From 3cc0e19239f497bd594e40be63906612adf38225 Mon Sep 17 00:00:00 2001 From: Tom Keller <1083460+kellertk@users.noreply.github.com> Date: Mon, 25 May 2026 12:19:31 -0700 Subject: [PATCH] chore: unstage devel changes (#1786) * Revert "chore: Update dist" This reverts commit e8614cfbf058de4c6c685b317488ecdec92a4305. * Revert "chore(deps): bump @aws-sdk/client-sts from 3.1045.0 to 3.1049.0 (#1782)" This reverts commit 4684f47f897062cba46d1973e47cb65a77ba3586. * Revert "chore: Update dist" This reverts commit 48b8685c96e9a05f07e38cb291428cee10ca5e99. * Revert "chore(deps-dev): bump @smithy/property-provider from 4.3.1 to 4.3.3 (#1783)" This reverts commit fe6ad3af1971161b5691b4f5ea26d4173facda46. * Revert "chore: Update dist" This reverts commit 2520c5e9216dbd207050d3b628f331c2eef189e1. * Revert "chore(deps-dev): bump @aws-sdk/credential-provider-env (#1784)" This reverts commit bc1093db1db8bd4f9aeed8eb93c038da7372fa04. * Revert "chore(deps-dev): bump @types/node from 25.7.0 to 25.9.0 (#1785)" This reverts commit ffde832a1dcd1b1bcfba9291c9e8a51f05fffc4a. * Revert "chore: Update dist" This reverts commit 707acd96f65bc307d7ffc3360f2e1c4fd0d9e248. * Revert "chore(deps): bump @smithy/node-http-handler from 4.7.1 to 4.7.3 (#1781)" This reverts commit a7c33ae483ce23c86f0fa288549e6389e2fd5486. * Revert "chore: update README for additional claim support (#1779)" This reverts commit 713aaabfecea015b1ad8d37dc2b819ee41c00eb0. * Revert "chore: Update dist" This reverts commit e6e8eba750b8541f77580405dced12152312f6ef. * Revert "fix: skip credential check on output-env-credentials: false (#1778)" This reverts commit 58e7c47adf77846879008deadfeeef8a6969fe6c. * Revert "chore: document forgejo compatibility (#1776)" This reverts commit f35a7d7d7e98a1ce791091d70771e2091cbb1519. * Revert "chore: Update dist" This reverts commit 3884f59ecd3ce795008f8473b3045734f08d18ad. * Revert "feat: add additional session tags by default (#1775)" This reverts commit e0ba7685077379a14a82d01fefd511490344ebfc. * Revert "chore: Update dist" This reverts commit 6795889618d79d99229f756707265940b9c929a0. * Revert "feat: expose run id in STS client user-agent (#1774)" This reverts commit 29d1be30273e7ef371d59fccf6ec54572c64ec89. * Revert "chore(deps-dev): bump @types/node from 25.6.0 to 25.7.0 (#1773)" This reverts commit ef734cca817839d2dcb4b1e3a7118492ebb4df39. * Revert "chore(deps-dev): bump @biomejs/biome from 2.4.14 to 2.4.15 (#1772)" This reverts commit 7521c5591073295b30b17971e3a0749c172fadce. * Revert "chore: Update dist" This reverts commit c0e2737f14c4eb148ab17eb7c172361aab9ee0ac. * Revert "chore(deps): bump @smithy/node-http-handler from 4.6.1 to 4.7.1 (#1770)" This reverts commit dbd503f3687b0d46ad5d401ca4ac2df0f17da523. * Revert "chore: Update dist" This reverts commit 18a236fbd1b9d2eaf21d23427ffa35669c894a15. * Revert "chore(deps-dev): bump @smithy/property-provider from 4.2.14 to 4.3.1 (#1771)" This reverts commit 1ab31502aaebb98cfdc4ced2b6e1a2c68b9d96f7. * Revert "chore(deps-dev): bump @vitest/coverage-v8 from 4.1.5 to 4.1.6 (#1768)" This reverts commit 1fb495c4b2bf15cc540e6a0747edae353cc57a1f. * Revert "chore: Update dist" This reverts commit 1e8fec8ea13fc374a47c637b92270f8b3075e121. * Revert "chore(deps): bump @aws-sdk/client-sts from 3.1044.0 to 3.1045.0 (#1767)" This reverts commit a388f23f7d89e91f0f8ac855d98ba70f7a280106. * Revert "chore: update documentation for environment workflows (#1766)" This reverts commit 3f7e1b63d77bea78bb0417be3ac5fffdd82e2678. * Revert "feat: add regex validation to role-session-name (#1765)" This reverts commit e35449909c6ede5083a48ba4b8bbfaaa1cf09ba1. * Revert "chore: Update dist" This reverts commit 958a80fc348ad2627a5e200adb46232a5ea4c1c8. * Revert "feat: add more retry logic and better logging (#1764)" This reverts commit 540d0c13aedb8d55501d220bd2f0b3cdedfe84e8. * Revert "chore: automate README version bumping (#1763)" This reverts commit 07ada0fe07a23e36e59cd9063b7fcd8900b01013. * Revert "chore: Update dist" This reverts commit f8d4eb68a96ad288bb26a801e2a970b7251f7e62. * Revert "feat: support custom STS endpoints (#1762)" This reverts commit 8d52d05d7a4521fa52b39de50cb6114b12e5c332. * Revert "chore: Update dist" This reverts commit 681892c11b95f935aee43b00e43466327707adba. * Revert "chore: configure codeql to ignore generated code (#1760)" This reverts commit dc2353e57a69ebbfa86a53c338dd0f60277e6b21. * Revert "feat: Allow custom session tags to be passed when assuming a role (#1759)" This reverts commit 61f50f630f383628add73c1eab3f1935ba07da2b. * Revert "chore: automatic major version tagging (#1565)" This reverts commit c36525a56725db0e07d7ff5df639c0af8ce4fe17. * Revert "chore: bump unit test node version (#1758)" This reverts commit 39d17027214c196ae8a0703cf80b50cb47ab1a38. * Revert "chore(deps): bump @aws-sdk/client-sts from 3.1043.0 to 3.1044.0 (#1754)" This reverts commit 4cfda40a13a617661c61bbea22188e90072afad0. * Revert "chore(deps-dev): bump @biomejs/biome from 2.4.13 to 2.4.14 (#1756)" This reverts commit 8856e12f3a91639ad32afe4fbb048dc8ba011847. * Revert "chore(deps): bump @actions/core from 2.0.3 to 3.0.1 (#1746)" This reverts commit 64d8e82527cd8f525f030178565e65c3e96985f0. * Revert "chore(deps-dev): bump vitest from 3.2.4 to 4.1.5 (#1748)" This reverts commit 78f374f6d1e7f4d1def8353d2a26416a3e668054. --- .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 | 564 +- action.yml | 7 +- dist/cleanup/index.js | 3920 ++- dist/index.js | 33060 ++++++++++++------------- package-lock.json | 6422 +++-- package.json | 22 +- src/CredentialsClient.ts | 25 +- src/assumeRole.ts | 134 +- src/helpers.ts | 31 +- src/index.ts | 138 +- test/cleanup.test.ts | 21 +- test/helpers.test.ts | 50 +- test/index.test.ts | 713 +- test/mockinputs.test.ts | 57 - test/profileManager.test.ts | 248 +- 20 files changed, 24501 insertions(+), 21311 deletions(-) delete mode 100644 .github/codeql/codeql-config.yml diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml deleted file mode 100644 index 3b07f53..0000000 --- a/.github/codeql/codeql-config.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: "CodeQL config" - -paths-ignore: - - dist - - node_modules diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index d53e6eb..b837d61 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -36,41 +36,10 @@ ${{ 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 - - - 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 + \ No newline at end of file diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml index cf697d0..7aa037d 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@v6.4.0 + uses: actions/setup-node@v4.4.0 with: - node-version: 24 + node-version: 20 - name: "Install dependencies" run: npm ci - name: "Run tests" diff --git a/.gitignore b/.gitignore index 6841d21..bc18168 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.history node_modules coverage .DS_Store diff --git a/README.md b/README.md index df38357..f53c131 100644 --- a/README.md +++ b/README.md @@ -1,76 +1,71 @@ # Configure AWS Credentials -Authenticate to AWS in GitHub Actions (and others)! Works especially well with +Authenticate to AWS in GitHub Actions! 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 @@ -86,8 +81,8 @@ below). 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. @@ -110,12 +105,11 @@ 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.
@@ -137,8 +131,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 @@ -150,36 +144,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 |
@@ -216,8 +210,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`. @@ -232,8 +226,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:
@@ -243,7 +237,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 }} @@ -254,9 +248,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 @@ -288,8 +282,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 @@ -322,12 +316,11 @@ 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 @@ -344,15 +337,13 @@ _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" | @@ -360,43 +351,21 @@ overridden via `custom-tags`: | Workflow | GITHUB_WORKFLOW | | Action | GITHUB_ACTION | | Actor | GITHUB_ACTOR | -| 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). +| Commit | GITHUB_SHA | _Note: all tag values must conform to -[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 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 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. @@ -413,23 +382,6 @@ 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 @@ -500,12 +452,6 @@ 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 @@ -570,42 +516,41 @@ 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], 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. +To align with the Amazon IAM best practice of +[granting least privilege][least-privilege], [least-privilege]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege -[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 +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. -#### Inspecting the token - -If you aren't sure what claim values your workflow is producing, the +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 [`actions-oidc-debugger`](https://github.com/github/actions-oidc-debugger) -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. +action to your workflow to see the value of the subject (`sub`) key, as well as +other claims. -See the GitHub [security-hardening guide][gh-oidc-hardening] for further -discussion of trust conditions and threat modeling. +Additional claim conditions can be added for higher specificity as explained in +the +[GitHub documentation][gh-oidc-hardening]. [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 @@ -617,28 +562,6 @@ 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 @@ -736,13 +659,6 @@ 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 @@ -775,8 +691,8 @@ the credentials were never written to the environment. 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 @@ -789,7 +705,6 @@ 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 106e016..24c6a78 100644 --- a/THIRD-PARTY +++ b/THIRD-PARTY @@ -431,12 +431,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----------- -The following npm packages may be included in this product: +The following npm package may be included in this product: - - @aws-crypto/crc32@5.2.0 - @aws-crypto/util@5.2.0 -These packages each contain the following license: +This package contains the following license: Apache License Version 2.0, January 2004 @@ -642,11 +641,20 @@ Apache License ----------- -The following npm package may be included in this product: +The following npm packages may be included in this product: - - @aws-sdk/client-sts@3.1049.0 + - @aws-sdk/client-sts@3.1038.0 + - @aws-sdk/util-user-agent-browser@3.972.10 + - @aws-sdk/util-user-agent-node@3.973.22 + - @smithy/middleware-retry@4.5.6 + - @smithy/querystring-builder@4.2.14 + - @smithy/querystring-parser@4.2.14 + - @smithy/service-error-classification@4.3.1 + - @smithy/url-parser@4.2.14 + - @smithy/util-defaults-mode-browser@4.3.49 + - @smithy/util-defaults-mode-node@4.2.54 -This package contains the following license: +These packages each contain the following license: Apache License Version 2.0, January 2004 @@ -854,9 +862,17 @@ Apache License The following npm packages may be included in this product: - - @aws-sdk/signature-v4-multi-region@3.996.27 - - @smithy/core@3.24.3 - - @smithy/types@4.14.2 + - @aws-sdk/middleware-host-header@3.972.10 + - @aws-sdk/middleware-recursion-detection@3.972.11 + - @aws-sdk/middleware-sdk-s3@3.972.35 + - @aws-sdk/middleware-user-agent@3.972.36 + - @aws-sdk/signature-v4-multi-region@3.996.23 + - @smithy/core@3.23.17 + - @smithy/invalid-dependency@4.2.14 + - @smithy/middleware-serde@4.2.20 + - @smithy/protocol-http@5.3.14 + - @smithy/smithy-client@4.12.13 + - @smithy/types@4.14.1 These packages each contain the following license: @@ -1224,7 +1240,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The following npm package may be included in this product: - - @actions/http-client@4.0.1 + - @actions/http-client@3.0.2 This package contains the following license: @@ -1254,7 +1270,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.12 + - @aws-sdk/core@3.974.6 This package contains the following license: @@ -1674,20 +1690,40 @@ Apache License The following npm packages may be included in this product: - - @aws-sdk/credential-provider-env@3.972.38 - - @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/credential-provider-env@3.972.32 + - @aws-sdk/credential-provider-ini@3.972.36 + - @aws-sdk/credential-provider-node@3.972.37 + - @aws-sdk/region-config-resolver@3.972.13 + - @aws-sdk/token-providers@3.1038.0 - @aws-sdk/types@3.973.8 + - @aws-sdk/util-arn-parser@3.972.3 + - @aws-sdk/util-endpoints@3.996.8 - @aws-sdk/util-locate-window@3.965.5 - - @aws-sdk/xml-builder@3.972.24 - - @smithy/credential-provider-imds@4.3.3 - - @smithy/fetch-http-handler@5.4.3 + - @aws-sdk/xml-builder@3.972.21 + - @smithy/config-resolver@4.4.17 + - @smithy/credential-provider-imds@4.2.14 + - @smithy/fetch-http-handler@5.3.17 + - @smithy/hash-node@4.2.14 - @smithy/is-array-buffer@2.2.0 - - @smithy/node-http-handler@4.7.3 - - @smithy/signature-v4@5.4.3 + - @smithy/is-array-buffer@4.2.2 + - @smithy/middleware-content-length@4.2.14 + - @smithy/middleware-endpoint@4.4.32 + - @smithy/middleware-stack@4.2.14 + - @smithy/node-http-handler@4.6.1 + - @smithy/property-provider@4.2.14 + - @smithy/shared-ini-file-loader@4.4.9 + - @smithy/signature-v4@5.3.14 + - @smithy/util-base64@4.3.2 + - @smithy/util-body-length-browser@4.2.2 + - @smithy/util-body-length-node@4.2.3 - @smithy/util-buffer-from@2.2.0 + - @smithy/util-buffer-from@4.2.2 + - @smithy/util-hex-encoding@4.2.2 + - @smithy/util-stream@4.5.25 + - @smithy/util-uri-escape@4.2.2 - @smithy/util-utf8@2.3.0 + - @smithy/util-utf8@4.2.2 + - @smithy/uuid@1.1.2 These packages each contain the following license: @@ -1897,9 +1933,9 @@ Apache License The following npm packages may be included in this product: - - @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/credential-provider-process@3.972.32 + - @aws-sdk/credential-provider-sso@3.972.36 + - @aws-sdk/credential-provider-web-identity@3.972.36 These packages each contain the following license: @@ -2109,9 +2145,433 @@ Apache License The following npm packages may be included in this product: - - @aws-sdk/credential-provider-http@3.972.40 - - @aws-sdk/credential-provider-login@3.972.42 - - @aws-sdk/nested-clients@3.997.10 + - @aws-sdk/middleware-logger@3.972.10 + - @smithy/node-config-provider@4.3.14 + - @smithy/util-config-provider@4.2.2 + +These packages each contain the following license: + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +----------- + +The following npm packages may be included in this product: + + - @smithy/util-endpoints@3.4.2 + - @smithy/util-middleware@4.2.14 + - @smithy/util-retry@4.3.5 + +These packages each contain the following license: + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +----------- + +The following npm packages may be included in this product: + + - @aws-sdk/credential-provider-http@3.972.34 + - @aws-sdk/credential-provider-login@3.972.36 + - @aws-sdk/nested-clients@3.997.4 These packages each contain the following license: @@ -2121,7 +2581,7 @@ Apache-2.0 The following npm package may be included in this product: - - ip-address@10.2.0 + - ip-address@10.0.1 This package contains the following license: @@ -2208,7 +2668,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The following npm package may be included in this product: - - basic-ftp@5.3.1 + - basic-ftp@5.3.0 This package contains the following license: @@ -2336,8 +2796,8 @@ 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 - quickjs-wasi@2.2.0 - - xml-naming@0.1.0 These packages each contain the following license: @@ -2347,37 +2807,7 @@ 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 + - fast-xml-parser@5.7.2 This package contains the following license: @@ -2407,7 +2837,7 @@ SOFTWARE. The following npm package may be included in this product: - - strnum@2.3.0 + - strnum@2.2.3 This package contains the following license: @@ -2467,7 +2897,7 @@ SOFTWARE. The following npm package may be included in this product: - - fast-xml-builder@1.2.0 + - fast-xml-builder@1.1.5 This package contains the following license: @@ -2497,7 +2927,7 @@ SOFTWARE. The following npm package may be included in this product: - - undici@6.25.0 + - undici@6.24.0 This package contains the following license: @@ -2639,7 +3069,7 @@ THE SOFTWARE. The following npm package may be included in this product: - - socks@2.8.8 + - socks@2.8.7 This package contains the following license: @@ -2727,9 +3157,9 @@ SOFTWARE. The following npm packages may be included in this product: - - @actions/core@3.0.1 - - @actions/exec@3.0.0 - - @actions/io@3.0.2 + - @actions/core@2.0.2 + - @actions/exec@2.0.0 + - @actions/io@2.0.0 These packages each contain the following license: diff --git a/action.yml b/action.yml index 318c99d..e6448c7 100644 --- a/action.yml +++ b/action.yml @@ -1,3 +1,4 @@ + name: '"Configure AWS Credentials" Action for GitHub Actions' description: Configures AWS credentials for use in subsequent steps in a GitHub Action workflow runs: @@ -100,12 +101,6 @@ 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 4256724..e2a6694 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -30,6 +30,287 @@ 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 fs = __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 (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.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) { @@ -41,28 +322,28 @@ var require_tunnel = __commonJS({ var events = require("events"); var assert = require("assert"); var util = require("util"); - exports2.httpOverHttp = httpOverHttp2; - exports2.httpsOverHttp = httpsOverHttp2; - exports2.httpOverHttps = httpOverHttps2; - exports2.httpsOverHttps = httpsOverHttps2; - function httpOverHttp2(options) { + exports2.httpOverHttp = httpOverHttp; + exports2.httpsOverHttp = httpsOverHttp; + exports2.httpOverHttps = httpOverHttps; + exports2.httpsOverHttps = httpsOverHttps; + function httpOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; return agent; } - function httpsOverHttp2(options) { + function httpsOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; } - function httpOverHttps2(options) { + function httpOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; return agent; } - function httpsOverHttps2(options) { + function httpsOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; agent.createSocket = createSecureSocket; @@ -158,18 +439,18 @@ var require_tunnel = __commonJS({ 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 error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error.code = "ECONNRESET"; + options.request.emit("error", error); self.removeSocket(placeholder); return; } if (head.length > 0) { debug2("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 error = new Error("got illegal response body from proxy"); + error.code = "ECONNRESET"; + options.request.emit("error", error); self.removeSocket(placeholder); return; } @@ -184,9 +465,9 @@ var require_tunnel = __commonJS({ 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 error = new Error("tunneling socket could not be established, cause=" + cause.message); + error.code = "ECONNRESET"; + options.request.emit("error", error); self.removeSocket(placeholder); } }; @@ -1515,14 +1796,14 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version, protocol, port, host }, - error: error2 + error } = evt; debuglog( "connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version, - error2.message + error.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -1553,14 +1834,14 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { request: { method, path, origin }, - error: error2 + error } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, path, - error2.message + error.message ); }); isClientSet = true; @@ -1595,7 +1876,7 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version, protocol, port, host }, - error: error2 + error } = evt; debuglog( "connection to %s%s using %s%s errored - %s", @@ -1603,7 +1884,7 @@ var require_diagnostics = __commonJS({ port ? `:${port}` : "", protocol, version, - error2.message + error.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -1873,16 +2154,16 @@ var require_request = __commonJS({ this.onError(err); } } - onError(error2) { + onError(error) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error2 }); + channels.error.publish({ request: this, error }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error2); + return this[kHandler].onError(error); } onFinally() { if (this.errorHandler) { @@ -2046,20 +2327,13 @@ 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(opts) { + constructor() { 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]; @@ -2612,7 +2886,7 @@ var require_connect = __commonJS({ }); // node_modules/undici/lib/llhttp/utils.js -var require_utils = __commonJS({ +var require_utils2 = __commonJS({ "node_modules/undici/lib/llhttp/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -2637,7 +2911,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_utils(); + var utils_1 = require_utils2(); var ERROR; (function(ERROR2) { ERROR2[ERROR2["OK"] = 0] = "OK"; @@ -4010,11 +4284,11 @@ var require_util2 = __commonJS({ var { isUint8Array } = require("node:util/types"); var { webidl } = require_webidl(); var supportedHashes = []; - var crypto2; + var crypto; try { - crypto2 = require("node:crypto"); + crypto = require("node:crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -4287,7 +4561,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto2 === void 0) { + if (crypto === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -4302,7 +4576,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5366,8 +5640,8 @@ var require_body = __commonJS({ var { multipartFormDataParser } = require_formdata_parser(); var random; try { - const crypto2 = require("node:crypto"); - random = (max) => crypto2.randomInt(0, max); + const crypto = require("node:crypto"); + random = (max) => crypto.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5612,7 +5886,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r } throwIfAborted(object[kState]); const promise = createDeferredPromise(); - const errorSteps = (error2) => promise.reject(error2); + const errorSteps = (error) => promise.reject(error); const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)); @@ -5707,7 +5981,7 @@ var require_client_h1 = __commonJS({ kResume, kHTTPContext } = require_symbols(); - var constants3 = require_constants2(); + var constants = require_constants2(); var EMPTY_BUF = Buffer.alloc(0); var FastBuffer = Buffer[Symbol.species]; var addListener = util.addListener; @@ -5779,7 +6053,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(constants3.TYPE.RESPONSE); + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); this.client = client; this.socket = socket; this.timeout = null; @@ -5874,19 +6148,19 @@ var require_client_h1 = __commonJS({ currentBufferRef = null; } const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; - if (ret === constants3.ERROR.PAUSED_UPGRADE) { + if (ret === constants.ERROR.PAUSED_UPGRADE) { this.onUpgrade(data.slice(offset)); - } else if (ret === constants3.ERROR.PAUSED) { + } else if (ret === constants.ERROR.PAUSED) { this.paused = true; socket.unshift(data.slice(offset)); - } else if (ret !== constants3.ERROR.OK) { + } else if (ret !== constants.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, constants3.ERROR[ret], data.slice(offset)); + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); } } catch (err) { util.destroy(socket, err); @@ -6061,7 +6335,7 @@ var require_client_h1 = __commonJS({ socket[kBlocking] = false; client[kResume](); } - return pause ? constants3.ERROR.PAUSED : 0; + return pause ? constants.ERROR.PAUSED : 0; } onBody(buf) { const { client, socket, statusCode, maxResponseSize } = this; @@ -6083,7 +6357,7 @@ var require_client_h1 = __commonJS({ } this.bytesRead += buf.length; if (request.onData(buf) === false) { - return constants3.ERROR.PAUSED; + return constants.ERROR.PAUSED; } } onMessageComplete() { @@ -6118,13 +6392,13 @@ var require_client_h1 = __commonJS({ if (socket[kWriting]) { assert(client[kRunning] === 0); util.destroy(socket, new InformationalError("reset")); - return constants3.ERROR.PAUSED; + return constants.ERROR.PAUSED; } else if (!shouldKeepAlive) { util.destroy(socket, new InformationalError("reset")); - return constants3.ERROR.PAUSED; + return constants.ERROR.PAUSED; } else if (socket[kReset] && client[kRunning] === 0) { util.destroy(socket, new InformationalError("reset")); - return constants3.ERROR.PAUSED; + return constants.ERROR.PAUSED; } else if (client[kPipelining] == null || client[kPipelining] === 1) { setImmediate(() => client[kResume]()); } else { @@ -7120,8 +7394,8 @@ var require_client_h2 = __commonJS({ } request.onRequestSent(); client[kResume](); - } catch (error2) { - abort(error2); + } catch (error) { + abort(error); } } function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { @@ -7276,8 +7550,8 @@ var require_redirect_handler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error2) { - this.handler.onError(error2); + onError(error) { + this.handler.onError(error); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -7498,10 +7772,9 @@ var require_client = __commonJS({ autoSelectFamilyAttemptTimeout, // h2 maxConcurrentStreams, - allowH2, - webSocket + allowH2 } = {}) { - super({ webSocket }); + super(); if (keepAlive !== void 0) { throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); } @@ -8007,8 +8280,8 @@ var require_pool_base = __commonJS({ var kRemoveClient = /* @__PURE__ */ Symbol("remove client"); var kStats = /* @__PURE__ */ Symbol("stats"); var PoolBase = class extends DispatcherBase { - constructor(opts) { - super(opts); + constructor() { + super(); this[kQueue] = new FixedQueue(); this[kClients] = []; this[kQueued] = 0; @@ -8179,6 +8452,7 @@ var require_pool = __commonJS({ allowH2, ...options } = {}) { + super(); if (connections != null && (!Number.isFinite(connections) || connections < 0)) { throw new InvalidArgumentError("invalid connections"); } @@ -8199,14 +8473,13 @@ 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, error2) => { + this.on("connectionError", (origin2, targets, error) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -8399,6 +8672,7 @@ 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."); } @@ -8408,7 +8682,6 @@ 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 }; } @@ -8551,7 +8824,7 @@ var require_proxy_agent = __commonJS({ return this.#client.destroy(err); } }; - var ProxyAgent2 = class extends DispatcherBase { + var ProxyAgent = class extends DispatcherBase { constructor(opts) { super(); if (!opts || typeof opts === "object" && !(opts instanceof URL2) && !opts.uri) { @@ -8692,7 +8965,7 @@ var require_proxy_agent = __commonJS({ throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); } } - module2.exports = ProxyAgent2; + module2.exports = ProxyAgent; } }); @@ -8702,7 +8975,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 ProxyAgent2 = require_proxy_agent(); + var ProxyAgent = require_proxy_agent(); var Agent = require_agent(); var DEFAULT_PORTS = { "http:": 80, @@ -8726,13 +8999,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 ProxyAgent2({ ...agentOpts, uri: HTTP_PROXY }); + this[kHttpProxyAgent] = new ProxyAgent({ ...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 ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY }); } else { this[kHttpsProxyAgent] = this[kHttpProxyAgent]; } @@ -10573,13 +10846,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: error2 }, delay, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error2 !== null) { + if (error !== null) { deleteMockDispatch(this[kDispatches], key); - handler.onError(error2); + handler.onError(error); return true; } if (typeof delay === "number" && delay > 0) { @@ -10617,19 +10890,19 @@ var require_mock_utils = __commonJS({ if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler); - } catch (error2) { - if (error2 instanceof MockNotMatchedError) { + } catch (error) { + if (error 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(`${error.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(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error2; + throw error; } } } else { @@ -10794,11 +11067,11 @@ var require_mock_interceptor = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error2) { - if (typeof error2 === "undefined") { + replyWithError(error) { + if (typeof error === "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 }); return new MockScope(newMockDispatch); } /** @@ -11759,12 +12032,12 @@ var require_headers = __commonJS({ append(name, value, isLowerCase) { this[kHeadersSortedMap] = null; const lowercaseName = isLowerCase ? name : name.toLowerCase(); - const exists2 = this[kHeadersMap].get(lowercaseName); - if (exists2) { + const exists = this[kHeadersMap].get(lowercaseName); + if (exists) { const delimiter = lowercaseName === "cookie" ? "; " : ", "; this[kHeadersMap].set(lowercaseName, { - name: exists2.name, - value: `${exists2.value}${delimiter}${value}` + name: exists.name, + value: `${exists.value}${delimiter}${value}` }); } else { this[kHeadersMap].set(lowercaseName, { name, value }); @@ -11889,7 +12162,7 @@ var require_headers = __commonJS({ } } }; - var Headers2 = class _Headers { + var Headers = class _Headers { #guard; #headersList; constructor(init = void 0) { @@ -12039,13 +12312,13 @@ var require_headers = __commonJS({ o.#headersList = list; } }; - 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, { + 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, { append: kEnumerableProperty, delete: kEnumerableProperty, get: kEnumerableProperty, @@ -12063,7 +12336,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 === Headers2.prototype.entries) { + if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { try { return getHeadersList(V).entriesList; } catch { @@ -12084,7 +12357,7 @@ var require_headers = __commonJS({ fill, // for test. compareHeaderName, - Headers: Headers2, + Headers, HeadersList, getHeadersGuard, setHeadersGuard, @@ -12098,7 +12371,7 @@ var require_headers = __commonJS({ var require_response = __commonJS({ "node_modules/undici/lib/web/fetch/response.js"(exports2, module2) { "use strict"; - var { Headers: Headers2, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); + var { Headers, 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"); @@ -12176,7 +12449,7 @@ var require_response = __commonJS({ } init = webidl.converters.ResponseInit(init); this[kState] = makeResponse({}); - this[kHeaders] = new Headers2(kConstruct); + this[kHeaders] = new Headers(kConstruct); setHeadersGuard(this[kHeaders], "response"); setHeadersList(this[kHeaders], this[kState].headersList); let bodyWithType = null; @@ -12420,7 +12693,7 @@ var require_response = __commonJS({ function fromInnerResponse(innerResponse, guard) { const response = new Response(kConstruct); response[kState] = innerResponse; - response[kHeaders] = new Headers2(kConstruct); + response[kHeaders] = new Headers(kConstruct); setHeadersList(response[kHeaders], innerResponse.headersList); setHeadersGuard(response[kHeaders], guard); if (hasFinalizationRegistry && innerResponse.body?.stream) { @@ -12540,7 +12813,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: Headers2, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); + var { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); var { FinalizationRegistry: FinalizationRegistry2 } = require_dispatcher_weakref()(); var util = require_util(); var nodeUtil = require("node:util"); @@ -12808,7 +13081,7 @@ var require_request2 = __commonJS({ requestFinalizer.register(ac, { signal, abort }, abort); } } - this[kHeaders] = new Headers2(kConstruct); + this[kHeaders] = new Headers(kConstruct); setHeadersList(this[kHeaders], request.headersList); setHeadersGuard(this[kHeaders], "request"); if (mode === "no-cors") { @@ -13097,7 +13370,7 @@ var require_request2 = __commonJS({ const request = new Request(kConstruct); request[kState] = innerRequest; request[kSignal] = signal; - request[kHeaders] = new Headers2(kConstruct); + request[kHeaders] = new Headers(kConstruct); setHeadersList(request[kHeaders], innerRequest.headersList); setHeadersGuard(request[kHeaders], guard); return request; @@ -13316,17 +13589,17 @@ var require_fetch = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error2) { + abort(error) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error2) { - error2 = new DOMException("The operation was aborted.", "AbortError"); + if (!error) { + error = new DOMException("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error2; - this.connection?.destroy(error2); - this.emit("terminated", error2); + this.serializedAbortReason = error; + this.connection?.destroy(error); + this.emit("terminated", error); } }; function handleFetchDone(response) { @@ -13422,12 +13695,12 @@ var require_fetch = __commonJS({ ); } var markResourceTiming = performance.markResourceTiming; - function abortFetch(p, request, responseObject, error2) { + function abortFetch(p, request, responseObject, error) { if (p) { - p.reject(error2); + p.reject(error); } if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error2).catch((err) => { + request.body.stream.cancel(error).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13439,7 +13712,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(error).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -14260,13 +14533,13 @@ var require_fetch = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error2) { + onError(error) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error2); - fetchParams.controller.terminate(error2); - reject(error2); + this.body?.destroy(error); + fetchParams.controller.terminate(error); + reject(error); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) { @@ -14729,8 +15002,8 @@ var require_util4 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error2) { - fr[kError] = error2; + } catch (error) { + fr[kError] = error; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -14739,13 +15012,13 @@ var require_util4 = __commonJS({ }); break; } - } catch (error2) { + } catch (error) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error2; + fr[kError] = error; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -16135,10 +16408,10 @@ var require_cookies = __commonJS({ var { parseSetCookie } = require_parse(); var { stringify } = require_util6(); var { webidl } = require_webidl(); - var { Headers: Headers2 } = require_headers(); + var { Headers } = require_headers(); function getCookies(headers) { webidl.argumentLengthCheck(arguments, 1, "getCookies"); - webidl.brandCheck(headers, Headers2, { strict: false }); + webidl.brandCheck(headers, Headers, { strict: false }); const cookie = headers.get("cookie"); const out = {}; if (!cookie) { @@ -16151,7 +16424,7 @@ var require_cookies = __commonJS({ return out; } function deleteCookie(headers, name, attributes) { - webidl.brandCheck(headers, Headers2, { strict: false }); + webidl.brandCheck(headers, Headers, { strict: false }); const prefix = "deleteCookie"; webidl.argumentLengthCheck(arguments, 2, prefix); name = webidl.converters.DOMString(name, prefix, "name"); @@ -16165,7 +16438,7 @@ var require_cookies = __commonJS({ } function getSetCookies(headers) { webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); - webidl.brandCheck(headers, Headers2, { strict: false }); + webidl.brandCheck(headers, Headers, { strict: false }); const cookies = headers.getSetCookie(); if (!cookies) { return []; @@ -16174,7 +16447,7 @@ var require_cookies = __commonJS({ } function setCookie(headers, cookie) { webidl.argumentLengthCheck(arguments, 2, "setCookie"); - webidl.brandCheck(headers, Headers2, { strict: false }); + webidl.brandCheck(headers, Headers, { strict: false }); cookie = webidl.converters.Cookie(cookie); const str = stringify(cookie); if (str) { @@ -16776,13 +17049,13 @@ var require_frame = __commonJS({ "use strict"; var { maxUnsigned16Bit } = require_constants5(); var BUFFER_SIZE = 16386; - var crypto2; + var crypto; var buffer = null; var bufIdx = BUFFER_SIZE; try { - crypto2 = require("node:crypto"); + crypto = require("node:crypto"); } catch { - crypto2 = { + crypto = { // not full compatibility, but minimum. randomFillSync: function randomFillSync(buffer2, _offset, _size) { for (let i = 0; i < buffer2.length; ++i) { @@ -16795,7 +17068,7 @@ var require_frame = __commonJS({ function generateMask() { if (bufIdx === BUFFER_SIZE) { bufIdx = 0; - crypto2.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + crypto.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); } return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]]; } @@ -16864,12 +17137,12 @@ var require_connection = __commonJS({ var { CloseEvent } = require_events(); var { makeRequest } = require_request2(); var { fetching } = require_fetch(); - var { Headers: Headers2, getHeadersList } = require_headers(); + var { Headers, getHeadersList } = require_headers(); var { getDecodeSplit } = require_util2(); var { WebsocketFrameSend } = require_frame(); - var crypto2; + var crypto; try { - crypto2 = require("node:crypto"); + crypto = require("node:crypto"); } catch { } function establishWebSocketConnection(url, protocols, client, ws, onEstablish, options) { @@ -16886,10 +17159,10 @@ var require_connection = __commonJS({ redirect: "error" }); if (options.headers) { - const headersList = getHeadersList(new Headers2(options.headers)); + const headersList = getHeadersList(new Headers(options.headers)); request.headersList = headersList; } - const keyValue = crypto2.randomBytes(16).toString("base64"); + const keyValue = crypto.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16919,7 +17192,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -17017,11 +17290,11 @@ var require_connection = __commonJS({ }); } } - function onSocketError(error2) { + function onSocketError(error) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error2); + channels.socketError.publish(error); } this.destroy(); } @@ -17042,26 +17315,31 @@ 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 = {}; - #maxPayloadSize = 0; + /** @type {number} */ + #maxDecompressedSize; + /** @type {boolean} */ + #aborted = false; + /** @type {Function|null} */ + #currentCallback = null; /** * @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.#maxPayloadSize = options.maxPayloadSize; + this.#maxDecompressedSize = options.maxDecompressedMessageSize ?? kDefaultMaxDecompressedSize; } - /** - * 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) { @@ -17080,11 +17358,20 @@ 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.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { - callback(new MessageSizeExceededError()); + if (this.#inflate[kLength] > this.#maxDecompressedSize) { + this.#aborted = true; 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); @@ -17094,17 +17381,19 @@ 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.#inflate) { + if (this.#aborted || !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); }); } @@ -17135,10 +17424,8 @@ 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; @@ -17146,18 +17433,18 @@ var require_receiver = __commonJS({ #fragments = []; /** @type {Map} */ #extensions; - /** @type {number} */ - #maxPayloadSize; + /** @type {{ maxDecompressedMessageSize?: number }} */ + #options; /** * @param {import('./websocket').WebSocket} ws * @param {Map|null} extensions - * @param {{ maxPayloadSize?: number }} [options] + * @param {{ maxDecompressedMessageSize?: number }} [options] */ constructor(ws, extensions, options = {}) { super(); this.ws = ws; this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; - this.#maxPayloadSize = options.maxPayloadSize ?? 0; + this.#options = options; if (this.#extensions.has("permessage-deflate")) { this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions, options)); } @@ -17172,13 +17459,6 @@ 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, @@ -17238,9 +17518,6 @@ 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) { @@ -17261,9 +17538,6 @@ 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(); @@ -17277,9 +17551,6 @@ 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(); @@ -17290,41 +17561,32 @@ var require_receiver = __commonJS({ this.#state = parserStates.INFO; } else { if (!this.#info.compressed) { - this.writeFragments(body); - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message); - return; - } + this.#fragments.push(body); if (!this.#info.fragmented && this.#info.fin) { - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + const fullMessage = Buffer.concat(this.#fragments); + websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage); + this.#fragments.length = 0; } this.#state = parserStates.INFO; } else { - 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); + 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.#loop = true; + 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; } @@ -17367,21 +17629,6 @@ 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; @@ -17593,6 +17840,8 @@ var require_websocket = __commonJS({ #extensions = ""; /** @type {SendQueue} */ #sendQueue; + /** @type {{ maxDecompressedMessageSize?: number }} */ + #options; /** * @param {string} url * @param {string|string[]} protocols @@ -17636,6 +17885,9 @@ 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, @@ -17819,10 +18071,7 @@ var require_websocket = __commonJS({ */ #onConnectionEstablished(response, parsedExtensions) { this[kResponse] = response; - const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize; - const parser = new ByteParser(this, parsedExtensions, { - maxPayloadSize - }); + const parser = new ByteParser(this, parsedExtensions, this.#options); parser.on("drain", onParserDrain); parser.on("error", onParserError.bind(this)); response.socket.ws = this; @@ -17897,6 +18146,19 @@ 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) { @@ -18359,8 +18621,8 @@ var require_eventsource = __commonJS({ pipeline( response.body.stream, eventSourceStream, - (error2) => { - if (error2?.aborted === false) { + (error) => { + if (error?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -18500,7 +18762,7 @@ var require_undici = __commonJS({ var Pool = require_pool(); var BalancedPool = require_balanced_pool(); var Agent = require_agent(); - var ProxyAgent2 = require_proxy_agent(); + var ProxyAgent = require_proxy_agent(); var EnvHttpProxyAgent = require_env_http_proxy_agent(); var RetryAgent = require_retry_agent(); var errors = require_errors(); @@ -18523,7 +18785,7 @@ var require_undici = __commonJS({ module2.exports.Pool = Pool; module2.exports.BalancedPool = BalancedPool; module2.exports.Agent = Agent; - module2.exports.ProxyAgent = ProxyAgent2; + module2.exports.ProxyAgent = ProxyAgent; module2.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; module2.exports.RetryAgent = RetryAgent; module2.exports.RetryHandler = RetryHandler; @@ -18633,510 +18895,2714 @@ 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 fs = __importStar(require("fs")); + var path = __importStar(require("path")); + _a = fs.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 fs.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs.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); - -// 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); -} +var core2 = __toESM(require_core()); // src/helpers.ts -function errorMessage(error2) { - return error2 instanceof Error ? error2.message : String(error2); +var core = __toESM(require_core()); +function errorMessage(error) { + return error instanceof Error ? error.message : String(error); } function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; const optionsWithoutDefault = { ...options }; delete optionsWithoutDefault.default; - const val = getInput(name, optionsWithoutDefault); + const val = core.getInput(name, optionsWithoutDefault); if (trueValue.includes(val)) return true; if (falseValue.includes(val)) return false; if (val === "") return options?.default ?? false; @@ -19148,27 +21614,27 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\`` // src/cleanup/index.ts function cleanup() { - const awsProfile = getInput("aws-profile", { required: false }); + const awsProfile = core2.getInput("aws-profile", { required: false }); if (getBooleanInput("output-env-credentials", { required: false, default: !awsProfile })) { try { - 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", ""); + 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", ""); } - } catch (error2) { - setFailed(errorMessage(error2)); + } catch (error) { + core2.setFailed(errorMessage(error)); } } } if (require.main === module) { try { cleanup(); - } catch (error2) { - setFailed(errorMessage(error2)); + } catch (error) { + core2.setFailed(errorMessage(error)); } } // Annotate the CommonJS export names for ESM import in node: diff --git a/dist/index.js b/dist/index.js index 5b30eaf..abaf387 100644 --- a/dist/index.js +++ b/dist/index.js @@ -33,41 +33,322 @@ 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 Command(command, properties, message); + process.stdout.write(cmd.toString() + os3.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 __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 fs3 = __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 (!fs3.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs3.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 http6 = require("http"); - var https5 = require("https"); + var http5 = require("http"); + var https4 = require("https"); var events = require("events"); var assert4 = require("assert"); var util = require("util"); - exports2.httpOverHttp = httpOverHttp2; - exports2.httpsOverHttp = httpsOverHttp2; - exports2.httpOverHttps = httpOverHttps2; - exports2.httpsOverHttps = httpsOverHttps2; - function httpOverHttp2(options) { + exports2.httpOverHttp = httpOverHttp; + exports2.httpsOverHttp = httpsOverHttp; + exports2.httpOverHttps = httpOverHttps; + exports2.httpsOverHttps = httpsOverHttps; + function httpOverHttp(options) { var agent = new TunnelingAgent(options); - agent.request = http6.request; + agent.request = http5.request; return agent; } - function httpsOverHttp2(options) { + function httpsOverHttp(options) { var agent = new TunnelingAgent(options); - agent.request = http6.request; + agent.request = http5.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; } - function httpOverHttps2(options) { + function httpOverHttps(options) { var agent = new TunnelingAgent(options); - agent.request = https5.request; + agent.request = https4.request; return agent; } - function httpsOverHttps2(options) { + function httpsOverHttps(options) { var agent = new TunnelingAgent(options); - agent.request = https5.request; + agent.request = https4.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; @@ -76,7 +357,7 @@ var require_tunnel = __commonJS({ var self = this; self.options = options || {}; self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http6.Agent.defaultMaxSockets; + self.maxSockets = self.options.maxSockets || http5.Agent.defaultMaxSockets; self.requests = []; self.sockets = []; self.on("free", function onFree(socket, host, port, localAddress) { @@ -136,7 +417,7 @@ var require_tunnel = __commonJS({ connectOptions.headers = connectOptions.headers || {}; connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } - debug17("making CONNECT request"); + debug19("making CONNECT request"); var connectReq = self.request(connectOptions); connectReq.useChunkedEncodingByDefault = false; connectReq.once("response", onResponse); @@ -156,40 +437,40 @@ var require_tunnel = __commonJS({ connectReq.removeAllListeners(); socket.removeAllListeners(); if (res.statusCode !== 200) { - debug17( + debug19( "tunneling socket could not be established, statusCode=%d", res.statusCode ); socket.destroy(); - var error3 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error3.code = "ECONNRESET"; - options.request.emit("error", error3); + 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) { - debug17("got illegal response body from proxy"); + debug19("got illegal response body from proxy"); socket.destroy(); - var error3 = new Error("got illegal response body from proxy"); - error3.code = "ECONNRESET"; - options.request.emit("error", error3); + var error2 = new Error("got illegal response body from proxy"); + error2.code = "ECONNRESET"; + options.request.emit("error", error2); self.removeSocket(placeholder); return; } - debug17("tunneling connection has established"); + debug19("tunneling connection has established"); self.sockets[self.sockets.indexOf(placeholder)] = socket; return cb(socket); } function onError(cause) { connectReq.removeAllListeners(); - debug17( + debug19( "tunneling socket could not be established, cause=%s\n", cause.message, cause.stack ); - var error3 = new Error("tunneling socket could not be established, cause=" + cause.message); - error3.code = "ECONNRESET"; - options.request.emit("error", error3); + var error2 = new Error("tunneling socket could not be established, cause=" + cause.message); + error2.code = "ECONNRESET"; + options.request.emit("error", error2); self.removeSocket(placeholder); } }; @@ -244,9 +525,9 @@ var require_tunnel = __commonJS({ } return target; } - var debug17; + var debug19; if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug17 = function() { + debug19 = function() { var args = Array.prototype.slice.call(arguments); if (typeof args[0] === "string") { args[0] = "TUNNEL: " + args[0]; @@ -256,10 +537,10 @@ var require_tunnel = __commonJS({ console.error.apply(console, args); }; } else { - debug17 = function() { + debug19 = function() { }; } - exports2.debug = debug17; + exports2.debug = debug19; } }); @@ -1040,7 +1321,7 @@ var require_util = __commonJS({ function isHttpOrHttpsPrefixed(value) { return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); } - function parseURL2(url) { + function parseURL(url) { if (typeof url === "string") { url = new URL(url); if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { @@ -1087,7 +1368,7 @@ var require_util = __commonJS({ return url; } function parseOrigin(url) { - url = parseURL2(url); + url = parseURL(url); if (url.pathname !== "/" || url.search || url.hash) { throw new InvalidArgumentError("invalid url"); } @@ -1422,7 +1703,7 @@ var require_util = __commonJS({ isUSVString, isBlobLike, parseOrigin, - parseURL: parseURL2, + parseURL, getServerName, isStream, isIterable, @@ -1518,14 +1799,14 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version, protocol, port, host }, - error: error3 + error: error2 } = evt; debuglog( "connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version, - error3.message + error2.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -1556,14 +1837,14 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { request: { method, path: path3, origin }, - error: error3 + error: error2 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, path3, - error3.message + error2.message ); }); isClientSet = true; @@ -1598,7 +1879,7 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version, protocol, port, host }, - error: error3 + error: error2 } = evt; debuglog( "connection to %s%s using %s%s errored - %s", @@ -1606,7 +1887,7 @@ var require_diagnostics = __commonJS({ port ? `:${port}` : "", protocol, version, - error3.message + error2.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -1674,7 +1955,7 @@ var require_request = __commonJS({ var { headerNameLowerCasedRecord } = require_constants(); var invalidPathRegex = /[^\u0021-\u00ff]/; var kHandler = /* @__PURE__ */ Symbol("handler"); - var Request = class { + var Request2 = class { constructor(origin, { path: path3, method, @@ -1876,16 +2157,16 @@ var require_request = __commonJS({ this.onError(err); } } - onError(error3) { + onError(error2) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error3 }); + channels.error.publish({ request: this, error: error2 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error3); + return this[kHandler].onError(error2); } onFinally() { if (this.errorHandler) { @@ -1976,7 +2257,7 @@ var require_request = __commonJS({ request.headers.push(key, val); } } - module2.exports = Request; + module2.exports = Request2; } }); @@ -2049,20 +2330,13 @@ 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(opts) { + constructor() { 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]; @@ -2615,7 +2889,7 @@ var require_connect = __commonJS({ }); // node_modules/undici/lib/llhttp/utils.js -var require_utils = __commonJS({ +var require_utils2 = __commonJS({ "node_modules/undici/lib/llhttp/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -2640,7 +2914,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_utils(); + var utils_1 = require_utils2(); var ERROR; (function(ERROR2) { ERROR2[ERROR2["OK"] = 0] = "OK"; @@ -4013,11 +4287,11 @@ var require_util2 = __commonJS({ var { isUint8Array } = require("node:util/types"); var { webidl } = require_webidl(); var supportedHashes = []; - var crypto4; + var crypto3; try { - crypto4 = require("node:crypto"); + crypto3 = require("node:crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto4.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto3.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -4290,7 +4564,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto4 === void 0) { + if (crypto3 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -4305,7 +4579,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto4.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto3.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5108,9 +5382,9 @@ var require_formdata_parser = __commonJS({ var filenameBuffer = Buffer.from("; filename"); var dd = Buffer.from("--"); var ddcrlf = Buffer.from("--\r\n"); - function isAsciiString(chars2) { - for (let i5 = 0; i5 < chars2.length; ++i5) { - if ((chars2.charCodeAt(i5) & ~127) !== 0) { + function isAsciiString(chars) { + for (let i5 = 0; i5 < chars.length; ++i5) { + if ((chars.charCodeAt(i5) & ~127) !== 0) { return false; } } @@ -5364,13 +5638,13 @@ var require_body = __commonJS({ var { Blob: Blob2 } = require("node:buffer"); var assert4 = require("node:assert"); var { isErrored, isDisturbed } = require("node:stream"); - var { isArrayBuffer: isArrayBuffer2 } = require("node:util/types"); + var { isArrayBuffer } = require("node:util/types"); var { serializeAMimeType } = require_data_url(); var { multipartFormDataParser } = require_formdata_parser(); var random; try { - const crypto4 = require("node:crypto"); - random = (max) => crypto4.randomInt(0, max); + const crypto3 = require("node:crypto"); + random = (max) => crypto3.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5418,7 +5692,7 @@ var require_body = __commonJS({ } else if (object instanceof URLSearchParams) { source = object.toString(); type = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isArrayBuffer2(object)) { + } else if (isArrayBuffer(object)) { source = new Uint8Array(object.slice()); } else if (ArrayBuffer.isView(object)) { source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); @@ -5615,7 +5889,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r } throwIfAborted(object[kState]); const promise = createDeferredPromise(); - const errorSteps = (error3) => promise.reject(error3); + const errorSteps = (error2) => promise.reject(error2); const successSteps = (data3) => { try { promise.resolve(convertBytesToJSValue(data3)); @@ -5710,7 +5984,7 @@ var require_client_h1 = __commonJS({ kResume, kHTTPContext } = require_symbols(); - var constants3 = require_constants2(); + var constants = require_constants2(); var EMPTY_BUF = Buffer.alloc(0); var FastBuffer = Buffer[Symbol.species]; var addListener = util.addListener; @@ -5782,7 +6056,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(constants3.TYPE.RESPONSE); + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); this.client = client; this.socket = socket; this.timeout = null; @@ -5877,19 +6151,19 @@ var require_client_h1 = __commonJS({ currentBufferRef = null; } const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; - if (ret === constants3.ERROR.PAUSED_UPGRADE) { + if (ret === constants.ERROR.PAUSED_UPGRADE) { this.onUpgrade(data3.slice(offset)); - } else if (ret === constants3.ERROR.PAUSED) { + } else if (ret === constants.ERROR.PAUSED) { this.paused = true; socket.unshift(data3.slice(offset)); - } else if (ret !== constants3.ERROR.OK) { + } else if (ret !== constants.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, constants3.ERROR[ret], data3.slice(offset)); + throw new HTTPParserError(message, constants.ERROR[ret], data3.slice(offset)); } } catch (err) { util.destroy(socket, err); @@ -6064,7 +6338,7 @@ var require_client_h1 = __commonJS({ socket[kBlocking] = false; client[kResume](); } - return pause ? constants3.ERROR.PAUSED : 0; + return pause ? constants.ERROR.PAUSED : 0; } onBody(buf) { const { client, socket, statusCode, maxResponseSize } = this; @@ -6086,7 +6360,7 @@ var require_client_h1 = __commonJS({ } this.bytesRead += buf.length; if (request.onData(buf) === false) { - return constants3.ERROR.PAUSED; + return constants.ERROR.PAUSED; } } onMessageComplete() { @@ -6121,13 +6395,13 @@ var require_client_h1 = __commonJS({ if (socket[kWriting]) { assert4(client[kRunning] === 0); util.destroy(socket, new InformationalError("reset")); - return constants3.ERROR.PAUSED; + return constants.ERROR.PAUSED; } else if (!shouldKeepAlive) { util.destroy(socket, new InformationalError("reset")); - return constants3.ERROR.PAUSED; + return constants.ERROR.PAUSED; } else if (socket[kReset] && client[kRunning] === 0) { util.destroy(socket, new InformationalError("reset")); - return constants3.ERROR.PAUSED; + return constants.ERROR.PAUSED; } else if (client[kPipelining] == null || client[kPipelining] === 1) { setImmediate(() => client[kResume]()); } else { @@ -7123,8 +7397,8 @@ var require_client_h2 = __commonJS({ } request.onRequestSent(); client[kResume](); - } catch (error3) { - abort(error3); + } catch (error2) { + abort(error2); } } function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { @@ -7279,8 +7553,8 @@ var require_redirect_handler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error3) { - this.handler.onError(error3); + onError(error2) { + this.handler.onError(error2); } onHeaders(statusCode, headers, resume3, statusText) { this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -7405,10 +7679,10 @@ var require_client = __commonJS({ "use strict"; var assert4 = require("node:assert"); var net11 = require("node:net"); - var http6 = require("node:http"); + var http5 = require("node:http"); var util = require_util(); var { channels } = require_diagnostics(); - var Request = require_request(); + var Request2 = require_request(); var DispatcherBase = require_dispatcher_base(); var { InvalidArgumentError, @@ -7467,7 +7741,7 @@ var require_client = __commonJS({ function getPipelining(client) { return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; } - var Client3 = class extends DispatcherBase { + var Client2 = class extends DispatcherBase { /** * * @param {string|URL} url @@ -7501,10 +7775,9 @@ var require_client = __commonJS({ autoSelectFamilyAttemptTimeout, // h2 maxConcurrentStreams, - allowH2, - webSocket + allowH2 } = {}) { - super({ webSocket }); + super(); if (keepAlive !== void 0) { throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); } @@ -7593,7 +7866,7 @@ var require_client = __commonJS({ this[kUrl] = util.parseOrigin(url); this[kConnector] = connect14; this[kPipelining] = pipelining != null ? pipelining : 1; - this[kMaxHeadersSize] = maxHeaderSize || http6.maxHeaderSize; + this[kMaxHeadersSize] = maxHeaderSize || http5.maxHeaderSize; this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; @@ -7650,7 +7923,7 @@ var require_client = __commonJS({ } [kDispatch](opts, handler) { const origin = opts.origin || this[kUrl].origin; - const request = new Request(origin, opts, handler); + const request = new Request2(origin, opts, handler); this[kQueue].push(request); if (this[kResuming]) { } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { @@ -7896,7 +8169,7 @@ var require_client = __commonJS({ } } } - module2.exports = Client3; + module2.exports = Client2; } }); @@ -8010,8 +8283,8 @@ var require_pool_base = __commonJS({ var kRemoveClient = /* @__PURE__ */ Symbol("remove client"); var kStats = /* @__PURE__ */ Symbol("stats"); var PoolBase = class extends DispatcherBase { - constructor(opts) { - super(opts); + constructor() { + super(); this[kQueue] = new FixedQueue(); this[kClients] = []; this[kQueued] = 0; @@ -8155,7 +8428,7 @@ var require_pool = __commonJS({ kAddClient, kGetDispatcher } = require_pool_base(); - var Client3 = require_client(); + var Client2 = require_client(); var { InvalidArgumentError } = require_errors(); @@ -8166,7 +8439,7 @@ var require_pool = __commonJS({ var kConnections = /* @__PURE__ */ Symbol("connections"); var kFactory = /* @__PURE__ */ Symbol("factory"); function defaultFactory(origin, opts) { - return new Client3(origin, opts); + return new Client2(origin, opts); } var Pool = class extends PoolBase { constructor(origin, { @@ -8182,6 +8455,7 @@ var require_pool = __commonJS({ allowH2, ...options } = {}) { + super(); if (connections != null && (!Number.isFinite(connections) || connections < 0)) { throw new InvalidArgumentError("invalid connections"); } @@ -8202,14 +8476,13 @@ 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, error3) => { + this.on("connectionError", (origin2, targets, error2) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -8387,7 +8660,7 @@ var require_agent = __commonJS({ var { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols(); var DispatcherBase = require_dispatcher_base(); var Pool = require_pool(); - var Client3 = require_client(); + var Client2 = require_client(); var util = require_util(); var createRedirectInterceptor = require_redirect_interceptor(); var kOnConnect = /* @__PURE__ */ Symbol("onConnect"); @@ -8398,10 +8671,11 @@ var require_agent = __commonJS({ var kFactory = /* @__PURE__ */ Symbol("factory"); var kOptions = /* @__PURE__ */ Symbol("options"); function defaultFactory(origin, opts) { - return opts && opts.connections === 1 ? new Client3(origin, opts) : new Pool(origin, opts); + return opts && opts.connections === 1 ? new Client2(origin, opts) : new Pool(origin, opts); } - var Agent9 = class extends DispatcherBase { + var Agent7 = class extends DispatcherBase { constructor({ factory = defaultFactory, maxRedirections = 0, connect: connect13, ...options } = {}) { + super(); if (typeof factory !== "function") { throw new InvalidArgumentError("factory must be a function."); } @@ -8411,7 +8685,6 @@ 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 }; } @@ -8472,7 +8745,7 @@ var require_agent = __commonJS({ await Promise.all(destroyPromises); } }; - module2.exports = Agent9; + module2.exports = Agent7; } }); @@ -8482,12 +8755,12 @@ var require_proxy_agent = __commonJS({ "use strict"; var { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols(); var { URL: URL10 } = require("node:url"); - var Agent9 = require_agent(); + var Agent7 = require_agent(); var Pool = require_pool(); var DispatcherBase = require_dispatcher_base(); var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors(); var buildConnector = require_connect(); - var Client3 = require_client(); + var Client2 = require_client(); var kAgent = /* @__PURE__ */ Symbol("proxy agent"); var kClient = /* @__PURE__ */ Symbol("proxy client"); var kProxyHeaders = /* @__PURE__ */ Symbol("proxy headers"); @@ -8505,7 +8778,7 @@ var require_proxy_agent = __commonJS({ }; function defaultAgentFactory(origin, opts) { if (opts.connections === 1) { - return new Client3(origin, opts); + return new Client2(origin, opts); } return new Pool(origin, opts); } @@ -8520,7 +8793,7 @@ var require_proxy_agent = __commonJS({ if (factory) { this.#client = factory(proxyUrl, { connect: connect13 }); } else { - this.#client = new Client3(proxyUrl, { connect: connect13 }); + this.#client = new Client2(proxyUrl, { connect: connect13 }); } } [kDispatch](opts, handler) { @@ -8554,7 +8827,7 @@ var require_proxy_agent = __commonJS({ return this.#client.destroy(err); } }; - var ProxyAgent3 = class extends DispatcherBase { + var ProxyAgent2 = class extends DispatcherBase { constructor(opts) { super(); if (!opts || typeof opts === "object" && !(opts instanceof URL10) && !opts.uri) { @@ -8597,7 +8870,7 @@ var require_proxy_agent = __commonJS({ return agentFactory(origin2, options); }; this[kClient] = clientFactory(url, { connect: connect13 }); - this[kAgent] = new Agent9({ + this[kAgent] = new Agent7({ ...opts, factory, connect: async (opts2, callback) => { @@ -8695,7 +8968,7 @@ var require_proxy_agent = __commonJS({ throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); } } - module2.exports = ProxyAgent3; + module2.exports = ProxyAgent2; } }); @@ -8705,9 +8978,9 @@ 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 ProxyAgent3 = require_proxy_agent(); - var Agent9 = require_agent(); - var DEFAULT_PORTS4 = { + var ProxyAgent2 = require_proxy_agent(); + var Agent7 = require_agent(); + var DEFAULT_PORTS3 = { "http:": 80, "https:": 443 }; @@ -8726,16 +8999,16 @@ var require_env_http_proxy_agent = __commonJS({ }); } const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; - this[kNoProxyAgent] = new Agent9(agentOpts); + this[kNoProxyAgent] = new Agent7(agentOpts); const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent3({ ...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 ProxyAgent3({ ...agentOpts, uri: HTTPS_PROXY }); + this[kHttpsProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTPS_PROXY }); } else { this[kHttpsProxyAgent] = this[kHttpProxyAgent]; } @@ -8767,7 +9040,7 @@ var require_env_http_proxy_agent = __commonJS({ #getProxyAgentForUrl(url) { let { protocol, host: hostname, port } = url; hostname = hostname.replace(/:\d*$/, "").toLowerCase(); - port = Number.parseInt(port, 10) || DEFAULT_PORTS4[protocol] || 0; + port = Number.parseInt(port, 10) || DEFAULT_PORTS3[protocol] || 0; if (!this.#shouldProxy(hostname, port)) { return this[kNoProxyAgent]; } @@ -9173,7 +9446,7 @@ var require_readable = __commonJS({ "node_modules/undici/lib/api/readable.js"(exports2, module2) { "use strict"; var assert4 = require("node:assert"); - var { Readable: Readable7 } = require("node:stream"); + var { Readable: Readable2 } = require("node:stream"); var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); var util = require_util(); var { ReadableStreamFrom } = require_util(); @@ -9185,7 +9458,7 @@ var require_readable = __commonJS({ var kContentLength = /* @__PURE__ */ Symbol("kContentLength"); var noop = () => { }; - var BodyReadable = class extends Readable7 { + var BodyReadable = class extends Readable2 { constructor({ resume: resume3, abort, @@ -9527,7 +9800,7 @@ var require_api_request = __commonJS({ "node_modules/undici/lib/api/api-request.js"(exports2, module2) { "use strict"; var assert4 = require("node:assert"); - var { Readable: Readable7 } = require_readable(); + var { Readable: Readable2 } = require_readable(); var { InvalidArgumentError, RequestAbortedError } = require_errors(); var util = require_util(); var { getResolveErrorBodyCallback } = require_util3(); @@ -9622,7 +9895,7 @@ var require_api_request = __commonJS({ const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; const contentType = parsedHeaders["content-type"]; const contentLength = parsedHeaders["content-length"]; - const res = new Readable7({ + const res = new Readable2({ resume: resume3, abort, contentType, @@ -9764,7 +10037,7 @@ var require_api_stream = __commonJS({ "node_modules/undici/lib/api/api-stream.js"(exports2, module2) { "use strict"; var assert4 = require("node:assert"); - var { finished, PassThrough: PassThrough3 } = require("node:stream"); + var { finished, PassThrough: PassThrough2 } = require("node:stream"); var { InvalidArgumentError, InvalidReturnValueError } = require_errors(); var util = require_util(); var { getResolveErrorBodyCallback } = require_util3(); @@ -9840,7 +10113,7 @@ var require_api_stream = __commonJS({ if (this.throwOnError && statusCode >= 400) { const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; const contentType = parsedHeaders["content-type"]; - res = new PassThrough3(); + res = new PassThrough2(); this.callback = null; this.runInAsyncScope( getResolveErrorBodyCallback, @@ -9937,9 +10210,9 @@ var require_api_pipeline = __commonJS({ "node_modules/undici/lib/api/api-pipeline.js"(exports2, module2) { "use strict"; var { - Readable: Readable7, - Duplex: Duplex2, - PassThrough: PassThrough3 + Readable: Readable2, + Duplex, + PassThrough: PassThrough2 } = require("node:stream"); var { InvalidArgumentError, @@ -9951,7 +10224,7 @@ var require_api_pipeline = __commonJS({ var { addSignal, removeSignal } = require_abort_signal(); var assert4 = require("node:assert"); var kResume = /* @__PURE__ */ Symbol("resume"); - var PipelineRequest = class extends Readable7 { + var PipelineRequest = class extends Readable2 { constructor() { super({ autoDestroy: true }); this[kResume] = null; @@ -9968,7 +10241,7 @@ var require_api_pipeline = __commonJS({ callback(err); } }; - var PipelineResponse = class extends Readable7 { + var PipelineResponse = class extends Readable2 { constructor(resume3) { super({ autoDestroy: true }); this[kResume] = resume3; @@ -10009,7 +10282,7 @@ var require_api_pipeline = __commonJS({ this.context = null; this.onInfo = onInfo || null; this.req = new PipelineRequest().on("error", util.nop); - this.ret = new Duplex2({ + this.ret = new Duplex({ readableObjectMode: opts.objectMode, autoDestroy: true, read: () => { @@ -10125,7 +10398,7 @@ var require_api_pipeline = __commonJS({ this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler); return pipelineHandler.ret; } catch (err) { - return new PassThrough3().destroy(err); + return new PassThrough2().destroy(err); } } module2.exports = pipeline; @@ -10576,13 +10849,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: error3 }, delay, persist } = mockDispatch2; + const { data: { statusCode, data: data3, headers, trailers, error: error2 }, delay, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error3 !== null) { + if (error2 !== null) { deleteMockDispatch(this[kDispatches], key); - handler.onError(error3); + handler.onError(error2); return true; } if (typeof delay === "number" && delay > 0) { @@ -10620,19 +10893,19 @@ var require_mock_utils = __commonJS({ if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler); - } catch (error3) { - if (error3 instanceof MockNotMatchedError) { + } catch (error2) { + if (error2 instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error3.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(`${error3.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 error3; + throw error2; } } } else { @@ -10797,11 +11070,11 @@ var require_mock_interceptor = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error3) { - if (typeof error3 === "undefined") { + replyWithError(error2) { + if (typeof error2 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error3 }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error2 }); return new MockScope(newMockDispatch); } /** @@ -10842,7 +11115,7 @@ var require_mock_client = __commonJS({ "node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { "use strict"; var { promisify } = require("node:util"); - var Client3 = require_client(); + var Client2 = require_client(); var { buildMockDispatch } = require_mock_utils(); var { kDispatches, @@ -10856,7 +11129,7 @@ var require_mock_client = __commonJS({ var { MockInterceptor } = require_mock_interceptor(); var Symbols = require_symbols(); var { InvalidArgumentError } = require_errors(); - var MockClient = class extends Client3 { + var MockClient = class extends Client2 { constructor(origin, opts) { super(origin, opts); if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { @@ -11020,7 +11293,7 @@ var require_mock_agent = __commonJS({ "node_modules/undici/lib/mock/mock-agent.js"(exports2, module2) { "use strict"; var { kClients } = require_symbols(); - var Agent9 = require_agent(); + var Agent7 = require_agent(); var { kAgent, kMockAgentSet, @@ -11047,7 +11320,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 Agent9(opts); + const agent = opts?.agent ? opts.agent : new Agent7(opts); this[kAgent] = agent; this[kClients] = agent[kClients]; this[kOptions] = buildMockOptions(opts); @@ -11151,9 +11424,9 @@ var require_global2 = __commonJS({ "use strict"; var globalDispatcher = /* @__PURE__ */ Symbol.for("undici.globalDispatcher.1"); var { InvalidArgumentError } = require_errors(); - var Agent9 = require_agent(); + var Agent7 = require_agent(); if (getGlobalDispatcher() === void 0) { - setGlobalDispatcher(new Agent9()); + setGlobalDispatcher(new Agent7()); } function setGlobalDispatcher(agent) { if (!agent || typeof agent.dispatch !== "function") { @@ -11762,12 +12035,12 @@ var require_headers = __commonJS({ append(name, value, isLowerCase) { this[kHeadersSortedMap] = null; const lowercaseName = isLowerCase ? name : name.toLowerCase(); - const exists2 = this[kHeadersMap].get(lowercaseName); - if (exists2) { + const exists = this[kHeadersMap].get(lowercaseName); + if (exists) { const delimiter = lowercaseName === "cookie" ? "; " : ", "; this[kHeadersMap].set(lowercaseName, { - name: exists2.name, - value: `${exists2.value}${delimiter}${value}` + name: exists.name, + value: `${exists.value}${delimiter}${value}` }); } else { this[kHeadersMap].set(lowercaseName, { name, value }); @@ -12599,7 +12872,7 @@ var require_request2 = __commonJS({ } } var patchMethodWarning = false; - var Request = class _Request { + var Request2 = class _Request { // https://fetch.spec.whatwg.org/#dom-request constructor(input, init = {}) { webidl.util.markAsUncloneable(this); @@ -13046,7 +13319,7 @@ var require_request2 = __commonJS({ return `Request ${nodeUtil.formatWithOptions(options, properties)}`; } }; - mixinBody(Request); + mixinBody(Request2); function makeRequest(init) { return { method: init.method ?? "GET", @@ -13097,7 +13370,7 @@ var require_request2 = __commonJS({ return newRequest; } function fromInnerRequest(innerRequest, signal, guard) { - const request = new Request(kConstruct); + const request = new Request2(kConstruct); request[kState] = innerRequest; request[kSignal] = signal; request[kHeaders] = new Headers2(kConstruct); @@ -13105,7 +13378,7 @@ var require_request2 = __commonJS({ setHeadersGuard(request[kHeaders], guard); return request; } - Object.defineProperties(Request.prototype, { + Object.defineProperties(Request2.prototype, { method: kEnumerableProperty, url: kEnumerableProperty, headers: kEnumerableProperty, @@ -13132,13 +13405,13 @@ var require_request2 = __commonJS({ } }); webidl.converters.Request = webidl.interfaceConverter( - Request + Request2 ); webidl.converters.RequestInfo = function(V, prefix, argument) { if (typeof V === "string") { return webidl.converters.USVString(V, prefix, argument); } - if (V instanceof Request) { + if (V instanceof Request2) { return webidl.converters.Request(V, prefix, argument); } return webidl.converters.USVString(V, prefix, argument); @@ -13229,7 +13502,7 @@ var require_request2 = __commonJS({ converter: webidl.converters.any } ]); - module2.exports = { Request, makeRequest, fromInnerRequest, cloneRequest }; + module2.exports = { Request: Request2, makeRequest, fromInnerRequest, cloneRequest }; } }); @@ -13245,7 +13518,7 @@ var require_fetch = __commonJS({ fromInnerResponse } = require_response(); var { HeadersList } = require_headers(); - var { Request, cloneRequest } = require_request2(); + var { Request: Request2, cloneRequest } = require_request2(); var zlib = require("node:zlib"); var { bytesMatch, @@ -13293,14 +13566,14 @@ var require_fetch = __commonJS({ subresourceSet } = require_constants3(); var EE = require("node:events"); - var { Readable: Readable7, pipeline, finished } = require("node:stream"); + var { Readable: Readable2, pipeline, finished } = require("node:stream"); var { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require_util(); var { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url(); var { getGlobalDispatcher } = require_global2(); var { webidl } = require_webidl(); var { STATUS_CODES: STATUS_CODES2 } = require("node:http"); var GET_OR_HEAD = ["GET", "HEAD"]; - var defaultUserAgent2 = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici"; + var defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici"; var resolveObjectURL; var Fetch = class extends EE { constructor(dispatcher) { @@ -13319,28 +13592,28 @@ var require_fetch = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error3) { + abort(error2) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error3) { - error3 = new DOMException("The operation was aborted.", "AbortError"); + if (!error2) { + error2 = new DOMException("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error3; - this.connection?.destroy(error3); - this.emit("terminated", error3); + this.serializedAbortReason = error2; + this.connection?.destroy(error2); + this.emit("terminated", error2); } }; function handleFetchDone(response) { finalizeAndReportTiming(response, "fetch"); } - function fetch(input, init = void 0) { + function fetch2(input, init = void 0) { webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); let p2 = createDeferredPromise(); let requestObject; try { - requestObject = new Request(input, init); + requestObject = new Request2(input, init); } catch (e5) { p2.reject(e5); return p2.promise; @@ -13425,12 +13698,12 @@ var require_fetch = __commonJS({ ); } var markResourceTiming = performance.markResourceTiming; - function abortFetch(p2, request, responseObject, error3) { + function abortFetch(p2, request, responseObject, error2) { if (p2) { - p2.reject(error3); + p2.reject(error2); } if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error3).catch((err) => { + request.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13442,7 +13715,7 @@ var require_fetch = __commonJS({ } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error3).catch((err) => { + response.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13904,7 +14177,7 @@ var require_fetch = __commonJS({ appendRequestOriginHeader(httpRequest); appendFetchMetadata(httpRequest); if (!httpRequest.headersList.contains("user-agent", true)) { - httpRequest.headersList.append("user-agent", defaultUserAgent2); + httpRequest.headersList.append("user-agent", defaultUserAgent); } if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) { httpRequest.cache = "no-store"; @@ -14194,7 +14467,7 @@ var require_fetch = __commonJS({ headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i5]), rawHeaders[i5 + 1].toString("latin1"), true); } location = headersList.get("location", true); - this.body = new Readable7({ read: resume3 }); + this.body = new Readable2({ read: resume3 }); const decoders = []; const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status); if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { @@ -14263,13 +14536,13 @@ var require_fetch = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error3) { + onError(error2) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error3); - fetchParams.controller.terminate(error3); - reject(error3); + this.body?.destroy(error2); + fetchParams.controller.terminate(error2); + reject(error2); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) { @@ -14292,7 +14565,7 @@ var require_fetch = __commonJS({ } } module2.exports = { - fetch, + fetch: fetch2, Fetch, fetching, finalizeAndReportTiming @@ -14732,8 +15005,8 @@ var require_util4 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error3) { - fr[kError] = error3; + } catch (error2) { + fr[kError] = error2; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -14742,13 +15015,13 @@ var require_util4 = __commonJS({ }); break; } - } catch (error3) { + } catch (error2) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error3; + fr[kError] = error2; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -15162,7 +15435,7 @@ var require_cache = __commonJS({ var { kEnumerableProperty, isDisturbed } = require_util(); var { webidl } = require_webidl(); var { Response, cloneResponse, fromInnerResponse } = require_response(); - var { Request, fromInnerRequest } = require_request2(); + var { Request: Request2, fromInnerRequest } = require_request2(); var { kState } = require_symbols2(); var { fetching } = require_fetch(); var { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util2(); @@ -15236,7 +15509,7 @@ var require_cache = __commonJS({ } const fetchControllers = []; for (const request of requests) { - const r5 = new Request(request)[kState]; + const r5 = new Request2(request)[kState]; if (!urlIsHttpHttpsScheme(r5.url)) { throw webidl.errors.exception({ header: prefix, @@ -15320,10 +15593,10 @@ var require_cache = __commonJS({ request = webidl.converters.RequestInfo(request, prefix, "request"); response = webidl.converters.Response(response, prefix, "response"); let innerRequest = null; - if (request instanceof Request) { + if (request instanceof Request2) { innerRequest = request[kState]; } else { - innerRequest = new Request(request)[kState]; + innerRequest = new Request2(request)[kState]; } if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") { throw webidl.errors.exception({ @@ -15401,14 +15674,14 @@ var require_cache = __commonJS({ request = webidl.converters.RequestInfo(request, prefix, "request"); options = webidl.converters.CacheQueryOptions(options, prefix, "options"); let r5 = null; - if (request instanceof Request) { + if (request instanceof Request2) { r5 = request[kState]; if (r5.method !== "GET" && !options.ignoreMethod) { return false; } } else { assert4(typeof request === "string"); - r5 = new Request(request)[kState]; + r5 = new Request2(request)[kState]; } const operations = []; const operation2 = { @@ -15447,13 +15720,13 @@ var require_cache = __commonJS({ options = webidl.converters.CacheQueryOptions(options, prefix, "options"); let r5 = null; if (request !== void 0) { - if (request instanceof Request) { + if (request instanceof Request2) { r5 = request[kState]; if (r5.method !== "GET" && !options.ignoreMethod) { return []; } } else if (typeof request === "string") { - r5 = new Request(request)[kState]; + r5 = new Request2(request)[kState]; } } const promise = createDeferredPromise(); @@ -15619,13 +15892,13 @@ var require_cache = __commonJS({ #internalMatchAll(request, options, maxResponses = Infinity) { let r5 = null; if (request !== void 0) { - if (request instanceof Request) { + if (request instanceof Request2) { r5 = request[kState]; if (r5.method !== "GET" && !options.ignoreMethod) { return []; } } else if (typeof request === "string") { - r5 = new Request(request)[kState]; + r5 = new Request2(request)[kState]; } } const responses = []; @@ -16779,13 +17052,13 @@ var require_frame = __commonJS({ "use strict"; var { maxUnsigned16Bit } = require_constants5(); var BUFFER_SIZE = 16386; - var crypto4; + var crypto3; var buffer = null; var bufIdx = BUFFER_SIZE; try { - crypto4 = require("node:crypto"); + crypto3 = require("node:crypto"); } catch { - crypto4 = { + crypto3 = { // not full compatibility, but minimum. randomFillSync: function randomFillSync(buffer2, _offset2, _size) { for (let i5 = 0; i5 < buffer2.length; ++i5) { @@ -16798,7 +17071,7 @@ var require_frame = __commonJS({ function generateMask() { if (bufIdx === BUFFER_SIZE) { bufIdx = 0; - crypto4.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + crypto3.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); } return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]]; } @@ -16870,9 +17143,9 @@ var require_connection = __commonJS({ var { Headers: Headers2, getHeadersList } = require_headers(); var { getDecodeSplit } = require_util2(); var { WebsocketFrameSend } = require_frame(); - var crypto4; + var crypto3; try { - crypto4 = require("node:crypto"); + crypto3 = require("node:crypto"); } catch { } function establishWebSocketConnection(url, protocols2, client, ws, onEstablish, options) { @@ -16892,7 +17165,7 @@ var require_connection = __commonJS({ const headersList = getHeadersList(new Headers2(options.headers)); request.headersList = headersList; } - const keyValue = crypto4.randomBytes(16).toString("base64"); + const keyValue = crypto3.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols2) { @@ -16922,7 +17195,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto4.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto3.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -17020,11 +17293,11 @@ var require_connection = __commonJS({ }); } } - function onSocketError(error3) { + function onSocketError(error2) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error3); + channels.socketError.publish(error2); } this.destroy(); } @@ -17045,26 +17318,31 @@ 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 = {}; - #maxPayloadSize = 0; + /** @type {number} */ + #maxDecompressedSize; + /** @type {boolean} */ + #aborted = false; + /** @type {Function|null} */ + #currentCallback = null; /** * @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.#maxPayloadSize = options.maxPayloadSize; + this.#maxDecompressedSize = options.maxDecompressedMessageSize ?? kDefaultMaxDecompressedSize; } - /** - * 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) { @@ -17083,11 +17361,20 @@ 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.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { - callback(new MessageSizeExceededError()); + if (this.#inflate[kLength] > this.#maxDecompressedSize) { + this.#aborted = true; 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); @@ -17097,17 +17384,19 @@ 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.#inflate) { + if (this.#aborted || !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); }); } @@ -17120,7 +17409,7 @@ var require_permessage_deflate = __commonJS({ var require_receiver = __commonJS({ "node_modules/undici/lib/web/websocket/receiver.js"(exports2, module2) { "use strict"; - var { Writable: Writable3 } = require("node:stream"); + var { Writable } = require("node:stream"); var assert4 = require("node:assert"); var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants5(); var { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols5(); @@ -17138,10 +17427,8 @@ 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 { + var ByteParser = class extends Writable { #buffers = []; - #fragmentsBytes = 0; #byteOffset = 0; #loop = false; #state = parserStates.INFO; @@ -17149,18 +17436,18 @@ var require_receiver = __commonJS({ #fragments = []; /** @type {Map} */ #extensions; - /** @type {number} */ - #maxPayloadSize; + /** @type {{ maxDecompressedMessageSize?: number }} */ + #options; /** * @param {import('./websocket').WebSocket} ws * @param {Map|null} extensions - * @param {{ maxPayloadSize?: number }} [options] + * @param {{ maxDecompressedMessageSize?: number }} [options] */ constructor(ws, extensions, options = {}) { super(); this.ws = ws; this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; - this.#maxPayloadSize = options.maxPayloadSize ?? 0; + this.#options = options; if (this.#extensions.has("permessage-deflate")) { this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions, options)); } @@ -17175,13 +17462,6 @@ 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, @@ -17241,9 +17521,6 @@ 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) { @@ -17264,9 +17541,6 @@ 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(); @@ -17280,9 +17554,6 @@ 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(); @@ -17293,41 +17564,32 @@ var require_receiver = __commonJS({ this.#state = parserStates.INFO; } else { if (!this.#info.compressed) { - this.writeFragments(body); - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message); - return; - } + this.#fragments.push(body); if (!this.#info.fragmented && this.#info.fin) { - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + const fullMessage = Buffer.concat(this.#fragments); + websocketMessageReceived(this.ws, this.#info.binaryType, fullMessage); + this.#fragments.length = 0; } this.#state = parserStates.INFO; } else { - 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); + 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.#loop = true; + 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; } @@ -17370,21 +17632,6 @@ 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; @@ -17596,6 +17843,8 @@ var require_websocket = __commonJS({ #extensions = ""; /** @type {SendQueue} */ #sendQueue; + /** @type {{ maxDecompressedMessageSize?: number }} */ + #options; /** * @param {string} url * @param {string|string[]} protocols @@ -17639,6 +17888,9 @@ 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, @@ -17822,10 +18074,7 @@ var require_websocket = __commonJS({ */ #onConnectionEstablished(response, parsedExtensions) { this[kResponse] = response; - const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize; - const parser = new ByteParser(this, parsedExtensions, { - maxPayloadSize - }); + const parser = new ByteParser(this, parsedExtensions, this.#options); parser.on("drain", onParserDrain); parser.on("error", onParserError.bind(this)); response.socket.ws = this; @@ -17900,6 +18149,19 @@ 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) { @@ -17977,7 +18239,7 @@ var require_eventsource_stream = __commonJS({ var LF = 10; var CR = 13; var COLON = 58; - var SPACE2 = 32; + var SPACE = 32; var EventSourceStream = class extends Transform { /** * @type {eventSourceSettings} @@ -18127,7 +18389,7 @@ var require_eventsource_stream = __commonJS({ if (colonPosition !== -1) { field = line.subarray(0, colonPosition).toString("utf8"); let valueStart = colonPosition + 1; - if (line[valueStart] === SPACE2) { + if (line[valueStart] === SPACE) { ++valueStart; } value = line.subarray(valueStart).toString("utf8"); @@ -18362,8 +18624,8 @@ var require_eventsource = __commonJS({ pipeline( response.body.stream, eventSourceStream, - (error3) => { - if (error3?.aborted === false) { + (error2) => { + if (error2?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -18498,12 +18760,12 @@ var require_eventsource = __commonJS({ var require_undici = __commonJS({ "node_modules/undici/index.js"(exports2, module2) { "use strict"; - var Client3 = require_client(); + var Client2 = require_client(); var Dispatcher = require_dispatcher(); var Pool = require_pool(); var BalancedPool = require_balanced_pool(); - var Agent9 = require_agent(); - var ProxyAgent3 = require_proxy_agent(); + var Agent7 = require_agent(); + var ProxyAgent2 = require_proxy_agent(); var EnvHttpProxyAgent = require_env_http_proxy_agent(); var RetryAgent = require_retry_agent(); var errors = require_errors(); @@ -18522,11 +18784,11 @@ var require_undici = __commonJS({ var createRedirectInterceptor = require_redirect_interceptor(); Object.assign(Dispatcher.prototype, api); module2.exports.Dispatcher = Dispatcher; - module2.exports.Client = Client3; + module2.exports.Client = Client2; module2.exports.Pool = Pool; module2.exports.BalancedPool = BalancedPool; - module2.exports.Agent = Agent9; - module2.exports.ProxyAgent = ProxyAgent3; + module2.exports.Agent = Agent7; + module2.exports.ProxyAgent = ProxyAgent2; module2.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; module2.exports.RetryAgent = RetryAgent; module2.exports.RetryHandler = RetryHandler; @@ -18587,7 +18849,7 @@ var require_undici = __commonJS({ module2.exports.setGlobalDispatcher = setGlobalDispatcher; module2.exports.getGlobalDispatcher = getGlobalDispatcher; var fetchImpl = require_fetch().fetch; - module2.exports.fetch = async function fetch(init, options = void 0) { + module2.exports.fetch = async function fetch2(init, options = void 0) { try { return await fetchImpl(init, options); } catch (err) { @@ -18636,348 +18898,2692 @@ var require_undici = __commonJS({ } }); -// node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js -var state, emitWarningIfUnsupportedVersion; -var init_emitWarningIfUnsupportedVersion = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"() { - state = { - warningEmitted: false +// 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()); + }); }; - emitWarningIfUnsupportedVersion = (version) => { - if (version && !state.warningEmitted) { - if (process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED === "true") { - state.warningEmitted = true; + 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 Headers2; + (function(Headers3) { + Headers3["Accept"] = "accept"; + Headers3["ContentType"] = "content-type"; + })(Headers2 || (exports2.Headers = Headers2 = {})); + 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[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.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[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.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[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.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[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.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; } - const userMajorVersion = parseInt(version.substring(1, version.indexOf("."))); - const vv = 22; - if (userMajorVersion < vv) { - state.warningEmitted = true; - process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3) -versions published after the first week of January 2027 -will require node >=${vv}. You are running node ${version}. - -To continue receiving updates to AWS services, bug fixes, -and security updates please upgrade to node >=${vv}. - -More information can be found at: https://a.co/c895JFp`); + 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; } - } - }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/longPollMiddleware.js -var longPollMiddleware, longPollMiddlewareOptions, getLongPollPlugin; -var init_longPollMiddleware = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/longPollMiddleware.js"() { - longPollMiddleware = () => (next, context) => async (args) => { - context.__retryLongPoll = true; - return next(args); - }; - longPollMiddlewareOptions = { - name: "longPollMiddleware", - tags: ["RETRY"], - step: "initialize", - override: true - }; - getLongPollPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(longPollMiddleware(), longPollMiddlewareOptions); - } - }); - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js -function setCredentialFeature(credentials, feature, value) { - if (!credentials.$source) { - credentials.$source = {}; - } - credentials.$source[feature] = value; - return credentials; -} -var init_setCredentialFeature = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/isStreamingPayload/isStreamingPayload.js -var import_node_stream, isStreamingPayload; -var init_isStreamingPayload = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/isStreamingPayload/isStreamingPayload.js"() { - import_node_stream = require("node:stream"); - isStreamingPayload = (request) => request?.body instanceof import_node_stream.Readable || typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js -var getAllAliases, getMiddlewareNameWithAliases, constructStack, stepWeights, priorityWeights; -var init_MiddlewareStack = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js"() { - getAllAliases = (name, aliases) => { - const _aliases = []; - if (name) { - _aliases.push(name); - } - if (aliases) { - for (const alias of aliases) { - _aliases.push(alias); + info5.options.agent = this._getAgent(info5.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info5.options); + } } + return info5; } - return _aliases; - }; - getMiddlewareNameWithAliases = (name, aliases) => { - return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; - }; - constructStack = () => { - let absoluteEntries = []; - let relativeEntries = []; - let identifyOnResolve = false; - const entriesNameSet = /* @__PURE__ */ new Set(); - const sort = (entries) => entries.sort((a5, b6) => stepWeights[b6.step] - stepWeights[a5.step] || priorityWeights[b6.priority || "normal"] - priorityWeights[a5.priority || "normal"]); - const removeByName = (toRemove) => { - let isRemoved = false; - const filterCb = (entry) => { - const aliases = getAllAliases(entry.name, entry.aliases); - if (aliases.includes(toRemove)) { - isRemoved = true; - for (const alias of aliases) { - entriesNameSet.delete(alias); - } - return false; + _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; } - return true; - }; - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }; - const removeByReference = (toRemove) => { - let isRemoved = false; - const filterCb = (entry) => { - if (entry.middleware === toRemove) { - isRemoved = true; - for (const alias of getAllAliases(entry.name, entry.aliases)) { - entriesNameSet.delete(alias); + } + 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)[Headers2.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; } - return false; } - return true; - }; - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }; - const cloneTo = (toStack) => { - absoluteEntries.forEach((entry) => { - toStack.add(entry.middleware, { ...entry }); - }); - relativeEntries.forEach((entry) => { - toStack.addRelativeTo(entry.middleware, { ...entry }); - }); - toStack.identifyOnResolve?.(stack.identifyOnResolve()); - return toStack; - }; - const expandRelativeMiddlewareList = (from) => { - const expandedMiddlewareList = []; - from.before.forEach((entry) => { - if (entry.before.length === 0 && entry.after.length === 0) { - expandedMiddlewareList.push(entry); + } + const additionalValue = additionalHeaders[Headers2.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); } else { - expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + return additionalValue; } - }); - expandedMiddlewareList.push(from); - from.after.reverse().forEach((entry) => { - if (entry.before.length === 0 && entry.after.length === 0) { - expandedMiddlewareList.push(entry); + } + 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 { - expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; } - }); - return expandedMiddlewareList; - }; - const getMiddlewareList = (debug17 = false) => { - const normalizedAbsoluteEntries = []; - const normalizedRelativeEntries = []; - const normalizedEntriesNameMap = {}; - absoluteEntries.forEach((entry) => { - const normalizedEntry = { - ...entry, - before: [], - after: [] - }; - for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { - normalizedEntriesNameMap[alias] = normalizedEntry; - } - normalizedAbsoluteEntries.push(normalizedEntry); - }); - relativeEntries.forEach((entry) => { - const normalizedEntry = { - ...entry, - before: [], - after: [] - }; - for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { - normalizedEntriesNameMap[alias] = normalizedEntry; - } - normalizedRelativeEntries.push(normalizedEntry); - }); - normalizedRelativeEntries.forEach((entry) => { - if (entry.toMiddleware) { - const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; - if (toMiddleware === void 0) { - if (debug17) { - return; - } - throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`); - } - if (entry.relation === "after") { - toMiddleware.after.push(entry); - } - if (entry.relation === "before") { - toMiddleware.before.push(entry); - } - } - }); - const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => { - wholeList.push(...expandedMiddlewareList); - return wholeList; - }, []); - return mainChain; - }; - const stack = { - add: (middleware, options = {}) => { - const { name, override, aliases: _aliases } = options; - const entry = { - step: "initialize", - priority: "normal", - middleware, - ...options - }; - const aliases = getAllAliases(name, _aliases); - if (aliases.length > 0) { - if (aliases.some((alias) => entriesNameSet.has(alias))) { - if (!override) - throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); - for (const alias of aliases) { - const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a5) => a5 === alias)); - if (toOverrideIndex === -1) { - continue; - } - const toOverride = absoluteEntries[toOverrideIndex]; - if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { - throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.`); - } - absoluteEntries.splice(toOverrideIndex, 1); - } - } - for (const alias of aliases) { - entriesNameSet.add(alias); - } - } - absoluteEntries.push(entry); - }, - addRelativeTo: (middleware, options) => { - const { name, override, aliases: _aliases } = options; - const entry = { - middleware, - ...options - }; - const aliases = getAllAliases(name, _aliases); - if (aliases.length > 0) { - if (aliases.some((alias) => entriesNameSet.has(alias))) { - if (!override) - throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); - for (const alias of aliases) { - const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a5) => a5 === alias)); - if (toOverrideIndex === -1) { - continue; - } - const toOverride = relativeEntries[toOverrideIndex]; - if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { - throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.`); - } - relativeEntries.splice(toOverrideIndex, 1); - } - } - for (const alias of aliases) { - entriesNameSet.add(alias); - } - } - relativeEntries.push(entry); - }, - clone: () => cloneTo(constructStack()), - use: (plugin) => { - plugin.applyToStack(stack); - }, - remove: (toRemove) => { - if (typeof toRemove === "string") - return removeByName(toRemove); - else - return removeByReference(toRemove); - }, - removeByTag: (toRemove) => { - let isRemoved = false; - const filterCb = (entry) => { - const { tags, name, aliases: _aliases } = entry; - if (tags && tags.includes(toRemove)) { - const aliases = getAllAliases(name, _aliases); - for (const alias of aliases) { - entriesNameSet.delete(alias); - } - isRemoved = true; - return false; - } - return true; - }; - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }, - concat: (from) => { - const cloned = cloneTo(constructStack()); - cloned.use(from); - cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)); - return cloned; - }, - applyToStack: cloneTo, - identify: () => { - return getMiddlewareList(true).map((mw) => { - const step = mw.step ?? mw.relation + " " + mw.toMiddleware; - return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + 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 }); - }, - identifyOnResolve(toggle) { - if (typeof toggle === "boolean") - identifyOnResolve = toggle; - return identifyOnResolve; - }, - resolve: (handler, context) => { - for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { - handler = middleware(handler, context); - } - if (identifyOnResolve) { - console.log(stack.identify()); - } - return handler; } + 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 stack; + 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 path3 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path3.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()); + }); }; - stepWeights = { - initialize: 5, - serialize: 4, - build: 3, - finalizeRequest: 2, - deserialize: 1 + 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 fs3 = __importStar2(require("fs")); + var path3 = __importStar2(require("path")); + _a2 = fs3.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 fs3.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs3.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 = path3.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 = path3.dirname(filePath); + const upperName = path3.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path3.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()); + }); }; - priorityWeights = { - high: 3, - normal: 2, - low: 1 + 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 path3 = __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 ? path3.join(dest, path3.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 (path3.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 = path3.join(dest, path3.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(path3.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(path3.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(path3.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p2 of process.env.PATH.split(path3.delimiter)) { + if (p2) { + directories.push(p2); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path3.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 path3 = __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 = path3.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 = warning; + exports2.notice = notice2; + exports2.info = info5; + exports2.startGroup = startGroup; + exports2.endGroup = endGroup; + exports2.group = group; + 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 path3 = __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}${path3.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 warning(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 group(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()); } }); @@ -18996,19 +21602,19 @@ var require_dist_cjs = __commonJS({ HttpApiKeyAuthLocation2["QUERY"] = "query"; })(exports2.HttpApiKeyAuthLocation || (exports2.HttpApiKeyAuthLocation = {})); exports2.EndpointURLScheme = void 0; - (function(EndpointURLScheme2) { - EndpointURLScheme2["HTTP"] = "http"; - EndpointURLScheme2["HTTPS"] = "https"; + (function(EndpointURLScheme) { + EndpointURLScheme["HTTP"] = "http"; + EndpointURLScheme["HTTPS"] = "https"; })(exports2.EndpointURLScheme || (exports2.EndpointURLScheme = {})); exports2.AlgorithmId = void 0; - (function(AlgorithmId2) { - AlgorithmId2["MD5"] = "md5"; - AlgorithmId2["CRC32"] = "crc32"; - AlgorithmId2["CRC32C"] = "crc32c"; - AlgorithmId2["SHA1"] = "sha1"; - AlgorithmId2["SHA256"] = "sha256"; + (function(AlgorithmId) { + AlgorithmId["MD5"] = "md5"; + AlgorithmId["CRC32"] = "crc32"; + AlgorithmId["CRC32C"] = "crc32c"; + AlgorithmId["SHA1"] = "sha1"; + AlgorithmId["SHA256"] = "sha256"; })(exports2.AlgorithmId || (exports2.AlgorithmId = {})); - var getChecksumConfiguration2 = (runtimeConfig) => { + var getChecksumConfiguration = (runtimeConfig) => { const checksumAlgorithms = []; if (runtimeConfig.sha256 !== void 0) { checksumAlgorithms.push({ @@ -19031,30 +21637,30 @@ var require_dist_cjs = __commonJS({ } }; }; - var resolveChecksumRuntimeConfig2 = (clientConfig) => { + var resolveChecksumRuntimeConfig = (clientConfig) => { const runtimeConfig = {}; clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); }); return runtimeConfig; }; - var getDefaultClientConfiguration2 = (runtimeConfig) => { - return getChecksumConfiguration2(runtimeConfig); + var getDefaultClientConfiguration = (runtimeConfig) => { + return getChecksumConfiguration(runtimeConfig); }; - var resolveDefaultRuntimeConfig2 = (config) => { - return resolveChecksumRuntimeConfig2(config); + var resolveDefaultRuntimeConfig5 = (config) => { + return resolveChecksumRuntimeConfig(config); }; exports2.FieldPosition = void 0; - (function(FieldPosition2) { - FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; - FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; + (function(FieldPosition) { + FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; + FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; })(exports2.FieldPosition || (exports2.FieldPosition = {})); - var SMITHY_CONTEXT_KEY4 = "__smithy_context"; + var SMITHY_CONTEXT_KEY2 = "__smithy_context"; exports2.IniSectionType = void 0; - (function(IniSectionType4) { - IniSectionType4["PROFILE"] = "profile"; - IniSectionType4["SSO_SESSION"] = "sso-session"; - IniSectionType4["SERVICES"] = "services"; + (function(IniSectionType) { + IniSectionType["PROFILE"] = "profile"; + IniSectionType["SSO_SESSION"] = "sso-session"; + IniSectionType["SERVICES"] = "services"; })(exports2.IniSectionType || (exports2.IniSectionType = {})); exports2.RequestHandlerProtocol = void 0; (function(RequestHandlerProtocol) { @@ -19062,25 +21668,674 @@ 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.getDefaultClientConfiguration = getDefaultClientConfiguration2; - exports2.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig2; + exports2.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY2; + exports2.getDefaultClientConfiguration = getDefaultClientConfiguration; + exports2.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig5; } }); -// node_modules/@smithy/core/dist-es/submodules/client/util-middleware/getSmithyContext.js +// node_modules/@smithy/protocol-http/dist-cjs/index.js +var require_dist_cjs2 = __commonJS({ + "node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2) { + "use strict"; + var types3 = require_dist_cjs(); + var getHttpHandlerExtensionConfiguration5 = (runtimeConfig) => { + return { + setHttpHandler(handler) { + runtimeConfig.httpHandler = handler; + }, + httpHandler() { + return runtimeConfig.httpHandler; + }, + updateHttpClientConfig(key, value) { + runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return runtimeConfig.httpHandler.httpHandlerConfigs(); + } + }; + }; + var resolveHttpHandlerRuntimeConfig5 = (httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler() + }; + }; + var Field = class { + name; + kind; + values; + constructor({ name, kind = types3.FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind; + this.values = values; + } + add(value) { + this.values.push(value); + } + set(values) { + this.values = values; + } + remove(value) { + this.values = this.values.filter((v) => v !== value); + } + toString() { + return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); + } + get() { + return this.values; + } + }; + var Fields = class { + entries = {}; + encoding; + constructor({ fields = [], encoding = "utf-8" }) { + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; + } + setField(field) { + this.entries[field.name.toLowerCase()] = field; + } + getField(name) { + return this.entries[name.toLowerCase()]; + } + removeField(name) { + delete this.entries[name.toLowerCase()]; + } + getByType(kind) { + return Object.values(this.entries).filter((field) => field.kind === kind); + } + }; + var HttpRequest10 = 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); + } + }; + function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); + } + var HttpResponse4 = 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"; + } + }; + function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); + } + exports2.Field = Field; + exports2.Fields = Fields; + exports2.HttpRequest = HttpRequest10; + exports2.HttpResponse = HttpResponse4; + exports2.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration5; + exports2.isValidHostname = isValidHostname; + exports2.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig5; + } +}); + +// node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js +var require_dist_cjs3 = __commonJS({ + "node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js"(exports2) { + "use strict"; + var protocolHttp = require_dist_cjs2(); + function resolveHostHeaderConfig5(input) { + return input; + } + var hostHeaderMiddleware = (options) => (next) => async (args) => { + if (!protocolHttp.HttpRequest.isInstance(args.request)) + return next(args); + const { request } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { + delete request.headers["host"]; + request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); + } else if (!request.headers["host"]) { + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; + } + return next(args); + }; + var hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true + }; + var getHostHeaderPlugin5 = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + } + }); + exports2.getHostHeaderPlugin = getHostHeaderPlugin5; + exports2.hostHeaderMiddleware = hostHeaderMiddleware; + exports2.hostHeaderMiddlewareOptions = hostHeaderMiddlewareOptions; + exports2.resolveHostHeaderConfig = resolveHostHeaderConfig5; + } +}); + +// node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js +var require_dist_cjs4 = __commonJS({ + "node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js"(exports2) { + "use strict"; + var loggerMiddleware = () => (next, context) => async (args) => { + try { + const response = await next(args); + const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + logger2?.info?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata + }); + return response; + } catch (error2) { + const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + logger2?.error?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error: error2, + metadata: error2.$metadata + }); + throw error2; + } + }; + var loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true + }; + var getLoggerPlugin5 = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + } + }); + exports2.getLoggerPlugin = getLoggerPlugin5; + exports2.loggerMiddleware = loggerMiddleware; + exports2.loggerMiddlewareOptions = loggerMiddlewareOptions; + } +}); + +// node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js +var invoke_store_exports = {}; +__export(invoke_store_exports, { + InvokeStore: () => InvokeStore, + InvokeStoreBase: () => InvokeStoreBase +}); +var PROTECTED_KEYS, NO_GLOBAL_AWS_LAMBDA, InvokeStoreBase, InvokeStoreSingle, InvokeStoreMulti, InvokeStore; +var init_invoke_store = __esm({ + "node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js"() { + PROTECTED_KEYS = { + REQUEST_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_REQUEST_ID"), + X_RAY_TRACE_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"), + TENANT_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_TENANT_ID") + }; + NO_GLOBAL_AWS_LAMBDA = ["true", "1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA ?? ""); + if (!NO_GLOBAL_AWS_LAMBDA) { + globalThis.awslambda = globalThis.awslambda || {}; + } + InvokeStoreBase = class { + static PROTECTED_KEYS = PROTECTED_KEYS; + isProtectedKey(key) { + return Object.values(PROTECTED_KEYS).includes(key); + } + getRequestId() { + return this.get(PROTECTED_KEYS.REQUEST_ID) ?? "-"; + } + getXRayTraceId() { + return this.get(PROTECTED_KEYS.X_RAY_TRACE_ID); + } + getTenantId() { + return this.get(PROTECTED_KEYS.TENANT_ID); + } + }; + InvokeStoreSingle = class extends InvokeStoreBase { + currentContext; + getContext() { + return this.currentContext; + } + hasContext() { + return this.currentContext !== void 0; + } + get(key) { + return this.currentContext?.[key]; + } + set(key, value) { + if (this.isProtectedKey(key)) { + throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`); + } + this.currentContext = this.currentContext || {}; + this.currentContext[key] = value; + } + run(context, fn) { + this.currentContext = context; + return fn(); + } + }; + InvokeStoreMulti = class _InvokeStoreMulti extends InvokeStoreBase { + als; + static async create() { + const instance = new _InvokeStoreMulti(); + const asyncHooks = await import("node:async_hooks"); + instance.als = new asyncHooks.AsyncLocalStorage(); + return instance; + } + getContext() { + return this.als.getStore(); + } + hasContext() { + return this.als.getStore() !== void 0; + } + get(key) { + return this.als.getStore()?.[key]; + } + set(key, value) { + if (this.isProtectedKey(key)) { + throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`); + } + const store = this.als.getStore(); + if (!store) { + throw new Error("No context available"); + } + store[key] = value; + } + run(context, fn) { + return this.als.run(context, fn); + } + }; + (function(InvokeStore2) { + let instance = null; + async function getInstanceAsync(forceInvokeStoreMulti) { + if (!instance) { + instance = (async () => { + const isMulti = forceInvokeStoreMulti === true || "AWS_LAMBDA_MAX_CONCURRENCY" in process.env; + const newInstance = isMulti ? await InvokeStoreMulti.create() : new InvokeStoreSingle(); + if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda?.InvokeStore) { + return globalThis.awslambda.InvokeStore; + } else if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda) { + globalThis.awslambda.InvokeStore = newInstance; + return newInstance; + } else { + return newInstance; + } + })(); + } + return instance; + } + InvokeStore2.getInstanceAsync = getInstanceAsync; + InvokeStore2._testing = process.env.AWS_LAMBDA_BENCHMARK_MODE === "1" ? { + reset: () => { + instance = null; + if (globalThis.awslambda?.InvokeStore) { + delete globalThis.awslambda.InvokeStore; + } + globalThis.awslambda = { InvokeStore: void 0 }; + } + } : void 0; + })(InvokeStore || (InvokeStore = {})); + } +}); + +// node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.js +var require_recursionDetectionMiddleware = __commonJS({ + "node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.recursionDetectionMiddleware = void 0; + var lambda_invoke_store_1 = (init_invoke_store(), __toCommonJS(invoke_store_exports)); + var protocol_http_1 = require_dist_cjs2(); + var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; + var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; + var ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; + var recursionDetectionMiddleware = () => (next) => async (args) => { + const { request } = args; + if (!protocol_http_1.HttpRequest.isInstance(request)) { + return next(args); + } + const traceIdHeader = Object.keys(request.headers ?? {}).find((h5) => h5.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME; + if (request.headers.hasOwnProperty(traceIdHeader)) { + return next(args); + } + const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; + const traceIdFromEnv = process.env[ENV_TRACE_ID]; + const invokeStore = await lambda_invoke_store_1.InvokeStore.getInstanceAsync(); + const traceIdFromInvokeStore = invokeStore?.getXRayTraceId(); + const traceId = traceIdFromInvokeStore ?? traceIdFromEnv; + const nonEmptyString = (str) => typeof str === "string" && str.length > 0; + if (nonEmptyString(functionName) && nonEmptyString(traceId)) { + request.headers[TRACE_ID_HEADER_NAME] = traceId; + } + return next({ + ...args, + request + }); + }; + exports2.recursionDetectionMiddleware = recursionDetectionMiddleware; + } +}); + +// node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +var require_dist_cjs5 = __commonJS({ + "node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js"(exports2) { + "use strict"; + var recursionDetectionMiddleware = require_recursionDetectionMiddleware(); + var recursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low" + }; + var getRecursionDetectionPlugin5 = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware.recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions); + } + }); + exports2.getRecursionDetectionPlugin = getRecursionDetectionPlugin5; + Object.prototype.hasOwnProperty.call(recursionDetectionMiddleware, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: recursionDetectionMiddleware["__proto__"] + }); + Object.keys(recursionDetectionMiddleware).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = recursionDetectionMiddleware[k5]; + }); + } +}); + +// node_modules/@smithy/core/dist-es/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/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/util-middleware/dist-cjs/index.js +var require_dist_cjs6 = __commonJS({ + "node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2) { + "use strict"; + var types3 = require_dist_cjs(); + var getSmithyContext11 = (context) => context[types3.SMITHY_CONTEXT_KEY] || (context[types3.SMITHY_CONTEXT_KEY] = {}); + var normalizeProvider6 = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }; + exports2.getSmithyContext = getSmithyContext11; + exports2.normalizeProvider = normalizeProvider6; + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js +var resolveAuthOptions; +var init_resolveAuthOptions = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js"() { + resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => { + if (!authSchemePreference || authSchemePreference.length === 0) { + return candidateAuthOptions; + } + const preferredAuthOptions = []; + for (const preferredSchemeName of authSchemePreference) { + for (const candidateAuthOption of candidateAuthOptions) { + const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1]; + if (candidateAuthSchemeName === preferredSchemeName) { + preferredAuthOptions.push(candidateAuthOption); + } + } + } + for (const candidateAuthOption of candidateAuthOptions) { + if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) { + preferredAuthOptions.push(candidateAuthOption); + } + } + return preferredAuthOptions; + }; + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map2 = /* @__PURE__ */ new Map(); + for (const scheme of httpAuthSchemes) { + map2.set(scheme.schemeId, scheme); + } + return map2; +} +var import_util_middleware, httpAuthSchemeMiddleware; +var init_httpAuthSchemeMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { + import_util_middleware = __toESM(require_dist_cjs6()); + init_resolveAuthOptions(); + httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => { + const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)); + const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : []; + const resolvedOptions = resolveAuthOptions(options, authSchemePreference); + const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes); + const smithyContext = (0, import_util_middleware.getSmithyContext)(context); + const failureReasons = []; + for (const option of resolvedOptions) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; + } + const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer + }; + break; + } + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); + } + return next(args); + }; + } +}); + +// node_modules/@smithy/core/dist-es/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"() { + init_httpAuthSchemeMiddleware(); + httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); + } + }); + } +}); + +// node_modules/@smithy/core/dist-es/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"() { + init_httpAuthSchemeMiddleware(); + httpAuthSchemeMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: "serializerMiddleware" + }; + getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeMiddlewareOptions); + } + }); + } +}); + +// node_modules/@smithy/core/dist-es/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"() { + init_httpAuthSchemeMiddleware(); + init_getHttpAuthSchemeEndpointRuleSetPlugin(); + init_getHttpAuthSchemePlugin(); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +var import_protocol_http, import_util_middleware2, defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware; +var init_httpSigningMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() { + import_protocol_http = __toESM(require_dist_cjs2()); + import_util_middleware2 = __toESM(require_dist_cjs6()); + defaultErrorHandler = (signingProperties) => (error2) => { + throw error2; + }; + defaultSuccessHandler = (httpResponse, signingProperties) => { + }; + httpSigningMiddleware = (config) => (next, context) => async (args) => { + if (!import_protocol_http.HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = (0, import_util_middleware2.getSmithyContext)(context); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity, signingProperties) + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; + }; + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +var httpSigningMiddlewareOptions, getHttpSigningPlugin; +var init_getHttpSigningMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() { + init_httpSigningMiddleware(); + httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: "retryMiddleware" + }; + getHttpSigningPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); + } + }); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-signing/index.js +var init_middleware_http_signing = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-signing/index.js"() { + init_httpSigningMiddleware(); + init_getHttpSigningMiddleware(); + } +}); + +// node_modules/@smithy/core/dist-es/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/normalizeProvider.js"() { normalizeProvider = (input) => { if (typeof input === "function") return input; @@ -19090,309 +22345,2150 @@ var init_normalizeProvider = __esm({ } }); -// node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidFunction.js -var invalidFunction; -var init_invalidFunction = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidFunction.js"() { - invalidFunction = (message) => () => { - throw new Error(message); +// node_modules/@smithy/core/dist-es/pagination/createPaginator.js +function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return async function* paginateOperation(config, input, ...additionalArguments) { + const _input = input; + let token = config.startingToken ?? _input[inputTokenName]; + let hasNext = true; + let page; + while (hasNext) { + _input[inputTokenName] = token; + if (pageSizeTokenName) { + _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize; + } + if (config.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config.client, input, config.withCommand, ...additionalArguments); + } else { + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); + } + yield page; + const prevToken = token; + token = get(page, outputTokenName); + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + return void 0; + }; +} +var makePagedClientRequest, get; +var init_createPaginator = __esm({ + "node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() { + makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => { + let command = new CommandCtor(input); + command = withCommand(command) ?? command; + return await client.send(command, ...args); + }; + get = (fromObject, path3) => { + let cursor2 = fromObject; + const pathComponents = path3.split("."); + for (const step of pathComponents) { + if (!cursor2 || typeof cursor2 !== "object") { + return void 0; + } + cursor2 = cursor2[step]; + } + return cursor2; }; } }); -// node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidProvider.js -var invalidProvider; -var init_invalidProvider = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidProvider.js"() { - invalidProvider = (message) => () => Promise.reject(message); +// node_modules/@smithy/is-array-buffer/dist-cjs/index.js +var require_dist_cjs7 = __commonJS({ + "node_modules/@smithy/is-array-buffer/dist-cjs/index.js"(exports2) { + "use strict"; + var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; + exports2.isArrayBuffer = isArrayBuffer; } }); -// node_modules/@smithy/core/dist-es/submodules/client/util-waiter/circularReplacer.js -var getCircularReplacer; -var init_circularReplacer = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/util-waiter/circularReplacer.js"() { - getCircularReplacer = () => { - const seen = /* @__PURE__ */ new WeakSet(); - return (key, value) => { - if (typeof value === "object" && value !== null) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }; +// node_modules/@smithy/util-buffer-from/dist-cjs/index.js +var require_dist_cjs8 = __commonJS({ + "node_modules/@smithy/util-buffer-from/dist-cjs/index.js"(exports2) { + "use strict"; + var isArrayBuffer = require_dist_cjs7(); + var buffer = require("buffer"); + var fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { + if (!isArrayBuffer.isArrayBuffer(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return buffer.Buffer.from(input, offset, length); }; + var fromString = (input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + } + return encoding ? buffer.Buffer.from(input, encoding) : buffer.Buffer.from(input); + }; + exports2.fromArrayBuffer = fromArrayBuffer; + exports2.fromString = fromString; } }); -// node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js -var sleep; -var init_sleep = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js"() { - sleep = (seconds) => { - return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); +// node_modules/@smithy/util-base64/dist-cjs/fromBase64.js +var require_fromBase64 = __commonJS({ + "node_modules/@smithy/util-base64/dist-cjs/fromBase64.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromBase64 = void 0; + var util_buffer_from_1 = require_dist_cjs8(); + var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; + var fromBase649 = (input) => { + if (input.length * 3 % 4 !== 0) { + throw new TypeError(`Incorrect padding on base64 string.`); + } + if (!BASE64_REGEX.exec(input)) { + throw new TypeError(`Invalid base64 string.`); + } + const buffer = (0, util_buffer_from_1.fromString)(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); }; + exports2.fromBase64 = fromBase649; } }); -// node_modules/@smithy/core/dist-es/submodules/client/util-waiter/waiter.js -var waiterServiceDefaults, WaiterState, checkExceptions; -var init_waiter = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/util-waiter/waiter.js"() { - init_circularReplacer(); - waiterServiceDefaults = { - minDelay: 2, - maxDelay: 120 +// node_modules/@smithy/util-utf8/dist-cjs/index.js +var require_dist_cjs9 = __commonJS({ + "node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2) { + "use strict"; + var utilBufferFrom = require_dist_cjs8(); + var fromUtf88 = (input) => { + const buf = utilBufferFrom.fromString(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); }; - (function(WaiterState2) { - WaiterState2["ABORTED"] = "ABORTED"; - WaiterState2["FAILURE"] = "FAILURE"; - WaiterState2["SUCCESS"] = "SUCCESS"; - WaiterState2["RETRY"] = "RETRY"; - WaiterState2["TIMEOUT"] = "TIMEOUT"; - })(WaiterState || (WaiterState = {})); - checkExceptions = (result) => { - if (result.state === WaiterState.ABORTED) { - const abortError = new Error(`${JSON.stringify({ - ...result, - reason: "Request was aborted" - }, getCircularReplacer())}`); - abortError.name = "AbortError"; - throw abortError; - } else if (result.state === WaiterState.TIMEOUT) { - const timeoutError = new Error(`${JSON.stringify({ - ...result, - reason: "Waiter has timed out" - }, getCircularReplacer())}`); - timeoutError.name = "TimeoutError"; - throw timeoutError; - } else if (result.state !== WaiterState.SUCCESS) { - throw new Error(`${JSON.stringify(result, getCircularReplacer())}`); + var toUint8Array2 = (data3) => { + if (typeof data3 === "string") { + return fromUtf88(data3); } - return result; + if (ArrayBuffer.isView(data3)) { + return new Uint8Array(data3.buffer, data3.byteOffset, data3.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data3); }; + var toUtf811 = (input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); + }; + exports2.fromUtf8 = fromUtf88; + exports2.toUint8Array = toUint8Array2; + exports2.toUtf8 = toUtf811; } }); -// node_modules/@smithy/core/dist-es/submodules/client/util-waiter/poller.js -var runPolling, checkWarn403, createMessageFromResponse, exponentialBackoffWithJitter, randomInRange; -var init_poller = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/util-waiter/poller.js"() { - init_circularReplacer(); - init_sleep(); - init_waiter(); - runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => { - const observedResponses = {}; - const [minDelayMs, maxDelayMs] = [minDelay * 1e3, maxDelay * 1e3]; - let currentAttempt = 0; - const waitUntil = Date.now() + maxWaitTime * 1e3; - const warn403Time = Date.now() + 6e4; - let didWarn403 = false; - while (true) { - if (currentAttempt > 0) { - const delayMs = exponentialBackoffWithJitter(minDelayMs, maxDelayMs, currentAttempt, waitUntil); - if (abortController?.signal?.aborted || abortSignal?.aborted) { - const message = "AbortController signal aborted."; - observedResponses[message] |= 0; - observedResponses[message] += 1; - return { state: WaiterState.ABORTED, observedResponses }; - } - if (Date.now() + delayMs > waitUntil) { - return { state: WaiterState.TIMEOUT, observedResponses }; - } - await sleep(delayMs / 1e3); - } - const { state: state2, reason } = await acceptorChecks(client, input); - if (reason) { - const message = createMessageFromResponse(reason); - observedResponses[message] |= 0; - observedResponses[message] += 1; - } - if (state2 !== WaiterState.RETRY) { - return { state: state2, reason, final: reason, observedResponses }; - } - currentAttempt += 1; - if (!didWarn403 && Date.now() >= warn403Time) { - checkWarn403(observedResponses, client); - didWarn403 = true; - } +// node_modules/@smithy/util-base64/dist-cjs/toBase64.js +var require_toBase64 = __commonJS({ + "node_modules/@smithy/util-base64/dist-cjs/toBase64.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toBase64 = void 0; + var util_buffer_from_1 = require_dist_cjs8(); + var util_utf8_1 = require_dist_cjs9(); + var toBase649 = (_input) => { + let input; + if (typeof _input === "string") { + input = (0, util_utf8_1.fromUtf8)(_input); + } else { + input = _input; } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); }; - checkWarn403 = (observedResponses = {}, client) => { - const orderedErrors = Object.keys(observedResponses); - let maxCount = 0; - let count403 = 0; - for (const response of orderedErrors) { - const n3 = observedResponses[response] | 0; - maxCount = Math.max(n3, maxCount); - if (response.startsWith("403:")) { - count403 += n3; - } - } - const clientLogger = client?.config?.logger; - const warningLogger = typeof clientLogger?.warn === "function" && !clientLogger.constructor?.name?.includes?.("NoOpLogger") ? clientLogger : console; - if (count403 >= 3 || orderedErrors[orderedErrors.length - 1]?.startsWith("403:")) { - warningLogger.warn(`@smithy/util-waiter WARN - 403 status code encountered during waiter polling.`); - } - }; - createMessageFromResponse = (reason) => { - const status = reason?.$response?.statusCode ?? reason?.$metadata?.httpStatusCode; - if (reason?.$responseBodyText) { - return `${status ? status + ": " : ""}Deserialization error for body: ${reason.$responseBodyText}`; - } - if (status) { - if (reason?.$response || reason?.message) { - return `${status ?? "Unknown"}: ${reason?.message}`; - } - return `${status}: OK`; - } - return String(reason?.message ?? JSON.stringify(reason, getCircularReplacer()) ?? "Unknown"); - }; - exponentialBackoffWithJitter = (minDelayMs, maxDelayMs, attempt, waitUntil) => { - const attemptCountCeiling = Math.log(maxDelayMs / minDelayMs) / Math.log(2) + 1; - if (attempt > attemptCountCeiling) { - return maxDelayMs; - } - const delay = minDelayMs * 2 ** (attempt - 1); - const capped = Math.min(delay, maxDelayMs); - const waitFor = randomInRange(minDelayMs, capped); - if (Date.now() + waitFor > waitUntil) { - const timeRemaining = waitUntil - Date.now(); - return Math.max(0, timeRemaining - 500); - } - return waitFor; - }; - randomInRange = (min, max) => min + Math.random() * (max - min); + exports2.toBase64 = toBase649; } }); -// node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/validate.js -var validateWaiterOptions; -var init_validate = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/validate.js"() { - validateWaiterOptions = (options) => { - if (options.maxWaitTime <= 0) { - throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`); - } else if (options.minDelay <= 0) { - throw new Error(`WaiterConfiguration.minDelay must be greater than 0`); - } else if (options.maxDelay <= 0) { - throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`); - } else if (options.maxWaitTime <= options.minDelay) { - throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); - } else if (options.maxDelay < options.minDelay) { - throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); - } - }; +// node_modules/@smithy/util-base64/dist-cjs/index.js +var require_dist_cjs10 = __commonJS({ + "node_modules/@smithy/util-base64/dist-cjs/index.js"(exports2) { + "use strict"; + var fromBase649 = require_fromBase64(); + var toBase649 = require_toBase64(); + Object.prototype.hasOwnProperty.call(fromBase649, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: fromBase649["__proto__"] + }); + Object.keys(fromBase649).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = fromBase649[k5]; + }); + Object.prototype.hasOwnProperty.call(toBase649, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: toBase649["__proto__"] + }); + Object.keys(toBase649).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = toBase649[k5]; + }); } }); -// node_modules/@smithy/core/dist-es/submodules/client/util-waiter/createWaiter.js -var abortTimeout, createWaiter; -var init_createWaiter = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/util-waiter/createWaiter.js"() { - init_poller(); - init_validate(); - init_waiter(); - abortTimeout = (abortSignal) => { - let onAbort; - const promise = new Promise((resolve) => { - onAbort = () => resolve({ state: WaiterState.ABORTED }); - if (typeof abortSignal.addEventListener === "function") { - abortSignal.addEventListener("abort", onAbort); +// node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js +var require_ChecksumStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ChecksumStream = void 0; + var util_base64_1 = require_dist_cjs10(); + var stream_1 = require("stream"); + var ChecksumStream = class extends stream_1.Duplex { + expectedChecksum; + checksumSourceLocation; + checksum; + source; + base64Encoder; + pendingCallback = null; + constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) { + super(); + if (typeof source.pipe === "function") { + this.source = source; } else { - abortSignal.onabort = onAbort; + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); } - }); - return { - clearListener() { - if (typeof abortSignal.removeEventListener === "function") { - abortSignal.removeEventListener("abort", onAbort); + this.base64Encoder = base64Encoder ?? util_base64_1.toBase64; + this.expectedChecksum = expectedChecksum; + this.checksum = checksum; + this.checksumSourceLocation = checksumSourceLocation; + this.source.pipe(this); + } + _read(size) { + if (this.pendingCallback) { + const callback = this.pendingCallback; + this.pendingCallback = null; + callback(); + } + } + _write(chunk, encoding, callback) { + try { + this.checksum.update(chunk); + const canPushMore = this.push(chunk); + if (!canPushMore) { + this.pendingCallback = callback; + return; } + } catch (e5) { + return callback(e5); + } + return callback(); + } + async _final(callback) { + try { + const digest = await this.checksum.digest(); + const received = this.base64Encoder(digest); + if (this.expectedChecksum !== received) { + return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}" in response header "${this.checksumSourceLocation}".`)); + } + } catch (e5) { + return callback(e5); + } + this.push(null); + return callback(); + } + }; + exports2.ChecksumStream = ChecksumStream; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js +var require_stream_type_check = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBlob = exports2.isReadableStream = void 0; + var isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream); + exports2.isReadableStream = isReadableStream; + var isBlob = (blob) => { + return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); + }; + exports2.isBlob = isBlob; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js +var require_ChecksumStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ChecksumStream = void 0; + var ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() { + }; + var ChecksumStream = class extends ReadableStreamRef { + }; + exports2.ChecksumStream = ChecksumStream; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js +var require_createChecksumStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createChecksumStream = void 0; + var util_base64_1 = require_dist_cjs10(); + var stream_type_check_1 = require_stream_type_check(); + var ChecksumStream_browser_1 = require_ChecksumStream_browser(); + var createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => { + if (!(0, stream_type_check_1.isReadableStream)(source)) { + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); + } + const encoder = base64Encoder ?? util_base64_1.toBase64; + if (typeof TransformStream !== "function") { + throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); + } + const transform = new TransformStream({ + start() { }, - aborted: promise - }; - }; - createWaiter = async (options, input, acceptorChecks) => { - const params = { - ...waiterServiceDefaults, - ...options - }; - validateWaiterOptions(params); - const exitConditions = [runPolling(params, input, acceptorChecks)]; - const finalize = []; - if (options.abortSignal) { - const { aborted, clearListener } = abortTimeout(options.abortSignal); - finalize.push(clearListener); - exitConditions.push(aborted); - } - if (options.abortController?.signal) { - const { aborted, clearListener } = abortTimeout(options.abortController.signal); - finalize.push(clearListener); - exitConditions.push(aborted); - } - return Promise.race(exitConditions).then((result) => { - for (const fn of finalize) { - fn(); + async transform(chunk, controller) { + checksum.update(chunk); + controller.enqueue(chunk); + }, + async flush(controller) { + 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); + } else { + controller.terminate(); + } } - return result; }); + source.pipeThrough(transform); + const readable = transform.readable; + Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype); + return readable; + }; + exports2.createChecksumStream = createChecksumStream; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js +var require_createChecksumStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createChecksumStream = createChecksumStream; + var stream_type_check_1 = require_stream_type_check(); + var ChecksumStream_1 = require_ChecksumStream(); + var createChecksumStream_browser_1 = require_createChecksumStream_browser(); + function createChecksumStream(init) { + if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { + return (0, createChecksumStream_browser_1.createChecksumStream)(init); + } + return new ChecksumStream_1.ChecksumStream(init); + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js +var require_ByteArrayCollector = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ByteArrayCollector = void 0; + var ByteArrayCollector = class { + allocByteArray; + byteLength = 0; + byteArrays = []; + constructor(allocByteArray) { + this.allocByteArray = allocByteArray; + } + push(byteArray) { + this.byteArrays.push(byteArray); + this.byteLength += byteArray.byteLength; + } + flush() { + if (this.byteArrays.length === 1) { + const bytes = this.byteArrays[0]; + this.reset(); + return bytes; + } + const aggregation = this.allocByteArray(this.byteLength); + let cursor2 = 0; + for (let i5 = 0; i5 < this.byteArrays.length; ++i5) { + const bytes = this.byteArrays[i5]; + aggregation.set(bytes, cursor2); + cursor2 += bytes.byteLength; + } + this.reset(); + return aggregation; + } + reset() { + this.byteArrays = []; + this.byteLength = 0; + } + }; + exports2.ByteArrayCollector = ByteArrayCollector; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js +var require_createBufferedReadableStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createBufferedReadable = void 0; + exports2.createBufferedReadableStream = createBufferedReadableStream; + exports2.merge = merge; + exports2.flush = flush; + exports2.sizeOf = sizeOf; + exports2.modeOf = modeOf; + var ByteArrayCollector_1 = require_ByteArrayCollector(); + function createBufferedReadableStream(upstream, size, logger2) { + const reader = upstream.getReader(); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = ["", new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2))]; + let mode = -1; + const pull = async (controller) => { + const { value, done } = await reader.read(); + const chunk = value; + if (done) { + if (mode !== -1) { + const remainder = flush(buffers, mode); + if (sizeOf(remainder) > 0) { + controller.enqueue(remainder); + } + } + controller.close(); + } else { + const chunkMode = modeOf(chunk, false); + if (mode !== chunkMode) { + if (mode >= 0) { + controller.enqueue(flush(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + controller.enqueue(chunk); + return; + } + const chunkSize = sizeOf(chunk); + bytesSeen += chunkSize; + const bufferSize = sizeOf(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + controller.enqueue(chunk); + } else { + const newSize = merge(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + controller.enqueue(flush(buffers, mode)); + } else { + await pull(controller); + } + } + } + }; + return new ReadableStream({ + pull + }); + } + exports2.createBufferedReadable = createBufferedReadableStream; + function merge(buffers, mode, chunk) { + switch (mode) { + case 0: + buffers[0] += chunk; + return sizeOf(buffers[0]); + case 1: + case 2: + buffers[mode].push(chunk); + return sizeOf(buffers[mode]); + } + } + function flush(buffers, mode) { + switch (mode) { + case 0: + const s = buffers[0]; + buffers[0] = ""; + return s; + case 1: + case 2: + return buffers[mode].flush(); + } + throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); + } + function sizeOf(chunk) { + return chunk?.byteLength ?? chunk?.length ?? 0; + } + function modeOf(chunk, allowBuffer = true) { + if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { + return 2; + } + if (chunk instanceof Uint8Array) { + return 1; + } + if (typeof chunk === "string") { + return 0; + } + return -1; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js +var require_createBufferedReadable = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createBufferedReadable = createBufferedReadable; + var node_stream_1 = require("node:stream"); + var ByteArrayCollector_1 = require_ByteArrayCollector(); + var createBufferedReadableStream_1 = require_createBufferedReadableStream(); + var stream_type_check_1 = require_stream_type_check(); + function createBufferedReadable(upstream, size, logger2) { + if ((0, stream_type_check_1.isReadableStream)(upstream)) { + return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger2); + } + const downstream = new node_stream_1.Readable({ read() { + } }); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = [ + "", + new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2)), + new ByteArrayCollector_1.ByteArrayCollector((size2) => Buffer.from(new Uint8Array(size2))) + ]; + let mode = -1; + upstream.on("data", (chunk) => { + const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); + if (mode !== chunkMode) { + if (mode >= 0) { + downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + downstream.push(chunk); + return; + } + const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); + bytesSeen += chunkSize; + const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + downstream.push(chunk); + } else { + const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); + } + } + }); + upstream.on("end", () => { + if (mode !== -1) { + const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); + if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { + downstream.push(remainder); + } + } + downstream.push(null); + }); + return downstream; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js +var require_getAwsChunkedEncodingStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getAwsChunkedEncodingStream = void 0; + var getAwsChunkedEncodingStream = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0; + const reader = readableStream.getReader(); + return new ReadableStream({ + async pull(controller) { + const { value, done } = await reader.read(); + if (done) { + controller.enqueue(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + controller.enqueue(`${checksumLocationName}:${checksum}\r +`); + controller.enqueue(`\r +`); + } + controller.close(); + } else { + controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r +${value}\r +`); + } + } + }); + }; + exports2.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js +var require_getAwsChunkedEncodingStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; + var node_stream_1 = require("node:stream"); + var getAwsChunkedEncodingStream_browser_1 = require_getAwsChunkedEncodingStream_browser(); + var stream_type_check_1 = require_stream_type_check(); + function getAwsChunkedEncodingStream(stream, options) { + const readable = stream; + const readableStream = stream; + if ((0, stream_type_check_1.isReadableStream)(readableStream)) { + return (0, getAwsChunkedEncodingStream_browser_1.getAwsChunkedEncodingStream)(readableStream, options); + } + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : void 0; + const awsChunkedEncodingStream = new node_stream_1.Readable({ + read: () => { + } + }); + readable.on("data", (data3) => { + const length = bodyLengthChecker(data3) || 0; + if (length === 0) { + return; + } + awsChunkedEncodingStream.push(`${length.toString(16)}\r +`); + awsChunkedEncodingStream.push(data3); + awsChunkedEncodingStream.push("\r\n"); + }); + readable.on("end", async () => { + awsChunkedEncodingStream.push(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r +`); + awsChunkedEncodingStream.push(`\r +`); + } + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js +var require_headStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.headStream = headStream; + async function headStream(stream, bytes) { + let byteLengthCounter = 0; + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + byteLengthCounter += value?.byteLength ?? 0; + } + if (byteLengthCounter >= bytes) { + break; + } + isDone = done; + } + reader.releaseLock(); + const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); + let offset = 0; + for (const chunk of chunks) { + if (chunk.byteLength > collected.byteLength - offset) { + collected.set(chunk.subarray(0, collected.byteLength - offset), offset); + break; + } else { + collected.set(chunk, offset); + } + offset += chunk.length; + } + return collected; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/headStream.js +var require_headStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/headStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.headStream = void 0; + var stream_1 = require("stream"); + var headStream_browser_1 = require_headStream_browser(); + var stream_type_check_1 = require_stream_type_check(); + var headStream = (stream, bytes) => { + if ((0, stream_type_check_1.isReadableStream)(stream)) { + return (0, headStream_browser_1.headStream)(stream, bytes); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + collector.limit = bytes; + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes2 = new Uint8Array(Buffer.concat(this.buffers)); + resolve(bytes2); + }); + }); + }; + exports2.headStream = headStream; + var Collector = class extends stream_1.Writable { + buffers = []; + limit = Infinity; + bytesBuffered = 0; + _write(chunk, encoding, callback) { + this.buffers.push(chunk); + this.bytesBuffered += chunk.byteLength ?? 0; + if (this.bytesBuffered >= this.limit) { + const excess = this.bytesBuffered - this.limit; + const tailBuffer = this.buffers[this.buffers.length - 1]; + this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess); + this.emit("finish"); + } + callback(); + } }; } }); -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client.js -var Client; -var init_client = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/client.js"() { - init_MiddlewareStack(); - Client = class { - config; - middlewareStack = constructStack(); - initConfig; - handlers; - constructor(config) { - this.config = config; - const { protocol, protocolSettings } = config; - if (protocolSettings) { - if (typeof protocol === "function") { - config.protocol = new protocol(protocolSettings); +// node_modules/@smithy/util-uri-escape/dist-cjs/index.js +var require_dist_cjs11 = __commonJS({ + "node_modules/@smithy/util-uri-escape/dist-cjs/index.js"(exports2) { + "use strict"; + var escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); + var hexEncode = (c5) => `%${c5.charCodeAt(0).toString(16).toUpperCase()}`; + var escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/"); + exports2.escapeUri = escapeUri; + exports2.escapeUriPath = escapeUriPath; + } +}); + +// node_modules/@smithy/querystring-builder/dist-cjs/index.js +var require_dist_cjs12 = __commonJS({ + "node_modules/@smithy/querystring-builder/dist-cjs/index.js"(exports2) { + "use strict"; + var utilUriEscape = require_dist_cjs11(); + function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = utilUriEscape.escapeUri(key); + if (Array.isArray(value)) { + for (let i5 = 0, iLen = value.length; i5 < iLen; i5++) { + parts.push(`${key}=${utilUriEscape.escapeUri(value[i5])}`); } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${utilUriEscape.escapeUri(value)}`; + } + parts.push(qsEntry); } } - send(command, optionsOrCb, cb) { - const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; - const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; - const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; - let handler; - if (useHandlerCache) { - if (!this.handlers) { - this.handlers = /* @__PURE__ */ new WeakMap(); - } - const handlers = this.handlers; - if (handlers.has(command.constructor)) { - handler = handlers.get(command.constructor); - } else { - handler = command.resolveMiddleware(this.middlewareStack, this.config, options); - handlers.set(command.constructor, handler); - } - } else { - delete this.handlers; - handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + return parts.join("&"); + } + exports2.buildQueryString = buildQueryString; + } +}); + +// node_modules/@smithy/node-http-handler/dist-cjs/index.js +var require_dist_cjs13 = __commonJS({ + "node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2) { + "use strict"; + var protocolHttp = require_dist_cjs2(); + var querystringBuilder = require_dist_cjs12(); + var node_https = require("node:https"); + var node_stream = require("node:stream"); + var http22 = require("node:http2"); + function buildAbortError(abortSignal) { + const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0; + if (reason) { + if (reason instanceof Error) { + const abortError3 = new Error("Request aborted"); + abortError3.name = "AbortError"; + abortError3.cause = reason; + return abortError3; } - if (callback) { - handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => { - }); + const abortError2 = new Error(String(reason)); + abortError2.name = "AbortError"; + return abortError2; + } + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return abortError; + } + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + var getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; + }; + var timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId) + }; + var DEFER_EVENT_LISTENER_TIME$2 = 1e3; + var setConnectionTimeout = (request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; + } + const registerTimeout = (offset) => { + const timeoutId = timing.setTimeout(() => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), { + name: "TimeoutError" + })); + }, timeoutInMs - offset); + const doWithSocket = (socket) => { + if (socket?.connecting) { + socket.on("connect", () => { + timing.clearTimeout(timeoutId); + }); + } else { + timing.clearTimeout(timeoutId); + } + }; + if (request.socket) { + doWithSocket(request.socket); } else { - return handler(command).then((result) => result.output); + request.on("socket", doWithSocket); + } + }; + if (timeoutInMs < 2e3) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2); + }; + var setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger2) => { + if (timeoutInMs) { + 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), { + name: "TimeoutError", + code: "ETIMEDOUT" + }); + req.destroy(error2); + reject(error2); + } else { + msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`; + logger2?.warn?.(msg); + } + }, timeoutInMs); + } + return -1; + }; + var DEFER_EVENT_LISTENER_TIME$1 = 3e3; + var setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { + if (keepAlive !== true) { + return -1; + } + const registerListener = () => { + if (request.socket) { + request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } else { + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + } + }; + if (deferTimeMs === 0) { + registerListener(); + return 0; + } + return timing.setTimeout(registerListener, deferTimeMs); + }; + var DEFER_EVENT_LISTENER_TIME = 3e3; + var setSocketTimeout = (request, reject, timeoutInMs = 0) => { + const registerTimeout = (offset) => { + const timeout = timeoutInMs - offset; + const onTimeout = () => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" })); + }; + if (request.socket) { + request.socket.setTimeout(timeout, onTimeout); + request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); + } else { + request.setTimeout(timeout, onTimeout); + } + }; + if (0 < timeoutInMs && timeoutInMs < 6e3) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); + }; + var MIN_WAIT_TIME = 6e3; + async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) { + const headers = request.headers ?? {}; + const expect = headers.Expect || headers.expect; + let timeoutId = -1; + let sendBody = true; + if (!externalAgent && expect === "100-continue") { + sendBody = await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + timing.clearTimeout(timeoutId); + resolve(true); + }); + httpRequest.on("response", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + httpRequest.on("error", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + }) + ]); + } + if (sendBody) { + writeBody(httpRequest, request.body); + } + } + function writeBody(httpRequest, body) { + if (body instanceof node_stream.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + const isBuffer = Buffer.isBuffer(body); + const isString = typeof body === "string"; + if (isBuffer || isString) { + if (isBuffer && body.byteLength === 0) { + httpRequest.end(); + } else { + httpRequest.end(body); + } + return; + } + const uint8 = body; + if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; + } + httpRequest.end(); + } + var DEFAULT_REQUEST_TIMEOUT = 0; + var hAgent = void 0; + var hRequest = void 0; + var NodeHttpHandler2 = class _NodeHttpHandler { + config; + configProvider; + socketWarningTimestamp = 0; + externalAgent = false; + metadata = { handlerProtocol: "http/1.1" }; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new _NodeHttpHandler(instanceOrOptions); + } + static checkSocketUsage(agent, socketWarningTimestamp, logger2 = console) { + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15e3; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = sockets[origin]?.length ?? 0; + const requestsEnqueued = requests[origin]?.length ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + logger2?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`); + return Date.now(); + } + } + } + return socketWarningTimestamp; + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }).catch(reject); + } else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const config = this.config; + const isSSL = request.protocol === "https:"; + if (!isSSL && !this.config.httpAgent) { + this.config.httpAgent = await this.config.httpAgentProvider(); + } + return new Promise((_resolve, _reject) => { + let writeRequestBodyPromise = void 0; + const timeouts = []; + const resolve = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _reject(arg); + }; + if (abortSignal?.aborted) { + const abortError = buildAbortError(abortSignal); + reject(abortError); + return; + } + const headers = request.headers ?? {}; + const expectContinue = (headers.Expect ?? headers.expect) === "100-continue"; + let agent = isSSL ? config.httpsAgent : config.httpAgent; + if (expectContinue && !this.externalAgent) { + agent = new (isSSL ? node_https.Agent : hAgent)({ + keepAlive: false, + maxSockets: Infinity + }); + } + timeouts.push(timing.setTimeout(() => { + this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger); + }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2e3) + (config.connectionTimeout ?? 1e3))); + const queryString = querystringBuilder.buildQueryString(request.query || {}); + let auth = void 0; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}`; + } + let path3 = request.path; + if (queryString) { + path3 += `?${queryString}`; + } + if (request.fragment) { + path3 += `#${request.fragment}`; + } + let hostname = request.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request.hostname.slice(1, -1); + } else { + hostname = request.hostname; + } + const nodeHttpsOptions = { + headers: request.headers, + host: hostname, + method: request.method, + path: path3, + port: request.port, + agent, + auth + }; + const requestFunc = isSSL ? node_https.request : hRequest; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } else { + reject(err); + } + }); + if (abortSignal) { + const onAbort = () => { + req.destroy(); + const abortError = buildAbortError(abortSignal); + reject(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout; + timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout)); + timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console)); + timeouts.push(setSocketTimeout(req, reject, config.socketTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push(setSocketKeepAlive(req, { + keepAlive: httpAgent.keepAlive, + keepAliveMsecs: httpAgent.keepAliveMsecs + })); + } + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e5) => { + timeouts.forEach(timing.clearTimeout); + return _reject(e5); + }); + }); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger: logger2 } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout, + socketTimeout, + socketAcquisitionWarningTimeout, + throwOnRequestTimeout, + httpAgentProvider: async () => { + const { Agent: Agent7, request } = await import("node:http"); + hRequest = request; + hAgent = Agent7; + if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") { + this.externalAgent = true; + return httpAgent; + } + return new hAgent({ keepAlive, maxSockets, ...httpAgent }); + }, + httpsAgent: (() => { + if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") { + this.externalAgent = true; + return httpsAgent; + } + return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger: logger2 + }; + } + }; + var ids = new Uint16Array(1); + var ClientHttp2SessionRef = class { + id = ids[0]++; + total = 0; + max = 0; + session; + refs = 0; + constructor(session) { + session.unref(); + this.session = session; + } + retain() { + if (this.session.destroyed) { + throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session."); + } + this.refs += 1; + this.total += 1; + this.max = Math.max(this.refs, this.max); + this.session.ref(); + } + free() { + if (this.session.destroyed) { + return; + } + this.refs -= 1; + if (this.refs === 0) { + this.session.unref(); + } + if (this.refs < 0) { + throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement."); + } + } + deref() { + return this.session; + } + close() { + if (!this.session.closed) { + this.session.close(); } } destroy() { - this.config?.requestHandler?.destroy?.(); - delete this.handlers; + this.refs = 0; + if (!this.session.destroyed) { + this.session.destroy(); + } + } + useCount() { + return this.refs; } }; + var NodeHttp2ConnectionPool = class { + sessions = []; + maxConcurrency = 0; + constructor(sessions) { + this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session)); + } + poll() { + let cleanup = false; + for (const session of this.sessions) { + if (session.deref().destroyed) { + cleanup = true; + continue; + } + if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) { + return session; + } + } + if (cleanup) { + for (const session of this.sessions) { + if (session.deref().destroyed) { + this.remove(session); + } + } + } + } + offerLast(ref) { + this.sessions.push(ref); + } + remove(ref) { + const ix = this.sessions.indexOf(ref); + if (ix > -1) { + this.sessions.splice(ix, 1); + } + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + setMaxConcurrency(maxConcurrency) { + this.maxConcurrency = maxConcurrency; + } + destroy(ref) { + this.remove(ref); + ref.destroy(); + } + }; + var NodeHttp2ConnectionManager = class { + config; + connectionPools = /* @__PURE__ */ new Map(); + constructor(config) { + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } + } + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const pool = this.getPool(url); + if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) { + const available = pool.poll(); + if (available) { + available.retain(); + return available; + } + } + const ref = new ClientHttp2SessionRef(http22.connect(url)); + const session = ref.deref(); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error("Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString()); + } + }); + } + const graceful = () => { + this.removeFromPoolAndClose(url, ref); + }; + const ensureDestroyed = () => { + this.removeFromPoolAndCheckedDestroy(url, ref); + }; + session.on("goaway", graceful); + session.on("error", ensureDestroyed); + session.on("frameError", ensureDestroyed); + session.on("close", ensureDestroyed); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed); + } + pool.offerLast(ref); + ref.retain(); + return ref; + } + release(_requestContext, ref) { + ref.free(); + } + createIsolatedSession(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const ref = new ClientHttp2SessionRef(http22.connect(url)); + const session = ref.deref(); + session.settings({ maxConcurrentStreams: 1 }); + const ensureDestroyed = () => { + ref.destroy(); + }; + session.on("error", ensureDestroyed); + session.on("frameError", ensureDestroyed); + session.on("close", ensureDestroyed); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed); + } + ref.retain(); + return ref; + } + destroy() { + for (const [url, connectionPool] of this.connectionPools) { + for (const session of [...connectionPool]) { + session.destroy(); + } + this.connectionPools.delete(url); + } + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + for (const pool of this.connectionPools.values()) { + pool.setMaxConcurrency(maxConcurrentStreams); + } + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + debug() { + const pools = {}; + for (const [url, pool] of this.connectionPools) { + const sessions = []; + for (const ref of pool) { + sessions.push({ + id: ref.id, + active: ref.useCount(), + maxConcurrent: ref.max, + totalRequests: ref.total + }); + } + pools[url] = { sessions }; + } + return pools; + } + removeFromPoolAndClose(authority, ref) { + this.connectionPools.get(authority)?.remove(ref); + ref.close(); + } + removeFromPoolAndCheckedDestroy(authority, ref) { + this.connectionPools.get(authority)?.remove(ref); + ref.destroy(); + } + getPool(url) { + if (!this.connectionPools.has(url)) { + const pool = new NodeHttp2ConnectionPool(); + if (this.config.maxConcurrency) { + pool.setMaxConcurrency(this.config.maxConcurrency); + } + this.connectionPools.set(url, pool); + } + return this.connectionPools.get(url); + } + getUrlString(request) { + return request.destination.toString(); + } + }; + var NodeHttp2Handler = class _NodeHttp2Handler { + config; + configProvider; + metadata = { handlerProtocol: "h2" }; + connectionManager = new NodeHttp2ConnectionManager({}); + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new _NodeHttp2Handler(instanceOrOptions); + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((opts) => { + resolve(opts || {}); + }).catch(reject); + } else { + resolve(options || {}); + } + }); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) { + if (!this.config) { + this.config = await this.configProvider; + const { disableConcurrentStreams: disableConcurrentStreams2, maxConcurrentStreams } = this.config; + this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams2 ?? false); + if (maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams); + } + } + const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; + const useIsolatedSession = disableConcurrentStreams || isEventStream; + const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; + return new Promise((_resolve, _reject) => { + let fulfilled = false; + let writeRequestBodyPromise = void 0; + const resolve = async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }; + if (abortSignal?.aborted) { + fulfilled = true; + const abortError = buildAbortError(abortSignal); + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request; + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const connectConfig = { + requestTimeout: this.config?.sessionTimeout, + isEventStream + }; + const ref = useIsolatedSession ? this.connectionManager.createIsolatedSession(requestContext, connectConfig) : this.connectionManager.lease(requestContext, connectConfig); + const session = ref.deref(); + const rejectWithDestroy = (err) => { + if (useIsolatedSession) { + ref.destroy(); + } + fulfilled = true; + reject(err); + }; + const queryString = querystringBuilder.buildQueryString(query ?? {}); + let path3 = request.path; + if (queryString) { + path3 += `?${queryString}`; + } + if (request.fragment) { + path3 += `#${request.fragment}`; + } + const clientHttp2Stream = session.request({ + ...request.headers, + [http22.constants.HTTP2_HEADER_PATH]: path3, + [http22.constants.HTTP2_HEADER_METHOD]: method + }); + if (effectiveRequestTimeout) { + clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => { + clientHttp2Stream.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = () => { + clientHttp2Stream.close(); + const abortError = buildAbortError(abortSignal); + rejectWithDestroy(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + clientHttp2Stream.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + clientHttp2Stream.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + clientHttp2Stream.on("error", rejectWithDestroy); + clientHttp2Stream.on("aborted", () => { + rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`)); + }); + clientHttp2Stream.on("response", (headers) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: headers[":status"] ?? -1, + headers: getTransformedHeaders(headers), + body: clientHttp2Stream + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (useIsolatedSession) { + session.close(); + } + }); + clientHttp2Stream.on("close", () => { + if (useIsolatedSession) { + ref.destroy(); + } else { + this.connectionManager.release(requestContext, ref); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + }; + var Collector = class extends node_stream.Writable { + bufferedBytes = []; + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } + }; + var streamCollector5 = (stream) => { + if (isReadableStreamInstance(stream)) { + return collectReadableStream(stream); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); + }); + }; + var isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; + async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; + } + exports2.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; + exports2.NodeHttp2Handler = NodeHttp2Handler; + exports2.NodeHttpHandler = NodeHttpHandler2; + exports2.streamCollector = streamCollector5; + } +}); + +// node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +var require_dist_cjs14 = __commonJS({ + "node_modules/@smithy/fetch-http-handler/dist-cjs/index.js"(exports2) { + "use strict"; + var protocolHttp = require_dist_cjs2(); + var querystringBuilder = require_dist_cjs12(); + var utilBase64 = require_dist_cjs10(); + function createRequest(url, requestOptions) { + return new Request(url, requestOptions); + } + function requestTimeout(timeoutInMs = 0) { + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); + } + }); + } + var keepAliveSupport = { + supported: void 0 + }; + var FetchHttpHandler = class _FetchHttpHandler { + config; + configProvider; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new _FetchHttpHandler(instanceOrOptions); + } + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + if (keepAliveSupport.supported === void 0) { + keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]")); + } + } + destroy() { + } + async handle(request, { abortSignal, requestTimeout: requestTimeout$1 } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = requestTimeout$1 ?? this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + const credentials = this.config.credentials; + if (abortSignal?.aborted) { + const abortError = buildAbortError(abortSignal); + return Promise.reject(abortError); + } + let path3 = request.path; + const queryString = querystringBuilder.buildQueryString(request.query || {}); + if (queryString) { + path3 += `?${queryString}`; + } + if (request.fragment) { + path3 += `#${request.fragment}`; + } + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request; + const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path3}`; + const body = method === "GET" || method === "HEAD" ? void 0 : request.body; + const requestOptions = { + body, + headers: new Headers(request.headers), + method, + credentials + }; + if (this.config?.cache) { + requestOptions.cache = this.config.cache; + } + if (body) { + requestOptions.duplex = "half"; + } + if (typeof AbortController !== "undefined") { + requestOptions.signal = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions.keepalive = keepAlive; + } + if (typeof this.config.requestInit === "function") { + Object.assign(requestOptions, this.config.requestInit(request)); + } + let removeSignalEventListener = () => { + }; + const fetchRequest = createRequest(url, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; + } + const hasReadableStream = response.body != void 0; + if (!hasReadableStream) { + return response.blob().then((body2) => ({ + response: new protocolHttp.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: body2 + }) + })); + } + return { + response: new protocolHttp.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body + }) + }; + }), + requestTimeout(requestTimeoutInMs) + ]; + if (abortSignal) { + raceOfPromises.push(new Promise((resolve, reject) => { + const onAbort = () => { + const abortError = buildAbortError(abortSignal); + reject(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + removeSignalEventListener = () => signal.removeEventListener("abort", onAbort); + } else { + abortSignal.onabort = onAbort; + } + })); + } + return Promise.race(raceOfPromises).finally(removeSignalEventListener); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + config[key] = value; + return config; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + }; + function buildAbortError(abortSignal) { + const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0; + if (reason) { + if (reason instanceof Error) { + const abortError3 = new Error("Request aborted"); + abortError3.name = "AbortError"; + abortError3.cause = reason; + return abortError3; + } + const abortError2 = new Error(String(reason)); + abortError2.name = "AbortError"; + return abortError2; + } + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return abortError; + } + var streamCollector5 = async (stream) => { + if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") { + if (Blob.prototype.arrayBuffer !== void 0) { + return new Uint8Array(await stream.arrayBuffer()); + } + return collectBlob(stream); + } + return collectStream(stream); + }; + async function collectBlob(blob) { + const base64 = await readToBase64(blob); + const arrayBuffer = utilBase64.fromBase64(base64); + return new Uint8Array(arrayBuffer); + } + async function collectStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; + } + function readToBase64(blob) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = reader.result ?? ""; + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob); + }); + } + exports2.FetchHttpHandler = FetchHttpHandler; + exports2.keepAliveSupport = keepAliveSupport; + exports2.streamCollector = streamCollector5; + } +}); + +// node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +var require_dist_cjs15 = __commonJS({ + "node_modules/@smithy/util-hex-encoding/dist-cjs/index.js"(exports2) { + "use strict"; + var SHORT_TO_HEX = {}; + var HEX_TO_SHORT = {}; + for (let i5 = 0; i5 < 256; i5++) { + let encodedByte = i5.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i5] = encodedByte; + HEX_TO_SHORT[encodedByte] = i5; + } + function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i5 = 0; i5 < encoded.length; i5 += 2) { + const encodedByte = encoded.slice(i5, i5 + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i5 / 2] = HEX_TO_SHORT[encodedByte]; + } else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; + } + function toHex(bytes) { + let out = ""; + for (let i5 = 0; i5 < bytes.byteLength; i5++) { + out += SHORT_TO_HEX[bytes[i5]]; + } + return out; + } + exports2.fromHex = fromHex; + exports2.toHex = toHex; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js +var require_sdk_stream_mixin_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sdkStreamMixin = void 0; + var fetch_http_handler_1 = require_dist_cjs14(); + var util_base64_1 = require_dist_cjs10(); + var util_hex_encoding_1 = require_dist_cjs15(); + var util_utf8_1 = require_dist_cjs9(); + var stream_type_check_1 = require_stream_type_check(); + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + var sdkStreamMixin2 = (stream) => { + if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) { + const name = stream?.__proto__?.constructor?.name || stream; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, fetch_http_handler_1.streamCollector)(stream); + }; + const blobToWebStream = (blob) => { + if (typeof blob.stream !== "function") { + throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob.stream(); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return (0, util_base64_1.toBase64)(buf); + } else if (encoding === "hex") { + return (0, util_hex_encoding_1.toHex)(buf); + } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") { + return (0, util_utf8_1.toUtf8)(buf); + } else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + if (isBlobInstance(stream)) { + return blobToWebStream(stream); + } else if ((0, stream_type_check_1.isReadableStream)(stream)) { + return stream; + } else { + throw new Error(`Cannot transform payload to web stream, got ${stream}`); + } + } + }); + }; + exports2.sdkStreamMixin = sdkStreamMixin2; + var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +var require_sdk_stream_mixin = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sdkStreamMixin = void 0; + var node_http_handler_1 = require_dist_cjs13(); + var util_buffer_from_1 = require_dist_cjs8(); + var stream_1 = require("stream"); + var sdk_stream_mixin_browser_1 = require_sdk_stream_mixin_browser(); + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + var sdkStreamMixin2 = (stream) => { + if (!(stream instanceof stream_1.Readable)) { + try { + return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); + } catch (e5) { + const name = stream?.__proto__?.constructor?.name || stream; + throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); + } + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, node_http_handler_1.streamCollector)(stream); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === void 0 || Buffer.isEncoding(encoding)) { + return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); + } else { + const decoder2 = new TextDecoder(encoding); + return decoder2.decode(buf); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + if (stream.readableFlowing !== null) { + throw new Error("The stream has been consumed by other callbacks."); + } + if (typeof stream_1.Readable.toWeb !== "function") { + throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); + } + transformed = true; + return stream_1.Readable.toWeb(stream); + } + }); + }; + exports2.sdkStreamMixin = sdkStreamMixin2; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js +var require_splitStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitStream = splitStream; + async function splitStream(stream) { + if (typeof stream.stream === "function") { + stream = stream.stream(); + } + const readableStream = stream; + return readableStream.tee(); + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/splitStream.js +var require_splitStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/splitStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitStream = splitStream; + var stream_1 = require("stream"); + var splitStream_browser_1 = require_splitStream_browser(); + var stream_type_check_1 = require_stream_type_check(); + async function splitStream(stream) { + if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { + return (0, splitStream_browser_1.splitStream)(stream); + } + const stream1 = new stream_1.PassThrough(); + const stream2 = new stream_1.PassThrough(); + stream.pipe(stream1); + stream.pipe(stream2); + return [stream1, stream2]; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/index.js +var require_dist_cjs16 = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/index.js"(exports2) { + "use strict"; + var utilBase64 = require_dist_cjs10(); + var utilUtf8 = require_dist_cjs9(); + var ChecksumStream = require_ChecksumStream(); + var createChecksumStream = require_createChecksumStream(); + var createBufferedReadable = require_createBufferedReadable(); + var getAwsChunkedEncodingStream = require_getAwsChunkedEncodingStream(); + var headStream = require_headStream(); + var sdkStreamMixin2 = require_sdk_stream_mixin(); + var splitStream = require_splitStream(); + var streamTypeCheck = require_stream_type_check(); + var Uint8ArrayBlobAdapter2 = class _Uint8ArrayBlobAdapter extends Uint8Array { + static fromString(source, encoding = "utf-8") { + if (typeof source === "string") { + if (encoding === "base64") { + return _Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source)); + } + return _Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(source)); + } + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } + static mutate(source) { + Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype); + return source; + } + transformToString(encoding = "utf-8") { + if (encoding === "base64") { + return utilBase64.toBase64(this); + } + return utilUtf8.toUtf8(this); + } + }; + exports2.isBlob = streamTypeCheck.isBlob; + exports2.isReadableStream = streamTypeCheck.isReadableStream; + exports2.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter2; + Object.prototype.hasOwnProperty.call(ChecksumStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: ChecksumStream["__proto__"] + }); + Object.keys(ChecksumStream).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = ChecksumStream[k5]; + }); + Object.prototype.hasOwnProperty.call(createChecksumStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: createChecksumStream["__proto__"] + }); + Object.keys(createChecksumStream).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = createChecksumStream[k5]; + }); + Object.prototype.hasOwnProperty.call(createBufferedReadable, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: createBufferedReadable["__proto__"] + }); + Object.keys(createBufferedReadable).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = createBufferedReadable[k5]; + }); + Object.prototype.hasOwnProperty.call(getAwsChunkedEncodingStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: getAwsChunkedEncodingStream["__proto__"] + }); + Object.keys(getAwsChunkedEncodingStream).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = getAwsChunkedEncodingStream[k5]; + }); + Object.prototype.hasOwnProperty.call(headStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: headStream["__proto__"] + }); + Object.keys(headStream).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = headStream[k5]; + }); + Object.prototype.hasOwnProperty.call(sdkStreamMixin2, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: sdkStreamMixin2["__proto__"] + }); + Object.keys(sdkStreamMixin2).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = sdkStreamMixin2[k5]; + }); + Object.prototype.hasOwnProperty.call(splitStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: splitStream["__proto__"] + }); + Object.keys(splitStream).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = splitStream[k5]; + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js +var import_util_stream, collectBody; +var init_collect_stream_body = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() { + import_util_stream = __toESM(require_dist_cjs16()); + collectBody = async (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody); + } + if (!streamBody) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); + } + const fromContext = context.streamCollector(streamBody); + return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js +function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c5) { + return "%" + c5.charCodeAt(0).toString(16).toUpperCase(); + }); +} +var init_extended_encode_uri_component = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js"() { } }); @@ -19409,149 +24505,886 @@ var init_deref = __esm({ } }); -// node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js -var isArrayBuffer; -var init_is_array_buffer = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js"() { - isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; +// 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/serde/util-buffer-from/buffer-from.js -var fromArrayBuffer, fromString; -var init_buffer_from = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-buffer-from/buffer-from.js"() { - init_is_array_buffer(); - fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { - if (!isArrayBuffer(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); - } - return Buffer.from(input, offset, length); - }; - fromString = (input, encoding) => { - if (typeof input !== "string") { - throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); - } - return encoding ? Buffer.from(input, encoding) : Buffer.from(input); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.js -var BASE64_REGEX, fromBase64; -var init_fromBase64 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.js"() { - init_buffer_from(); - BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; - fromBase64 = (input) => { - if (input.length * 3 % 4 !== 0) { - throw new TypeError(`Incorrect padding on base64 string.`); - } - if (!BASE64_REGEX.exec(input)) { - throw new TypeError(`Invalid base64 string.`); - } - const buffer = fromString(input, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.js -var fromUtf8; -var init_fromUtf8 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.js"() { - init_buffer_from(); - fromUtf8 = (input) => { - const buf = fromString(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.js -var toBase64; -var init_toBase64 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.js"() { - init_buffer_from(); - init_fromUtf8(); - toBase64 = (_input) => { - let input; - if (typeof _input === "string") { - input = fromUtf8(_input); - } else { - input = _input; - } - if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { - throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); - } - return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64"); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js -function bindUint8ArrayBlobAdapter(toUtf83, fromUtf83, toBase643, fromBase643) { - return class Uint8ArrayBlobAdapter2 extends Uint8Array { - static fromString(source, encoding = "utf-8") { - if (typeof source === "string") { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter2.mutate(fromBase643(source)); +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +var import_protocol_http2, import_util_middleware3, schemaDeserializationMiddleware, findHeader; +var init_schemaDeserializationMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() { + import_protocol_http2 = __toESM(require_dist_cjs2()); + import_util_middleware3 = __toESM(require_dist_cjs6()); + init_operation(); + schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { + const { response } = await next(args); + const { operationSchema } = (0, import_util_middleware3.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 (import_protocol_http2.HttpResponse.isInstance(response)) { + const { headers = {} } = response; + const headerEntries = Object.entries(headers); + error2.$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) + }; + } + } catch (e5) { + } } - return Uint8ArrayBlobAdapter2.mutate(fromUtf83(source)); + throw error2; } - throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); - } - static mutate(source) { - Object.setPrototypeOf(source, Uint8ArrayBlobAdapter2.prototype); - return source; - } - transformToString(encoding = "utf-8") { - if (encoding === "base64") { - return toBase643(this); - } - return toUtf83(this); - } - }; -} -var init_Uint8ArrayBlobAdapter = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.js -var toUtf8; -var init_toUtf8 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.js"() { - init_buffer_from(); - toUtf8 = (input) => { - if (typeof input === "string") { - return input; - } - if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { - throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); - } - return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); + }; + findHeader = (pattern, headers) => { + return (headers.find(([k5]) => { + return k5.match(pattern); + }) || [void 0, void 0])[1]; }; } }); -// node_modules/@smithy/core/dist-es/submodules/serde/uuid/v4.js -function bindV4(getRandomValues2) { - if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") { - return () => crypto.randomUUID(); +// node_modules/@smithy/querystring-parser/dist-cjs/index.js +var require_dist_cjs17 = __commonJS({ + "node_modules/@smithy/querystring-parser/dist-cjs/index.js"(exports2) { + "use strict"; + 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; + } + exports2.parseQueryString = parseQueryString; } - return () => { - const rnds = new Uint8Array(16); - getRandomValues2(rnds); - rnds[6] = rnds[6] & 15 | 64; - rnds[8] = rnds[8] & 63 | 128; - return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]]; +}); + +// node_modules/@smithy/url-parser/dist-cjs/index.js +var require_dist_cjs18 = __commonJS({ + "node_modules/@smithy/url-parser/dist-cjs/index.js"(exports2) { + "use strict"; + var querystringParser = require_dist_cjs17(); + var parseUrl7 = (url) => { + if (typeof url === "string") { + return parseUrl7(new URL(url)); + } + const { hostname, pathname, port, protocol, search } = url; + let query; + if (search) { + query = querystringParser.parseQueryString(search); + } + return { + hostname, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; + }; + exports2.parseUrl = parseUrl7; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +var import_url_parser, toEndpointV1; +var init_toEndpointV1 = __esm({ + "node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js"() { + import_url_parser = __toESM(require_dist_cjs18()); + toEndpointV1 = (endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = (0, import_url_parser.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 (0, import_url_parser.parseUrl)(endpoint); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +var endpoints_exports = {}; +__export(endpoints_exports, { + toEndpointV1: () => toEndpointV1 +}); +var init_endpoints = __esm({ + "node_modules/@smithy/core/dist-es/submodules/endpoints/index.js"() { + init_toEndpointV1(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +var import_util_middleware4, schemaSerializationMiddleware; +var init_schemaSerializationMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() { + init_endpoints(); + import_util_middleware4 = __toESM(require_dist_cjs6()); + init_operation(); + schemaSerializationMiddleware = (config) => (next, context) => async (args) => { + const { operationSchema } = (0, import_util_middleware4.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 decimalToHex; -var init_v4 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/uuid/v4.js"() { - decimalToHex = Array.from({ length: 256 }, (_, i5) => i5.toString(16).padStart(2, "0")); +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, 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)) { + 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: () => error, + 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(); } }); @@ -19991,6 +25824,571 @@ var init_date_utils = __esm({ } }); +// node_modules/tslib/tslib.es6.mjs +var tslib_es6_exports = {}; +__export(tslib_es6_exports, { + __addDisposableResource: () => __addDisposableResource, + __assign: () => __assign, + __asyncDelegator: () => __asyncDelegator, + __asyncGenerator: () => __asyncGenerator, + __asyncValues: () => __asyncValues, + __await: () => __await, + __awaiter: () => __awaiter, + __classPrivateFieldGet: () => __classPrivateFieldGet, + __classPrivateFieldIn: () => __classPrivateFieldIn, + __classPrivateFieldSet: () => __classPrivateFieldSet, + __createBinding: () => __createBinding, + __decorate: () => __decorate, + __disposeResources: () => __disposeResources, + __esDecorate: () => __esDecorate, + __exportStar: () => __exportStar, + __extends: () => __extends, + __generator: () => __generator, + __importDefault: () => __importDefault, + __importStar: () => __importStar, + __makeTemplateObject: () => __makeTemplateObject, + __metadata: () => __metadata, + __param: () => __param, + __propKey: () => __propKey, + __read: () => __read, + __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, + __runInitializers: () => __runInitializers, + __setFunctionName: () => __setFunctionName, + __spread: () => __spread, + __spreadArray: () => __spreadArray, + __spreadArrays: () => __spreadArrays, + __values: () => __values, + default: () => tslib_es6_default +}); +function __extends(d5, b6) { + if (typeof b6 !== "function" && b6 !== null) + throw new TypeError("Class extends value " + String(b6) + " is not a constructor or null"); + extendStatics(d5, b6); + function __() { + this.constructor = d5; + } + d5.prototype = b6 === null ? Object.create(b6) : (__.prototype = b6.prototype, new __()); +} +function __rest(s, e5) { + var t = {}; + for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e5.indexOf(p2) < 0) + t[p2] = s[p2]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i5 = 0, p2 = Object.getOwnPropertySymbols(s); i5 < p2.length; i5++) { + if (e5.indexOf(p2[i5]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i5])) + t[p2[i5]] = s[p2[i5]]; + } + return t; +} +function __decorate(decorators, target, key, desc) { + var c5 = arguments.length, r5 = c5 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r5 = Reflect.decorate(decorators, target, key, desc); + else for (var i5 = decorators.length - 1; i5 >= 0; i5--) if (d5 = decorators[i5]) r5 = (c5 < 3 ? d5(r5) : c5 > 3 ? d5(target, key, r5) : d5(target, key)) || r5; + return c5 > 3 && r5 && Object.defineProperty(target, key, r5), r5; +} +function __param(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; +} +function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f5) { + if (f5 !== void 0 && typeof f5 !== "function") throw new TypeError("Function expected"); + return f5; + } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i5 = decorators.length - 1; i5 >= 0; i5--) { + var context = {}; + for (var p2 in contextIn) context[p2] = p2 === "access" ? {} : contextIn[p2]; + for (var p2 in contextIn.access) context.access[p2] = contextIn.access[p2]; + context.addInitializer = function(f5) { + if (done) throw new TypeError("Cannot add initializers after decoration has completed"); + extraInitializers.push(accept(f5 || null)); + }; + var result = (0, decorators[i5])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +} +function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i5 = 0; i5 < initializers.length; i5++) { + value = useValue ? initializers[i5].call(thisArg, value) : initializers[i5].call(thisArg); + } + return useValue ? value : void 0; +} +function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +} +function __setFunctionName(f5, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f5, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +} +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} +function __awaiter(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()); + }); +} +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f5, y, t, g5 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g5.next = verb(0), g5["throw"] = verb(1), g5["return"] = verb(2), typeof Symbol === "function" && (g5[Symbol.iterator] = function() { + return this; + }), g5; + function verb(n3) { + return function(v) { + return step([n3, v]); + }; + } + function step(op2) { + if (f5) throw new TypeError("Generator is already executing."); + while (g5 && (g5 = 0, op2[0] && (_ = 0)), _) try { + if (f5 = 1, y && (t = op2[0] & 2 ? y["return"] : op2[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op2[1])).done) return t; + if (y = 0, t) op2 = [op2[0] & 2, t.value]; + switch (op2[0]) { + case 0: + case 1: + t = op2; + break; + case 4: + _.label++; + return { value: op2[1], done: false }; + case 5: + _.label++; + y = op2[1]; + op2 = [0]; + continue; + case 7: + op2 = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op2[0] === 6 || op2[0] === 2)) { + _ = 0; + continue; + } + if (op2[0] === 3 && (!t || op2[1] > t[0] && op2[1] < t[3])) { + _.label = op2[1]; + break; + } + if (op2[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op2; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op2); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op2 = body.call(thisArg, _); + } catch (e5) { + op2 = [6, e5]; + y = 0; + } finally { + f5 = t = 0; + } + if (op2[0] & 5) throw op2[1]; + return { value: op2[0] ? op2[1] : void 0, done: true }; + } +} +function __exportStar(m3, o2) { + for (var p2 in m3) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(o2, p2)) __createBinding(o2, m3, p2); +} +function __values(o2) { + var s = typeof Symbol === "function" && Symbol.iterator, m3 = s && o2[s], i5 = 0; + if (m3) return m3.call(o2); + if (o2 && typeof o2.length === "number") return { + next: function() { + if (o2 && i5 >= o2.length) o2 = void 0; + return { value: o2 && o2[i5++], done: !o2 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +function __read(o2, n3) { + var m3 = typeof Symbol === "function" && o2[Symbol.iterator]; + if (!m3) return o2; + 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 }; + } finally { + try { + if (r5 && !r5.done && (m3 = i5["return"])) m3.call(i5); + } finally { + if (e5) throw e5.error; + } + } + return ar; +} +function __spread() { + for (var ar = [], i5 = 0; i5 < arguments.length; i5++) + ar = ar.concat(__read(arguments[i5])); + return ar; +} +function __spreadArrays() { + for (var s = 0, i5 = 0, il = arguments.length; i5 < il; i5++) s += arguments[i5].length; + for (var r5 = Array(s), k5 = 0, i5 = 0; i5 < il; i5++) + for (var a5 = arguments[i5], j5 = 0, jl = a5.length; j5 < jl; j5++, k5++) + r5[k5] = a5[j5]; + return r5; +} +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i5 = 0, l3 = from.length, ar; i5 < l3; i5++) { + if (ar || !(i5 in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i5); + ar[i5] = from[i5]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g5 = generator.apply(thisArg, _arguments || []), i5, q2 = []; + return i5 = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i5[Symbol.asyncIterator] = function() { + return this; + }, i5; + function awaitReturn(f5) { + return function(v) { + return Promise.resolve(v).then(f5, reject); + }; + } + function verb(n3, f5) { + if (g5[n3]) { + i5[n3] = function(v) { + return new Promise(function(a5, b6) { + q2.push([n3, v, a5, b6]) > 1 || resume3(n3, v); + }); + }; + if (f5) i5[n3] = f5(i5[n3]); + } + } + function resume3(n3, v) { + try { + step(g5[n3](v)); + } catch (e5) { + settle(q2[0][3], e5); + } + } + function step(r5) { + r5.value instanceof __await ? Promise.resolve(r5.value.v).then(fulfill, reject) : settle(q2[0][2], r5); + } + function fulfill(value) { + resume3("next", value); + } + function reject(value) { + resume3("throw", value); + } + function settle(f5, v) { + if (f5(v), q2.shift(), q2.length) resume3(q2[0][0], q2[0][1]); + } +} +function __asyncDelegator(o2) { + var i5, p2; + return i5 = {}, verb("next"), verb("throw", function(e5) { + throw e5; + }), verb("return"), i5[Symbol.iterator] = function() { + return this; + }, i5; + function verb(n3, f5) { + i5[n3] = o2[n3] ? function(v) { + return (p2 = !p2) ? { value: __await(o2[n3](v)), done: false } : f5 ? f5(v) : v; + } : f5; + } +} +function __asyncValues(o2) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m3 = o2[Symbol.asyncIterator], i5; + return m3 ? m3.call(o2) : (o2 = typeof __values === "function" ? __values(o2) : o2[Symbol.iterator](), i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() { + return this; + }, i5); + function verb(n3) { + i5[n3] = o2[n3] && function(v) { + return new Promise(function(resolve, reject) { + v = o2[n3](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d5, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d5 }); + }, reject); + } +} +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; + } + return cooked; +} +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k5 = ownKeys(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding(result, mod, k5[i5]); + } + __setModuleDefault(result, mod); + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { default: mod }; +} +function __classPrivateFieldGet(receiver, state2, kind, f5) { + if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state2 === "function" ? receiver !== state2 || !f5 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state2.get(receiver); +} +function __classPrivateFieldSet(receiver, state2, value, kind, f5) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state2 === "function" ? receiver !== state2 || !f5 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f5.call(receiver, value) : f5 ? f5.value = value : state2.set(receiver, value), value; +} +function __classPrivateFieldIn(state2, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state2 === "function" ? receiver === state2 : state2.has(receiver); +} +function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { + try { + inner.call(this); + } catch (e5) { + return Promise.reject(e5); + } + }; + env.stack.push({ value, dispose, async }); + } else if (async) { + env.stack.push({ async: true }); + } + return value; +} +function __disposeResources(env) { + function fail(e5) { + env.error = env.hasError ? new _SuppressedError(e5, env.error, "An error was suppressed during disposal.") : e5; + env.hasError = true; + } + var r5, s = 0; + function next() { + while (r5 = env.stack.pop()) { + try { + if (!r5.async && s === 1) return s = 0, env.stack.push(r5), Promise.resolve().then(next); + if (r5.dispose) { + var result = r5.dispose.call(r5.value); + if (r5.async) return s |= 2, Promise.resolve(result).then(next, function(e5) { + fail(e5); + return next(); + }); + } else s |= 1; + } catch (e5) { + fail(e5); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); +} +function __rewriteRelativeImportExtension(path3, preserveJsx) { + if (typeof path3 === "string" && /^\.\.?\//.test(path3)) { + return path3.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m3, tsx, d5, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d5 && (!ext || !cm) ? m3 : d5 + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path3; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; +var init_tslib_es6 = __esm({ + "node_modules/tslib/tslib.es6.mjs"() { + extendStatics = function(d5, b6) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b7) { + d6.__proto__ = b7; + } || function(d6, b7) { + for (var p2 in b7) if (Object.prototype.hasOwnProperty.call(b7, p2)) d6[p2] = b7[p2]; + }; + return extendStatics(d5, b6); + }; + __assign = function() { + __assign = Object.assign || function __assign2(t) { + for (var s, i5 = 1, n3 = arguments.length; i5 < n3; i5++) { + s = arguments[i5]; + for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t[p2] = s[p2]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + __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]; + }); + __setModuleDefault = Object.create ? (function(o2, v) { + Object.defineProperty(o2, "default", { enumerable: true, value: v }); + }) : function(o2, v) { + o2["default"] = v; + }; + ownKeys = function(o2) { + ownKeys = 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 ownKeys(o2); + }; + _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error2, suppressed, message) { + var e5 = new Error(message); + return e5.name = "SuppressedError", e5.error = error2, e5.suppressed = suppressed, e5; + }; + tslib_es6_default = { + __extends, + __assign, + __rest, + __decorate, + __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources, + __rewriteRelativeImportExtension + }; + } +}); + +// node_modules/@smithy/uuid/dist-cjs/randomUUID.js +var require_randomUUID = __commonJS({ + "node_modules/@smithy/uuid/dist-cjs/randomUUID.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var crypto_1 = tslib_1.__importDefault(require("crypto")); + exports2.randomUUID = crypto_1.default.randomUUID.bind(crypto_1.default); + } +}); + +// node_modules/@smithy/uuid/dist-cjs/index.js +var require_dist_cjs19 = __commonJS({ + "node_modules/@smithy/uuid/dist-cjs/index.js"(exports2) { + "use strict"; + var randomUUID = require_randomUUID(); + var decimalToHex = Array.from({ length: 256 }, (_, i5) => i5.toString(16).padStart(2, "0")); + var v4 = () => { + if (randomUUID.randomUUID) { + return randomUUID.randomUUID(); + } + const rnds = new Uint8Array(16); + crypto.getRandomValues(rnds); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]]; + }; + exports2.v4 = v4; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js +var import_uuid; +var init_generateIdempotencyToken = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/generateIdempotencyToken.js"() { + import_uuid = __toESM(require_dist_cjs19()); + } +}); + // node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js var LazyJsonString; var init_lazy_json = __esm({ @@ -20245,3537 +26643,16 @@ var init_NumericValue = __esm({ } }); -// node_modules/@smithy/core/dist-es/submodules/serde/util-hex-encoding/hex-encoding.js -function fromHex(encoded) { - if (encoded.length % 2 !== 0) { - throw new Error("Hex encoded strings must have an even number length"); - } - const out = new Uint8Array(encoded.length / 2); - for (let i5 = 0; i5 < encoded.length; i5 += 2) { - const encodedByte = encoded.slice(i5, i5 + 2).toLowerCase(); - if (encodedByte in HEX_TO_SHORT) { - out[i5 / 2] = HEX_TO_SHORT[encodedByte]; - } else { - throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); - } - } - return out; -} -function toHex(bytes) { - let out = ""; - for (let i5 = 0; i5 < bytes.byteLength; i5++) { - out += SHORT_TO_HEX[bytes[i5]]; - } - return out; -} -var SHORT_TO_HEX, HEX_TO_SHORT; -var init_hex_encoding = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-hex-encoding/hex-encoding.js"() { - SHORT_TO_HEX = {}; - HEX_TO_SHORT = {}; - for (let i5 = 0; i5 < 256; i5++) { - let encodedByte = i5.toString(16).toLowerCase(); - if (encodedByte.length === 1) { - encodedByte = `0${encodedByte}`; - } - SHORT_TO_HEX[i5] = encodedByte; - HEX_TO_SHORT[encodedByte] = i5; - } - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.js -var import_node_fs, calculateBodyLength; -var init_calculateBodyLength = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.js"() { - import_node_fs = require("node:fs"); - calculateBodyLength = (body) => { - if (!body) { - return 0; - } - if (typeof body === "string") { - return Buffer.byteLength(body); - } else if (typeof body.byteLength === "number") { - return body.byteLength; - } else if (typeof body.size === "number") { - return body.size; - } else if (typeof body.start === "number" && typeof body.end === "number") { - return body.end + 1 - body.start; - } else if (body instanceof import_node_fs.ReadStream) { - if (body.path != null) { - return (0, import_node_fs.lstatSync)(body.path).size; - } else if (typeof body.fd === "number") { - return (0, import_node_fs.fstatSync)(body.fd).size; - } - } - throw new Error(`Body Length computation failed for ${body}`); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js -var toUint8Array; -var init_toUint8Array = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js"() { - init_fromUtf8(); - toUint8Array = (data3) => { - if (typeof data3 === "string") { - return fromUtf8(data3); - } - if (ArrayBuffer.isView(data3)) { - return new Uint8Array(data3.buffer, data3.byteOffset, data3.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data3); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js -var deserializerMiddleware, findHeader; -var init_deserializerMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js"() { - init_protocols(); - deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { - const { response } = await next(args); - try { - const parsed = await deserializer(response, options); - 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 = {} } = response; - const headerEntries = Object.entries(headers); - 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) - }; - } - } 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/config/property-provider/ProviderError.js -var ProviderError; -var init_ProviderError = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/property-provider/ProviderError.js"() { - ProviderError = class _ProviderError extends Error { - name = "ProviderError"; - tryNextLink; - constructor(message, options = true) { - let logger2; - let tryNextLink = true; - if (typeof options === "boolean") { - logger2 = void 0; - tryNextLink = options; - } else if (options != null && typeof options === "object") { - logger2 = options.logger; - tryNextLink = options.tryNextLink ?? true; - } - super(message); - this.tryNextLink = tryNextLink; - Object.setPrototypeOf(this, _ProviderError.prototype); - logger2?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); - } - static from(error3, options = true) { - return Object.assign(new this(error3.message, options), error3); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/property-provider/CredentialsProviderError.js -var CredentialsProviderError; -var init_CredentialsProviderError = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/property-provider/CredentialsProviderError.js"() { - init_ProviderError(); - CredentialsProviderError = class _CredentialsProviderError extends ProviderError { - name = "CredentialsProviderError"; - constructor(message, options = true) { - super(message, options); - Object.setPrototypeOf(this, _CredentialsProviderError.prototype); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/property-provider/TokenProviderError.js -var TokenProviderError; -var init_TokenProviderError = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/property-provider/TokenProviderError.js"() { - init_ProviderError(); - TokenProviderError = class _TokenProviderError extends ProviderError { - name = "TokenProviderError"; - constructor(message, options = true) { - super(message, options); - Object.setPrototypeOf(this, _TokenProviderError.prototype); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/property-provider/chain.js -var chain; -var init_chain = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/property-provider/chain.js"() { - init_ProviderError(); - chain = (...providers) => async () => { - if (providers.length === 0) { - throw new ProviderError("No providers in chain"); - } - let lastProviderError; - for (const provider of providers) { - try { - const credentials = await provider(); - return credentials; - } catch (err) { - lastProviderError = err; - if (err?.tryNextLink) { - continue; - } - throw err; - } - } - throw lastProviderError; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/property-provider/fromValue.js -var fromValue; -var init_fromValue = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/property-provider/fromValue.js"() { - fromValue = (staticValue) => () => Promise.resolve(staticValue); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/property-provider/memoize.js -var memoize; -var init_memoize = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/property-provider/memoize.js"() { - memoize = (provider, isExpired, requiresRefresh) => { - let resolved; - let pending; - let hasResult; - let isConstant = false; - const coalesceProvider = async () => { - if (!pending) { - pending = provider(); - } - try { - resolved = await pending; - hasResult = true; - isConstant = false; - } finally { - pending = void 0; - } - return resolved; - }; - if (isExpired === void 0) { - return async (options) => { - if (!hasResult || options?.forceRefresh) { - resolved = await coalesceProvider(); - } - return resolved; - }; - } - return async (options) => { - if (!hasResult || options?.forceRefresh) { - resolved = await coalesceProvider(); - } - if (isConstant) { - return resolved; - } - if (requiresRefresh && !requiresRefresh(resolved)) { - isConstant = true; - return resolved; - } - if (isExpired(resolved)) { - await coalesceProvider(); - return resolved; - } - return resolved; - }; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js -var booleanSelector; -var init_booleanSelector = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js"() { - booleanSelector = (obj, key, type) => { - if (!(key in obj)) - return void 0; - if (obj[key] === "true") - return true; - if (obj[key] === "false") - return false; - throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js -var numberSelector; -var init_numberSelector = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js"() { - numberSelector = (obj, key, type) => { - if (!(key in obj)) - return void 0; - const numberValue = parseInt(obj[key], 10); - if (Number.isNaN(numberValue)) { - throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); - } - return numberValue; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/types.js -var SelectorType; -var init_types = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/types.js"() { - (function(SelectorType2) { - SelectorType2["ENV"] = "env"; - SelectorType2["CONFIG"] = "shared config entry"; - })(SelectorType || (SelectorType = {})); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js -var import_node_os, import_node_path, homeDirCache, getHomeDirCacheKey, getHomeDir; -var init_getHomeDir = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js"() { - import_node_os = require("node:os"); - import_node_path = require("node:path"); - homeDirCache = {}; - getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; - }; - getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${import_node_path.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, import_node_os.homedir)(); - return homeDirCache[homeDirCacheKey]; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getProfileName.js -var ENV_PROFILE, DEFAULT_PROFILE, getProfileName; -var init_getProfileName = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getProfileName.js"() { - ENV_PROFILE = "AWS_PROFILE"; - DEFAULT_PROFILE = "default"; - getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFilepath.js -var import_node_crypto, import_node_path2, getSSOTokenFilepath; -var init_getSSOTokenFilepath = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFilepath.js"() { - import_node_crypto = require("node:crypto"); - import_node_path2 = require("node:path"); - init_getHomeDir(); - getSSOTokenFilepath = (id) => { - const hasher = (0, import_node_crypto.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, import_node_path2.join)(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFromFile.js -var import_promises, tokenIntercept, getSSOTokenFromFile; -var init_getSSOTokenFromFile = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFromFile.js"() { - import_promises = require("node:fs/promises"); - init_getSSOTokenFilepath(); - tokenIntercept = {}; - getSSOTokenFromFile = async (id) => { - if (tokenIntercept[id]) { - return tokenIntercept[id]; - } - const ssoTokenFilepath = getSSOTokenFilepath(id); - const ssoTokenText = await (0, import_promises.readFile)(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js -var CONFIG_PREFIX_SEPARATOR; -var init_constants = __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 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(); - 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)); - }).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; - acc[updatedKey] = value; - return acc; - }, { - ...data3.default && { default: data3.default } - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigFilepath.js -var import_node_path3, ENV_CONFIG_PATH, getConfigFilepath; -var init_getConfigFilepath = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigFilepath.js"() { - import_node_path3 = require("node:path"); - init_getHomeDir(); - ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; - getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || (0, import_node_path3.join)(getHomeDir(), ".aws", "config"); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getCredentialsFilepath.js -var import_node_path4, ENV_CREDENTIALS_PATH, getCredentialsFilepath; -var init_getCredentialsFilepath = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getCredentialsFilepath.js"() { - import_node_path4 = require("node:path"); - init_getHomeDir(); - ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; - getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || (0, import_node_path4.join)(getHomeDir(), ".aws", "credentials"); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js -var import_types3, 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(); - prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; - profileNameBlockList = ["__proto__", "profile __proto__"]; - parseIni = (iniData) => { - const map3 = {}; - let currentSection; - let currentSubSection; - for (const iniLine of iniData.split(/\r?\n/)) { - const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); - const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; - if (isSection) { - currentSection = void 0; - currentSubSection = void 0; - const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); - const matches = prefixKeyRegex.exec(sectionName); - if (matches) { - const [, prefix, , name] = matches; - if (Object.values(import_types3.IniSectionType).includes(prefix)) { - currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); - } - } else { - currentSection = sectionName; - } - if (profileNameBlockList.includes(sectionName)) { - throw new Error(`Found invalid profile name "${sectionName}"`); - } - } else if (currentSection) { - const indexOfEqualsSign = trimmedLine.indexOf("="); - if (![0, -1].includes(indexOfEqualsSign)) { - const [name, value] = [ - trimmedLine.substring(0, indexOfEqualsSign).trim(), - trimmedLine.substring(indexOfEqualsSign + 1).trim() - ]; - if (value === "") { - currentSubSection = name; - } else { - if (currentSubSection && iniLine.trimStart() === iniLine) { - currentSubSection = void 0; - } - map3[currentSection] = map3[currentSection] || {}; - const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; - map3[currentSection][key] = value; - } - } - } - } - return map3; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/readFile.js -var import_promises2, filePromises, fileIntercept, readFile2; -var init_readFile = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/readFile.js"() { - import_promises2 = require("node:fs/promises"); - filePromises = {}; - fileIntercept = {}; - readFile2 = (path3, options) => { - if (fileIntercept[path3] !== void 0) { - return fileIntercept[path3]; - } - if (!filePromises[path3] || options?.ignoreCache) { - filePromises[path3] = (0, import_promises2.readFile)(path3, "utf8"); - } - return filePromises[path3]; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSharedConfigFiles.js -var import_node_path5, swallowError, loadSharedConfigFiles; -var init_loadSharedConfigFiles = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSharedConfigFiles.js"() { - import_node_path5 = require("node:path"); - init_getConfigData(); - init_getConfigFilepath(); - init_getCredentialsFilepath(); - init_getHomeDir(); - init_parseIni(); - init_readFile(); - init_constants(); - swallowError = () => ({}); - loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = (0, import_node_path5.join)(homeDir, filepath.slice(2)); - } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = (0, import_node_path5.join)(homeDir, configFilepath.slice(2)); - } - const parsedFiles = await Promise.all([ - readFile2(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache - }).then(parseIni).then(getConfigData).catch(swallowError), - readFile2(resolvedFilepath, { - ignoreCache: init.ignoreCache - }).then(parseIni).catch(swallowError) - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1] - }; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js -var import_types4, 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()); - 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 }), {}); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSsoSessionData.js -var swallowError2, loadSsoSessionData; -var init_loadSsoSessionData = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSsoSessionData.js"() { - init_getConfigFilepath(); - init_getSsoSessionData(); - init_parseIni(); - init_readFile(); - swallowError2 = () => ({}); - loadSsoSessionData = async (init = {}) => readFile2(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/mergeConfigFiles.js -var mergeConfigFiles; -var init_mergeConfigFiles = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/mergeConfigFiles.js"() { - mergeConfigFiles = (...files) => { - const merged = {}; - for (const file2 of files) { - for (const [key, values] of Object.entries(file2)) { - if (merged[key] !== void 0) { - Object.assign(merged[key], values); - } else { - merged[key] = values; - } - } - } - return merged; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseKnownFiles.js -var parseKnownFiles; -var init_parseKnownFiles = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseKnownFiles.js"() { - init_loadSharedConfigFiles(); - init_mergeConfigFiles(); - parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/externalDataInterceptor.js -var externalDataInterceptor; -var init_externalDataInterceptor = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/externalDataInterceptor.js"() { - init_getSSOTokenFromFile(); - init_readFile(); - externalDataInterceptor = { - getFileRecord() { - return fileIntercept; - }, - interceptFile(path3, contents) { - fileIntercept[path3] = Promise.resolve(contents); - }, - getTokenRecord() { - return tokenIntercept; - }, - interceptToken(id, contents) { - tokenIntercept[id] = contents; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/getSelectorName.js -function getSelectorName(functionString) { - try { - const constants3 = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); - constants3.delete("CONFIG"); - constants3.delete("CONFIG_PREFIX_SEPARATOR"); - constants3.delete("ENV"); - return [...constants3].join(", "); - } catch (e5) { - return functionString; - } -} -var init_getSelectorName = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/getSelectorName.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromEnv.js -var fromEnv; -var init_fromEnv = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromEnv.js"() { - init_CredentialsProviderError(); - init_getSelectorName(); - fromEnv = (envVarSelector, options) => async () => { - try { - const config = envVarSelector(process.env, options); - if (config === void 0) { - throw new Error(); - } - return config; - } catch (e5) { - throw new CredentialsProviderError(e5.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger }); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromSharedConfigFiles.js -var fromSharedConfigFiles; -var init_fromSharedConfigFiles = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromSharedConfigFiles.js"() { - init_CredentialsProviderError(); - init_getProfileName(); - init_loadSharedConfigFiles(); - init_getSelectorName(); - fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { - const profile = getProfileName(init); - const { configFile, credentialsFile } = await loadSharedConfigFiles(init); - const profileFromCredentials = credentialsFile[profile] || {}; - const profileFromConfig = configFile[profile] || {}; - const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; - try { - const cfgFile = preferredFile === "config" ? configFile : credentialsFile; - const configValue = configSelector(mergedProfile, cfgFile); - if (configValue === void 0) { - throw new Error(); - } - return configValue; - } catch (e5) { - throw new CredentialsProviderError(e5.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger }); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromStatic.js -var isFunction, fromStatic; -var init_fromStatic = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromStatic.js"() { - init_fromValue(); - isFunction = (func) => typeof func === "function"; - fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : fromValue(defaultValue); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/configLoader.js -var loadConfig; -var init_configLoader = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/configLoader.js"() { - init_chain(); - init_memoize(); - init_fromEnv(); - init_fromSharedConfigFiles(); - init_fromStatic(); - loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { - const { signingName, logger: logger2 } = configuration; - const envOptions = { signingName, logger: logger2 }; - return memoize(chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js -var ENV_USE_DUALSTACK_ENDPOINT, CONFIG_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_DUALSTACK_ENDPOINT, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, nodeDualstackConfigSelectors; -var init_NodeUseDualstackEndpointConfigOptions = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js"() { - init_booleanSelector(); - init_types(); - ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; - CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; - DEFAULT_USE_DUALSTACK_ENDPOINT = false; - NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env2) => booleanSelector(env2, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV), - configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG), - default: false - }; - nodeDualstackConfigSelectors = { - environmentVariableSelector: (env2) => booleanSelector(env2, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV), - configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG), - default: void 0 - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseFipsEndpointConfigOptions.js -var ENV_USE_FIPS_ENDPOINT, CONFIG_USE_FIPS_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, nodeFipsConfigSelectors; -var init_NodeUseFipsEndpointConfigOptions = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseFipsEndpointConfigOptions.js"() { - init_booleanSelector(); - init_types(); - ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; - CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; - DEFAULT_USE_FIPS_ENDPOINT = false; - NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env2) => booleanSelector(env2, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV), - configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG), - default: false - }; - nodeFipsConfigSelectors = { - environmentVariableSelector: (env2) => booleanSelector(env2, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV), - configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG), - default: void 0 - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveCustomEndpointsConfig.js -var resolveCustomEndpointsConfig; -var init_resolveCustomEndpointsConfig = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveCustomEndpointsConfig.js"() { - init_client2(); - resolveCustomEndpointsConfig = (input) => { - const { tls: tls8, endpoint, urlParser, useDualstackEndpoint } = input; - return Object.assign(input, { - tls: tls8 ?? true, - endpoint: normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), - isCustomEndpoint: true, - useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false) - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/utils/getEndpointFromRegion.js -var getEndpointFromRegion; -var init_getEndpointFromRegion = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/utils/getEndpointFromRegion.js"() { - getEndpointFromRegion = async (input) => { - const { tls: tls8 = true } = input; - const region = await input.region(); - const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); - if (!dnsHostRegex.test(region)) { - throw new Error("Invalid region in client config"); - } - const useDualstackEndpoint = await input.useDualstackEndpoint(); - const useFipsEndpoint = await input.useFipsEndpoint(); - const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; - if (!hostname) { - throw new Error("Cannot resolve hostname from client config"); - } - return input.urlParser(`${tls8 ? "https:" : "http:"}//${hostname}`); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveEndpointsConfig.js -var resolveEndpointsConfig; -var init_resolveEndpointsConfig = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/resolveEndpointsConfig.js"() { - init_client2(); - init_getEndpointFromRegion(); - resolveEndpointsConfig = (input) => { - const useDualstackEndpoint = normalizeProvider(input.useDualstackEndpoint ?? false); - const { endpoint, useFipsEndpoint, urlParser, tls: tls8 } = input; - return Object.assign(input, { - tls: tls8 ?? true, - endpoint: endpoint ? normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), - isCustomEndpoint: !!endpoint, - useDualstackEndpoint - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/config.js -var REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS; -var init_config = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/config.js"() { - REGION_ENV_NAME = "AWS_REGION"; - REGION_INI_NAME = "region"; - NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: (env2) => env2[REGION_ENV_NAME], - configFileSelector: (profile) => profile[REGION_INI_NAME], - default: () => { - throw new Error("Region is missing"); - } - }; - NODE_REGION_CONFIG_FILE_OPTIONS = { - preferredFile: "credentials" - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js -var validRegions, checkRegion; -var init_checkRegion = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js"() { - init_endpoints(); - validRegions = /* @__PURE__ */ new Set(); - checkRegion = (region, check = isValidHostLabel) => { - if (!validRegions.has(region) && !check(region)) { - if (region === "*") { - console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`); - } else { - throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`); - } - } else { - validRegions.add(region); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/isFipsRegion.js -var isFipsRegion; -var init_isFipsRegion = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/isFipsRegion.js"() { - isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getRealRegion.js -var getRealRegion; -var init_getRealRegion = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getRealRegion.js"() { - init_isFipsRegion(); - getRealRegion = (region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/resolveRegionConfig.js -var resolveRegionConfig; -var init_resolveRegionConfig = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/resolveRegionConfig.js"() { - init_checkRegion(); - init_getRealRegion(); - init_isFipsRegion(); - resolveRegionConfig = (input) => { - const { region, useFipsEndpoint } = input; - if (!region) { - throw new Error("Region is missing"); - } - return Object.assign(input, { - region: async () => { - const providedRegion = typeof region === "function" ? await region() : region; - const realRegion = getRealRegion(providedRegion); - checkRegion(realRegion); - return realRegion; - }, - useFipsEndpoint: async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if (isFipsRegion(providedRegion)) { - return true; - } - return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - } - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getHostnameFromVariants.js -var getHostnameFromVariants; -var init_getHostnameFromVariants = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getHostnameFromVariants.js"() { - getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedHostname.js -var getResolvedHostname; -var init_getResolvedHostname = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedHostname.js"() { - getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedPartition.js -var getResolvedPartition; -var init_getResolvedPartition = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedPartition.js"() { - getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws"; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedSigningRegion.js -var getResolvedSigningRegion; -var init_getResolvedSigningRegion = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getResolvedSigningRegion.js"() { - getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { - if (signingRegion) { - return signingRegion; - } else if (useFipsEndpoint) { - const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); - const regionRegexmatchArray = hostname.match(regionRegexJs); - if (regionRegexmatchArray) { - return regionRegexmatchArray[0].slice(1, -1); - } - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getRegionInfo.js -var getRegionInfo; -var init_getRegionInfo = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionInfo/getRegionInfo.js"() { - init_getHostnameFromVariants(); - init_getResolvedHostname(); - init_getResolvedPartition(); - init_getResolvedSigningRegion(); - getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash }) => { - const partition2 = getResolvedPartition(region, { partitionHash }); - const resolvedRegion = region in regionHash ? region : partitionHash[partition2]?.endpoint ?? region; - const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; - const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions); - const partitionHostname = getHostnameFromVariants(partitionHash[partition2]?.variants, hostnameOptions); - const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); - if (hostname === void 0) { - throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); - } - const signingRegion = getResolvedSigningRegion(hostname, { - signingRegion: regionHash[resolvedRegion]?.signingRegion, - regionRegex: partitionHash[partition2].regionRegex, - useFipsEndpoint - }); - return { - partition: partition2, - signingService, - hostname, - ...signingRegion && { signingRegion }, - ...regionHash[resolvedRegion]?.signingService && { - signingService: regionHash[resolvedRegion].signingService - } - }; - }; - } -}); - -// 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({ - "node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js"() { - AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; - AWS_REGION_ENV = "AWS_REGION"; - AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; - ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; - DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; - IMDS_REGION_PATH = "/latest/meta-data/placement/region"; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/defaultsModeConfig.js -var AWS_DEFAULTS_MODE_ENV, AWS_DEFAULTS_MODE_CONFIG, NODE_DEFAULTS_MODE_CONFIG_OPTIONS; -var init_defaultsModeConfig = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/defaultsModeConfig.js"() { - AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; - AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; - NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env2) => { - return env2[AWS_DEFAULTS_MODE_ENV]; - }, - configFileSelector: (profile) => { - return profile[AWS_DEFAULTS_MODE_CONFIG]; - }, - default: "legacy" - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.js -var resolveDefaultsModeConfig, resolveNodeDefaultsModeAuto, inferPhysicalRegion, getImdsEndpoint, imdsHttpGet; -var init_resolveDefaultsModeConfig = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.js"() { - init_config(); - init_configLoader(); - init_memoize(); - init_constants2(); - 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; - switch (mode?.toLowerCase()) { - case "auto": - return resolveNodeDefaultsModeAuto(region); - case "in-region": - case "cross-region": - case "mobile": - case "standard": - case "legacy": - return Promise.resolve(mode?.toLocaleLowerCase()); - case void 0: - return Promise.resolve("legacy"); - default: - throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); - } - }); - resolveNodeDefaultsModeAuto = async (clientRegion) => { - if (clientRegion) { - const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; - const inferredRegion = await inferPhysicalRegion(); - if (!inferredRegion) { - return "standard"; - } - if (resolvedRegion === inferredRegion) { - return "in-region"; - } else { - return "cross-region"; - } - } - return "standard"; - }; - inferPhysicalRegion = async () => { - if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { - return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; - } - if (!process.env[ENV_IMDS_DISABLED]) { - try { - const endpoint = await getImdsEndpoint(); - return (await imdsHttpGet({ hostname: endpoint.hostname, path: IMDS_REGION_PATH })).toString(); - } catch (e5) { - } - } - }; - getImdsEndpoint = async () => { - const envEndpoint = process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT; - if (envEndpoint) { - const url = new URL(envEndpoint); - return { hostname: url.hostname, path: url.pathname }; - } - const envMode = process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE; - if (envMode === "IPv6") { - return { hostname: "fd00:ec2::254", path: "/" }; - } - return { hostname: "169.254.169.254", path: "/" }; - }; - imdsHttpGet = async ({ hostname, path: path3 }) => { - const { request } = await import("node:http"); - return new Promise((resolve, reject) => { - const req = request({ - method: "GET", - hostname: hostname.replace(/^\[(.+)]$/, "$1"), - path: path3, - timeout: 1e3, - signal: AbortSignal.timeout(1e3) - }); - req.on("error", (err) => { - reject(err); - req.destroy(); - }); - req.on("timeout", () => { - reject(new Error("TimeoutError from instance metadata service")); - req.destroy(); - }); - req.on("response", (res) => { - const { statusCode = 400 } = res; - if (statusCode < 200 || 300 <= statusCode) { - reject(Object.assign(new Error("Error response received from instance metadata service"), { statusCode })); - req.destroy(); - return; - } - const chunks = []; - res.on("data", (chunk) => chunks.push(chunk)); - res.on("end", () => { - resolve(Buffer.concat(chunks)); - req.destroy(); - }); - }); - req.end(); - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/config/index.js -var config_exports = {}; -__export(config_exports, { - CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, - CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, - CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, - CredentialsProviderError: () => CredentialsProviderError, - DEFAULT_PROFILE: () => DEFAULT_PROFILE, - DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, - DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, - ENV_PROFILE: () => ENV_PROFILE, - ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT, - ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT, - NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, - NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, - NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, - NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, - ProviderError: () => ProviderError, - REGION_ENV_NAME: () => REGION_ENV_NAME, - REGION_INI_NAME: () => REGION_INI_NAME, - SelectorType: () => SelectorType, - TokenProviderError: () => TokenProviderError, - booleanSelector: () => booleanSelector, - chain: () => chain, - externalDataInterceptor: () => externalDataInterceptor, - fromStatic: () => fromStatic, - fromValue: () => fromValue, - getHomeDir: () => getHomeDir, - getProfileName: () => getProfileName, - getRegionInfo: () => getRegionInfo, - getSSOTokenFilepath: () => getSSOTokenFilepath, - getSSOTokenFromFile: () => getSSOTokenFromFile, - loadConfig: () => loadConfig, - loadSharedConfigFiles: () => loadSharedConfigFiles, - loadSsoSessionData: () => loadSsoSessionData, - memoize: () => memoize, - nodeDualstackConfigSelectors: () => nodeDualstackConfigSelectors, - nodeFipsConfigSelectors: () => nodeFipsConfigSelectors, - numberSelector: () => numberSelector, - parseKnownFiles: () => parseKnownFiles, - readFile: () => readFile2, - resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, - resolveDefaultsModeConfig: () => resolveDefaultsModeConfig, - resolveEndpointsConfig: () => resolveEndpointsConfig, - resolveRegionConfig: () => resolveRegionConfig -}); -var init_config2 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/config/index.js"() { - init_ProviderError(); - init_CredentialsProviderError(); - init_TokenProviderError(); - init_chain(); - init_fromValue(); - init_memoize(); - init_booleanSelector(); - init_numberSelector(); - init_types(); - init_getHomeDir(); - init_getProfileName(); - init_getSSOTokenFilepath(); - init_getSSOTokenFromFile(); - init_constants(); - init_loadSharedConfigFiles(); - init_loadSsoSessionData(); - init_parseKnownFiles(); - init_externalDataInterceptor(); - init_readFile(); - init_configLoader(); - init_fromStatic(); - init_NodeUseDualstackEndpointConfigOptions(); - init_NodeUseFipsEndpointConfigOptions(); - init_resolveCustomEndpointsConfig(); - init_resolveEndpointsConfig(); - init_config(); - init_resolveRegionConfig(); - init_getRegionInfo(); - init_resolveDefaultsModeConfig(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js -var ENV_ENDPOINT_URL, CONFIG_ENDPOINT_URL, getEndpointUrlConfig; -var init_getEndpointUrlConfig = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js"() { - init_config2(); - ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; - CONFIG_ENDPOINT_URL = "endpoint_url"; - getEndpointUrlConfig = (serviceId) => ({ - environmentVariableSelector: (env2) => { - const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); - const serviceEndpointUrl = env2[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; - if (serviceEndpointUrl) - return serviceEndpointUrl; - const endpointUrl = env2[ENV_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return void 0; - }, - configFileSelector: (profile, config) => { - if (config && profile.services) { - const servicesSection = config[["services", profile.services].join(CONFIG_PREFIX_SEPARATOR)]; - if (servicesSection) { - const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); - const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(CONFIG_PREFIX_SEPARATOR)]; - if (endpointUrl2) - return endpointUrl2; - } - } - const endpointUrl = profile[CONFIG_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return void 0; - }, - default: void 0 - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromConfig.js -var getEndpointFromConfig; -var init_getEndpointFromConfig = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromConfig.js"() { - init_config2(); - init_getEndpointUrlConfig(); - getEndpointFromConfig = async (serviceId) => loadConfig(getEndpointUrlConfig(serviceId ?? ""))(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/s3.js -var resolveParamsForS3, DOMAIN_PATTERN, IP_ADDRESS_PATTERN, DOTS_PATTERN, isDnsCompatibleBucketName, isArnBucketName; -var init_s3 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/s3.js"() { - resolveParamsForS3 = async (endpointParams) => { - const bucket = endpointParams?.Bucket || ""; - if (typeof endpointParams.Bucket === "string") { - endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); - } - if (isArnBucketName(bucket)) { - if (endpointParams.ForcePathStyle === true) { - throw new Error("Path-style addressing cannot be used with ARN buckets"); - } - } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { - endpointParams.ForcePathStyle = true; - } - if (endpointParams.DisableMultiRegionAccessPoints) { - endpointParams.disableMultiRegionAccessPoints = true; - endpointParams.DisableMRAP = true; - } - return endpointParams; - }; - DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; - IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; - DOTS_PATTERN = /\.\./; - isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); - isArnBucketName = (bucketName) => { - const [arn, partition2, service, , , bucket] = bucketName.split(":"); - const isArn = arn === "arn" && bucketName.split(":").length >= 6; - const isValidArn = Boolean(isArn && partition2 && service && bucket); - if (isArn && !isValidArn) { - throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); - } - return isValidArn; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/index.js -var init_service_customizations = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/index.js"() { - init_s3(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/createConfigValueProvider.js -var createConfigValueProvider; -var init_createConfigValueProvider = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/createConfigValueProvider.js"() { - createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => { - const configProvider = async () => { - let configValue; - if (isClientContextParam) { - const clientContextParams = config.clientContextParams; - const nestedValue = clientContextParams?.[configKey]; - configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey]; - } else { - configValue = config[configKey] ?? config[canonicalEndpointParamKey]; - } - if (typeof configValue === "function") { - return configValue(); - } - return configValue; - }; - if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { - return async () => { - const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; - const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; - return configValue; - }; - } - if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { - return async () => { - const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; - const configValue = credentials?.accountId ?? credentials?.AccountId; - return configValue; - }; - } - if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { - return async () => { - if (config.isCustomEndpoint === false) { - return void 0; - } - const endpoint = await configProvider(); - if (endpoint && typeof endpoint === "object") { - if ("url" in endpoint) { - return endpoint.url.href; - } - if ("hostname" in endpoint) { - const { protocol, hostname, port, path: path3 } = endpoint; - return `${protocol}//${hostname}${port ? ":" + port : ""}${path3}`; - } - } - return endpoint; - }; - } - return configProvider; - }; - } -}); - -// 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(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromInstructions.js -function bindGetEndpointFromInstructions(getEndpointFromConfig2) { - return async (commandInput, instructionsSupplier, clientConfig, context) => { - if (!clientConfig.isCustomEndpoint) { - let endpointFromConfig; - if (clientConfig.serviceConfiguredEndpoint) { - endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); - } else { - endpointFromConfig = await getEndpointFromConfig2(clientConfig.serviceId); - } - if (endpointFromConfig) { - clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); - clientConfig.isCustomEndpoint = true; - } - } - const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); - if (typeof clientConfig.endpointProvider !== "function") { - throw new Error("config.endpointProvider is not set."); - } - const endpoint = clientConfig.endpointProvider(endpointParams, context); - if (clientConfig.isCustomEndpoint && clientConfig.endpoint) { - const customEndpoint = await clientConfig.endpoint(); - if (customEndpoint?.headers) { - endpoint.headers ??= {}; - for (const [name, value] of Object.entries(customEndpoint.headers)) { - endpoint.headers[name] = Array.isArray(value) ? value : [value]; - } - } - } - return endpoint; - }; -} -var resolveParams; -var init_getEndpointFromInstructions = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointFromInstructions.js"() { - init_service_customizations(); - init_createConfigValueProvider(); - init_toEndpointV12(); - resolveParams = async (commandInput, instructionsSupplier, clientConfig) => { - const endpointParams = {}; - const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; - for (const [name, instruction] of Object.entries(instructions)) { - switch (instruction.type) { - case "staticContextParams": - endpointParams[name] = instruction.value; - break; - case "contextParams": - endpointParams[name] = commandInput[instruction.name]; - break; - case "clientContextParams": - case "builtInParams": - endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")(); - break; - case "operationContextParams": - endpointParams[name] = instruction.get(commandInput); - break; - default: - throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); - } - } - if (Object.keys(instructions).length === 0) { - Object.assign(endpointParams, clientConfig); - } - if (String(clientConfig.serviceId).toLowerCase() === "s3") { - await resolveParamsForS3(endpointParams); - } - return endpointParams; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js -function setFeature(context, feature, value) { - if (!context.__smithy_context) { - context.__smithy_context = { features: {} }; - } else if (!context.__smithy_context.features) { - context.__smithy_context.features = {}; - } - context.__smithy_context.features[feature] = value; -} -function bindEndpointMiddleware(getEndpointFromConfig2) { - const getEndpointFromInstructions2 = bindGetEndpointFromInstructions(getEndpointFromConfig2); - return ({ config, instructions }) => { - return (next, context) => async (args) => { - if (config.isCustomEndpoint) { - setFeature(context, "ENDPOINT_OVERRIDE", "N"); - } - const endpoint = await getEndpointFromInstructions2(args.input, { - getEndpointParameterInstructions() { - return instructions; - } - }, { ...config }, context); - context.endpointV2 = endpoint; - context.authSchemes = endpoint.properties?.authSchemes; - const authScheme = context.authSchemes?.[0]; - if (authScheme) { - context["signing_region"] = authScheme.signingRegion; - context["signing_service"] = authScheme.signingName; - const smithyContext = getSmithyContext(context); - const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; - if (httpAuthOption) { - httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { - signing_region: authScheme.signingRegion, - signingRegion: authScheme.signingRegion, - signing_service: authScheme.signingName, - signingName: authScheme.signingName, - signingRegionSet: authScheme.signingRegionSet - }, authScheme.properties); - } - } - return next({ - ...args - }); - }; - }; -} -var init_endpointMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js"() { - init_client2(); - init_getEndpointFromInstructions(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/getEndpointPlugin.js -function bindGetEndpointPlugin(getEndpointFromConfig2) { - const endpointMiddleware2 = bindEndpointMiddleware(getEndpointFromConfig2); - return (config, instructions) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(endpointMiddleware2({ - config, - instructions - }), endpointMiddlewareOptions); - } - }); -} -var serializerMiddlewareOption, endpointMiddlewareOptions; -var init_getEndpointPlugin = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/getEndpointPlugin.js"() { - init_endpointMiddleware(); - serializerMiddlewareOption = { - name: "serializerMiddleware", - step: "serialize", - tags: ["SERIALIZER"], - override: true - }; - endpointMiddlewareOptions = { - step: "serialize", - tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], - name: "endpointV2Middleware", - override: true, - relation: "before", - toMiddleware: serializerMiddlewareOption.name - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js -function bindResolveEndpointConfig(getEndpointFromConfig2) { - return (input) => { - const tls8 = input.tls ?? true; - const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; - const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : void 0; - const isCustomEndpoint = !!endpoint; - const resolvedConfig = Object.assign(input, { - endpoint: customEndpointProvider, - tls: tls8, - isCustomEndpoint, - useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false), - useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false) - }); - let configuredEndpointPromise = void 0; - resolvedConfig.serviceConfiguredEndpoint = async () => { - if (input.serviceId && !configuredEndpointPromise) { - configuredEndpointPromise = getEndpointFromConfig2(input.serviceId); - } - return configuredEndpointPromise; - }; - return resolvedConfig; - }; -} -var init_resolveEndpointConfig = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js"() { - init_client2(); - init_toEndpointV12(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/bdd/BinaryDecisionDiagram.js -var BinaryDecisionDiagram; -var init_BinaryDecisionDiagram = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/bdd/BinaryDecisionDiagram.js"() { - BinaryDecisionDiagram = class _BinaryDecisionDiagram { - nodes; - root; - conditions; - results; - constructor(bdd5, root5, conditions, results) { - this.nodes = bdd5; - this.root = root5; - this.conditions = conditions; - this.results = results; - } - static from(bdd5, root5, conditions, results) { - return new _BinaryDecisionDiagram(bdd5, root5, conditions, results); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js -var EndpointCache; -var init_EndpointCache = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js"() { - EndpointCache = class { - capacity; - data = /* @__PURE__ */ new Map(); - parameters = []; - constructor({ size, params }) { - this.capacity = size ?? 50; - if (params) { - this.parameters = params; - } - } - get(endpointParams, resolver) { - const key = this.hash(endpointParams); - if (key === false) { - return resolver(); - } - if (!this.data.has(key)) { - if (this.data.size > this.capacity + 10) { - const keys = this.data.keys(); - let i5 = 0; - while (true) { - const { value, done } = keys.next(); - this.data.delete(value); - if (done || ++i5 > 10) { - break; - } - } - } - this.data.set(key, resolver()); - } - return this.data.get(key); - } - size() { - return this.data.size; - } - hash(endpointParams) { - let buffer = ""; - const { parameters } = this; - if (parameters.length === 0) { - return false; - } - for (const param of parameters) { - const val = String(endpointParams[param] ?? ""); - if (val.includes("|;")) { - return false; - } - buffer += val + "|;"; - } - return buffer; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointError.js -var EndpointError; -var init_EndpointError = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointError.js"() { - EndpointError = class extends Error { - constructor(message) { - super(message); - this.name = "EndpointError"; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointFunctions.js -var init_EndpointFunctions = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointFunctions.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointRuleObject.js -var init_EndpointRuleObject = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/EndpointRuleObject.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/ErrorRuleObject.js -var init_ErrorRuleObject = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/ErrorRuleObject.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/RuleSetObject.js -var init_RuleSetObject = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/RuleSetObject.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/TreeRuleObject.js -var init_TreeRuleObject = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/TreeRuleObject.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/shared.js -var init_shared = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/shared.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/index.js -var init_types2 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/index.js"() { - init_EndpointError(); - init_EndpointFunctions(); - init_EndpointRuleObject(); - init_ErrorRuleObject(); - init_RuleSetObject(); - init_TreeRuleObject(); - init_shared(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/debugId.js -var debugId; -var init_debugId = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/debugId.js"() { - debugId = "endpoints"; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/toDebugString.js -function toDebugString(input) { - if (typeof input !== "object" || input == null) { - return input; - } - if ("ref" in input) { - return `$${toDebugString(input.ref)}`; - } - if ("fn" in input) { - return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; - } - return JSON.stringify(input, null, 2); -} -var init_toDebugString = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/toDebugString.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/index.js -var init_debug = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/index.js"() { - init_debugId(); - init_toDebugString(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/customEndpointFunctions.js -var customEndpointFunctions; -var init_customEndpointFunctions = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/customEndpointFunctions.js"() { - customEndpointFunctions = {}; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/booleanEquals.js -var booleanEquals; -var init_booleanEquals = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/booleanEquals.js"() { - booleanEquals = (value1, value2) => value1 === value2; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/coalesce.js -function coalesce(...args) { - for (const arg of args) { - if (arg != null) { - return arg; - } - } - return void 0; -} -var init_coalesce = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/coalesce.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js -var getAttrPathList; -var init_getAttrPathList = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js"() { - init_types2(); - getAttrPathList = (path3) => { - const parts = path3.split("."); - const pathList = []; - for (const part of parts) { - const squareBracketIndex = part.indexOf("["); - if (squareBracketIndex !== -1) { - if (part.indexOf("]") !== part.length - 1) { - throw new EndpointError(`Path: '${path3}' does not end with ']'`); - } - const arrayIndex = part.slice(squareBracketIndex + 1, -1); - if (Number.isNaN(parseInt(arrayIndex))) { - throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path3}'`); - } - if (squareBracketIndex !== 0) { - pathList.push(part.slice(0, squareBracketIndex)); - } - pathList.push(arrayIndex); - } else { - pathList.push(part); - } - } - return pathList; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js -var getAttr; -var init_getAttr = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js"() { - init_types2(); - init_getAttrPathList(); - getAttr = (value, path3) => getAttrPathList(path3).reduce((acc, index) => { - if (typeof acc !== "object") { - throw new EndpointError(`Index '${index}' in '${path3}' not found in '${JSON.stringify(value)}'`); - } else if (Array.isArray(acc)) { - const i5 = parseInt(index); - return acc[i5 < 0 ? acc.length + i5 : i5]; - } - return acc[index]; - }, value); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isSet.js -var isSet; -var init_isSet = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isSet.js"() { - isSet = (value) => value != null; - } -}); - -// 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; -} -var init_ite = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/ite.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/not.js -var not; -var init_not = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/not.js"() { - not = (value) => !value; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isIpAddress.js -var IP_V4_REGEX, isIpAddress; -var init_isIpAddress = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isIpAddress.js"() { - IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); - isIpAddress = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/parseURL.js -var import_types10, 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()); - init_isIpAddress(); - DEFAULT_PORTS = { - [import_types10.EndpointURLScheme.HTTP]: 80, - [import_types10.EndpointURLScheme.HTTPS]: 443 - }; - parseURL = (value) => { - const whatwgURL = (() => { - try { - if (value instanceof URL) { - return value; - } - if (typeof value === "object" && "hostname" in value) { - const { hostname: hostname2, port, protocol: protocol2 = "", path: path3 = "", query = {} } = value; - const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path3}`); - url.search = Object.entries(query).map(([k5, v]) => `${k5}=${v}`).join("&"); - return url; - } - return new URL(value); - } catch (error3) { - return null; - } - })(); - if (!whatwgURL) { - console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); - return null; - } - const urlString = whatwgURL.href; - const { host, hostname, pathname, protocol, search } = whatwgURL; - if (search) { - return null; - } - const scheme = protocol.slice(0, -1); - if (!Object.values(import_types10.EndpointURLScheme).includes(scheme)) { - return null; - } - const isIp = isIpAddress(hostname); - const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); - const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; - return { - scheme, - authority, - path: pathname, - normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, - isIp - }; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/split.js -function split(value, delimiter, limit) { - if (limit === 1) { - return [value]; - } - if (value === "") { - return [""]; - } - const parts = value.split(delimiter); - if (limit === 0) { - return parts; - } - return parts.slice(0, limit - 1).concat(parts.slice(1).join(delimiter)); -} -var init_split = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/split.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/stringEquals.js -var stringEquals; -var init_stringEquals = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/stringEquals.js"() { - stringEquals = (value1, value2) => value1 === value2; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/substring.js -var substring; -var init_substring = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/substring.js"() { - substring = (input, start, stop, reverse) => { - if (input == null || start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) { - return null; - } - if (!reverse) { - return input.substring(start, stop); - } - return input.substring(input.length - stop, input.length - start); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/uriEncode.js -var uriEncode; -var init_uriEncode = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/uriEncode.js"() { - uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c5) => `%${c5.charCodeAt(0).toString(16).toUpperCase()}`); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js -var init_lib = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js"() { - init_booleanEquals(); - init_coalesce(); - init_getAttr(); - init_isSet(); - init_isValidHostLabel(); - init_ite(); - init_not(); - init_parseURL(); - init_split(); - init_stringEquals(); - init_substring(); - init_uriEncode(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/endpointFunctions.js -var endpointFunctions; -var init_endpointFunctions = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/endpointFunctions.js"() { - init_lib(); - endpointFunctions = { - booleanEquals, - coalesce, - getAttr, - isSet, - isValidHostLabel, - ite, - not, - parseURL, - split, - stringEquals, - substring, - uriEncode - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateTemplate.js -var evaluateTemplate; -var init_evaluateTemplate = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateTemplate.js"() { - init_lib(); - evaluateTemplate = (template, options) => { - const evaluatedTemplateArr = []; - const { referenceRecord, endpointParams } = options; - let currentIndex = 0; - while (currentIndex < template.length) { - const openingBraceIndex = template.indexOf("{", currentIndex); - if (openingBraceIndex === -1) { - evaluatedTemplateArr.push(template.slice(currentIndex)); - break; - } - evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); - const closingBraceIndex = template.indexOf("}", openingBraceIndex); - if (closingBraceIndex === -1) { - evaluatedTemplateArr.push(template.slice(openingBraceIndex)); - break; - } - if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { - evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); - currentIndex = closingBraceIndex + 2; - } - const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); - if (parameterName.includes("#")) { - const [refName, attrName] = parameterName.split("#"); - evaluatedTemplateArr.push(getAttr(referenceRecord[refName] ?? endpointParams[refName], attrName)); - } else { - evaluatedTemplateArr.push(referenceRecord[parameterName] ?? endpointParams[parameterName]); - } - currentIndex = closingBraceIndex + 1; - } - return evaluatedTemplateArr.join(""); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getReferenceValue.js -var getReferenceValue; -var init_getReferenceValue = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getReferenceValue.js"() { - getReferenceValue = ({ ref }, options) => { - return options.referenceRecord[ref] ?? options.endpointParams[ref]; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateExpression.js -var evaluateExpression, callFunction, group; -var init_evaluateExpression = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateExpression.js"() { - init_types2(); - init_customEndpointFunctions(); - init_endpointFunctions(); - init_evaluateTemplate(); - init_getReferenceValue(); - evaluateExpression = (obj, keyName, options) => { - if (typeof obj === "string") { - return evaluateTemplate(obj, options); - } else if (obj["fn"]) { - return group.callFunction(obj, options); - } else if (obj["ref"]) { - return getReferenceValue(obj, options); - } - throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); - }; - callFunction = ({ fn, argv }, options) => { - const evaluatedArgs = Array(argv.length); - for (let i5 = 0; i5 < evaluatedArgs.length; ++i5) { - const arg = argv[i5]; - if (typeof arg === "boolean" || typeof arg === "number") { - evaluatedArgs[i5] = arg; - } else { - evaluatedArgs[i5] = group.evaluateExpression(arg, "arg", options); - } - } - const namespaceSeparatorIndex = fn.indexOf("."); - if (namespaceSeparatorIndex !== -1) { - const namespaceFunctions = customEndpointFunctions[fn.slice(0, namespaceSeparatorIndex)]; - const customFunction = namespaceFunctions?.[fn.slice(namespaceSeparatorIndex + 1)]; - if (typeof customFunction === "function") { - return customFunction(...evaluatedArgs); - } - } - const callable = endpointFunctions[fn]; - if (typeof callable === "function") { - return callable(...evaluatedArgs); - } - throw new Error(`function ${fn} not loaded in endpointFunctions.`); - }; - group = { - evaluateExpression, - callFunction - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/callFunction.js -var init_callFunction = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/callFunction.js"() { - init_evaluateExpression(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateCondition.js -var evaluateCondition; -var init_evaluateCondition = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateCondition.js"() { - init_debug(); - init_types2(); - init_callFunction(); - evaluateCondition = (condition, options) => { - const { assign } = condition; - if (assign && assign in options.referenceRecord) { - throw new EndpointError(`'${assign}' is already defined in Reference Record.`); - } - const value = callFunction(condition, options); - options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(condition)} = ${toDebugString(value)}`); - const result = value === "" ? true : !!value; - if (assign != null) { - return { result, toAssign: { name: assign, value } }; - } - return { result }; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointHeaders.js -var getEndpointHeaders; -var init_getEndpointHeaders = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointHeaders.js"() { - init_types2(); - init_evaluateExpression(); - getEndpointHeaders = (headers, options) => Object.entries(headers ?? {}).reduce((acc, [headerKey, headerVal]) => { - acc[headerKey] = headerVal.map((headerValEntry) => { - const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); - if (typeof processedExpr !== "string") { - throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); - } - return processedExpr; - }); - return acc; - }, {}); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointProperties.js -var getEndpointProperties, getEndpointProperty, group2; -var init_getEndpointProperties = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointProperties.js"() { - init_types2(); - init_evaluateTemplate(); - getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => { - acc[propertyKey] = group2.getEndpointProperty(propertyVal, options); - return acc; - }, {}); - getEndpointProperty = (property, options) => { - if (Array.isArray(property)) { - return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); - } - switch (typeof property) { - case "string": - return evaluateTemplate(property, options); - case "object": - if (property === null) { - throw new EndpointError(`Unexpected endpoint property: ${property}`); - } - return group2.getEndpointProperties(property, options); - case "boolean": - return property; - default: - throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); - } - }; - group2 = { - getEndpointProperty, - getEndpointProperties - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointUrl.js -var getEndpointUrl; -var init_getEndpointUrl = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/getEndpointUrl.js"() { - init_types2(); - init_evaluateExpression(); - getEndpointUrl = (endpointUrl, options) => { - const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); - if (typeof expression === "string") { - try { - return new URL(expression); - } 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}`); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/decideEndpoint.js -var RESULT, decideEndpoint; -var init_decideEndpoint = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/decideEndpoint.js"() { - init_types2(); - init_evaluateCondition(); - init_evaluateExpression(); - init_getEndpointHeaders(); - init_getEndpointProperties(); - init_getEndpointUrl(); - RESULT = 1e8; - decideEndpoint = (bdd5, options) => { - const { nodes: nodes5, root: root5, results, conditions } = bdd5; - let ref = root5; - const referenceRecord = {}; - const closure = { - referenceRecord, - endpointParams: options.endpointParams, - logger: options.logger - }; - while (ref !== 1 && ref !== -1 && ref < RESULT) { - const node_i = 3 * (Math.abs(ref) - 1); - const [condition_i, highRef, lowRef] = [nodes5[node_i], nodes5[node_i + 1], nodes5[node_i + 2]]; - const [fn, argv, assign] = conditions[condition_i]; - const evaluation = evaluateCondition({ fn, assign, argv }, closure); - if (evaluation.toAssign) { - const { name, value } = evaluation.toAssign; - referenceRecord[name] = value; - } - ref = ref >= 0 === evaluation.result ? highRef : lowRef; - } - if (ref >= RESULT) { - const result = results[ref - RESULT]; - if (result[0] === -1) { - const [, errorExpression] = result; - throw new EndpointError(evaluateExpression(errorExpression, "Error", closure)); - } - const [url, properties, headers] = result; - return { - url: getEndpointUrl(url, closure), - properties: getEndpointProperties(properties, closure), - headers: getEndpointHeaders(headers ?? {}, closure) - }; - } - throw new EndpointError(`No matching endpoint.`); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateConditions.js -var evaluateConditions; -var init_evaluateConditions = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateConditions.js"() { - init_debug(); - init_evaluateCondition(); - evaluateConditions = (conditions = [], options) => { - const conditionsReferenceRecord = {}; - const conditionOptions = { - ...options, - referenceRecord: { ...options.referenceRecord } - }; - let didAssign = false; - for (const condition of conditions) { - const { result, toAssign } = evaluateCondition(condition, conditionOptions); - if (!result) { - return { result }; - } - if (toAssign) { - didAssign = true; - conditionsReferenceRecord[toAssign.name] = toAssign.value; - conditionOptions.referenceRecord[toAssign.name] = toAssign.value; - options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); - } - } - if (didAssign) { - return { result: true, referenceRecord: conditionsReferenceRecord }; - } - return { result: true }; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateEndpointRule.js -var evaluateEndpointRule; -var init_evaluateEndpointRule = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateEndpointRule.js"() { - init_debug(); - init_evaluateConditions(); - init_getEndpointHeaders(); - init_getEndpointProperties(); - init_getEndpointUrl(); - evaluateEndpointRule = (endpointRule, options) => { - const { conditions, endpoint } = endpointRule; - const { result, referenceRecord } = evaluateConditions(conditions, options); - if (!result) { - return; - } - const endpointRuleOptions = referenceRecord ? { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord } - } : options; - const { url, properties, headers } = endpoint; - options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); - const endpointToReturn = { url: getEndpointUrl(url, endpointRuleOptions) }; - if (headers != null) { - endpointToReturn.headers = getEndpointHeaders(headers, endpointRuleOptions); - } - if (properties != null) { - endpointToReturn.properties = getEndpointProperties(properties, endpointRuleOptions); - } - return endpointToReturn; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateErrorRule.js -var evaluateErrorRule; -var init_evaluateErrorRule = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateErrorRule.js"() { - init_types2(); - init_evaluateConditions(); - init_evaluateExpression(); - evaluateErrorRule = (errorRule, options) => { - const { conditions, error: error3 } = errorRule; - const { result, referenceRecord } = evaluateConditions(conditions, options); - if (!result) { - return; - } - const errorRuleOptions = referenceRecord ? { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord } - } : options; - throw new EndpointError(evaluateExpression(error3, "Error", errorRuleOptions)); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateRules.js -var evaluateRules, evaluateTreeRule, group3; -var init_evaluateRules = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/evaluateRules.js"() { - init_types2(); - init_evaluateConditions(); - init_evaluateEndpointRule(); - init_evaluateErrorRule(); - evaluateRules = (rules, options) => { - for (const rule of rules) { - if (rule.type === "endpoint") { - const endpointOrUndefined = evaluateEndpointRule(rule, options); - if (endpointOrUndefined) { - return endpointOrUndefined; - } - } else if (rule.type === "error") { - evaluateErrorRule(rule, options); - } else if (rule.type === "tree") { - const endpointOrUndefined = group3.evaluateTreeRule(rule, options); - if (endpointOrUndefined) { - return endpointOrUndefined; - } - } else { - throw new EndpointError(`Unknown endpoint rule: ${rule}`); - } - } - throw new EndpointError(`Rules evaluation failed`); - }; - evaluateTreeRule = (treeRule, options) => { - const { conditions, rules } = treeRule; - const { result, referenceRecord } = evaluateConditions(conditions, options); - if (!result) { - return; - } - const treeRuleOptions = referenceRecord ? { ...options, referenceRecord: { ...options.referenceRecord, ...referenceRecord } } : options; - return group3.evaluateRules(rules, treeRuleOptions); - }; - group3 = { - evaluateRules, - evaluateTreeRule - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/index.js -var init_utils = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/index.js"() { - init_customEndpointFunctions(); - init_evaluateRules(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js -var resolveEndpoint; -var init_resolveEndpoint = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js"() { - init_debug(); - init_types2(); - init_utils(); - resolveEndpoint = (ruleSetObject, options) => { - const { endpointParams, logger: logger2 } = options; - const { parameters, rules } = ruleSetObject; - options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); - for (const paramKey in parameters) { - const parameter = parameters[paramKey]; - const endpointParam = endpointParams[paramKey]; - if (endpointParam == null && parameter.default != null) { - endpointParams[paramKey] = parameter.default; - continue; - } - if (parameter.required && endpointParam == null) { - throw new EndpointError(`Missing required parameter: '${paramKey}'`); - } - } - const endpoint = evaluateRules(rules, { endpointParams, logger: logger2, referenceRecord: {} }); - options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); - return endpoint; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointRequiredConfig.js -var resolveEndpointRequiredConfig; -var init_resolveEndpointRequiredConfig = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointRequiredConfig.js"() { - resolveEndpointRequiredConfig = (input) => { - const { endpoint } = input; - if (endpoint === void 0) { - input.endpoint = async () => { - throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint."); - }; - } - return input; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/endpoints/index.js -var endpoints_exports = {}; -__export(endpoints_exports, { - BinaryDecisionDiagram: () => BinaryDecisionDiagram, - EndpointCache: () => EndpointCache, - EndpointError: () => EndpointError, - customEndpointFunctions: () => customEndpointFunctions, - decideEndpoint: () => decideEndpoint, - endpointMiddleware: () => endpointMiddleware, - endpointMiddlewareOptions: () => endpointMiddlewareOptions, - getEndpointFromInstructions: () => getEndpointFromInstructions, - getEndpointPlugin: () => getEndpointPlugin, - isIpAddress: () => isIpAddress, - isValidHostLabel: () => isValidHostLabel, - middlewareEndpointToEndpointV1: () => toEndpointV1, - resolveEndpoint: () => resolveEndpoint, - resolveEndpointConfig: () => resolveEndpointConfig, - resolveEndpointRequiredConfig: () => resolveEndpointRequiredConfig, - resolveParams: () => resolveParams, - toEndpointV1: () => toEndpointV1 -}); -var getEndpointFromInstructions, resolveEndpointConfig, endpointMiddleware, getEndpointPlugin; -var init_endpoints = __esm({ - "node_modules/@smithy/core/dist-es/submodules/endpoints/index.js"() { - init_getEndpointFromConfig(); - init_getEndpointFromInstructions(); - init_endpointMiddleware(); - init_getEndpointPlugin(); - init_resolveEndpointConfig(); - init_toEndpointV1(); - init_BinaryDecisionDiagram(); - init_EndpointCache(); - init_decideEndpoint(); - init_isIpAddress(); - init_isValidHostLabel(); - init_customEndpointFunctions(); - init_resolveEndpoint(); - init_types2(); - init_getEndpointFromInstructions(); - init_toEndpointV12(); - init_getEndpointPlugin(); - init_resolveEndpointRequiredConfig(); - getEndpointFromInstructions = bindGetEndpointFromInstructions(getEndpointFromConfig); - resolveEndpointConfig = bindResolveEndpointConfig(getEndpointFromConfig); - endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig); - getEndpointPlugin = bindGetEndpointPlugin(getEndpointFromConfig); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serializerMiddleware.js -var serializerMiddleware; -var init_serializerMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serializerMiddleware.js"() { - init_endpoints(); - serializerMiddleware = (options, serializer) => (next, context) => async (args) => { - const endpointConfig = options; - const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : endpointConfig.endpoint; - if (!endpoint) { - throw new Error("No valid endpoint provider available."); - } - const request = await serializer(args.input, { ...options, endpoint }); - return next({ - ...args, - request - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serdePlugin.js -function getSerdePlugin(config, serializer, deserializer) { - return { - applyToStack: (commandStack) => { - commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); - commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption2); - } - }; -} -var deserializerMiddlewareOption, serializerMiddlewareOption2; -var init_serdePlugin = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serdePlugin.js"() { - init_deserializerMiddleware(); - init_serializerMiddleware(); - deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true - }; - serializerMiddlewareOption2 = { - name: "serializerMiddleware", - step: "serialize", - tags: ["SERIALIZER"], - override: true - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/hash-node/hash-node.js -function castSourceData(toCast, encoding) { - if (Buffer.isBuffer(toCast)) { - return toCast; - } - if (typeof toCast === "string") { - return fromString(toCast, encoding); - } - if (ArrayBuffer.isView(toCast)) { - return fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength); - } - return fromArrayBuffer(toCast); -} -var import_node_crypto2, Hash; -var init_hash_node = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/hash-node/hash-node.js"() { - import_node_crypto2 = require("node:crypto"); - init_buffer_from(); - init_toUint8Array(); - Hash = class { - algorithmIdentifier; - secret; - hash; - constructor(algorithmIdentifier, secret) { - this.algorithmIdentifier = algorithmIdentifier; - this.secret = secret; - this.reset(); - } - update(toHash, encoding) { - this.hash.update(toUint8Array(castSourceData(toHash, encoding))); - } - digest() { - return Promise.resolve(this.hash.digest()); - } - reset() { - this.hash = this.secret ? (0, import_node_crypto2.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_node_crypto2.createHash)(this.algorithmIdentifier); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js -var import_node_stream2, ChecksumStream; -var init_ChecksumStream = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js"() { - import_node_stream2 = require("node:stream"); - init_toBase64(); - ChecksumStream = class extends import_node_stream2.Duplex { - expectedChecksum; - checksumSourceLocation; - checksum; - source; - base64Encoder; - pendingCallback = null; - constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) { - super(); - if (typeof source.pipe === "function") { - this.source = source; - } else { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); - } - this.base64Encoder = base64Encoder ?? toBase64; - this.expectedChecksum = expectedChecksum; - this.checksum = checksum; - this.checksumSourceLocation = checksumSourceLocation; - this.source.pipe(this); - } - _read(size) { - if (this.pendingCallback) { - const callback = this.pendingCallback; - this.pendingCallback = null; - callback(); - } - } - _write(chunk, encoding, callback) { - try { - this.checksum.update(chunk); - const canPushMore = this.push(chunk); - if (!canPushMore) { - this.pendingCallback = callback; - return; - } - } catch (e5) { - return callback(e5); - } - return callback(); - } - async _final(callback) { - try { - const digest = await this.checksum.digest(); - const received = this.base64Encoder(digest); - if (this.expectedChecksum !== received) { - return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}" in response header "${this.checksumSourceLocation}".`)); - } - } catch (e5) { - return callback(e5); - } - this.push(null); - return callback(); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-type-check.js -var isReadableStream, isBlob; -var init_stream_type_check = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-type-check.js"() { - isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream); - isBlob = (blob) => { - return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.browser.js -var fromUtf82; -var init_fromUtf8_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.browser.js"() { - fromUtf82 = (input) => new TextEncoder().encode(input); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-base64/constants-for-browser.js -var chars, alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue; -var init_constants_for_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-base64/constants-for-browser.js"() { - chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`; - alphabetByEncoding = Object.entries(chars).reduce((acc, [i5, c5]) => { - acc[c5] = Number(i5); - return acc; - }, {}); - alphabetByValue = chars.split(""); - bitsPerLetter = 6; - bitsPerByte = 8; - maxLetterValue = 63; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.browser.js -function toBase642(_input) { - let input; - if (typeof _input === "string") { - input = fromUtf82(_input); - } else { - input = _input; - } - const isArrayLike = typeof input === "object" && typeof input.length === "number"; - const isUint8Array = typeof input === "object" && typeof input.byteOffset === "number" && typeof input.byteLength === "number"; - if (!isArrayLike && !isUint8Array) { - throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); - } - let str = ""; - for (let i5 = 0; i5 < input.length; i5 += 3) { - let bits = 0; - let bitLength = 0; - for (let j5 = i5, limit = Math.min(i5 + 3, input.length); j5 < limit; j5++) { - bits |= input[j5] << (limit - j5 - 1) * bitsPerByte; - bitLength += bitsPerByte; - } - const bitClusterCount = Math.ceil(bitLength / bitsPerLetter); - bits <<= bitClusterCount * bitsPerLetter - bitLength; - for (let k5 = 1; k5 <= bitClusterCount; k5++) { - const offset = (bitClusterCount - k5) * bitsPerLetter; - str += alphabetByValue[(bits & maxLetterValue << offset) >> offset]; - } - str += "==".slice(0, 4 - bitClusterCount); - } - return str; -} -var init_toBase64_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.browser.js"() { - init_fromUtf8_browser(); - init_constants_for_browser(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.browser.js -var ReadableStreamRef, ChecksumStream2; -var init_ChecksumStream_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.browser.js"() { - ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() { - }; - ChecksumStream2 = class extends ReadableStreamRef { - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.browser.js -var createChecksumStream; -var init_createChecksumStream_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.browser.js"() { - init_toBase64_browser(); - init_stream_type_check(); - init_ChecksumStream_browser(); - createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => { - if (!isReadableStream(source)) { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); - } - const encoder = base64Encoder ?? toBase642; - if (typeof TransformStream !== "function") { - throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); - } - const transform = new TransformStream({ - start() { - }, - async transform(chunk, controller) { - checksum.update(chunk); - controller.enqueue(chunk); - }, - async flush(controller) { - const digest = await checksum.digest(); - const received = encoder(digest); - if (expectedChecksum !== received) { - const error3 = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`); - controller.error(error3); - } else { - controller.terminate(); - } - } - }); - source.pipeThrough(transform); - const readable = transform.readable; - Object.setPrototypeOf(readable, ChecksumStream2.prototype); - return readable; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.js -function createChecksumStream2(init) { - if (typeof ReadableStream === "function" && isReadableStream(init.source)) { - return createChecksumStream(init); - } - return new ChecksumStream(init); -} -var init_createChecksumStream = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/createChecksumStream.js"() { - init_stream_type_check(); - init_ChecksumStream(); - init_createChecksumStream_browser(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/ByteArrayCollector.js -var ByteArrayCollector; -var init_ByteArrayCollector = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/ByteArrayCollector.js"() { - ByteArrayCollector = class { - allocByteArray; - byteLength = 0; - byteArrays = []; - constructor(allocByteArray) { - this.allocByteArray = allocByteArray; - } - push(byteArray) { - this.byteArrays.push(byteArray); - this.byteLength += byteArray.byteLength; - } - flush() { - if (this.byteArrays.length === 1) { - const bytes = this.byteArrays[0]; - this.reset(); - return bytes; - } - const aggregation = this.allocByteArray(this.byteLength); - let cursor2 = 0; - for (let i5 = 0; i5 < this.byteArrays.length; ++i5) { - const bytes = this.byteArrays[i5]; - aggregation.set(bytes, cursor2); - cursor2 += bytes.byteLength; - } - this.reset(); - return aggregation; - } - reset() { - this.byteArrays = []; - this.byteLength = 0; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.browser.js -function createBufferedReadableStream(upstream, size, logger2) { - const reader = upstream.getReader(); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = ["", new ByteArrayCollector((size2) => new Uint8Array(size2))]; - let mode = -1; - const pull = async (controller) => { - const { value, done } = await reader.read(); - const chunk = value; - if (done) { - if (mode !== -1) { - const remainder = flush(buffers, mode); - if (sizeOf(remainder) > 0) { - controller.enqueue(remainder); - } - } - controller.close(); - } else { - const chunkMode = modeOf(chunk, false); - if (mode !== chunkMode) { - if (mode >= 0) { - controller.enqueue(flush(buffers, mode)); - } - mode = chunkMode; - } - if (mode === -1) { - controller.enqueue(chunk); - return; - } - const chunkSize = sizeOf(chunk); - bytesSeen += chunkSize; - const bufferSize = sizeOf(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - controller.enqueue(chunk); - } else { - const newSize = merge(buffers, mode, chunk); - if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { - streamBufferingLoggedWarning = true; - logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); - } - if (newSize >= size) { - controller.enqueue(flush(buffers, mode)); - } else { - await pull(controller); - } - } - } - }; - return new ReadableStream({ - pull - }); -} -function merge(buffers, mode, chunk) { - switch (mode) { - case 0: - buffers[0] += chunk; - return sizeOf(buffers[0]); - case 1: - case 2: - buffers[mode].push(chunk); - return sizeOf(buffers[mode]); - } -} -function flush(buffers, mode) { - switch (mode) { - case 0: - const s = buffers[0]; - buffers[0] = ""; - return s; - case 1: - case 2: - return buffers[mode].flush(); - } - throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); -} -function sizeOf(chunk) { - return chunk?.byteLength ?? chunk?.length ?? 0; -} -function modeOf(chunk, allowBuffer = true) { - if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { - return 2; - } - if (chunk instanceof Uint8Array) { - return 1; - } - if (typeof chunk === "string") { - return 0; - } - return -1; -} -var init_createBufferedReadable_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.browser.js"() { - init_ByteArrayCollector(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.js -function createBufferedReadable(upstream, size, logger2) { - if (isReadableStream(upstream)) { - return createBufferedReadableStream(upstream, size, logger2); - } - const downstream = new import_node_stream3.Readable({ read() { - } }); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = [ - "", - new ByteArrayCollector((size2) => new Uint8Array(size2)), - new ByteArrayCollector((size2) => Buffer.from(new Uint8Array(size2))) - ]; - let mode = -1; - upstream.on("data", (chunk) => { - const chunkMode = modeOf(chunk, true); - if (mode !== chunkMode) { - if (mode >= 0) { - downstream.push(flush(buffers, mode)); - } - mode = chunkMode; - } - if (mode === -1) { - downstream.push(chunk); - return; - } - const chunkSize = sizeOf(chunk); - bytesSeen += chunkSize; - const bufferSize = sizeOf(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - downstream.push(chunk); - } else { - const newSize = merge(buffers, mode, chunk); - if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { - streamBufferingLoggedWarning = true; - logger2?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); - } - if (newSize >= size) { - downstream.push(flush(buffers, mode)); - } - } - }); - upstream.on("end", () => { - if (mode !== -1) { - const remainder = flush(buffers, mode); - if (sizeOf(remainder) > 0) { - downstream.push(remainder); - } - } - downstream.push(null); - }); - return downstream; -} -var import_node_stream3; -var init_createBufferedReadable = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/createBufferedReadable.js"() { - import_node_stream3 = require("node:stream"); - init_ByteArrayCollector(); - init_createBufferedReadable_browser(); - init_stream_type_check(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js -var getAwsChunkedEncodingStream; -var init_getAwsChunkedEncodingStream_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js"() { - getAwsChunkedEncodingStream = (readableStream, options) => { - const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; - const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; - const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0; - const reader = readableStream.getReader(); - return new ReadableStream({ - async pull(controller) { - const { value, done } = await reader.read(); - if (done) { - controller.enqueue(`0\r -`); - if (checksumRequired) { - const checksum = base64Encoder(await digest); - controller.enqueue(`${checksumLocationName}:${checksum}\r -`); - controller.enqueue(`\r -`); - } - controller.close(); - } else { - controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r -${value}\r -`); - } - } - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js -function getAwsChunkedEncodingStream2(stream, options) { - const readable = stream; - const readableStream = stream; - if (isReadableStream(readableStream)) { - return getAwsChunkedEncodingStream(readableStream, options); - } - const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; - const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; - const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : void 0; - const awsChunkedEncodingStream = new import_node_stream4.Readable({ - read: () => { - } - }); - readable.on("data", (data3) => { - const length = bodyLengthChecker(data3) || 0; - if (length === 0) { - return; - } - awsChunkedEncodingStream.push(`${length.toString(16)}\r -`); - awsChunkedEncodingStream.push(data3); - awsChunkedEncodingStream.push("\r\n"); - }); - readable.on("end", async () => { - awsChunkedEncodingStream.push(`0\r -`); - if (checksumRequired) { - const checksum = base64Encoder(await digest); - awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r -`); - awsChunkedEncodingStream.push(`\r -`); - } - awsChunkedEncodingStream.push(null); - }); - return awsChunkedEncodingStream; -} -var import_node_stream4; -var init_getAwsChunkedEncodingStream = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js"() { - import_node_stream4 = require("node:stream"); - init_getAwsChunkedEncodingStream_browser(); - init_stream_type_check(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.browser.js -async function headStream(stream, bytes) { - let byteLengthCounter = 0; - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - byteLengthCounter += value?.byteLength ?? 0; - } - if (byteLengthCounter >= bytes) { - break; - } - isDone = done; - } - reader.releaseLock(); - const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); - let offset = 0; - for (const chunk of chunks) { - if (chunk.byteLength > collected.byteLength - offset) { - collected.set(chunk.subarray(0, collected.byteLength - offset), offset); - break; - } else { - collected.set(chunk, offset); - } - offset += chunk.length; - } - return collected; -} -var init_headStream_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.browser.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.js -var import_node_stream5, headStream2, Collector; -var init_headStream = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.js"() { - import_node_stream5 = require("node:stream"); - init_headStream_browser(); - init_stream_type_check(); - headStream2 = (stream, bytes) => { - if (isReadableStream(stream)) { - return headStream(stream, bytes); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - collector.limit = bytes; - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function() { - const bytes2 = new Uint8Array(Buffer.concat(this.buffers)); - resolve(bytes2); - }); - }); - }; - Collector = class extends import_node_stream5.Writable { - buffers = []; - limit = Infinity; - bytesBuffered = 0; - _write(chunk, encoding, callback) { - this.buffers.push(chunk); - this.bytesBuffered += chunk.byteLength ?? 0; - if (this.bytesBuffered >= this.limit) { - const excess = this.bytesBuffered - this.limit; - const tailBuffer = this.buffers[this.buffers.length - 1]; - this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess); - this.emit("finish"); - } - callback(); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.browser.js -var toUtf82; -var init_toUtf8_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.browser.js"() { - toUtf82 = (input) => { - if (typeof input === "string") { - return input; - } - if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { - throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); - } - return new TextDecoder("utf-8").decode(input); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.browser.js -var fromBase642; -var init_fromBase64_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.browser.js"() { - init_constants_for_browser(); - fromBase642 = (input) => { - let totalByteLength = input.length / 4 * 3; - if (input.slice(-2) === "==") { - totalByteLength -= 2; - } else if (input.slice(-1) === "=") { - totalByteLength--; - } - const out = new ArrayBuffer(totalByteLength); - const dataView3 = new DataView(out); - for (let i5 = 0; i5 < input.length; i5 += 4) { - let bits = 0; - let bitLength = 0; - for (let j5 = i5, limit = i5 + 3; j5 <= limit; j5++) { - if (input[j5] !== "=") { - if (!(input[j5] in alphabetByEncoding)) { - throw new TypeError(`Invalid character ${input[j5]} in base64 string.`); - } - bits |= alphabetByEncoding[input[j5]] << (limit - j5) * bitsPerLetter; - bitLength += bitsPerLetter; - } else { - bits >>= bitsPerLetter; - } - } - const chunkOffset = i5 / 4 * 3; - bits >>= bitLength % bitsPerByte; - const byteLength = Math.floor(bitLength / bitsPerByte); - for (let k5 = 0; k5 < byteLength; k5++) { - const offset = (byteLength - k5 - 1) * bitsPerByte; - dataView3.setUint8(chunkOffset + k5, (bits & 255 << offset) >> offset); - } - } - return new Uint8Array(out); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js -async function collectBlob(blob) { - const base64 = await readToBase64(blob); - const arrayBuffer = fromBase642(base64); - return new Uint8Array(arrayBuffer); -} -async function collectStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} -function readToBase64(blob) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onloadend = () => { - if (reader.readyState !== 2) { - return reject(new Error("Reader aborted too early")); - } - const result = reader.result ?? ""; - const commaIndex = result.indexOf(","); - const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; - resolve(result.substring(dataOffset)); - }; - reader.onabort = () => reject(new Error("Read aborted")); - reader.onerror = () => reject(reader.error); - reader.readAsDataURL(blob); - }); -} -var streamCollector; -var init_stream_collector_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js"() { - init_fromBase64_browser(); - streamCollector = async (stream) => { - if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") { - if (Blob.prototype.arrayBuffer !== void 0) { - return new Uint8Array(await stream.arrayBuffer()); - } - return collectBlob(stream); - } - return collectStream(stream); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js -var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED, sdkStreamMixin, isBlobInstance; -var init_sdk_stream_mixin_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js"() { - init_toBase64_browser(); - init_hex_encoding(); - init_toUtf8_browser(); - init_stream_collector_browser(); - init_stream_type_check(); - ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; - sdkStreamMixin = (stream) => { - if (!isBlobInstance(stream) && !isReadableStream(stream)) { - const name = stream?.__proto__?.constructor?.name || stream; - throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); - } - let transformed = false; - const transformToByteArray = async () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - transformed = true; - return await streamCollector(stream); - }; - const blobToWebStream = (blob) => { - if (typeof blob.stream !== "function") { - throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); - } - return blob.stream(); - }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === "base64") { - return toBase642(buf); - } else if (encoding === "hex") { - return toHex(buf); - } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") { - return toUtf82(buf); - } else if (typeof TextDecoder === "function") { - return new TextDecoder(encoding).decode(buf); - } else { - throw new Error("TextDecoder is not available, please make sure polyfill is provided."); - } - }, - transformToWebStream: () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - transformed = true; - if (isBlobInstance(stream)) { - return blobToWebStream(stream); - } else if (isReadableStream(stream)) { - return stream; - } else { - throw new Error(`Cannot transform payload to web stream, got ${stream}`); - } - } - }); - }; - isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js -async function collectReadableStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; -} -var import_node_stream6, Collector2, isReadableStreamInstance, streamCollector2; -var init_stream_collector = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js"() { - import_node_stream6 = require("node:stream"); - Collector2 = class extends import_node_stream6.Writable { - bufferedBytes = []; - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); - } - }; - isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; - streamCollector2 = (stream) => { - if (isReadableStreamInstance(stream)) { - return collectReadableStream(stream); - } - return new Promise((resolve, reject) => { - const collector = new Collector2(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function() { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.js -var import_node_stream7, ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2, sdkStreamMixin2; -var init_sdk_stream_mixin = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.js"() { - import_node_stream7 = require("node:stream"); - init_buffer_from(); - init_sdk_stream_mixin_browser(); - init_stream_collector(); - ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2 = "The stream has already been transformed."; - sdkStreamMixin2 = (stream) => { - if (!(stream instanceof import_node_stream7.Readable)) { - try { - return sdkStreamMixin(stream); - } catch (e5) { - const name = stream?.__proto__?.constructor?.name || stream; - throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); - } - } - let transformed = false; - const transformToByteArray = async () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2); - } - transformed = true; - return await streamCollector2(stream); - }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === void 0 || Buffer.isEncoding(encoding)) { - return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); - } else { - const decoder2 = new TextDecoder(encoding); - return decoder2.decode(buf); - } - }, - transformToWebStream: () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2); - } - if (stream.readableFlowing !== null) { - throw new Error("The stream has been consumed by other callbacks."); - } - if (typeof import_node_stream7.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); - } - transformed = true; - return import_node_stream7.Readable.toWeb(stream); - } - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.browser.js -async function splitStream(stream) { - if (typeof stream.stream === "function") { - stream = stream.stream(); - } - const readableStream = stream; - return readableStream.tee(); -} -var init_splitStream_browser = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.browser.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.js -async function splitStream2(stream) { - if (isReadableStream(stream) || isBlob(stream)) { - return splitStream(stream); - } - const stream1 = new import_node_stream8.PassThrough(); - const stream2 = new import_node_stream8.PassThrough(); - stream.pipe(stream1); - stream.pipe(stream2); - return [stream1, stream2]; -} -var import_node_stream8; -var init_splitStream = __esm({ - "node_modules/@smithy/core/dist-es/submodules/serde/util-stream/splitStream.js"() { - import_node_stream8 = require("node:stream"); - init_splitStream_browser(); - init_stream_type_check(); - } -}); - // node_modules/@smithy/core/dist-es/submodules/serde/index.js var serde_exports = {}; __export(serde_exports, { - ChecksumStream: () => ChecksumStream, - Hash: () => Hash, LazyJsonString: () => LazyJsonString, NumericValue: () => NumericValue, - Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter, _parseEpochTimestamp: () => _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset: () => _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime: () => _parseRfc7231DateTime, - calculateBodyLength: () => calculateBodyLength, copyDocumentWithTransform: () => copyDocumentWithTransform, - createBufferedReadable: () => createBufferedReadable, - createChecksumStream: () => createChecksumStream2, dateToUtcString: () => dateToUtcString, - deserializerMiddleware: () => deserializerMiddleware, - deserializerMiddlewareOption: () => deserializerMiddlewareOption, expectBoolean: () => expectBoolean, expectByte: () => expectByte, expectFloat32: () => expectFloat32, @@ -23788,19 +26665,8 @@ __export(serde_exports, { expectShort: () => expectShort, expectString: () => expectString, expectUnion: () => expectUnion, - fromArrayBuffer: () => fromArrayBuffer, - fromBase64: () => fromBase64, - fromHex: () => fromHex, - fromString: () => fromString, - fromUtf8: () => fromUtf8, - generateIdempotencyToken: () => generateIdempotencyToken, - getAwsChunkedEncodingStream: () => getAwsChunkedEncodingStream2, - getSerdePlugin: () => getSerdePlugin, + generateIdempotencyToken: () => import_uuid.v4, handleFloat: () => handleFloat, - headStream: () => headStream2, - isArrayBuffer: () => isArrayBuffer, - isBlob: () => isBlob, - isReadableStream: () => isReadableStream, limitedParseDouble: () => limitedParseDouble, limitedParseFloat: () => limitedParseFloat, limitedParseFloat32: () => limitedParseFloat32, @@ -23812,12 +26678,8 @@ __export(serde_exports, { parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset, parseRfc7231DateTime: () => parseRfc7231DateTime, quoteHeader: () => quoteHeader, - sdkStreamMixin: () => sdkStreamMixin2, - serializerMiddleware: () => serializerMiddleware, - serializerMiddlewareOption: () => serializerMiddlewareOption2, splitEvery: () => splitEvery, splitHeader: () => splitHeader, - splitStream: () => splitStream2, strictParseByte: () => strictParseByte, strictParseDouble: () => strictParseDouble, strictParseFloat: () => strictParseFloat, @@ -23825,25 +26687,13 @@ __export(serde_exports, { strictParseInt: () => strictParseInt, strictParseInt32: () => strictParseInt32, strictParseLong: () => strictParseLong, - strictParseShort: () => strictParseShort, - toBase64: () => toBase64, - toHex: () => toHex, - toUint8Array: () => toUint8Array, - toUtf8: () => toUtf8, - v4: () => v4 + strictParseShort: () => strictParseShort }); -var import_node_crypto3, Uint8ArrayBlobAdapter, _getRandomValues, v4, generateIdempotencyToken; var init_serde = __esm({ "node_modules/@smithy/core/dist-es/submodules/serde/index.js"() { - import_node_crypto3 = require("node:crypto"); - init_fromBase64(); - init_toBase64(); - init_Uint8ArrayBlobAdapter(); - init_fromUtf8(); - init_toUtf8(); - init_v4(); init_copyDocumentWithTransform(); init_date_utils(); + init_generateIdempotencyToken(); init_lazy_json(); init_parse_utils(); init_quote_header(); @@ -23851,57 +26701,6 @@ var init_serde = __esm({ init_split_every(); init_split_header(); init_NumericValue(); - init_hex_encoding(); - init_calculateBodyLength(); - init_toUint8Array(); - init_buffer_from(); - init_is_array_buffer(); - init_deserializerMiddleware(); - init_serdePlugin(); - init_serializerMiddleware(); - init_hash_node(); - init_ChecksumStream(); - init_createChecksumStream(); - init_createBufferedReadable(); - init_getAwsChunkedEncodingStream(); - init_headStream(); - init_sdk_stream_mixin(); - init_splitStream(); - init_stream_type_check(); - Uint8ArrayBlobAdapter = class extends bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) { - }; - _getRandomValues = import_node_crypto3.getRandomValues; - v4 = bindV4(_getRandomValues); - generateIdempotencyToken = v4; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js -var collectBody; -var init_collect_stream_body = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() { - init_serde(); - collectBody = async (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return Uint8ArrayBlobAdapter.mutate(streamBody); - } - if (!streamBody) { - return Uint8ArrayBlobAdapter.mutate(new Uint8Array()); - } - const fromContext = context.streamCollector(streamBody); - return Uint8ArrayBlobAdapter.mutate(await fromContext); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js -function extendedEncodeURIComponent(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c5) { - return "%" + c5.charCodeAt(0).toString(16).toUpperCase(); - }); -} -var init_extended_encode_uri_component = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js"() { } }); @@ -23918,1899 +26717,11 @@ 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, { - __addDisposableResource: () => __addDisposableResource, - __assign: () => __assign, - __asyncDelegator: () => __asyncDelegator, - __asyncGenerator: () => __asyncGenerator, - __asyncValues: () => __asyncValues, - __await: () => __await, - __awaiter: () => __awaiter6, - __classPrivateFieldGet: () => __classPrivateFieldGet, - __classPrivateFieldIn: () => __classPrivateFieldIn, - __classPrivateFieldSet: () => __classPrivateFieldSet, - __createBinding: () => __createBinding, - __decorate: () => __decorate, - __disposeResources: () => __disposeResources, - __esDecorate: () => __esDecorate, - __exportStar: () => __exportStar, - __extends: () => __extends, - __generator: () => __generator, - __importDefault: () => __importDefault, - __importStar: () => __importStar, - __makeTemplateObject: () => __makeTemplateObject, - __metadata: () => __metadata, - __param: () => __param, - __propKey: () => __propKey, - __read: () => __read, - __rest: () => __rest, - __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, - __runInitializers: () => __runInitializers, - __setFunctionName: () => __setFunctionName, - __spread: () => __spread, - __spreadArray: () => __spreadArray, - __spreadArrays: () => __spreadArrays, - __values: () => __values, - default: () => tslib_es6_default -}); -function __extends(d5, b6) { - if (typeof b6 !== "function" && b6 !== null) - throw new TypeError("Class extends value " + String(b6) + " is not a constructor or null"); - extendStatics(d5, b6); - function __() { - this.constructor = d5; - } - d5.prototype = b6 === null ? Object.create(b6) : (__.prototype = b6.prototype, new __()); -} -function __rest(s, e5) { - var t = {}; - for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e5.indexOf(p2) < 0) - t[p2] = s[p2]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i5 = 0, p2 = Object.getOwnPropertySymbols(s); i5 < p2.length; i5++) { - if (e5.indexOf(p2[i5]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i5])) - t[p2[i5]] = s[p2[i5]]; - } - return t; -} -function __decorate(decorators, target, key, desc) { - var c5 = arguments.length, r5 = c5 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r5 = Reflect.decorate(decorators, target, key, desc); - else for (var i5 = decorators.length - 1; i5 >= 0; i5--) if (d5 = decorators[i5]) r5 = (c5 < 3 ? d5(r5) : c5 > 3 ? d5(target, key, r5) : d5(target, key)) || r5; - return c5 > 3 && r5 && Object.defineProperty(target, key, r5), r5; -} -function __param(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f5) { - if (f5 !== void 0 && typeof f5 !== "function") throw new TypeError("Function expected"); - return f5; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i5 = decorators.length - 1; i5 >= 0; i5--) { - var context = {}; - for (var p2 in contextIn) context[p2] = p2 === "access" ? {} : contextIn[p2]; - for (var p2 in contextIn.access) context.access[p2] = contextIn.access[p2]; - context.addInitializer = function(f5) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f5 || null)); - }; - var result = (0, decorators[i5])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i5 = 0; i5 < initializers.length; i5++) { - value = useValue ? initializers[i5].call(thisArg, value) : initializers[i5].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName(f5, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f5, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter6(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()); - }); -} -function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f5, y, t, g5 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g5.next = verb(0), g5["throw"] = verb(1), g5["return"] = verb(2), typeof Symbol === "function" && (g5[Symbol.iterator] = function() { - return this; - }), g5; - function verb(n3) { - return function(v) { - return step([n3, v]); - }; - } - function step(op2) { - if (f5) throw new TypeError("Generator is already executing."); - while (g5 && (g5 = 0, op2[0] && (_ = 0)), _) try { - if (f5 = 1, y && (t = op2[0] & 2 ? y["return"] : op2[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op2[1])).done) return t; - if (y = 0, t) op2 = [op2[0] & 2, t.value]; - switch (op2[0]) { - case 0: - case 1: - t = op2; - break; - case 4: - _.label++; - return { value: op2[1], done: false }; - case 5: - _.label++; - y = op2[1]; - op2 = [0]; - continue; - case 7: - op2 = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op2[0] === 6 || op2[0] === 2)) { - _ = 0; - continue; - } - if (op2[0] === 3 && (!t || op2[1] > t[0] && op2[1] < t[3])) { - _.label = op2[1]; - break; - } - if (op2[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op2; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op2); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op2 = body.call(thisArg, _); - } catch (e5) { - op2 = [6, e5]; - y = 0; - } finally { - f5 = t = 0; - } - if (op2[0] & 5) throw op2[1]; - return { value: op2[0] ? op2[1] : void 0, done: true }; - } -} -function __exportStar(m3, o2) { - for (var p2 in m3) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(o2, p2)) __createBinding(o2, m3, p2); -} -function __values(o2) { - var s = typeof Symbol === "function" && Symbol.iterator, m3 = s && o2[s], i5 = 0; - if (m3) return m3.call(o2); - if (o2 && typeof o2.length === "number") return { - next: function() { - if (o2 && i5 >= o2.length) o2 = void 0; - return { value: o2 && o2[i5++], done: !o2 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read(o2, n3) { - var m3 = typeof Symbol === "function" && o2[Symbol.iterator]; - if (!m3) return o2; - var i5 = m3.call(o2), r5, ar = [], e5; - try { - while ((n3 === void 0 || n3-- > 0) && !(r5 = i5.next()).done) ar.push(r5.value); - } catch (error3) { - e5 = { error: error3 }; - } finally { - try { - if (r5 && !r5.done && (m3 = i5["return"])) m3.call(i5); - } finally { - if (e5) throw e5.error; - } - } - return ar; -} -function __spread() { - for (var ar = [], i5 = 0; i5 < arguments.length; i5++) - ar = ar.concat(__read(arguments[i5])); - return ar; -} -function __spreadArrays() { - for (var s = 0, i5 = 0, il = arguments.length; i5 < il; i5++) s += arguments[i5].length; - for (var r5 = Array(s), k5 = 0, i5 = 0; i5 < il; i5++) - for (var a5 = arguments[i5], j5 = 0, jl = a5.length; j5 < jl; j5++, k5++) - r5[k5] = a5[j5]; - return r5; -} -function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i5 = 0, l3 = from.length, ar; i5 < l3; i5++) { - if (ar || !(i5 in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i5); - ar[i5] = from[i5]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} -function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g5 = generator.apply(thisArg, _arguments || []), i5, q2 = []; - return i5 = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i5[Symbol.asyncIterator] = function() { - return this; - }, i5; - function awaitReturn(f5) { - return function(v) { - return Promise.resolve(v).then(f5, reject); - }; - } - function verb(n3, f5) { - if (g5[n3]) { - i5[n3] = function(v) { - return new Promise(function(a5, b6) { - q2.push([n3, v, a5, b6]) > 1 || resume3(n3, v); - }); - }; - if (f5) i5[n3] = f5(i5[n3]); - } - } - function resume3(n3, v) { - try { - step(g5[n3](v)); - } catch (e5) { - settle(q2[0][3], e5); - } - } - function step(r5) { - r5.value instanceof __await ? Promise.resolve(r5.value.v).then(fulfill, reject) : settle(q2[0][2], r5); - } - function fulfill(value) { - resume3("next", value); - } - function reject(value) { - resume3("throw", value); - } - function settle(f5, v) { - if (f5(v), q2.shift(), q2.length) resume3(q2[0][0], q2[0][1]); - } -} -function __asyncDelegator(o2) { - var i5, p2; - return i5 = {}, verb("next"), verb("throw", function(e5) { - throw e5; - }), verb("return"), i5[Symbol.iterator] = function() { - return this; - }, i5; - function verb(n3, f5) { - i5[n3] = o2[n3] ? function(v) { - return (p2 = !p2) ? { value: __await(o2[n3](v)), done: false } : f5 ? f5(v) : v; - } : f5; - } -} -function __asyncValues(o2) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m3 = o2[Symbol.asyncIterator], i5; - return m3 ? m3.call(o2) : (o2 = typeof __values === "function" ? __values(o2) : o2[Symbol.iterator](), i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() { - return this; - }, i5); - function verb(n3) { - i5[n3] = o2[n3] && function(v) { - return new Promise(function(resolve, reject) { - v = o2[n3](v), settle(resolve, reject, v.done, v.value); - }); - }; - } - function settle(resolve, reject, d5, v) { - Promise.resolve(v).then(function(v2) { - resolve({ value: v2, done: d5 }); - }, reject); - } -} -function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k5 = ownKeys(mod), i5 = 0; i5 < k5.length; i5++) if (k5[i5] !== "default") __createBinding(result, mod, k5[i5]); - } - __setModuleDefault(result, mod); - return result; -} -function __importDefault(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet(receiver, state2, kind, f5) { - if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f5 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f5 : kind === "a" ? f5.call(receiver) : f5 ? f5.value : state2.get(receiver); -} -function __classPrivateFieldSet(receiver, state2, value, kind, f5) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f5) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f5 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f5.call(receiver, value) : f5 ? f5.value = value : state2.set(receiver, value), value; -} -function __classPrivateFieldIn(state2, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state2 === "function" ? receiver === state2 : state2.has(receiver); -} -function __addDisposableResource(env2, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e5) { - return Promise.reject(e5); - } - }; - env2.stack.push({ value, dispose, async }); - } else if (async) { - env2.stack.push({ async: true }); - } - return value; -} -function __disposeResources(env2) { - function fail(e5) { - env2.error = env2.hasError ? new _SuppressedError(e5, env2.error, "An error was suppressed during disposal.") : e5; - env2.hasError = true; - } - var r5, s = 0; - function next() { - while (r5 = env2.stack.pop()) { - try { - if (!r5.async && s === 1) return s = 0, env2.stack.push(r5), Promise.resolve().then(next); - if (r5.dispose) { - var result = r5.dispose.call(r5.value); - if (r5.async) return s |= 2, Promise.resolve(result).then(next, function(e5) { - fail(e5); - return next(); - }); - } else s |= 1; - } catch (e5) { - fail(e5); - } - } - if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve(); - if (env2.hasError) throw env2.error; - } - return next(); -} -function __rewriteRelativeImportExtension(path3, preserveJsx) { - if (typeof path3 === "string" && /^\.\.?\//.test(path3)) { - return path3.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m3, tsx, d5, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d5 && (!ext || !cm) ? m3 : d5 + ext + "." + cm.toLowerCase() + "js"; - }); - } - return path3; -} -var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; -var init_tslib_es6 = __esm({ - "node_modules/tslib/tslib.es6.mjs"() { - extendStatics = function(d5, b6) { - extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b7) { - d6.__proto__ = b7; - } || function(d6, b7) { - for (var p2 in b7) if (Object.prototype.hasOwnProperty.call(b7, p2)) d6[p2] = b7[p2]; - }; - return extendStatics(d5, b6); - }; - __assign = function() { - __assign = Object.assign || function __assign2(t) { - for (var s, i5 = 1, n3 = arguments.length; i5 < n3; i5++) { - s = arguments[i5]; - for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t[p2] = s[p2]; - } - return t; - }; - return __assign.apply(this, arguments); - }; - __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]; - }); - __setModuleDefault = Object.create ? (function(o2, v) { - Object.defineProperty(o2, "default", { enumerable: true, value: v }); - }) : function(o2, v) { - o2["default"] = v; - }; - ownKeys = function(o2) { - ownKeys = 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 ownKeys(o2); - }; - _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e5 = new Error(message); - return e5.name = "SuppressedError", e5.error = error3, e5.suppressed = suppressed, e5; - }; - tslib_es6_default = { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter: __awaiter6, - __generator, - __createBinding, - __exportStar, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension - }; - } -}); - -// node_modules/@smithy/is-array-buffer/dist-cjs/index.js -var require_dist_cjs2 = __commonJS({ - "node_modules/@smithy/is-array-buffer/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - isArrayBuffer: () => isArrayBuffer2 - }); - module2.exports = __toCommonJS2(src_exports); - var isArrayBuffer2 = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); - } -}); - -// node_modules/@smithy/util-buffer-from/dist-cjs/index.js -var require_dist_cjs3 = __commonJS({ - "node_modules/@smithy/util-buffer-from/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - fromArrayBuffer: () => fromArrayBuffer2, - fromString: () => fromString2 - }); - module2.exports = __toCommonJS2(src_exports); - var import_is_array_buffer3 = require_dist_cjs2(); - var import_buffer = require("buffer"); - var fromArrayBuffer2 = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { - if (!(0, import_is_array_buffer3.isArrayBuffer)(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); - } - return import_buffer.Buffer.from(input, offset, length); - }, "fromArrayBuffer"); - var fromString2 = /* @__PURE__ */ __name((input, encoding) => { - if (typeof input !== "string") { - throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); - } - return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input); - }, "fromString"); - } -}); - -// node_modules/@smithy/util-utf8/dist-cjs/index.js -var require_dist_cjs4 = __commonJS({ - "node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2, module2) { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export2 = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export2(src_exports, { - fromUtf8: () => fromUtf83, - toUint8Array: () => toUint8Array3, - toUtf8: () => toUtf83 - }); - module2.exports = __toCommonJS2(src_exports); - var import_util_buffer_from = require_dist_cjs3(); - var fromUtf83 = /* @__PURE__ */ __name((input) => { - const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); - return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); - }, "fromUtf8"); - var toUint8Array3 = /* @__PURE__ */ __name((data3) => { - if (typeof data3 === "string") { - return fromUtf83(data3); - } - if (ArrayBuffer.isView(data3)) { - return new Uint8Array(data3.buffer, data3.byteOffset, data3.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data3); - }, "toUint8Array"); - var toUtf83 = /* @__PURE__ */ __name((input) => { - if (typeof input === "string") { - return input; - } - if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { - throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); - } - return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); - }, "toUtf8"); - } -}); - -// node_modules/@aws-crypto/util/build/main/convertToBuffer.js -var require_convertToBuffer = __commonJS({ - "node_modules/@aws-crypto/util/build/main/convertToBuffer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertToBuffer = void 0; - var util_utf8_1 = require_dist_cjs4(); - var fromUtf83 = typeof Buffer !== "undefined" && Buffer.from ? function(input) { - return Buffer.from(input, "utf8"); - } : util_utf8_1.fromUtf8; - function convertToBuffer(data3) { - if (data3 instanceof Uint8Array) - return data3; - if (typeof data3 === "string") { - return fromUtf83(data3); - } - if (ArrayBuffer.isView(data3)) { - return new Uint8Array(data3.buffer, data3.byteOffset, data3.byteLength / Uint8Array.BYTES_PER_ELEMENT); - } - return new Uint8Array(data3); - } - exports2.convertToBuffer = convertToBuffer; - } -}); - -// node_modules/@aws-crypto/util/build/main/isEmptyData.js -var require_isEmptyData = __commonJS({ - "node_modules/@aws-crypto/util/build/main/isEmptyData.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEmptyData = void 0; - function isEmptyData(data3) { - if (typeof data3 === "string") { - return data3.length === 0; - } - return data3.byteLength === 0; - } - exports2.isEmptyData = isEmptyData; - } -}); - -// node_modules/@aws-crypto/util/build/main/numToUint8.js -var require_numToUint8 = __commonJS({ - "node_modules/@aws-crypto/util/build/main/numToUint8.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.numToUint8 = void 0; - function numToUint8(num) { - return new Uint8Array([ - (num & 4278190080) >> 24, - (num & 16711680) >> 16, - (num & 65280) >> 8, - num & 255 - ]); - } - exports2.numToUint8 = numToUint8; - } -}); - -// node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js -var require_uint32ArrayFrom = __commonJS({ - "node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint32ArrayFrom = void 0; - function uint32ArrayFrom(a_lookUpTable) { - if (!Uint32Array.from) { - var return_array = new Uint32Array(a_lookUpTable.length); - var a_index = 0; - while (a_index < a_lookUpTable.length) { - return_array[a_index] = a_lookUpTable[a_index]; - a_index += 1; - } - return return_array; - } - return Uint32Array.from(a_lookUpTable); - } - exports2.uint32ArrayFrom = uint32ArrayFrom; - } -}); - -// node_modules/@aws-crypto/util/build/main/index.js -var require_main = __commonJS({ - "node_modules/@aws-crypto/util/build/main/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint32ArrayFrom = exports2.numToUint8 = exports2.isEmptyData = exports2.convertToBuffer = void 0; - var convertToBuffer_1 = require_convertToBuffer(); - Object.defineProperty(exports2, "convertToBuffer", { enumerable: true, get: function() { - return convertToBuffer_1.convertToBuffer; - } }); - var isEmptyData_1 = require_isEmptyData(); - Object.defineProperty(exports2, "isEmptyData", { enumerable: true, get: function() { - return isEmptyData_1.isEmptyData; - } }); - var numToUint8_1 = require_numToUint8(); - Object.defineProperty(exports2, "numToUint8", { enumerable: true, get: function() { - return numToUint8_1.numToUint8; - } }); - var uint32ArrayFrom_1 = require_uint32ArrayFrom(); - Object.defineProperty(exports2, "uint32ArrayFrom", { enumerable: true, get: function() { - return uint32ArrayFrom_1.uint32ArrayFrom; - } }); - } -}); - -// node_modules/@aws-crypto/crc32/build/main/aws_crc32.js -var require_aws_crc32 = __commonJS({ - "node_modules/@aws-crypto/crc32/build/main/aws_crc32.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AwsCrc32 = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var util_1 = require_main(); - var index_1 = require_main2(); - var AwsCrc32 = ( - /** @class */ - (function() { - function AwsCrc322() { - this.crc32 = new index_1.Crc32(); - } - AwsCrc322.prototype.update = function(toHash) { - if ((0, util_1.isEmptyData)(toHash)) - return; - this.crc32.update((0, util_1.convertToBuffer)(toHash)); - }; - AwsCrc322.prototype.digest = function() { - return tslib_1.__awaiter(this, void 0, void 0, function() { - return tslib_1.__generator(this, function(_a2) { - return [2, (0, util_1.numToUint8)(this.crc32.digest())]; - }); - }); - }; - AwsCrc322.prototype.reset = function() { - this.crc32 = new index_1.Crc32(); - }; - return AwsCrc322; - })() - ); - exports2.AwsCrc32 = AwsCrc32; - } -}); - -// node_modules/@aws-crypto/crc32/build/main/index.js -var require_main2 = __commonJS({ - "node_modules/@aws-crypto/crc32/build/main/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AwsCrc32 = exports2.Crc32 = exports2.crc32 = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var util_1 = require_main(); - function crc32(data3) { - return new Crc323().update(data3).digest(); - } - exports2.crc32 = crc32; - var Crc323 = ( - /** @class */ - (function() { - function Crc324() { - this.checksum = 4294967295; - } - Crc324.prototype.update = function(data3) { - var e_1, _a2; - try { - for (var data_1 = tslib_1.__values(data3), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { - var byte = data_1_1.value; - this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255]; - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (data_1_1 && !data_1_1.done && (_a2 = data_1.return)) _a2.call(data_1); - } finally { - if (e_1) throw e_1.error; - } - } - return this; - }; - Crc324.prototype.digest = function() { - return (this.checksum ^ 4294967295) >>> 0; - }; - return Crc324; - })() - ); - exports2.Crc32 = Crc323; - var a_lookUpTable = [ - 0, - 1996959894, - 3993919788, - 2567524794, - 124634137, - 1886057615, - 3915621685, - 2657392035, - 249268274, - 2044508324, - 3772115230, - 2547177864, - 162941995, - 2125561021, - 3887607047, - 2428444049, - 498536548, - 1789927666, - 4089016648, - 2227061214, - 450548861, - 1843258603, - 4107580753, - 2211677639, - 325883990, - 1684777152, - 4251122042, - 2321926636, - 335633487, - 1661365465, - 4195302755, - 2366115317, - 997073096, - 1281953886, - 3579855332, - 2724688242, - 1006888145, - 1258607687, - 3524101629, - 2768942443, - 901097722, - 1119000684, - 3686517206, - 2898065728, - 853044451, - 1172266101, - 3705015759, - 2882616665, - 651767980, - 1373503546, - 3369554304, - 3218104598, - 565507253, - 1454621731, - 3485111705, - 3099436303, - 671266974, - 1594198024, - 3322730930, - 2970347812, - 795835527, - 1483230225, - 3244367275, - 3060149565, - 1994146192, - 31158534, - 2563907772, - 4023717930, - 1907459465, - 112637215, - 2680153253, - 3904427059, - 2013776290, - 251722036, - 2517215374, - 3775830040, - 2137656763, - 141376813, - 2439277719, - 3865271297, - 1802195444, - 476864866, - 2238001368, - 4066508878, - 1812370925, - 453092731, - 2181625025, - 4111451223, - 1706088902, - 314042704, - 2344532202, - 4240017532, - 1658658271, - 366619977, - 2362670323, - 4224994405, - 1303535960, - 984961486, - 2747007092, - 3569037538, - 1256170817, - 1037604311, - 2765210733, - 3554079995, - 1131014506, - 879679996, - 2909243462, - 3663771856, - 1141124467, - 855842277, - 2852801631, - 3708648649, - 1342533948, - 654459306, - 3188396048, - 3373015174, - 1466479909, - 544179635, - 3110523913, - 3462522015, - 1591671054, - 702138776, - 2966460450, - 3352799412, - 1504918807, - 783551873, - 3082640443, - 3233442989, - 3988292384, - 2596254646, - 62317068, - 1957810842, - 3939845945, - 2647816111, - 81470997, - 1943803523, - 3814918930, - 2489596804, - 225274430, - 2053790376, - 3826175755, - 2466906013, - 167816743, - 2097651377, - 4027552580, - 2265490386, - 503444072, - 1762050814, - 4150417245, - 2154129355, - 426522225, - 1852507879, - 4275313526, - 2312317920, - 282753626, - 1742555852, - 4189708143, - 2394877945, - 397917763, - 1622183637, - 3604390888, - 2714866558, - 953729732, - 1340076626, - 3518719985, - 2797360999, - 1068828381, - 1219638859, - 3624741850, - 2936675148, - 906185462, - 1090812512, - 3747672003, - 2825379669, - 829329135, - 1181335161, - 3412177804, - 3160834842, - 628085408, - 1382605366, - 3423369109, - 3138078467, - 570562233, - 1426400815, - 3317316542, - 2998733608, - 733239954, - 1555261956, - 3268935591, - 3050360625, - 752459403, - 1541320221, - 2607071920, - 3965973030, - 1969922972, - 40735498, - 2617837225, - 3943577151, - 1913087877, - 83908371, - 2512341634, - 3803740692, - 2075208622, - 213261112, - 2463272603, - 3855990285, - 2094854071, - 198958881, - 2262029012, - 4057260610, - 1759359992, - 534414190, - 2176718541, - 4139329115, - 1873836001, - 414664567, - 2282248934, - 4279200368, - 1711684554, - 285281116, - 2405801727, - 4167216745, - 1634467795, - 376229701, - 2685067896, - 3608007406, - 1308918612, - 956543938, - 2808555105, - 3495958263, - 1231636301, - 1047427035, - 2932959818, - 3654703836, - 1088359270, - 936918e3, - 2847714899, - 3736837829, - 1202900863, - 817233897, - 3183342108, - 3401237130, - 1404277552, - 615818150, - 3134207493, - 3453421203, - 1423857449, - 601450431, - 3009837614, - 3294710456, - 1567103746, - 711928724, - 3020668471, - 3272380065, - 1510334235, - 755167117 - ]; - var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable); - var aws_crc32_1 = require_aws_crc32(); - Object.defineProperty(exports2, "AwsCrc32", { enumerable: true, get: function() { - return aws_crc32_1.AwsCrc32; - } }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js -function negate(bytes) { - for (let i5 = 0; i5 < 8; i5++) { - bytes[i5] ^= 255; - } - for (let i5 = 7; i5 > -1; i5--) { - bytes[i5]++; - if (bytes[i5] !== 0) - break; - } -} -var Int64; -var init_Int64 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js"() { - init_serde(); - Int64 = class _Int64 { - bytes; - constructor(bytes) { - this.bytes = bytes; - if (bytes.byteLength !== 8) { - throw new Error("Int64 buffers must be exactly 8 bytes"); - } - } - static fromNumber(number) { - if (number > 9223372036854776e3 || number < -9223372036854776e3) { - throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); - } - const bytes = new Uint8Array(8); - for (let i5 = 7, remaining = Math.abs(Math.round(number)); i5 > -1 && remaining > 0; i5--, remaining /= 256) { - bytes[i5] = remaining; - } - if (number < 0) { - negate(bytes); - } - return new _Int64(bytes); - } - valueOf() { - const bytes = this.bytes.slice(0); - const negative = bytes[0] & 128; - if (negative) { - negate(bytes); - } - return parseInt(toHex(bytes), 16) * (negative ? -1 : 1); - } - toString() { - return String(this.valueOf()); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js -var HeaderMarshaller, HEADER_VALUE_TYPE, BOOLEAN_TAG, BYTE_TAG, SHORT_TAG, INT_TAG, LONG_TAG, BINARY_TAG, STRING_TAG, TIMESTAMP_TAG, UUID_TAG, UUID_PATTERN; -var init_HeaderMarshaller = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js"() { - init_serde(); - init_Int64(); - HeaderMarshaller = class { - toUtf8; - fromUtf8; - constructor(toUtf83, fromUtf83) { - this.toUtf8 = toUtf83; - this.fromUtf8 = fromUtf83; - } - format(headers) { - const chunks = []; - for (const headerName of Object.keys(headers)) { - const bytes = this.fromUtf8(headerName); - chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); - } - const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); - let position = 0; - for (const chunk of chunks) { - out.set(chunk, position); - position += chunk.byteLength; - } - return out; - } - formatHeaderValue(header) { - switch (header.type) { - case "boolean": - return Uint8Array.from([header.value ? 0 : 1]); - case "byte": - return Uint8Array.from([2, header.value]); - case "short": - const shortView = new DataView(new ArrayBuffer(3)); - shortView.setUint8(0, 3); - shortView.setInt16(1, header.value, false); - return new Uint8Array(shortView.buffer); - case "integer": - const intView = new DataView(new ArrayBuffer(5)); - intView.setUint8(0, 4); - intView.setInt32(1, header.value, false); - return new Uint8Array(intView.buffer); - case "long": - const longBytes = new Uint8Array(9); - longBytes[0] = 5; - longBytes.set(header.value.bytes, 1); - return longBytes; - case "binary": - const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); - binView.setUint8(0, 6); - binView.setUint16(1, header.value.byteLength, false); - const binBytes = new Uint8Array(binView.buffer); - binBytes.set(header.value, 3); - return binBytes; - case "string": - const utf8Bytes = this.fromUtf8(header.value); - const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); - strView.setUint8(0, 7); - strView.setUint16(1, utf8Bytes.byteLength, false); - const strBytes = new Uint8Array(strView.buffer); - strBytes.set(utf8Bytes, 3); - return strBytes; - case "timestamp": - const tsBytes = new Uint8Array(9); - tsBytes[0] = 8; - tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); - return tsBytes; - case "uuid": - if (!UUID_PATTERN.test(header.value)) { - throw new Error(`Invalid UUID received: ${header.value}`); - } - const uuidBytes = new Uint8Array(17); - uuidBytes[0] = 9; - uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1); - return uuidBytes; - } - } - parse(headers) { - const out = {}; - let position = 0; - while (position < headers.byteLength) { - const nameLength = headers.getUint8(position++); - const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); - position += nameLength; - switch (headers.getUint8(position++)) { - case 0: - out[name] = { - type: BOOLEAN_TAG, - value: true - }; - break; - case 1: - out[name] = { - type: BOOLEAN_TAG, - value: false - }; - break; - case 2: - out[name] = { - type: BYTE_TAG, - value: headers.getInt8(position++) - }; - break; - case 3: - out[name] = { - type: SHORT_TAG, - value: headers.getInt16(position, false) - }; - position += 2; - break; - case 4: - out[name] = { - type: INT_TAG, - value: headers.getInt32(position, false) - }; - position += 4; - break; - case 5: - out[name] = { - type: LONG_TAG, - value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) - }; - position += 8; - break; - case 6: - const binaryLength = headers.getUint16(position, false); - position += 2; - out[name] = { - type: BINARY_TAG, - value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) - }; - position += binaryLength; - break; - case 7: - const stringLength = headers.getUint16(position, false); - position += 2; - out[name] = { - type: STRING_TAG, - value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) - }; - position += stringLength; - break; - case 8: - out[name] = { - type: TIMESTAMP_TAG, - value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) - }; - position += 8; - break; - case 9: - const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); - position += 16; - out[name] = { - type: UUID_TAG, - value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}` - }; - break; - default: - throw new Error(`Unrecognized header type tag`); - } - } - return out; - } - }; - (function(HEADER_VALUE_TYPE2) { - HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolTrue"] = 0] = "boolTrue"; - HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolFalse"] = 1] = "boolFalse"; - HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byte"] = 2] = "byte"; - HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["short"] = 3] = "short"; - HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["integer"] = 4] = "integer"; - HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["long"] = 5] = "long"; - HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byteArray"] = 6] = "byteArray"; - HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["string"] = 7] = "string"; - HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["timestamp"] = 8] = "timestamp"; - HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["uuid"] = 9] = "uuid"; - })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); - BOOLEAN_TAG = "boolean"; - BYTE_TAG = "byte"; - SHORT_TAG = "short"; - INT_TAG = "integer"; - LONG_TAG = "long"; - BINARY_TAG = "binary"; - STRING_TAG = "string"; - TIMESTAMP_TAG = "timestamp"; - UUID_TAG = "uuid"; - UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js -function splitMessage({ byteLength, byteOffset, buffer }) { - if (byteLength < MINIMUM_MESSAGE_LENGTH) { - throw new Error("Provided message too short to accommodate event stream message overhead"); - } - const view = new DataView(buffer, byteOffset, byteLength); - const messageLength = view.getUint32(0, false); - if (byteLength !== messageLength) { - throw new Error("Reported message length does not match received message length"); - } - const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); - const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); - const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); - const checksummer = new import_crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); - if (expectedPreludeChecksum !== checksummer.digest()) { - throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`); - } - checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH))); - if (expectedMessageChecksum !== checksummer.digest()) { - throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`); - } - return { - headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), - body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)) - }; -} -var import_crc32, PRELUDE_MEMBER_LENGTH, PRELUDE_LENGTH, CHECKSUM_LENGTH, MINIMUM_MESSAGE_LENGTH; -var init_splitMessage = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js"() { - import_crc32 = __toESM(require_main2()); - PRELUDE_MEMBER_LENGTH = 4; - PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; - CHECKSUM_LENGTH = 4; - MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js -var import_crc322, EventStreamCodec; -var init_EventStreamCodec = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js"() { - import_crc322 = __toESM(require_main2()); - init_HeaderMarshaller(); - init_splitMessage(); - EventStreamCodec = class { - headerMarshaller; - messageBuffer; - isEndOfStream; - constructor(toUtf83, fromUtf83) { - this.headerMarshaller = new HeaderMarshaller(toUtf83, fromUtf83); - this.messageBuffer = []; - this.isEndOfStream = false; - } - feed(message) { - this.messageBuffer.push(this.decode(message)); - } - endOfStream() { - this.isEndOfStream = true; - } - getMessage() { - const message = this.messageBuffer.pop(); - const isEndOfStream = this.isEndOfStream; - return { - getMessage() { - return message; - }, - isEndOfStream() { - return isEndOfStream; - } - }; - } - getAvailableMessages() { - const messages = this.messageBuffer; - this.messageBuffer = []; - const isEndOfStream = this.isEndOfStream; - return { - getMessages() { - return messages; - }, - isEndOfStream() { - return isEndOfStream; - } - }; - } - encode({ headers: rawHeaders, body }) { - const headers = this.headerMarshaller.format(rawHeaders); - const length = headers.byteLength + body.byteLength + 16; - const out = new Uint8Array(length); - const view = new DataView(out.buffer, out.byteOffset, out.byteLength); - const checksum = new import_crc322.Crc32(); - view.setUint32(0, length, false); - view.setUint32(4, headers.byteLength, false); - view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); - out.set(headers, 12); - out.set(body, headers.byteLength + 12); - view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); - return out; - } - decode(message) { - const { headers, body } = splitMessage(message); - return { headers: this.headerMarshaller.parse(headers), body }; - } - formatHeaders(rawHeaders) { - return this.headerMarshaller.format(rawHeaders); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageDecoderStream.js -var MessageDecoderStream; -var init_MessageDecoderStream = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageDecoderStream.js"() { - MessageDecoderStream = class { - options; - constructor(options) { - this.options = options; - } - [Symbol.asyncIterator]() { - return this.asyncIterator(); - } - async *asyncIterator() { - for await (const bytes of this.options.inputStream) { - const decoded = this.options.decoder.decode(bytes); - yield decoded; - } - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageEncoderStream.js -var MessageEncoderStream; -var init_MessageEncoderStream = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageEncoderStream.js"() { - MessageEncoderStream = class { - options; - constructor(options) { - this.options = options; - } - [Symbol.asyncIterator]() { - return this.asyncIterator(); - } - async *asyncIterator() { - for await (const msg of this.options.messageStream) { - const encoded = this.options.encoder.encode(msg); - yield encoded; - } - if (this.options.includeEndFrame) { - yield new Uint8Array(0); - } - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js -var SmithyMessageDecoderStream; -var init_SmithyMessageDecoderStream = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js"() { - SmithyMessageDecoderStream = class { - options; - constructor(options) { - this.options = options; - } - [Symbol.asyncIterator]() { - return this.asyncIterator(); - } - async *asyncIterator() { - for await (const message of this.options.messageStream) { - const deserialized = await this.options.deserializer(message); - if (deserialized === void 0) - continue; - yield deserialized; - } - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageEncoderStream.js -var SmithyMessageEncoderStream; -var init_SmithyMessageEncoderStream = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageEncoderStream.js"() { - SmithyMessageEncoderStream = class { - options; - constructor(options) { - this.options = options; - } - [Symbol.asyncIterator]() { - return this.asyncIterator(); - } - async *asyncIterator() { - for await (const chunk of this.options.inputStream) { - const payloadBuf = this.options.serializer(chunk); - yield payloadBuf; - } - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getChunkedStream.js -function getChunkedStream(source) { - let currentMessageTotalLength = 0; - let currentMessagePendingLength = 0; - let currentMessage = null; - let messageLengthBuffer = null; - const allocateMessage = (size) => { - if (typeof size !== "number") { - throw new Error("Attempted to allocate an event message where size was not a number: " + size); - } - currentMessageTotalLength = size; - currentMessagePendingLength = 4; - currentMessage = new Uint8Array(size); - const currentMessageView = new DataView(currentMessage.buffer); - currentMessageView.setUint32(0, size, false); - }; - const iterator = async function* () { - const sourceIterator = source[Symbol.asyncIterator](); - while (true) { - const { value, done } = await sourceIterator.next(); - if (done) { - if (!currentMessageTotalLength) { - return; - } else if (currentMessageTotalLength === currentMessagePendingLength) { - yield currentMessage; - } else { - throw new Error("Truncated event message received."); - } - return; - } - const chunkLength = value.length; - let currentOffset = 0; - while (currentOffset < chunkLength) { - if (!currentMessage) { - const bytesRemaining = chunkLength - currentOffset; - if (!messageLengthBuffer) { - messageLengthBuffer = new Uint8Array(4); - } - const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining); - messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength); - currentMessagePendingLength += numBytesForTotal; - currentOffset += numBytesForTotal; - if (currentMessagePendingLength < 4) { - break; - } - allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false)); - messageLengthBuffer = null; - } - const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset); - currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength); - currentMessagePendingLength += numBytesToWrite; - currentOffset += numBytesToWrite; - if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) { - yield currentMessage; - currentMessage = null; - currentMessageTotalLength = 0; - currentMessagePendingLength = 0; - } - } - } - }; - return { - [Symbol.asyncIterator]: iterator - }; -} -var init_getChunkedStream = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getChunkedStream.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js -function getUnmarshalledStream(source, options) { - const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8); - return { - [Symbol.asyncIterator]: async function* () { - for await (const chunk of source) { - const message = options.eventStreamCodec.decode(chunk); - const type = await messageUnmarshaller(message); - if (type === void 0) - continue; - yield type; - } - } - }; -} -function getMessageUnmarshaller(deserializer, toUtf83) { - return async function(message) { - const { value: messageType } = message.headers[":message-type"]; - if (messageType === "error") { - const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError"); - unmodeledError.name = message.headers[":error-code"].value; - throw unmodeledError; - } else if (messageType === "exception") { - const code = message.headers[":exception-type"].value; - const exception = { [code]: message }; - const deserializedException = await deserializer(exception); - if (deserializedException.$unknown) { - const error3 = new Error(toUtf83(message.body)); - error3.name = code; - throw error3; - } - throw deserializedException[code]; - } else if (messageType === "event") { - const event = { - [message.headers[":event-type"].value]: message - }; - const deserialized = await deserializer(event); - if (deserialized.$unknown) - return; - return deserialized; - } else { - throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`); - } - }; -} -var init_getUnmarshalledStream = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/EventStreamMarshaller.js -var EventStreamMarshaller, eventStreamSerdeProvider; -var init_EventStreamMarshaller = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/EventStreamMarshaller.js"() { - init_EventStreamCodec(); - init_MessageDecoderStream(); - init_MessageEncoderStream(); - init_SmithyMessageDecoderStream(); - init_SmithyMessageEncoderStream(); - init_getChunkedStream(); - init_getUnmarshalledStream(); - EventStreamMarshaller = class { - eventStreamCodec; - utfEncoder; - constructor({ utf8Encoder, utf8Decoder }) { - this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder); - this.utfEncoder = utf8Encoder; - } - deserialize(body, deserializer) { - const inputStream = getChunkedStream(body); - return new SmithyMessageDecoderStream({ - messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }), - deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder) - }); - } - serialize(inputStream, serializer) { - return new MessageEncoderStream({ - messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }), - encoder: this.eventStreamCodec, - includeEndFrame: true - }); - } - }; - eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js -async function* readableToIterable(readStream) { - let streamEnded = false; - let generationEnded = false; - const records = new Array(); - readStream.on("error", (err) => { - if (!streamEnded) { - streamEnded = true; - } - if (err) { - throw err; - } - }); - readStream.on("data", (data3) => { - records.push(data3); - }); - readStream.on("end", () => { - streamEnded = true; - }); - while (!generationEnded) { - const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0)); - if (value) { - yield value; - } - generationEnded = streamEnded && records.length === 0; - } -} -var import_node_stream9, EventStreamMarshaller2, eventStreamSerdeProvider2; -var init_EventStreamMarshaller2 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js"() { - import_node_stream9 = require("node:stream"); - init_EventStreamMarshaller(); - EventStreamMarshaller2 = class { - universalMarshaller; - constructor({ utf8Encoder, utf8Decoder }) { - this.universalMarshaller = new EventStreamMarshaller({ - utf8Decoder, - utf8Encoder - }); - } - deserialize(body, deserializer) { - const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readableToIterable(body); - return this.universalMarshaller.deserialize(bodyIterable, deserializer); - } - serialize(input, serializer) { - return import_node_stream9.Readable.from(this.universalMarshaller.serialize(input, serializer)); - } - }; - eventStreamSerdeProvider2 = (options) => new EventStreamMarshaller2(options); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js -var readableStreamToIterable, iterableToReadableStream; -var init_utils2 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js"() { - readableStreamToIterable = (readableStream) => ({ - [Symbol.asyncIterator]: async function* () { - const reader = readableStream.getReader(); - try { - while (true) { - const { done, value } = await reader.read(); - if (done) - return; - yield value; - } - } finally { - reader.releaseLock(); - } - } - }); - iterableToReadableStream = (asyncIterable) => { - const iterator = asyncIterable[Symbol.asyncIterator](); - return new ReadableStream({ - async pull(controller) { - const { done, value } = await iterator.next(); - if (done) { - return controller.close(); - } - controller.enqueue(value); - } - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-config-resolver/EventStreamSerdeConfig.js -var resolveEventStreamSerdeConfig; -var init_EventStreamSerdeConfig = __esm({ - "node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-config-resolver/EventStreamSerdeConfig.js"() { - resolveEventStreamSerdeConfig = (input) => Object.assign(input, { - eventStreamMarshaller: input.eventStreamSerdeProvider(input) - }); - } -}); - // node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js -var EventStreamSerde; +var import_util_utf8, EventStreamSerde; var init_EventStreamSerde = __esm({ "node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"() { - init_serde(); + import_util_utf8 = __toESM(require_dist_cjs9()); EventStreamSerde = class { marshaller; serializer; @@ -25913,7 +26824,7 @@ var init_EventStreamSerde = __esm({ if (member2.isBlobSchema()) { out[name] = body; } else if (member2.isStringSchema()) { - out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body); + out[name] = (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)(body); } else if (member2.isStructSchema()) { out[name] = await this.deserializer.read(member2, body); } @@ -26044,7 +26955,7 @@ var init_EventStreamSerde = __esm({ } } const messageSerialization = serializer.flush() ?? new Uint8Array(); - const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization) : messageSerialization; + const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? import_util_utf8.fromUtf8)(messageSerialization) : messageSerialization; return { body, eventType, @@ -26059,52 +26970,21 @@ var init_EventStreamSerde = __esm({ // node_modules/@smithy/core/dist-es/submodules/event-streams/index.js var event_streams_exports = {}; __export(event_streams_exports, { - EventStreamCodec: () => EventStreamCodec, - EventStreamMarshaller: () => EventStreamMarshaller2, - EventStreamSerde: () => EventStreamSerde, - HeaderMarshaller: () => HeaderMarshaller, - Int64: () => Int64, - MessageDecoderStream: () => MessageDecoderStream, - MessageEncoderStream: () => MessageEncoderStream, - SmithyMessageDecoderStream: () => SmithyMessageDecoderStream, - SmithyMessageEncoderStream: () => SmithyMessageEncoderStream, - UniversalEventStreamMarshaller: () => EventStreamMarshaller, - eventStreamSerdeProvider: () => eventStreamSerdeProvider2, - getChunkedStream: () => getChunkedStream, - getMessageUnmarshaller: () => getMessageUnmarshaller, - getUnmarshalledStream: () => getUnmarshalledStream, - iterableToReadableStream: () => iterableToReadableStream, - readableStreamToIterable: () => readableStreamToIterable, - resolveEventStreamSerdeConfig: () => resolveEventStreamSerdeConfig, - universalEventStreamSerdeProvider: () => eventStreamSerdeProvider + EventStreamSerde: () => EventStreamSerde }); var init_event_streams = __esm({ "node_modules/@smithy/core/dist-es/submodules/event-streams/index.js"() { - init_EventStreamCodec(); - init_HeaderMarshaller(); - init_Int64(); - init_MessageDecoderStream(); - init_MessageEncoderStream(); - init_SmithyMessageDecoderStream(); - init_SmithyMessageEncoderStream(); - init_EventStreamMarshaller2(); - init_utils2(); - init_EventStreamMarshaller(); - init_getChunkedStream(); - init_getUnmarshalledStream(); - init_EventStreamSerdeConfig(); init_EventStreamSerde(); } }); // node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js -var HttpProtocol; +var import_protocol_http3, HttpProtocol; var init_HttpProtocol = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"() { init_schema(); + import_protocol_http3 = __toESM(require_dist_cjs2()); init_SerdeContext(); - init_httpRequest(); - init_httpResponse(); HttpProtocol = class extends SerdeContext { options; compositeErrorRegistry; @@ -26117,10 +26997,10 @@ var init_HttpProtocol = __esm({ } } getRequestType() { - return HttpRequest; + return import_protocol_http3.HttpRequest; } getResponseType() { - return HttpResponse; + return import_protocol_http3.HttpResponse; } setSerdeContext(serdeContext) { this.serdeContext = serdeContext; @@ -26247,15 +27127,16 @@ var init_HttpProtocol = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js -var HttpBindingProtocol; +var import_protocol_http4, import_util_stream2, HttpBindingProtocol; var init_HttpBindingProtocol = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"() { init_schema(); init_serde(); - init_HttpProtocol(); + import_protocol_http4 = __toESM(require_dist_cjs2()); + import_util_stream2 = __toESM(require_dist_cjs16()); init_collect_stream_body(); init_extended_encode_uri_component(); - init_httpRequest(); + init_HttpProtocol(); HttpBindingProtocol = class extends HttpProtocol { async serializeRequest(operationSchema, _input, context) { const input = _input && typeof _input === "object" ? _input : {}; @@ -26268,7 +27149,7 @@ var init_HttpBindingProtocol = __esm({ const payloadMemberSchemas = []; let hasNonHttpBindingMember = false; let payload2; - const request = new HttpRequest({ + const request = new import_protocol_http4.HttpRequest({ protocol: "", hostname: "", port: void 0, @@ -26468,7 +27349,7 @@ var init_HttpBindingProtocol = __esm({ responseSchema: ns }); } else { - dataObject[memberName] = sdkStreamMixin2(response.body); + dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body); } } else if (response.body) { const bytes = await collectBody(response.body, context); @@ -26522,13 +27403,13 @@ var init_HttpBindingProtocol = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js -var RpcProtocol; +var import_protocol_http5, RpcProtocol; var init_RpcProtocol = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js"() { init_schema(); - init_HttpProtocol(); + import_protocol_http5 = __toESM(require_dist_cjs2()); init_collect_stream_body(); - init_httpRequest(); + init_HttpProtocol(); RpcProtocol = class extends HttpProtocol { async serializeRequest(operationSchema, _input, context) { const serializer = this.serializer; @@ -26539,7 +27420,7 @@ var init_RpcProtocol = __esm({ const schema = ns.getSchema(); let payload2; const input = _input && typeof _input === "object" ? _input : {}; - const request = new HttpRequest({ + const request = new import_protocol_http5.HttpRequest({ protocol: "", hostname: "", port: void 0, @@ -26642,10 +27523,10 @@ var init_resolve_path = __esm({ function requestBuilder(input, context) { return new RequestBuilder(input, context); } -var RequestBuilder; +var import_protocol_http6, RequestBuilder; var init_requestBuilder = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"() { - init_httpRequest(); + import_protocol_http6 = __toESM(require_dist_cjs2()); init_resolve_path(); RequestBuilder = class { input; @@ -26667,7 +27548,7 @@ var init_requestBuilder = __esm({ for (const resolvePath of this.resolvePathStack) { resolvePath(this.path); } - return new HttpRequest({ + return new import_protocol_http6.HttpRequest({ protocol, hostname: this.hostname || hostname, port, @@ -26731,11 +27612,13 @@ var init_determineTimestampFormat = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js -var FromStringShapeDeserializer; +var import_util_base64, import_util_utf82, FromStringShapeDeserializer; var init_FromStringShapeDeserializer = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js"() { init_schema(); init_serde(); + import_util_base64 = __toESM(require_dist_cjs10()); + import_util_utf82 = __toESM(require_dist_cjs9()); init_SerdeContext(); init_determineTimestampFormat(); FromStringShapeDeserializer = class extends SerdeContext { @@ -26750,7 +27633,7 @@ var init_FromStringShapeDeserializer = __esm({ return splitHeader(data3).map((item) => this.read(ns.getValueSchema(), item)); } if (ns.isBlobSchema()) { - return (this.serdeContext?.base64Decoder ?? fromBase64)(data3); + return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(data3); } if (ns.isTimestampSchema()) { const format2 = determineTimestampFormat(ns, this.settings); @@ -26795,18 +27678,18 @@ var init_FromStringShapeDeserializer = __esm({ return data3; } base64ToUtf8(base64String) { - return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String)); + return (this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8)((this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(base64String)); } }; } }); // node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js -var HttpInterceptingShapeDeserializer; +var import_util_utf83, HttpInterceptingShapeDeserializer; var init_HttpInterceptingShapeDeserializer = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js"() { init_schema(); - init_serde(); + import_util_utf83 = __toESM(require_dist_cjs9()); init_SerdeContext(); init_FromStringShapeDeserializer(); HttpInterceptingShapeDeserializer = class extends SerdeContext { @@ -26825,13 +27708,13 @@ var init_HttpInterceptingShapeDeserializer = __esm({ read(schema, data3) { const ns = NormalizedSchema.of(schema); const traits = ns.getMergedTraits(); - const toString = this.serdeContext?.utf8Encoder ?? toUtf8; + const toString = this.serdeContext?.utf8Encoder ?? import_util_utf83.toUtf8; if (traits.httpHeader || traits.httpResponseCode) { return this.stringDeserializer.read(ns, toString(data3)); } if (traits.httpPayload) { if (ns.isBlobSchema()) { - const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8; + const toBytes = this.serdeContext?.utf8Decoder ?? import_util_utf83.fromUtf8; if (typeof data3 === "string") { return toBytes(data3); } @@ -26850,11 +27733,12 @@ var init_HttpInterceptingShapeDeserializer = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js -var ToStringShapeSerializer; +var import_util_base642, ToStringShapeSerializer; var init_ToStringShapeSerializer = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js"() { init_schema(); init_serde(); + import_util_base642 = __toESM(require_dist_cjs10()); init_SerdeContext(); init_determineTimestampFormat(); ToStringShapeSerializer = class extends SerdeContext { @@ -26894,7 +27778,7 @@ var init_ToStringShapeSerializer = __esm({ return; } if (ns.isBlobSchema() && "byteLength" in value) { - this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value); + this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(value); return; } if (ns.isListSchema() && Array.isArray(value)) { @@ -26922,7 +27806,7 @@ var init_ToStringShapeSerializer = __esm({ intermediateValue = LazyJsonString.from(intermediateValue); } if (ns.getMergedTraits().httpHeader) { - this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString()); + this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(intermediateValue.toString()); return; } } @@ -26930,7 +27814,7 @@ var init_ToStringShapeSerializer = __esm({ break; default: if (ns.isIdempotencyToken()) { - this.stringBuffer = generateIdempotencyToken(); + this.stringBuffer = (0, import_uuid.v4)(); } else { this.stringBuffer = String(value); } @@ -26985,273 +27869,22 @@ var init_HttpInterceptingShapeSerializer = __esm({ } }); -// node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Field.js -var import_types20, Field; -var init_Field = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Field.js"() { - import_types20 = __toESM(require_dist_cjs()); - Field = class { - name; - kind; - values; - constructor({ name, kind = import_types20.FieldPosition.HEADER, values = [] }) { - this.name = name; - this.kind = kind; - this.values = values; - } - add(value) { - this.values.push(value); - } - set(values) { - this.values = values; - } - remove(value) { - this.values = this.values.filter((v) => v !== value); - } - toString() { - return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); - } - get() { - return this.values; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Fields.js -var Fields; -var init_Fields = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Fields.js"() { - Fields = class { - entries = {}; - encoding; - constructor({ fields = [], encoding = "utf-8" }) { - fields.forEach(this.setField.bind(this)); - this.encoding = encoding; - } - setField(field) { - this.entries[field.name.toLowerCase()] = field; - } - getField(name) { - return this.entries[name.toLowerCase()]; - } - removeField(name) { - delete this.entries[name.toLowerCase()]; - } - getByType(kind) { - return Object.values(this.entries).filter((field) => field.kind === kind); - } - }; - } -}); - -// 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({ - "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js"() { - getHttpHandlerExtensionConfiguration = (runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - } - }; - }; - resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler() - }; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js -function contentLengthMiddleware(bodyLengthChecker) { - return (next) => async (args) => { - const request = args.request; - if (HttpRequest.isInstance(request)) { - const { body, headers } = request; - if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { - try { - const length = bodyLengthChecker(body); - request.headers = { - ...request.headers, - [CONTENT_LENGTH_HEADER]: String(length) - }; - } catch (error3) { - } - } - } - return next({ - ...args, - request - }); - }; -} -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(); - CONTENT_LENGTH_HEADER = "content-length"; - contentLengthMiddlewareOptions = { - step: "build", - tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], - name: "contentLengthMiddleware", - override: true - }; - getContentLengthPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); - } - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/protocols/util-uri-escape/escape-uri.js -var escapeUri, hexEncode; -var init_escape_uri = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/util-uri-escape/escape-uri.js"() { - escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); - hexEncode = (c5) => `%${c5.charCodeAt(0).toString(16).toUpperCase()}`; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/protocols/util-uri-escape/escape-uri-path.js -var escapeUriPath; -var init_escape_uri_path = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/util-uri-escape/escape-uri-path.js"() { - init_escape_uri(); - escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/"); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/protocols/querystring-builder/buildQueryString.js -function buildQueryString(query) { - const parts = []; - for (let key of Object.keys(query).sort()) { - const value = query[key]; - key = escapeUri(key); - if (Array.isArray(value)) { - for (let i5 = 0, iLen = value.length; i5 < iLen; i5++) { - parts.push(`${key}=${escapeUri(value[i5])}`); - } - } else { - let qsEntry = key; - if (value || typeof value === "string") { - qsEntry += `=${escapeUri(value)}`; - } - parts.push(qsEntry); - } - } - return parts.join("&"); -} -var init_buildQueryString = __esm({ - "node_modules/@smithy/core/dist-es/submodules/protocols/querystring-builder/buildQueryString.js"() { - init_escape_uri(); - } -}); - -// 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, { - Field: () => Field, - Fields: () => Fields, FromStringShapeDeserializer: () => FromStringShapeDeserializer, HttpBindingProtocol: () => HttpBindingProtocol, HttpInterceptingShapeDeserializer: () => HttpInterceptingShapeDeserializer, HttpInterceptingShapeSerializer: () => HttpInterceptingShapeSerializer, HttpProtocol: () => HttpProtocol, - HttpRequest: () => HttpRequest, - HttpResponse: () => HttpResponse, RequestBuilder: () => RequestBuilder, RpcProtocol: () => RpcProtocol, SerdeContext: () => SerdeContext, ToStringShapeSerializer: () => ToStringShapeSerializer, - buildQueryString: () => buildQueryString, collectBody: () => collectBody, - contentLengthMiddleware: () => contentLengthMiddleware, - contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, determineTimestampFormat: () => determineTimestampFormat, - escapeUri: () => escapeUri, - escapeUriPath: () => escapeUriPath, extendedEncodeURIComponent: () => extendedEncodeURIComponent, - getContentLengthPlugin: () => getContentLengthPlugin, - getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration, - isValidHostname: () => isValidHostname, - parseQueryString: () => parseQueryString, - parseUrl: () => parseUrl, requestBuilder: () => requestBuilder, - resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig, resolvedPath: () => resolvedPath }); var init_protocols = __esm({ @@ -27269,3086 +27902,6 @@ var init_protocols = __esm({ init_ToStringShapeSerializer(); init_determineTimestampFormat(); init_SerdeContext(); - init_Field(); - init_Fields(); - init_httpRequest(); - init_httpResponse(); - init_isValidHostname(); - 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 (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 = {} } = response; - const headerEntries = Object.entries(headers); - error3.$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 error3; - } - }; - 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, 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: () => deserializerMiddlewareOption2, - error: () => error2, - 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, Command2, 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(); - 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_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 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_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: () => 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_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(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js -var CLOCK_SKEW_ERROR_CODES, THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, NODEJS_TIMEOUT_ERROR_CODES, NODEJS_NETWORK_ERROR_CODES; -var init_constants4 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js"() { - CLOCK_SKEW_ERROR_CODES = [ - "AuthFailure", - "InvalidSignatureException", - "RequestExpired", - "RequestInTheFuture", - "RequestTimeTooSkewed", - "SignatureDoesNotMatch" - ]; - THROTTLING_ERROR_CODES = [ - "BandwidthLimitExceeded", - "EC2ThrottledException", - "LimitExceededException", - "PriorRequestNotComplete", - "ProvisionedThroughputExceededException", - "RequestLimitExceeded", - "RequestThrottled", - "RequestThrottledException", - "SlowDown", - "ThrottledException", - "Throttling", - "ThrottlingException", - "TooManyRequestsException", - "TransactionInProgressException" - ]; - TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; - TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; - NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; - NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js -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 = (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", - "The Internet connection appears to be offline", - "Load failed", - "Network request failed" - ]); - const isValid = error3 && error3 instanceof TypeError; - if (!isValid) { - return false; - } - return errorMessages.has(error3.message); - }; - 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; - } - return false; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/util-retry/constants.js -var DEFAULT_RETRY_DELAY_BASE, MAXIMUM_RETRY_DELAY, THROTTLING_RETRY_DELAY_BASE, INITIAL_RETRY_TOKENS, RETRY_COST, TIMEOUT_RETRY_COST, NO_RETRY_INCREMENT, INVOCATION_ID_HEADER, REQUEST_HEADER; -var init_constants5 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/util-retry/constants.js"() { - DEFAULT_RETRY_DELAY_BASE = 100; - MAXIMUM_RETRY_DELAY = 20 * 1e3; - THROTTLING_RETRY_DELAY_BASE = 500; - INITIAL_RETRY_TOKENS = 500; - RETRY_COST = 5; - TIMEOUT_RETRY_COST = 10; - NO_RETRY_INCREMENT = 1; - INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; - REQUEST_HEADER = "amz-sdk-request"; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js -function parseRetryAfterHeader(response, logger2) { - if (!HttpResponse.isInstance(response)) { - return; - } - for (const header of Object.keys(response.headers)) { - const h5 = header.toLowerCase(); - if (h5 === "retry-after") { - const retryAfter = response.headers[header]; - let retryAfterSeconds = NaN; - if (retryAfter.endsWith("GMT")) { - try { - const date2 = parseRfc7231DateTime(retryAfter); - retryAfterSeconds = (date2.getTime() - Date.now()) / 1e3; - } catch (e5) { - logger2?.trace?.("Failed to parse retry-after header"); - logger2?.trace?.(e5); - } - } else if (retryAfter.match(/ GMT, ((\d+)|(\d+\.\d+))$/)) { - retryAfterSeconds = Number(retryAfter.match(/ GMT, ([\d.]+)$/)?.[1]); - } else if (retryAfter.match(/^((\d+)|(\d+\.\d+))$/)) { - retryAfterSeconds = Number(retryAfter); - } else if (Date.parse(retryAfter) >= Date.now()) { - retryAfterSeconds = (Date.parse(retryAfter) - Date.now()) / 1e3; - } - if (isNaN(retryAfterSeconds)) { - return; - } - return new Date(Date.now() + retryAfterSeconds * 1e3); - } else if (h5 === "x-amz-retry-after") { - const v = response.headers[header]; - const backoffMilliseconds = Number(v); - if (isNaN(backoffMilliseconds)) { - logger2?.trace?.(`Failed to parse x-amz-retry-after=${v}`); - return; - } - return new Date(Date.now() + backoffMilliseconds); - } - } -} -function getRetryAfterHint(response, logger2) { - return parseRetryAfterHeader(response, logger2); -} -var init_parseRetryAfterHeader = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js"() { - init_protocols(); - init_serde(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js -var asSdkError; -var init_util = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js"() { - 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}`); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js -function bindRetryMiddleware(isStreamingPayload2) { - return (options) => (next, context) => async (args) => { - let retryStrategy = await options.retryStrategy(); - const maxAttempts = await options.maxAttempts(); - if (isRetryStrategyV2(retryStrategy)) { - retryStrategy = retryStrategy; - let retryToken = await retryStrategy.acquireInitialRetryToken((context["partition_id"] ?? "") + (context.__retryLongPoll ? ":longpoll" : "")); - let lastError = new Error(); - let attempts = 0; - let totalRetryDelay = 0; - const { request } = args; - const isRequest = HttpRequest.isInstance(request); - if (isRequest) { - request.headers[INVOCATION_ID_HEADER] = v4(); - } - while (true) { - try { - if (isRequest) { - request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; - } - const { response, output } = await next(args); - retryStrategy.recordSuccess(retryToken); - output.$metadata.attempts = attempts + 1; - output.$metadata.totalRetryDelay = totalRetryDelay; - return { response, output }; - } catch (e5) { - const retryErrorInfo = getRetryErrorInfo(e5, options.logger); - lastError = asSdkError(e5); - if (isRequest && isStreamingPayload2(request)) { - (context.logger instanceof NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request."); - throw lastError; - } - try { - retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); - } catch (refreshError) { - if (typeof refreshError.$backoff === "number") { - await cooldown(refreshError.$backoff); - } - if (!lastError.$metadata) { - lastError.$metadata = {}; - } - lastError.$metadata.attempts = attempts + 1; - lastError.$metadata.totalRetryDelay = totalRetryDelay; - throw lastError; - } - attempts = retryToken.getRetryCount(); - const delay = retryToken.getRetryDelay(); - totalRetryDelay += delay; - await cooldown(delay); - } - } - } else { - retryStrategy = retryStrategy; - if (retryStrategy?.mode) { - context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; - } - return retryStrategy.retry(next, args); - } - }; -} -function bindGetRetryPlugin(isStreamingPayload2) { - const retryMiddleware2 = bindRetryMiddleware(isStreamingPayload2); - return (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(retryMiddleware2(options), retryMiddlewareOptions); - } - }); -} -var cooldown, isRetryStrategyV2, getRetryErrorInfo, getRetryErrorType, retryMiddlewareOptions; -var init_retryMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js"() { - init_client2(); - init_protocols(); - init_serde(); - init_service_error_classification(); - init_constants5(); - init_parseRetryAfterHeader(); - 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 = (error3, logger2) => { - const errorInfo = { - error: error3, - errorType: getRetryErrorType(error3) - }; - const retryAfterHint = parseRetryAfterHeader(error3.$response, logger2); - if (retryAfterHint) { - errorInfo.retryAfterHint = retryAfterHint; - } - return errorInfo; - }; - getRetryErrorType = (error3) => { - if (isThrottlingError(error3)) - return "THROTTLING"; - if (isTransientError(error3)) - return "TRANSIENT"; - if (isServerError(error3)) - return "SERVER_ERROR"; - return "CLIENT_ERROR"; - }; - retryMiddlewareOptions = { - name: "retryMiddleware", - tags: ["RETRY"], - step: "finalizeRequest", - priority: "high", - override: true - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRateLimiter.js -var DefaultRateLimiter; -var init_DefaultRateLimiter = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRateLimiter.js"() { - init_service_error_classification(); - DefaultRateLimiter = class _DefaultRateLimiter { - static setTimeoutFn = setTimeout; - beta; - minCapacity; - minFillRate; - scaleConstant; - smooth; - enabled = false; - availableTokens = 0; - lastMaxRate = 0; - measuredTxRate = 0; - requestCount = 0; - fillRate; - lastThrottleTime; - lastTimestamp = 0; - lastTxRateBucket; - maxCapacity; - timeWindow = 0; - constructor(options) { - this.beta = options?.beta ?? 0.7; - this.minCapacity = options?.minCapacity ?? 1; - this.minFillRate = options?.minFillRate ?? 0.5; - this.scaleConstant = options?.scaleConstant ?? 0.4; - this.smooth = options?.smooth ?? 0.8; - this.lastThrottleTime = this.getCurrentTimeInSeconds(); - this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); - this.fillRate = this.minFillRate; - this.maxCapacity = this.minCapacity; - } - async getSendToken() { - return this.acquireTokenBucket(1); - } - updateClientSendingRate(response) { - let calculatedRate; - this.updateMeasuredRate(); - const retryErrorInfo = response; - const isThrottling = retryErrorInfo?.errorType === "THROTTLING" || isThrottlingError(retryErrorInfo?.error ?? response); - if (isThrottling) { - const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); - this.lastMaxRate = rateToUse; - this.calculateTimeWindow(); - this.lastThrottleTime = this.getCurrentTimeInSeconds(); - calculatedRate = this.cubicThrottle(rateToUse); - this.enableTokenBucket(); - } else { - this.calculateTimeWindow(); - calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); - } - const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); - this.updateTokenBucketRate(newRate); - } - getCurrentTimeInSeconds() { - return Date.now() / 1e3; - } - async acquireTokenBucket(amount) { - if (!this.enabled) { - return; - } - this.refillTokenBucket(); - while (amount > this.availableTokens) { - const delay = (amount - this.availableTokens) / this.fillRate * 1e3; - await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay)); - this.refillTokenBucket(); - } - this.availableTokens = this.availableTokens - amount; - } - refillTokenBucket() { - const timestamp = this.getCurrentTimeInSeconds(); - if (!this.lastTimestamp) { - this.lastTimestamp = timestamp; - return; - } - const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; - this.availableTokens = Math.min(this.maxCapacity, this.availableTokens + fillAmount); - this.lastTimestamp = timestamp; - } - calculateTimeWindow() { - this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); - } - cubicThrottle(rateToUse) { - return this.getPrecise(rateToUse * this.beta); - } - cubicSuccess(timestamp) { - return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate); - } - enableTokenBucket() { - this.enabled = true; - } - updateTokenBucketRate(newRate) { - this.refillTokenBucket(); - this.fillRate = Math.max(newRate, this.minFillRate); - this.maxCapacity = Math.max(newRate, this.minCapacity); - this.availableTokens = Math.min(this.availableTokens, this.maxCapacity); - } - updateMeasuredRate() { - const t = this.getCurrentTimeInSeconds(); - const timeBucket = Math.floor(t * 2) / 2; - this.requestCount++; - if (timeBucket > this.lastTxRateBucket) { - const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); - this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); - this.requestCount = 0; - this.lastTxRateBucket = timeBucket; - } - } - getPrecise(num) { - return parseFloat(num.toFixed(8)); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/util-retry/retries-2026-config.js -var Retry; -var init_retries_2026_config = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/util-retry/retries-2026-config.js"() { - Retry = class _Retry { - static v2026 = typeof process !== "undefined" && process.env?.SMITHY_NEW_RETRIES_2026 === "true"; - static delay() { - return _Retry.v2026 ? 50 : 100; - } - static throttlingDelay() { - return _Retry.v2026 ? 1e3 : 500; - } - static cost() { - return _Retry.v2026 ? 14 : 5; - } - static throttlingCost() { - return _Retry.v2026 ? 5 : 10; - } - static modifiedCostType() { - return _Retry.v2026 ? "THROTTLING" : "TRANSIENT"; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryBackoffStrategy.js -var DefaultRetryBackoffStrategy; -var init_DefaultRetryBackoffStrategy = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryBackoffStrategy.js"() { - init_constants5(); - init_retries_2026_config(); - DefaultRetryBackoffStrategy = class { - x = Retry.delay(); - computeNextBackoffDelay(i5) { - const b6 = Math.random(); - const r5 = 2; - const t_i = b6 * Math.min(this.x * r5 ** i5, MAXIMUM_RETRY_DELAY); - return Math.floor(t_i); - } - setDelayBase(delay) { - this.x = delay; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryToken.js -var DefaultRetryToken; -var init_DefaultRetryToken = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryToken.js"() { - init_constants5(); - DefaultRetryToken = class { - delay; - count; - cost; - longPoll; - constructor(delay, count, cost, longPoll) { - this.delay = delay; - this.count = count; - this.cost = cost; - this.longPoll = longPoll; - } - getRetryCount() { - return this.count; - } - getRetryDelay() { - return Math.min(MAXIMUM_RETRY_DELAY, this.delay); - } - getRetryCost() { - return this.cost; - } - isLongPoll() { - return this.longPoll; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/util-retry/config.js -var RETRY_MODES, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE; -var init_config3 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/util-retry/config.js"() { - (function(RETRY_MODES2) { - RETRY_MODES2["STANDARD"] = "standard"; - RETRY_MODES2["ADAPTIVE"] = "adaptive"; - })(RETRY_MODES || (RETRY_MODES = {})); - DEFAULT_MAX_ATTEMPTS = 3; - DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/util-retry/StandardRetryStrategy.js -var refusal, StandardRetryStrategy; -var init_StandardRetryStrategy = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/util-retry/StandardRetryStrategy.js"() { - init_DefaultRetryBackoffStrategy(); - init_DefaultRetryToken(); - init_config3(); - init_constants5(); - init_retries_2026_config(); - refusal = { - incompatible: 1, - attempts: 2, - capacity: 3 - }; - StandardRetryStrategy = class { - mode = RETRY_MODES.STANDARD; - capacity = INITIAL_RETRY_TOKENS; - retryBackoffStrategy; - maxAttemptsProvider; - baseDelay; - constructor(arg1) { - if (typeof arg1 === "number") { - this.maxAttemptsProvider = async () => arg1; - } else if (typeof arg1 === "function") { - this.maxAttemptsProvider = arg1; - } else if (arg1 && typeof arg1 === "object") { - this.maxAttemptsProvider = async () => arg1.maxAttempts; - this.baseDelay = arg1.baseDelay; - this.retryBackoffStrategy = arg1.backoff; - } - this.maxAttemptsProvider ??= async () => DEFAULT_MAX_ATTEMPTS; - this.baseDelay ??= Retry.delay(); - this.retryBackoffStrategy ??= new DefaultRetryBackoffStrategy(); - } - async acquireInitialRetryToken(retryTokenScope) { - return new DefaultRetryToken(Retry.delay(), 0, void 0, Retry.v2026 && retryTokenScope.includes(":longpoll")); - } - async refreshRetryTokenForRetry(token, errorInfo) { - const maxAttempts = await this.getMaxAttempts(); - const retryCode = this.retryCode(token, errorInfo, maxAttempts); - const shouldRetry = retryCode === 0; - const isLongPoll = token.isLongPoll?.(); - if (shouldRetry || isLongPoll) { - const errorType = errorInfo.errorType; - this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? Retry.throttlingDelay() : this.baseDelay); - const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); - let retryDelay = delayFromErrorType; - if (errorInfo.retryAfterHint instanceof Date) { - retryDelay = Math.max(delayFromErrorType, Math.min(errorInfo.retryAfterHint.getTime() - Date.now(), delayFromErrorType + 5e3)); - } - if (!shouldRetry) { - throw Object.assign(new Error("No retry token available"), { - $backoff: Retry.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0 - }); - } else { - const capacityCost = this.getCapacityCost(errorType); - this.capacity -= capacityCost; - return new DefaultRetryToken(retryDelay, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false); - } - } - throw new Error("No retry token available"); - } - recordSuccess(token) { - this.capacity = Math.min(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); - } - getCapacity() { - return this.capacity; - } - async maxAttempts() { - return this.maxAttemptsProvider(); - } - async getMaxAttempts() { - try { - return await this.maxAttemptsProvider(); - } catch (error3) { - console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); - return DEFAULT_MAX_ATTEMPTS; - } - } - retryCode(tokenToRenew, errorInfo, maxAttempts) { - const attempts = tokenToRenew.getRetryCount() + 1; - const retryableStatus = this.isRetryableError(errorInfo.errorType) ? 0 : refusal.incompatible; - const attemptStatus = attempts < maxAttempts ? 0 : refusal.attempts; - const capacityStatus = this.capacity >= this.getCapacityCost(errorInfo.errorType) ? 0 : refusal.capacity; - return retryableStatus || attemptStatus || capacityStatus; - } - getCapacityCost(errorType) { - return errorType === Retry.modifiedCostType() ? Retry.throttlingCost() : Retry.cost(); - } - isRetryableError(errorType) { - return errorType === "THROTTLING" || errorType === "TRANSIENT"; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/util-retry/AdaptiveRetryStrategy.js -var AdaptiveRetryStrategy; -var init_AdaptiveRetryStrategy = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/util-retry/AdaptiveRetryStrategy.js"() { - init_DefaultRateLimiter(); - init_StandardRetryStrategy(); - init_config3(); - AdaptiveRetryStrategy = class { - mode = RETRY_MODES.ADAPTIVE; - rateLimiter; - standardRetryStrategy; - constructor(maxAttemptsProvider, options) { - const { rateLimiter } = options ?? {}; - this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); - this.standardRetryStrategy = options ? new StandardRetryStrategy({ - maxAttempts: typeof maxAttemptsProvider === "number" ? maxAttemptsProvider : 3, - ...options - }) : new StandardRetryStrategy(maxAttemptsProvider); - } - async acquireInitialRetryToken(retryTokenScope) { - const token = await this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); - await this.rateLimiter.getSendToken(); - return token; - } - async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { - this.rateLimiter.updateClientSendingRate(errorInfo); - const token = await this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); - await this.rateLimiter.getSendToken(); - return token; - } - recordSuccess(token) { - this.rateLimiter.updateClientSendingRate({}); - this.standardRetryStrategy.recordSuccess(token); - } - async maxAttemptsProvider() { - return this.standardRetryStrategy.maxAttempts(); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/util-retry/ConfiguredRetryStrategy.js -var ConfiguredRetryStrategy; -var init_ConfiguredRetryStrategy = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/util-retry/ConfiguredRetryStrategy.js"() { - init_StandardRetryStrategy(); - init_retries_2026_config(); - ConfiguredRetryStrategy = class extends StandardRetryStrategy { - computeNextBackoffDelay; - constructor(maxAttempts, computeNextBackoffDelay = Retry.delay()) { - super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); - if (typeof computeNextBackoffDelay === "number") { - this.computeNextBackoffDelay = () => computeNextBackoffDelay; - } else { - this.computeNextBackoffDelay = computeNextBackoffDelay; - } - } - async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { - const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); - token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); - return token; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/defaultRetryQuota.js -var getDefaultRetryQuota; -var init_defaultRetryQuota = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/defaultRetryQuota.js"() { - init_constants5(); - getDefaultRetryQuota = (initialRetryTokens, options) => { - const MAX_CAPACITY = initialRetryTokens; - const noRetryIncrement = options?.noRetryIncrement ?? NO_RETRY_INCREMENT; - const retryCost = options?.retryCost ?? RETRY_COST; - const timeoutRetryCost = options?.timeoutRetryCost ?? TIMEOUT_RETRY_COST; - let availableCapacity = initialRetryTokens; - 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(error3); - availableCapacity -= capacityAmount; - return capacityAmount; - }; - const releaseRetryTokens = (capacityReleaseAmount) => { - availableCapacity += capacityReleaseAmount ?? noRetryIncrement; - availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); - }; - return Object.freeze({ - hasRetryTokens, - retrieveRetryTokens, - releaseRetryTokens - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/delayDecider.js -var defaultDelayDecider; -var init_delayDecider = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/delayDecider.js"() { - init_constants5(); - defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/retryDecider.js -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 = (error3) => { - if (!error3) { - return false; - } - return isRetryableByTrait(error3) || isClockSkewError(error3) || isThrottlingError(error3) || isTransientError(error3); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js -var StandardRetryStrategy2, getDelayFromRetryAfterHeader; -var init_StandardRetryStrategy2 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js"() { - init_protocols(); - init_serde(); - init_service_error_classification(); - init_config3(); - init_constants5(); - init_util(); - init_defaultRetryQuota(); - init_delayDecider(); - init_retryDecider(); - StandardRetryStrategy2 = class { - maxAttemptsProvider; - retryDecider; - delayDecider; - retryQuota; - mode = RETRY_MODES.STANDARD; - constructor(maxAttemptsProvider, options) { - this.maxAttemptsProvider = maxAttemptsProvider; - this.retryDecider = options?.retryDecider ?? defaultRetryDecider; - this.delayDecider = options?.delayDecider ?? defaultDelayDecider; - this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(INITIAL_RETRY_TOKENS); - } - shouldRetry(error3, attempts, maxAttempts) { - return attempts < maxAttempts && this.retryDecider(error3) && this.retryQuota.hasRetryTokens(error3); - } - async getMaxAttempts() { - let maxAttempts; - try { - maxAttempts = await this.maxAttemptsProvider(); - } catch (error3) { - maxAttempts = DEFAULT_MAX_ATTEMPTS; - } - return maxAttempts; - } - async retry(next, args, options) { - let retryTokenAmount; - let attempts = 0; - let totalDelay = 0; - const maxAttempts = await this.getMaxAttempts(); - const { request } = args; - if (HttpRequest.isInstance(request)) { - request.headers[INVOCATION_ID_HEADER] = v4(); - } - while (true) { - try { - if (HttpRequest.isInstance(request)) { - request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; - } - if (options?.beforeRequest) { - await options.beforeRequest(); - } - const { response, output } = await next(args); - if (options?.afterRequest) { - options.afterRequest(response); - } - this.retryQuota.releaseRetryTokens(retryTokenAmount); - output.$metadata.attempts = attempts + 1; - output.$metadata.totalRetryDelay = totalDelay; - return { response, output }; - } catch (e5) { - const err = asSdkError(e5); - attempts++; - if (this.shouldRetry(err, attempts, maxAttempts)) { - retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); - const delayFromDecider = this.delayDecider(isThrottlingError(err) ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE, attempts); - const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); - const delay = Math.max(delayFromResponse || 0, delayFromDecider); - totalDelay += delay; - await new Promise((resolve) => setTimeout(resolve, delay)); - continue; - } - if (!err.$metadata) { - err.$metadata = {}; - } - err.$metadata.attempts = attempts; - err.$metadata.totalRetryDelay = totalDelay; - throw err; - } - } - } - }; - getDelayFromRetryAfterHeader = (response) => { - if (!HttpResponse.isInstance(response)) - return; - const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; - const retryAfter = response.headers[retryAfterHeaderName]; - const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return retryAfterSeconds * 1e3; - const retryAfterDate = new Date(retryAfter); - return retryAfterDate.getTime() - Date.now(); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/AdaptiveRetryStrategy.js -var AdaptiveRetryStrategy2; -var init_AdaptiveRetryStrategy2 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/AdaptiveRetryStrategy.js"() { - init_DefaultRateLimiter(); - init_config3(); - init_StandardRetryStrategy2(); - AdaptiveRetryStrategy2 = class extends StandardRetryStrategy2 { - rateLimiter; - constructor(maxAttemptsProvider, options) { - const { rateLimiter, ...superOptions } = options ?? {}; - super(maxAttemptsProvider, superOptions); - this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); - this.mode = RETRY_MODES.ADAPTIVE; - } - async retry(next, args) { - return super.retry(next, args, { - beforeRequest: async () => { - return this.rateLimiter.getSendToken(); - }, - afterRequest: (response) => { - this.rateLimiter.updateClientSendingRate(response); - } - }); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js -var ENV_MAX_ATTEMPTS, CONFIG_MAX_ATTEMPTS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, ENV_RETRY_MODE, CONFIG_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS; -var init_configurations = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js"() { - init_client2(); - init_AdaptiveRetryStrategy(); - init_StandardRetryStrategy(); - init_config3(); - ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; - CONFIG_MAX_ATTEMPTS = "max_attempts"; - NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { - environmentVariableSelector: (env2) => { - const value = env2[ENV_MAX_ATTEMPTS]; - if (!value) - return void 0; - const maxAttempt = parseInt(value); - if (Number.isNaN(maxAttempt)) { - throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); - } - return maxAttempt; - }, - configFileSelector: (profile) => { - const value = profile[CONFIG_MAX_ATTEMPTS]; - if (!value) - return void 0; - const maxAttempt = parseInt(value); - if (Number.isNaN(maxAttempt)) { - throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); - } - return maxAttempt; - }, - default: DEFAULT_MAX_ATTEMPTS - }; - resolveRetryConfig = (input) => { - const { retryStrategy, retryMode } = input; - const maxAttempts = normalizeProvider(input.maxAttempts ?? DEFAULT_MAX_ATTEMPTS); - let controller = retryStrategy ? Promise.resolve(retryStrategy) : void 0; - const getDefault = async () => await normalizeProvider(retryMode)() === RETRY_MODES.ADAPTIVE ? new AdaptiveRetryStrategy(maxAttempts) : new StandardRetryStrategy(maxAttempts); - return Object.assign(input, { - maxAttempts, - retryStrategy: () => controller ??= getDefault() - }); - }; - ENV_RETRY_MODE = "AWS_RETRY_MODE"; - CONFIG_RETRY_MODE = "retry_mode"; - NODE_RETRY_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env2) => env2[ENV_RETRY_MODE], - configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], - default: DEFAULT_RETRY_MODE - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/omitRetryHeadersMiddleware.js -var omitRetryHeadersMiddleware, omitRetryHeadersMiddlewareOptions, getOmitRetryHeadersPlugin; -var init_omitRetryHeadersMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/omitRetryHeadersMiddleware.js"() { - init_protocols(); - init_constants5(); - omitRetryHeadersMiddleware = () => (next) => async (args) => { - const { request } = args; - if (HttpRequest.isInstance(request)) { - delete request.headers[INVOCATION_ID_HEADER]; - delete request.headers[REQUEST_HEADER]; - } - return next(args); - }; - omitRetryHeadersMiddlewareOptions = { - name: "omitRetryHeadersMiddleware", - tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], - relation: "before", - toMiddleware: "awsAuthMiddleware", - override: true - }; - getOmitRetryHeadersPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); - } - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/retry/index.js -var retry_exports = {}; -__export(retry_exports, { - AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, - CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, - CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, - ConfiguredRetryStrategy: () => ConfiguredRetryStrategy, - DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS, - DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE, - DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE, - DefaultRateLimiter: () => DefaultRateLimiter, - DeprecatedAdaptiveRetryStrategy: () => AdaptiveRetryStrategy2, - DeprecatedStandardRetryStrategy: () => StandardRetryStrategy2, - ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS, - ENV_RETRY_MODE: () => ENV_RETRY_MODE, - INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS, - INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER, - MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY, - NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS, - NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS, - NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT, - REQUEST_HEADER: () => REQUEST_HEADER, - RETRY_COST: () => RETRY_COST, - RETRY_MODES: () => RETRY_MODES, - Retry: () => Retry, - StandardRetryStrategy: () => StandardRetryStrategy, - THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE, - TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST, - defaultDelayDecider: () => defaultDelayDecider, - defaultRetryDecider: () => defaultRetryDecider, - getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin, - getRetryAfterHint: () => getRetryAfterHint, - getRetryPlugin: () => getRetryPlugin, - isBrowserNetworkError: () => isBrowserNetworkError, - isClockSkewCorrectedError: () => isClockSkewCorrectedError, - isClockSkewError: () => isClockSkewError, - isNodeJsHttp2TransientError: () => isNodeJsHttp2TransientError, - isRetryableByTrait: () => isRetryableByTrait, - isServerError: () => isServerError, - isThrottlingError: () => isThrottlingError, - isTransientError: () => isTransientError, - omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware, - omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions, - resolveRetryConfig: () => resolveRetryConfig, - retryMiddleware: () => retryMiddleware, - retryMiddlewareOptions: () => retryMiddlewareOptions -}); -var retryMiddleware, getRetryPlugin; -var init_retry2 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/retry/index.js"() { - init_isStreamingPayload(); - init_retryMiddleware(); - init_service_error_classification(); - init_AdaptiveRetryStrategy(); - init_ConfiguredRetryStrategy(); - init_DefaultRateLimiter(); - init_StandardRetryStrategy(); - init_config3(); - init_constants5(); - init_retries_2026_config(); - init_AdaptiveRetryStrategy2(); - init_StandardRetryStrategy2(); - init_delayDecider(); - init_retryDecider(); - init_configurations(); - init_omitRetryHeadersMiddleware(); - init_retryMiddleware(); - init_parseRetryAfterHeader(); - retryMiddleware = bindRetryMiddleware(isStreamingPayload); - getRetryPlugin = bindGetRetryPlugin(isStreamingPayload); - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js -function setFeature2(context, feature, value) { - if (!context.__aws_sdk_context) { - context.__aws_sdk_context = { - features: {} - }; - } else if (!context.__aws_sdk_context.features) { - context.__aws_sdk_context.features = {}; - } - context.__aws_sdk_context.features[feature] = value; -} -var init_setFeature = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() { - init_retry2(); - Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true"; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js -function setTokenFeature(token, feature, value) { - if (!token.$source) { - token.$source = {}; - } - token.$source[feature] = value; - return token; -} -var init_setTokenFeature = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js"() { - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js -function resolveHostHeaderConfig(input) { - return input; -} -var hostHeaderMiddleware, hostHeaderMiddlewareOptions, getHostHeaderPlugin; -var init_hostHeaderMiddleware = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js"() { - init_protocols(); - hostHeaderMiddleware = (options) => (next) => async (args) => { - if (!HttpRequest.isInstance(args.request)) - return next(args); - const { request } = args; - const { handlerProtocol = "" } = options.requestHandler.metadata || {}; - if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { - delete request.headers["host"]; - request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); - } else if (!request.headers["host"]) { - let host = request.hostname; - if (request.port != null) - host += `:${request.port}`; - request.headers["host"] = host; - } - return next(args); - }; - hostHeaderMiddlewareOptions = { - name: "hostHeaderMiddleware", - step: "build", - priority: "low", - tags: ["HOST"], - override: true - }; - getHostHeaderPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); - } - }); - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-logger/loggerMiddleware.js -var loggerMiddleware, loggerMiddlewareOptions, getLoggerPlugin; -var init_loggerMiddleware = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-logger/loggerMiddleware.js"() { - loggerMiddleware = () => (next, context) => async (args) => { - try { - const response = await next(args); - const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context; - const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; - const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; - const { $metadata, ...outputWithoutMetadata } = response.output; - logger2?.info?.({ - clientName, - commandName, - input: inputFilterSensitiveLog(args.input), - output: outputFilterSensitiveLog(outputWithoutMetadata), - metadata: $metadata - }); - return response; - } catch (error3) { - const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context; - const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; - logger2?.error?.({ - clientName, - commandName, - input: inputFilterSensitiveLog(args.input), - error: error3, - metadata: error3.$metadata - }); - throw error3; - } - }; - loggerMiddlewareOptions = { - name: "loggerMiddleware", - tags: ["LOGGER"], - step: "initialize", - override: true - }; - getLoggerPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); - } - }); - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/configuration.js -var recursionDetectionMiddlewareOptions; -var init_configuration = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/configuration.js"() { - recursionDetectionMiddlewareOptions = { - step: "build", - tags: ["RECURSION_DETECTION"], - name: "recursionDetectionMiddleware", - override: true, - priority: "low" - }; - } -}); - -// node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js -var PROTECTED_KEYS, NO_GLOBAL_AWS_LAMBDA, InvokeStoreBase, InvokeStoreSingle, InvokeStoreMulti, InvokeStore; -var init_invoke_store = __esm({ - "node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js"() { - PROTECTED_KEYS = { - REQUEST_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_REQUEST_ID"), - X_RAY_TRACE_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"), - TENANT_ID: /* @__PURE__ */ Symbol.for("_AWS_LAMBDA_TENANT_ID") - }; - NO_GLOBAL_AWS_LAMBDA = ["true", "1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA ?? ""); - if (!NO_GLOBAL_AWS_LAMBDA) { - globalThis.awslambda = globalThis.awslambda || {}; - } - InvokeStoreBase = class { - static PROTECTED_KEYS = PROTECTED_KEYS; - isProtectedKey(key) { - return Object.values(PROTECTED_KEYS).includes(key); - } - getRequestId() { - return this.get(PROTECTED_KEYS.REQUEST_ID) ?? "-"; - } - getXRayTraceId() { - return this.get(PROTECTED_KEYS.X_RAY_TRACE_ID); - } - getTenantId() { - return this.get(PROTECTED_KEYS.TENANT_ID); - } - }; - InvokeStoreSingle = class extends InvokeStoreBase { - currentContext; - getContext() { - return this.currentContext; - } - hasContext() { - return this.currentContext !== void 0; - } - get(key) { - return this.currentContext?.[key]; - } - set(key, value) { - if (this.isProtectedKey(key)) { - throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`); - } - this.currentContext = this.currentContext || {}; - this.currentContext[key] = value; - } - run(context, fn) { - this.currentContext = context; - return fn(); - } - }; - InvokeStoreMulti = class _InvokeStoreMulti extends InvokeStoreBase { - als; - static async create() { - const instance = new _InvokeStoreMulti(); - const asyncHooks = await import("node:async_hooks"); - instance.als = new asyncHooks.AsyncLocalStorage(); - return instance; - } - getContext() { - return this.als.getStore(); - } - hasContext() { - return this.als.getStore() !== void 0; - } - get(key) { - return this.als.getStore()?.[key]; - } - set(key, value) { - if (this.isProtectedKey(key)) { - throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`); - } - const store = this.als.getStore(); - if (!store) { - throw new Error("No context available"); - } - store[key] = value; - } - run(context, fn) { - return this.als.run(context, fn); - } - }; - (function(InvokeStore2) { - let instance = null; - async function getInstanceAsync(forceInvokeStoreMulti) { - if (!instance) { - instance = (async () => { - const isMulti = forceInvokeStoreMulti === true || "AWS_LAMBDA_MAX_CONCURRENCY" in process.env; - const newInstance = isMulti ? await InvokeStoreMulti.create() : new InvokeStoreSingle(); - if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda?.InvokeStore) { - return globalThis.awslambda.InvokeStore; - } else if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda) { - globalThis.awslambda.InvokeStore = newInstance; - return newInstance; - } else { - return newInstance; - } - })(); - } - return instance; - } - InvokeStore2.getInstanceAsync = getInstanceAsync; - InvokeStore2._testing = process.env.AWS_LAMBDA_BENCHMARK_MODE === "1" ? { - reset: () => { - instance = null; - if (globalThis.awslambda?.InvokeStore) { - delete globalThis.awslambda.InvokeStore; - } - globalThis.awslambda = { InvokeStore: void 0 }; - } - } : void 0; - })(InvokeStore || (InvokeStore = {})); - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.js -var TRACE_ID_HEADER_NAME, ENV_LAMBDA_FUNCTION_NAME, ENV_TRACE_ID, recursionDetectionMiddleware; -var init_recursionDetectionMiddleware = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.js"() { - init_invoke_store(); - init_protocols(); - TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; - ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; - ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; - recursionDetectionMiddleware = () => (next) => async (args) => { - const { request } = args; - if (!HttpRequest.isInstance(request)) { - return next(args); - } - const traceIdHeader = Object.keys(request.headers ?? {}).find((h5) => h5.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME; - if (request.headers.hasOwnProperty(traceIdHeader)) { - return next(args); - } - const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; - const traceIdFromEnv = process.env[ENV_TRACE_ID]; - const invokeStore = await InvokeStore.getInstanceAsync(); - const traceIdFromInvokeStore = invokeStore?.getXRayTraceId(); - const traceId = traceIdFromInvokeStore ?? traceIdFromEnv; - const nonEmptyString = (str) => typeof str === "string" && str.length > 0; - if (nonEmptyString(functionName) && nonEmptyString(traceId)) { - request.headers[TRACE_ID_HEADER_NAME] = traceId; - } - return next({ - ...args, - request - }); - }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.js -var getRecursionDetectionPlugin; -var init_getRecursionDetectionPlugin = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.js"() { - init_configuration(); - init_recursionDetectionMiddleware(); - getRecursionDetectionPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions); - } - }); - } -}); - -// 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 -var resolveAuthOptions; -var init_resolveAuthOptions = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js"() { - resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => { - if (!authSchemePreference || authSchemePreference.length === 0) { - return candidateAuthOptions; - } - const preferredAuthOptions = []; - for (const preferredSchemeName of authSchemePreference) { - for (const candidateAuthOption of candidateAuthOptions) { - const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1]; - if (candidateAuthSchemeName === preferredSchemeName) { - preferredAuthOptions.push(candidateAuthOption); - } - } - } - for (const candidateAuthOption of candidateAuthOptions) { - if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) { - preferredAuthOptions.push(candidateAuthOption); - } - } - return preferredAuthOptions; - }; - } -}); - -// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js -function convertHttpAuthSchemesToMap(httpAuthSchemes) { - const map3 = /* @__PURE__ */ new Map(); - for (const scheme of httpAuthSchemes) { - map3.set(scheme.schemeId, scheme); - } - return map3; -} -var httpAuthSchemeMiddleware; -var init_httpAuthSchemeMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { - init_client2(); - init_resolveAuthOptions(); - httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => { - const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)); - const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : []; - const resolvedOptions = resolveAuthOptions(options, authSchemePreference); - const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes); - const smithyContext = getSmithyContext(context); - const failureReasons = []; - for (const option of resolvedOptions) { - const scheme = authSchemes.get(option.schemeId); - if (!scheme) { - failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); - continue; - } - const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); - if (!identityProvider) { - failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); - continue; - } - const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {}; - option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); - option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); - smithyContext.selectedHttpAuthScheme = { - httpAuthOption: option, - identity: await identityProvider(option.identityProperties), - signer: scheme.signer - }; - break; - } - if (!smithyContext.selectedHttpAuthScheme) { - throw new Error(failureReasons.join("\n")); - } - return next(args); - }; - } -}); - -// node_modules/@smithy/core/dist-es/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"() { - init_httpAuthSchemeMiddleware(); - httpAuthSchemeEndpointRuleSetMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: "endpointV2Middleware" - }; - getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider - }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); - } - }); - } -}); - -// node_modules/@smithy/core/dist-es/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"() { - init_httpAuthSchemeMiddleware(); - httpAuthSchemeMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: "serializerMiddleware" - }; - getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider - }), httpAuthSchemeMiddlewareOptions); - } - }); - } -}); - -// node_modules/@smithy/core/dist-es/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"() { - init_httpAuthSchemeMiddleware(); - init_getHttpAuthSchemeEndpointRuleSetPlugin(); - init_getHttpAuthSchemePlugin(); - } -}); - -// node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js -var defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware; -var init_httpSigningMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() { - init_client2(); - init_protocols(); - defaultErrorHandler = (signingProperties) => (error3) => { - throw error3; - }; - defaultSuccessHandler = (httpResponse, signingProperties) => { - }; - httpSigningMiddleware = (config) => (next, context) => async (args) => { - if (!HttpRequest.isInstance(args.request)) { - return next(args); - } - const smithyContext = getSmithyContext(context); - const scheme = smithyContext.selectedHttpAuthScheme; - if (!scheme) { - throw new Error(`No HttpAuthScheme was selected: unable to sign request`); - } - const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme; - const output = await next({ - ...args, - request: await signer.sign(args.request, identity, signingProperties) - }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); - (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); - return output; - }; - } -}); - -// node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js -var httpSigningMiddlewareOptions, getHttpSigningPlugin; -var init_getHttpSigningMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() { - init_httpSigningMiddleware(); - httpSigningMiddlewareOptions = { - step: "finalizeRequest", - tags: ["HTTP_SIGNING"], - name: "httpSigningMiddleware", - aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], - override: true, - relation: "after", - toMiddleware: "retryMiddleware" - }; - getHttpSigningPlugin = (config) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); - } - }); - } -}); - -// node_modules/@smithy/core/dist-es/middleware-http-signing/index.js -var init_middleware_http_signing = __esm({ - "node_modules/@smithy/core/dist-es/middleware-http-signing/index.js"() { - init_httpSigningMiddleware(); - init_getHttpSigningMiddleware(); - } -}); - -// node_modules/@smithy/core/dist-es/normalizeProvider.js -var normalizeProvider2; -var init_normalizeProvider2 = __esm({ - "node_modules/@smithy/core/dist-es/normalizeProvider.js"() { - normalizeProvider2 = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; - }; - } -}); - -// node_modules/@smithy/core/dist-es/pagination/createPaginator.js -function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { - return async function* paginateOperation(config, input, ...additionalArguments) { - const _input = input; - let token = config.startingToken ?? _input[inputTokenName]; - let hasNext = true; - let page; - while (hasNext) { - _input[inputTokenName] = token; - if (pageSizeTokenName) { - _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize; - } - if (config.client instanceof ClientCtor) { - page = await makePagedClientRequest(CommandCtor, config.client, input, config.withCommand, ...additionalArguments); - } else { - throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); - } - yield page; - const prevToken = token; - token = get(page, outputTokenName); - hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); - } - return void 0; - }; -} -var makePagedClientRequest, get; -var init_createPaginator = __esm({ - "node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() { - makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => { - let command = new CommandCtor(input); - command = withCommand(command) ?? command; - return await client.send(command, ...args); - }; - get = (fromObject, path3) => { - let cursor2 = fromObject; - const pathComponents = path3.split("."); - for (const step of pathComponents) { - if (!cursor2 || typeof cursor2 !== "object") { - return void 0; - } - cursor2 = cursor2[step]; - } - return cursor2; - }; } }); @@ -30360,7 +27913,7 @@ var init_requestBuilder2 = __esm({ }); // node_modules/@smithy/core/dist-es/setFeature.js -function setFeature3(context, feature, value) { +function setFeature(context, feature, value) { if (!context.__smithy_context) { context.__smithy_context = { features: {} @@ -30370,7 +27923,7 @@ function setFeature3(context, feature, value) { } context.__smithy_context.features[feature] = value; } -var init_setFeature2 = __esm({ +var init_setFeature = __esm({ "node_modules/@smithy/core/dist-es/setFeature.js"() { } }); @@ -30397,11 +27950,11 @@ var init_DefaultIdentityProviderConfig = __esm({ }); // node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js -var import_types24, HttpApiKeyAuthSigner; +var import_protocol_http7, import_types2, HttpApiKeyAuthSigner; var init_httpApiKeyAuth = __esm({ "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { - init_protocols(); - import_types24 = __toESM(require_dist_cjs()); + import_protocol_http7 = __toESM(require_dist_cjs2()); + import_types2 = __toESM(require_dist_cjs()); HttpApiKeyAuthSigner = class { async sign(httpRequest, identity, signingProperties) { if (!signingProperties) { @@ -30416,10 +27969,10 @@ var init_httpApiKeyAuth = __esm({ if (!identity.apiKey) { 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) { + const clonedRequest = import_protocol_http7.HttpRequest.clone(httpRequest); + if (signingProperties.in === import_types2.HttpApiKeyAuthLocation.QUERY) { clonedRequest.query[signingProperties.name] = identity.apiKey; - } else if (signingProperties.in === import_types24.HttpApiKeyAuthLocation.HEADER) { + } else if (signingProperties.in === import_types2.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 + "`"); @@ -30431,13 +27984,13 @@ var init_httpApiKeyAuth = __esm({ }); // node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js -var HttpBearerAuthSigner; +var import_protocol_http8, HttpBearerAuthSigner; var init_httpBearerAuth = __esm({ "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { - init_protocols(); + import_protocol_http8 = __toESM(require_dist_cjs2()); HttpBearerAuthSigner = class { async sign(httpRequest, identity, signingProperties) { - const clonedRequest = HttpRequest.clone(httpRequest); + const clonedRequest = import_protocol_http8.HttpRequest.clone(httpRequest); if (!identity.token) { throw new Error("request could not be signed with `token` since the `token` is not defined"); } @@ -30553,7 +28106,7 @@ __export(dist_es_exports, { getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, getHttpSigningPlugin: () => getHttpSigningPlugin, - getSmithyContext: () => getSmithyContext2, + getSmithyContext: () => getSmithyContext, httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, @@ -30561,75 +28114,876 @@ __export(dist_es_exports, { httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions, isIdentityExpired: () => isIdentityExpired, memoizeIdentityProvider: () => memoizeIdentityProvider, - normalizeProvider: () => normalizeProvider2, + normalizeProvider: () => normalizeProvider, requestBuilder: () => requestBuilder, - setFeature: () => setFeature3 + setFeature: () => setFeature }); var init_dist_es = __esm({ "node_modules/@smithy/core/dist-es/index.js"() { - init_getSmithyContext2(); + init_getSmithyContext(); init_middleware_http_auth_scheme(); init_middleware_http_signing(); - init_normalizeProvider2(); + init_normalizeProvider(); init_createPaginator(); init_requestBuilder2(); - init_setFeature2(); + init_setFeature(); init_util_identity_and_auth(); } }); -// node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/configurations.js -function isValidUserAgentAppId(appId) { - if (appId === void 0) { - return true; - } - return typeof appId === "string" && appId.length <= 50; -} -function resolveUserAgentConfig(input) { - const normalizedAppIdProvider = normalizeProvider2(input.userAgentAppId ?? DEFAULT_UA_APP_ID); - const { customUserAgent } = input; - return Object.assign(input, { - customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent, - userAgentAppId: async () => { - const appId = await normalizedAppIdProvider(); - if (!isValidUserAgentAppId(appId)) { - const logger2 = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger; - if (typeof appId !== "string") { - logger2?.warn("userAgentAppId must be a string or undefined."); - } else if (appId.length > 50) { - logger2?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."); +// node_modules/@smithy/util-endpoints/dist-cjs/index.js +var require_dist_cjs20 = __commonJS({ + "node_modules/@smithy/util-endpoints/dist-cjs/index.js"(exports2) { + "use strict"; + var types3 = require_dist_cjs(); + var BinaryDecisionDiagram5 = class _BinaryDecisionDiagram { + nodes; + root; + conditions; + results; + constructor(bdd5, root5, conditions, results) { + this.nodes = bdd5; + this.root = root5; + this.conditions = conditions; + this.results = results; + } + static from(bdd5, root5, conditions, results) { + return new _BinaryDecisionDiagram(bdd5, root5, conditions, results); + } + }; + var EndpointCache5 = class { + capacity; + data = /* @__PURE__ */ new Map(); + parameters = []; + constructor({ size, params }) { + this.capacity = size ?? 50; + if (params) { + this.parameters = params; } } - return appId; + get(endpointParams, resolver) { + const key = this.hash(endpointParams); + if (key === false) { + return resolver(); + } + if (!this.data.has(key)) { + if (this.data.size > this.capacity + 10) { + const keys = this.data.keys(); + let i5 = 0; + while (true) { + const { value, done } = keys.next(); + this.data.delete(value); + if (done || ++i5 > 10) { + break; + } + } + } + this.data.set(key, resolver()); + } + return this.data.get(key); + } + size() { + return this.data.size; + } + hash(endpointParams) { + let buffer = ""; + const { parameters } = this; + if (parameters.length === 0) { + return false; + } + for (const param of parameters) { + const val = String(endpointParams[param] ?? ""); + if (val.includes("|;")) { + return false; + } + buffer += val + "|;"; + } + return buffer; + } + }; + var EndpointError = class extends Error { + constructor(message) { + super(message); + this.name = "EndpointError"; + } + }; + var debugId = "endpoints"; + function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; + } + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; + } + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + } + return JSON.stringify(input, null, 2); } - }); -} -var DEFAULT_UA_APP_ID; -var init_configurations2 = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/configurations.js"() { - init_dist_es(); - DEFAULT_UA_APP_ID = void 0; + var customEndpointFunctions5 = {}; + var booleanEquals = (value1, value2) => value1 === value2; + function coalesce(...args) { + for (const arg of args) { + if (arg != null) { + return arg; + } + } + return void 0; + } + var getAttrPathList = (path3) => { + const parts = path3.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError(`Path: '${path3}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path3}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } else { + pathList.push(part); + } + } + return pathList; + }; + var getAttr = (value, path3) => getAttrPathList(path3).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError(`Index '${index}' in '${path3}' not found in '${JSON.stringify(value)}'`); + } else if (Array.isArray(acc)) { + const i5 = parseInt(index); + return acc[i5 < 0 ? acc.length + i5 : i5]; + } + return acc[index]; + }, value); + var isSet = (value) => value != null; + var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); + var 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; + }; + function ite(condition, trueValue, falseValue) { + return condition ? trueValue : falseValue; + } + var not = (value) => !value; + var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); + var isIpAddress = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"); + var DEFAULT_PORTS3 = { + [types3.EndpointURLScheme.HTTP]: 80, + [types3.EndpointURLScheme.HTTPS]: 443 + }; + var parseURL = (value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; + } + if (typeof value === "object" && "hostname" in value) { + const { hostname: hostname2, port, protocol: protocol2 = "", path: path3 = "", query = {} } = value; + const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path3}`); + url.search = Object.entries(query).map(([k5, v]) => `${k5}=${v}`).join("&"); + return url; + } + return new URL(value); + } catch (error2) { + return null; + } + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(types3.EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress(hostname); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS3[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS3[scheme]}`); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS3[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp + }; + }; + function split(value, delimiter, limit) { + if (limit === 1) { + return [value]; + } + if (value === "") { + return [""]; + } + const parts = value.split(delimiter); + if (limit === 0) { + return parts; + } + return parts.slice(0, limit - 1).concat(parts.slice(1).join(delimiter)); + } + var stringEquals = (value1, value2) => value1 === value2; + var substring = (input, start, stop, reverse) => { + if (input == null || start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); + }; + var uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c5) => `%${c5.charCodeAt(0).toString(16).toUpperCase()}`); + var endpointFunctions = { + booleanEquals, + coalesce, + getAttr, + isSet, + isValidHostLabel, + ite, + not, + parseURL, + split, + stringEquals, + substring, + uriEncode + }; + var evaluateTemplate = (template, options) => { + const evaluatedTemplateArr = []; + const { referenceRecord, endpointParams } = options; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; + } + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push(getAttr(referenceRecord[refName] ?? endpointParams[refName], attrName)); + } else { + evaluatedTemplateArr.push(referenceRecord[parameterName] ?? endpointParams[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); + }; + var getReferenceValue = ({ ref }, options) => { + return options.referenceRecord[ref] ?? options.endpointParams[ref]; + }; + var evaluateExpression = (obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } else if (obj["fn"]) { + return group$2.callFunction(obj, options); + } else if (obj["ref"]) { + return getReferenceValue(obj, options); + } + throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); + }; + var callFunction = ({ fn, argv }, options) => { + const evaluatedArgs = Array(argv.length); + for (let i5 = 0; i5 < evaluatedArgs.length; ++i5) { + const arg = argv[i5]; + if (typeof arg === "boolean" || typeof arg === "number") { + evaluatedArgs[i5] = arg; + } else { + evaluatedArgs[i5] = group$2.evaluateExpression(arg, "arg", options); + } + } + const namespaceSeparatorIndex = fn.indexOf("."); + if (namespaceSeparatorIndex !== -1) { + const namespaceFunctions = customEndpointFunctions5[fn.slice(0, namespaceSeparatorIndex)]; + const customFunction = namespaceFunctions?.[fn.slice(namespaceSeparatorIndex + 1)]; + if (typeof customFunction === "function") { + return customFunction(...evaluatedArgs); + } + } + const callable = endpointFunctions[fn]; + if (typeof callable === "function") { + return callable(...evaluatedArgs); + } + throw new Error(`function ${fn} not loaded in endpointFunctions.`); + }; + var group$2 = { + evaluateExpression, + callFunction + }; + var evaluateCondition = (condition, options) => { + const { assign } = condition; + if (assign && assign in options.referenceRecord) { + throw new EndpointError(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(condition, options); + options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(condition)} = ${toDebugString(value)}`); + const result = value === "" ? true : !!value; + if (assign != null) { + return { result, toAssign: { name: assign, value } }; + } + return { result }; + }; + var getEndpointHeaders = (headers, options) => Object.entries(headers ?? {}).reduce((acc, [headerKey, headerVal]) => { + acc[headerKey] = headerVal.map((headerValEntry) => { + const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }); + return acc; + }, {}); + var getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => { + acc[propertyKey] = group$1.getEndpointProperty(propertyVal, options); + return acc; + }, {}); + var getEndpointProperty = (property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); + } + switch (typeof property) { + case "string": + return evaluateTemplate(property, options); + case "object": + if (property === null) { + throw new EndpointError(`Unexpected endpoint property: ${property}`); + } + return group$1.getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); + } + }; + var group$1 = { + getEndpointProperty, + getEndpointProperties + }; + var getEndpointUrl = (endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } catch (error2) { + console.error(`Failed to construct URL with ${expression}`, error2); + throw error2; + } + } + throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); + }; + var RESULT = 1e8; + var decideEndpoint5 = (bdd5, options) => { + const { nodes: nodes5, root: root5, results, conditions } = bdd5; + let ref = root5; + const referenceRecord = {}; + const closure = { + referenceRecord, + endpointParams: options.endpointParams, + logger: options.logger + }; + while (ref !== 1 && ref !== -1 && ref < RESULT) { + const node_i = 3 * (Math.abs(ref) - 1); + const [condition_i, highRef, lowRef] = [nodes5[node_i], nodes5[node_i + 1], nodes5[node_i + 2]]; + const [fn, argv, assign] = conditions[condition_i]; + const evaluation = evaluateCondition({ fn, assign, argv }, closure); + if (evaluation.toAssign) { + const { name, value } = evaluation.toAssign; + referenceRecord[name] = value; + } + ref = ref >= 0 === evaluation.result ? highRef : lowRef; + } + if (ref >= RESULT) { + const result = results[ref - RESULT]; + if (result[0] === -1) { + const [, errorExpression] = result; + throw new EndpointError(evaluateExpression(errorExpression, "Error", closure)); + } + const [url, properties, headers] = result; + return { + url: getEndpointUrl(url, closure), + properties: getEndpointProperties(properties, closure), + headers: getEndpointHeaders(headers ?? {}, closure) + }; + } + throw new EndpointError(`No matching endpoint.`); + }; + var evaluateConditions = (conditions = [], options) => { + const conditionsReferenceRecord = {}; + const conditionOptions = { + ...options, + referenceRecord: { ...options.referenceRecord } + }; + let didAssign = false; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, conditionOptions); + if (!result) { + return { result }; + } + if (toAssign) { + didAssign = true; + conditionsReferenceRecord[toAssign.name] = toAssign.value; + conditionOptions.referenceRecord[toAssign.name] = toAssign.value; + options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); + } + } + if (didAssign) { + return { result: true, referenceRecord: conditionsReferenceRecord }; + } + return { result: true }; + }; + var evaluateEndpointRule = (endpointRule, options) => { + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = referenceRecord ? { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + } : options; + const { url, properties, headers } = endpoint; + options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); + const endpointToReturn = { url: getEndpointUrl(url, endpointRuleOptions) }; + if (headers != null) { + endpointToReturn.headers = getEndpointHeaders(headers, endpointRuleOptions); + } + if (properties != null) { + endpointToReturn.properties = getEndpointProperties(properties, endpointRuleOptions); + } + return endpointToReturn; + }; + var evaluateErrorRule = (errorRule, options) => { + const { conditions, error: error2 } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const errorRuleOptions = referenceRecord ? { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + } : options; + throw new EndpointError(evaluateExpression(error2, "Error", errorRuleOptions)); + }; + var evaluateRules = (rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = evaluateEndpointRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else if (rule.type === "error") { + evaluateErrorRule(rule, options); + } else if (rule.type === "tree") { + const endpointOrUndefined = group.evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else { + throw new EndpointError(`Unknown endpoint rule: ${rule}`); + } + } + throw new EndpointError(`Rules evaluation failed`); + }; + var evaluateTreeRule = (treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const treeRuleOptions = referenceRecord ? { ...options, referenceRecord: { ...options.referenceRecord, ...referenceRecord } } : options; + return group.evaluateRules(rules, treeRuleOptions); + }; + var group = { + evaluateRules, + evaluateTreeRule + }; + var resolveEndpoint = (ruleSetObject, options) => { + const { endpointParams, logger: logger2 } = options; + const { parameters, rules } = ruleSetObject; + options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + for (const paramKey in parameters) { + const parameter = parameters[paramKey]; + const endpointParam = endpointParams[paramKey]; + if (endpointParam == null && parameter.default != null) { + endpointParams[paramKey] = parameter.default; + continue; + } + if (parameter.required && endpointParam == null) { + throw new EndpointError(`Missing required parameter: '${paramKey}'`); + } + } + const endpoint = evaluateRules(rules, { endpointParams, logger: logger2, referenceRecord: {} }); + options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); + return endpoint; + }; + exports2.BinaryDecisionDiagram = BinaryDecisionDiagram5; + exports2.EndpointCache = EndpointCache5; + exports2.EndpointError = EndpointError; + exports2.customEndpointFunctions = customEndpointFunctions5; + exports2.decideEndpoint = decideEndpoint5; + exports2.isIpAddress = isIpAddress; + exports2.isValidHostLabel = isValidHostLabel; + exports2.resolveEndpoint = resolveEndpoint; } }); -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/partitions.js -var partitionsInfo; -var init_partitions = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/partitions.js"() { - partitionsInfo = { "partitions": [{ "id": "aws", "outputs": { "dnsSuffix": "amazonaws.com", "dualStackDnsSuffix": "api.aws", "implicitGlobalRegion": "us-east-1", "name": "aws", "supportsDualStack": true, "supportsFIPS": true }, "regionRegex": "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", "regions": { "af-south-1": { "description": "Africa (Cape Town)" }, "ap-east-1": { "description": "Asia Pacific (Hong Kong)" }, "ap-east-2": { "description": "Asia Pacific (Taipei)" }, "ap-northeast-1": { "description": "Asia Pacific (Tokyo)" }, "ap-northeast-2": { "description": "Asia Pacific (Seoul)" }, "ap-northeast-3": { "description": "Asia Pacific (Osaka)" }, "ap-south-1": { "description": "Asia Pacific (Mumbai)" }, "ap-south-2": { "description": "Asia Pacific (Hyderabad)" }, "ap-southeast-1": { "description": "Asia Pacific (Singapore)" }, "ap-southeast-2": { "description": "Asia Pacific (Sydney)" }, "ap-southeast-3": { "description": "Asia Pacific (Jakarta)" }, "ap-southeast-4": { "description": "Asia Pacific (Melbourne)" }, "ap-southeast-5": { "description": "Asia Pacific (Malaysia)" }, "ap-southeast-6": { "description": "Asia Pacific (New Zealand)" }, "ap-southeast-7": { "description": "Asia Pacific (Thailand)" }, "aws-global": { "description": "aws global region" }, "ca-central-1": { "description": "Canada (Central)" }, "ca-west-1": { "description": "Canada West (Calgary)" }, "eu-central-1": { "description": "Europe (Frankfurt)" }, "eu-central-2": { "description": "Europe (Zurich)" }, "eu-north-1": { "description": "Europe (Stockholm)" }, "eu-south-1": { "description": "Europe (Milan)" }, "eu-south-2": { "description": "Europe (Spain)" }, "eu-west-1": { "description": "Europe (Ireland)" }, "eu-west-2": { "description": "Europe (London)" }, "eu-west-3": { "description": "Europe (Paris)" }, "il-central-1": { "description": "Israel (Tel Aviv)" }, "me-central-1": { "description": "Middle East (UAE)" }, "me-south-1": { "description": "Middle East (Bahrain)" }, "mx-central-1": { "description": "Mexico (Central)" }, "sa-east-1": { "description": "South America (Sao Paulo)" }, "us-east-1": { "description": "US East (N. Virginia)" }, "us-east-2": { "description": "US East (Ohio)" }, "us-west-1": { "description": "US West (N. California)" }, "us-west-2": { "description": "US West (Oregon)" } } }, { "id": "aws-cn", "outputs": { "dnsSuffix": "amazonaws.com.cn", "dualStackDnsSuffix": "api.amazonwebservices.com.cn", "implicitGlobalRegion": "cn-northwest-1", "name": "aws-cn", "supportsDualStack": true, "supportsFIPS": true }, "regionRegex": "^cn\\-\\w+\\-\\d+$", "regions": { "aws-cn-global": { "description": "aws-cn global region" }, "cn-north-1": { "description": "China (Beijing)" }, "cn-northwest-1": { "description": "China (Ningxia)" } } }, { "id": "aws-eusc", "outputs": { "dnsSuffix": "amazonaws.eu", "dualStackDnsSuffix": "api.amazonwebservices.eu", "implicitGlobalRegion": "eusc-de-east-1", "name": "aws-eusc", "supportsDualStack": true, "supportsFIPS": true }, "regionRegex": "^eusc\\-(de)\\-\\w+\\-\\d+$", "regions": { "eusc-de-east-1": { "description": "AWS European Sovereign Cloud (Germany)" } } }, { "id": "aws-iso", "outputs": { "dnsSuffix": "c2s.ic.gov", "dualStackDnsSuffix": "api.aws.ic.gov", "implicitGlobalRegion": "us-iso-east-1", "name": "aws-iso", "supportsDualStack": true, "supportsFIPS": true }, "regionRegex": "^us\\-iso\\-\\w+\\-\\d+$", "regions": { "aws-iso-global": { "description": "aws-iso global region" }, "us-iso-east-1": { "description": "US ISO East" }, "us-iso-west-1": { "description": "US ISO WEST" } } }, { "id": "aws-iso-b", "outputs": { "dnsSuffix": "sc2s.sgov.gov", "dualStackDnsSuffix": "api.aws.scloud", "implicitGlobalRegion": "us-isob-east-1", "name": "aws-iso-b", "supportsDualStack": true, "supportsFIPS": true }, "regionRegex": "^us\\-isob\\-\\w+\\-\\d+$", "regions": { "aws-iso-b-global": { "description": "aws-iso-b global region" }, "us-isob-east-1": { "description": "US ISOB East (Ohio)" }, "us-isob-west-1": { "description": "US ISOB West" } } }, { "id": "aws-iso-e", "outputs": { "dnsSuffix": "cloud.adc-e.uk", "dualStackDnsSuffix": "api.cloud-aws.adc-e.uk", "implicitGlobalRegion": "eu-isoe-west-1", "name": "aws-iso-e", "supportsDualStack": true, "supportsFIPS": true }, "regionRegex": "^eu\\-isoe\\-\\w+\\-\\d+$", "regions": { "aws-iso-e-global": { "description": "aws-iso-e global region" }, "eu-isoe-west-1": { "description": "EU ISOE West" } } }, { "id": "aws-iso-f", "outputs": { "dnsSuffix": "csp.hci.ic.gov", "dualStackDnsSuffix": "api.aws.hci.ic.gov", "implicitGlobalRegion": "us-isof-south-1", "name": "aws-iso-f", "supportsDualStack": true, "supportsFIPS": true }, "regionRegex": "^us\\-isof\\-\\w+\\-\\d+$", "regions": { "aws-iso-f-global": { "description": "aws-iso-f global region" }, "us-isof-east-1": { "description": "US ISOF EAST" }, "us-isof-south-1": { "description": "US ISOF SOUTH" } } }, { "id": "aws-us-gov", "outputs": { "dnsSuffix": "amazonaws.com", "dualStackDnsSuffix": "api.aws", "implicitGlobalRegion": "us-gov-west-1", "name": "aws-us-gov", "supportsDualStack": true, "supportsFIPS": true }, "regionRegex": "^us\\-gov\\-\\w+\\-\\d+$", "regions": { "aws-us-gov-global": { "description": "aws-us-gov global region" }, "us-gov-east-1": { "description": "AWS GovCloud (US-East)" }, "us-gov-west-1": { "description": "AWS GovCloud (US-West)" } } }], "version": "1.1" }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/partition.js -var selectedPartitionsInfo, selectedUserAgentPrefix, partition, setPartitionInfo, useDefaultPartitionInfo, getUserAgentPrefix; -var init_partition = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/partition.js"() { - init_partitions(); - selectedPartitionsInfo = partitionsInfo; - selectedUserAgentPrefix = ""; - partition = (value) => { - const { partitions } = selectedPartitionsInfo; - for (const partition2 of partitions) { +// node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +var require_dist_cjs21 = __commonJS({ + "node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js"(exports2) { + "use strict"; + var utilEndpoints = require_dist_cjs20(); + var urlParser = require_dist_cjs18(); + var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!utilEndpoints.isValidHostLabel(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if (utilEndpoints.isIpAddress(value)) { + return false; + } + return true; + }; + var ARN_DELIMITER = ":"; + var RESOURCE_DELIMITER = "/"; + var parseArn = (value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) + return null; + const [arn, partition2, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") + return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition: partition2, + service, + region, + accountId, + resourceId + }; + }; + var partitions = [ + { + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "aws global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, + { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "aws-cn global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, + { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "api.amazonwebservices.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "AWS European Sovereign Cloud (Germany)" + } + } + }, + { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "api.aws.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "aws-iso global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, + { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "api.aws.scloud", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "aws-iso-b global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + }, + "us-isob-west-1": { + description: "US ISOB West" + } + } + }, + { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "aws-iso-e global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, + { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "api.aws.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "aws-iso-f global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, + { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "aws-us-gov global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + } + ]; + var version = "1.1"; + var partitionsInfo = { + partitions, + version + }; + var selectedPartitionsInfo = partitionsInfo; + var selectedUserAgentPrefix = ""; + var partition = (value) => { + const { partitions: partitions2 } = selectedPartitionsInfo; + for (const partition2 of partitions2) { const { regions, outputs } = partition2; for (const [region, regionData] of Object.entries(regions)) { if (region === value) { @@ -30640,7 +28994,7 @@ var init_partition = __esm({ } } } - for (const partition2 of partitions) { + for (const partition2 of partitions2) { const { regionRegex, outputs } = partition2; if (new RegExp(regionRegex).test(value)) { return { @@ -30648,7 +29002,7 @@ var init_partition = __esm({ }; } } - const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); + const DEFAULT_PARTITION = partitions2.find((partition2) => partition2.id === "aws"); if (!DEFAULT_PARTITION) { throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist."); } @@ -30656,147 +29010,698 @@ var init_partition = __esm({ ...DEFAULT_PARTITION.outputs }; }; - setPartitionInfo = (partitionsInfo2, userAgentPrefix = "") => { + var setPartitionInfo = (partitionsInfo2, userAgentPrefix = "") => { selectedPartitionsInfo = partitionsInfo2; selectedUserAgentPrefix = userAgentPrefix; }; - useDefaultPartitionInfo = () => { + var useDefaultPartitionInfo = () => { setPartitionInfo(partitionsInfo, ""); }; - getUserAgentPrefix = () => selectedUserAgentPrefix; + var getUserAgentPrefix = () => selectedUserAgentPrefix; + var awsEndpointFunctions5 = { + isVirtualHostableS3Bucket, + parseArn, + partition + }; + utilEndpoints.customEndpointFunctions.aws = awsEndpointFunctions5; + var resolveDefaultAwsRegionalEndpointsConfig = (input) => { + if (typeof input.endpointProvider !== "function") { + throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); + } + const { endpoint } = input; + if (endpoint === void 0) { + input.endpoint = async () => { + return toEndpointV12(input.endpointProvider({ + Region: typeof input.region === "function" ? await input.region() : input.region, + UseDualStack: typeof input.useDualstackEndpoint === "function" ? await input.useDualstackEndpoint() : input.useDualstackEndpoint, + UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, + Endpoint: void 0 + }, { logger: input.logger })); + }; + } + return input; + }; + var toEndpointV12 = (endpoint) => urlParser.parseUrl(endpoint.url); + exports2.EndpointError = utilEndpoints.EndpointError; + exports2.isIpAddress = utilEndpoints.isIpAddress; + exports2.resolveEndpoint = utilEndpoints.resolveEndpoint; + exports2.awsEndpointFunctions = awsEndpointFunctions5; + exports2.getUserAgentPrefix = getUserAgentPrefix; + exports2.partition = partition; + exports2.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig; + exports2.setPartitionInfo = setPartitionInfo; + exports2.toEndpointV1 = toEndpointV12; + exports2.useDefaultPartitionInfo = useDefaultPartitionInfo; } }); -// node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/check-features.js -async function checkFeatures(context, config, args) { - const request = args.request; - if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") { - setFeature2(context, "PROTOCOL_RPC_V2_CBOR", "M"); +// node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js +var state, emitWarningIfUnsupportedVersion; +var init_emitWarningIfUnsupportedVersion = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"() { + state = { + warningEmitted: false + }; + emitWarningIfUnsupportedVersion = (version) => { + if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 20) { + state.warningEmitted = true; + process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js ${version} in January 2026. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to a supported Node.js LTS version. + +More information can be found at: https://a.co/c895JFp`); + } + }; } - if (typeof config.retryStrategy === "function") { - const retryStrategy = await config.retryStrategy(); - if (typeof retryStrategy.mode === "string") { - switch (retryStrategy.mode) { - case RETRY_MODES.ADAPTIVE: - setFeature2(context, "RETRY_MODE_ADAPTIVE", "F"); - break; - case RETRY_MODES.STANDARD: - setFeature2(context, "RETRY_MODE_STANDARD", "E"); - break; +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/longPollMiddleware.js +var longPollMiddleware, longPollMiddlewareOptions, getLongPollPlugin; +var init_longPollMiddleware = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/longPollMiddleware.js"() { + longPollMiddleware = () => (next, context) => async (args) => { + context.__retryLongPoll = true; + return next(args); + }; + longPollMiddlewareOptions = { + name: "longPollMiddleware", + tags: ["RETRY"], + step: "initialize", + override: true + }; + getLongPollPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(longPollMiddleware(), longPollMiddlewareOptions); + } + }); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js +function setCredentialFeature(credentials, feature, value) { + if (!credentials.$source) { + credentials.$source = {}; + } + credentials.$source[feature] = value; + return credentials; +} +var init_setCredentialFeature = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js"() { + } +}); + +// node_modules/@smithy/service-error-classification/dist-cjs/index.js +var require_dist_cjs22 = __commonJS({ + "node_modules/@smithy/service-error-classification/dist-cjs/index.js"(exports2) { + "use strict"; + var CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch" + ]; + var THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException" + ]; + var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; + var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; + var NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; + var isRetryableByTrait = (error2) => error2?.$retryable !== void 0; + var isClockSkewError = (error2) => CLOCK_SKEW_ERROR_CODES.includes(error2.name); + var isClockSkewCorrectedError = (error2) => error2.$metadata?.clockSkewCorrected; + var isBrowserNetworkError = (error2) => { + const errorMessages = /* @__PURE__ */ new Set([ + "Failed to fetch", + "NetworkError when attempting to fetch resource", + "The Internet connection appears to be offline", + "Load failed", + "Network request failed" + ]); + const isValid = error2 && error2 instanceof TypeError; + if (!isValid) { + return false; + } + return errorMessages.has(error2.message); + }; + var isThrottlingError = (error2) => error2.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error2.name) || error2.$retryable?.throttling == true; + var 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); + var isServerError = (error2) => { + if (error2.$metadata?.httpStatusCode !== void 0) { + const statusCode = error2.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error2)) { + return true; + } + return false; + } + return false; + }; + function isNodeJsHttp2TransientError(error2) { + return error2.code === "ERR_HTTP2_STREAM_ERROR" && error2.message.includes("NGHTTP2_REFUSED_STREAM"); + } + exports2.isBrowserNetworkError = isBrowserNetworkError; + exports2.isClockSkewCorrectedError = isClockSkewCorrectedError; + exports2.isClockSkewError = isClockSkewError; + exports2.isNodeJsHttp2TransientError = isNodeJsHttp2TransientError; + exports2.isRetryableByTrait = isRetryableByTrait; + exports2.isServerError = isServerError; + exports2.isThrottlingError = isThrottlingError; + exports2.isTransientError = isTransientError; + } +}); + +// node_modules/@smithy/util-retry/dist-cjs/index.js +var require_dist_cjs23 = __commonJS({ + "node_modules/@smithy/util-retry/dist-cjs/index.js"(exports2) { + "use strict"; + var serviceErrorClassification = require_dist_cjs22(); + exports2.RETRY_MODES = void 0; + (function(RETRY_MODES) { + RETRY_MODES["STANDARD"] = "standard"; + RETRY_MODES["ADAPTIVE"] = "adaptive"; + })(exports2.RETRY_MODES || (exports2.RETRY_MODES = {})); + var DEFAULT_MAX_ATTEMPTS = 3; + var DEFAULT_RETRY_MODE5 = exports2.RETRY_MODES.STANDARD; + var DefaultRateLimiter = class _DefaultRateLimiter { + static setTimeoutFn = setTimeout; + beta; + minCapacity; + minFillRate; + scaleConstant; + smooth; + enabled = false; + availableTokens = 0; + lastMaxRate = 0; + measuredTxRate = 0; + requestCount = 0; + fillRate; + lastThrottleTime; + lastTimestamp = 0; + lastTxRateBucket; + maxCapacity; + timeWindow = 0; + constructor(options) { + this.beta = options?.beta ?? 0.7; + this.minCapacity = options?.minCapacity ?? 1; + this.minFillRate = options?.minFillRate ?? 0.5; + this.scaleConstant = options?.scaleConstant ?? 0.4; + this.smooth = options?.smooth ?? 0.8; + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + const retryErrorInfo = response; + const isThrottling = retryErrorInfo?.errorType === "THROTTLING" || serviceErrorClassification.isThrottlingError(retryErrorInfo?.error ?? response); + if (isThrottling) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + getCurrentTimeInSeconds() { + return Date.now() / 1e3; + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.availableTokens) { + const delay = (amount - this.availableTokens) / this.fillRate * 1e3; + await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay)); + } + this.availableTokens = this.availableTokens - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.availableTokens = Math.min(this.maxCapacity, this.availableTokens + fillAmount); + this.lastTimestamp = timestamp; + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.availableTokens = Math.min(this.availableTokens, this.maxCapacity); + } + updateMeasuredRate() { + const t = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } + }; + var DEFAULT_RETRY_DELAY_BASE = 100; + var MAXIMUM_RETRY_DELAY = 20 * 1e3; + var THROTTLING_RETRY_DELAY_BASE = 500; + var INITIAL_RETRY_TOKENS = 500; + var RETRY_COST = 5; + var TIMEOUT_RETRY_COST = 10; + var NO_RETRY_INCREMENT = 1; + var INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; + var REQUEST_HEADER = "amz-sdk-request"; + var Retry2 = class _Retry { + static v2026 = typeof process !== "undefined" && process.env?.SMITHY_NEW_RETRIES_2026 === "true"; + static delay() { + return _Retry.v2026 ? 50 : 100; + } + static throttlingDelay() { + return _Retry.v2026 ? 1e3 : 500; + } + static cost() { + return _Retry.v2026 ? 14 : 5; + } + static throttlingCost() { + return _Retry.v2026 ? 5 : 10; + } + static modifiedCostType() { + return _Retry.v2026 ? "THROTTLING" : "TRANSIENT"; + } + }; + var DefaultRetryBackoffStrategy = class { + x = Retry2.delay(); + computeNextBackoffDelay(i5) { + const b6 = Math.random(); + const r5 = 2; + const t_i = b6 * Math.min(this.x * r5 ** i5, MAXIMUM_RETRY_DELAY); + return Math.floor(t_i); + } + setDelayBase(delay) { + this.x = delay; + } + }; + var DefaultRetryToken = class { + delay; + count; + cost; + longPoll; + constructor(delay, count, cost, longPoll) { + this.delay = delay; + this.count = count; + this.cost = cost; + this.longPoll = longPoll; + } + getRetryCount() { + return this.count; + } + getRetryDelay() { + return Math.min(MAXIMUM_RETRY_DELAY, this.delay); + } + getRetryCost() { + return this.cost; + } + isLongPoll() { + return this.longPoll; + } + }; + var refusal = { + incompatible: 1, + attempts: 2, + capacity: 3 + }; + var StandardRetryStrategy = class { + mode = exports2.RETRY_MODES.STANDARD; + capacity = INITIAL_RETRY_TOKENS; + retryBackoffStrategy; + maxAttemptsProvider; + baseDelay; + constructor(arg1) { + if (typeof arg1 === "number") { + this.maxAttemptsProvider = async () => arg1; + } else if (typeof arg1 === "function") { + this.maxAttemptsProvider = arg1; + } else if (arg1 && typeof arg1 === "object") { + this.maxAttemptsProvider = async () => arg1.maxAttempts; + this.baseDelay = arg1.baseDelay; + this.retryBackoffStrategy = arg1.backoff; + } + this.maxAttemptsProvider ??= async () => DEFAULT_MAX_ATTEMPTS; + this.baseDelay ??= Retry2.delay(); + this.retryBackoffStrategy ??= new DefaultRetryBackoffStrategy(); + } + async acquireInitialRetryToken(retryTokenScope) { + return new DefaultRetryToken(Retry2.delay(), 0, void 0, Retry2.v2026 && retryTokenScope.includes(":longpoll")); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + const retryCode = this.retryCode(token, errorInfo, maxAttempts); + const shouldRetry = retryCode === 0; + const isLongPoll = token.isLongPoll?.(); + if (shouldRetry || isLongPoll) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? Retry2.throttlingDelay() : this.baseDelay); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + let retryDelay = delayFromErrorType; + if (errorInfo.retryAfterHint instanceof Date) { + retryDelay = Math.max(delayFromErrorType, Math.min(errorInfo.retryAfterHint.getTime() - Date.now(), delayFromErrorType + 5e3)); + } + if (!shouldRetry) { + throw Object.assign(new Error("No retry token available"), { + $backoff: Retry2.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0 + }); + } else { + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return new DefaultRetryToken(retryDelay, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false); + } + } + throw new Error("No retry token available"); + } + recordSuccess(token) { + this.capacity = Math.min(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); + } + getCapacity() { + return this.capacity; + } + async maxAttempts() { + return this.maxAttemptsProvider(); + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } catch (error2) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; + } + } + retryCode(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + const retryableStatus = this.isRetryableError(errorInfo.errorType) ? 0 : refusal.incompatible; + const attemptStatus = attempts < maxAttempts ? 0 : refusal.attempts; + const capacityStatus = this.capacity >= this.getCapacityCost(errorInfo.errorType) ? 0 : refusal.capacity; + return retryableStatus || attemptStatus || capacityStatus; + } + getCapacityCost(errorType) { + return errorType === Retry2.modifiedCostType() ? Retry2.throttlingCost() : Retry2.cost(); + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } + }; + var AdaptiveRetryStrategy = class { + mode = exports2.RETRY_MODES.ADAPTIVE; + rateLimiter; + standardRetryStrategy; + constructor(maxAttemptsProvider, options) { + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = options ? new StandardRetryStrategy({ + maxAttempts: typeof maxAttemptsProvider === "number" ? maxAttemptsProvider : 3, + ...options + }) : new StandardRetryStrategy(maxAttemptsProvider); + } + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } + async maxAttemptsProvider() { + return this.standardRetryStrategy.maxAttempts(); + } + }; + var ConfiguredRetryStrategy = class extends StandardRetryStrategy { + computeNextBackoffDelay; + constructor(maxAttempts, computeNextBackoffDelay = Retry2.delay()) { + super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); + if (typeof computeNextBackoffDelay === "number") { + this.computeNextBackoffDelay = () => computeNextBackoffDelay; + } else { + this.computeNextBackoffDelay = computeNextBackoffDelay; + } + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); + return token; + } + }; + exports2.AdaptiveRetryStrategy = AdaptiveRetryStrategy; + exports2.ConfiguredRetryStrategy = ConfiguredRetryStrategy; + exports2.DEFAULT_MAX_ATTEMPTS = DEFAULT_MAX_ATTEMPTS; + exports2.DEFAULT_RETRY_DELAY_BASE = DEFAULT_RETRY_DELAY_BASE; + exports2.DEFAULT_RETRY_MODE = DEFAULT_RETRY_MODE5; + exports2.DefaultRateLimiter = DefaultRateLimiter; + exports2.INITIAL_RETRY_TOKENS = INITIAL_RETRY_TOKENS; + exports2.INVOCATION_ID_HEADER = INVOCATION_ID_HEADER; + exports2.MAXIMUM_RETRY_DELAY = MAXIMUM_RETRY_DELAY; + exports2.NO_RETRY_INCREMENT = NO_RETRY_INCREMENT; + exports2.REQUEST_HEADER = REQUEST_HEADER; + exports2.RETRY_COST = RETRY_COST; + exports2.Retry = Retry2; + exports2.StandardRetryStrategy = StandardRetryStrategy; + exports2.THROTTLING_RETRY_DELAY_BASE = THROTTLING_RETRY_DELAY_BASE; + exports2.TIMEOUT_RETRY_COST = TIMEOUT_RETRY_COST; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js +function setFeature2(context, feature, value) { + if (!context.__aws_sdk_context) { + context.__aws_sdk_context = { + features: {} + }; + } else if (!context.__aws_sdk_context.features) { + context.__aws_sdk_context.features = {}; + } + context.__aws_sdk_context.features[feature] = value; +} +var import_util_retry; +var init_setFeature2 = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() { + import_util_retry = __toESM(require_dist_cjs23()); + import_util_retry.Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true"; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js +function setTokenFeature(token, feature, value) { + if (!token.$source) { + token.$source = {}; + } + token.$source[feature] = value; + return token; +} +var init_setTokenFeature = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js"() { + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +var client_exports = {}; +__export(client_exports, { + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, + getLongPollPlugin: () => getLongPollPlugin, + setCredentialFeature: () => setCredentialFeature, + setFeature: () => setFeature2, + setTokenFeature: () => setTokenFeature, + state: () => state +}); +var init_client = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/index.js"() { + init_emitWarningIfUnsupportedVersion(); + init_longPollMiddleware(); + init_setCredentialFeature(); + init_setFeature2(); + init_setTokenFeature(); + } +}); + +// node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +var require_dist_cjs24 = __commonJS({ + "node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js"(exports2) { + "use strict"; + var core5 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var utilEndpoints = require_dist_cjs21(); + var protocolHttp = require_dist_cjs2(); + var client = (init_client(), __toCommonJS(client_exports)); + var utilRetry = require_dist_cjs23(); + var DEFAULT_UA_APP_ID = void 0; + function isValidUserAgentAppId(appId) { + if (appId === void 0) { + return true; + } + return typeof appId === "string" && appId.length <= 50; + } + function resolveUserAgentConfig5(input) { + const normalizedAppIdProvider = core5.normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID); + const { customUserAgent } = input; + return Object.assign(input, { + customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent, + userAgentAppId: async () => { + const appId = await normalizedAppIdProvider(); + if (!isValidUserAgentAppId(appId)) { + const logger2 = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger; + if (typeof appId !== "string") { + logger2?.warn("userAgentAppId must be a string or undefined."); + } else if (appId.length > 50) { + logger2?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."); + } + } + return appId; + } + }); + } + var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/; + async function checkFeatures(context, config, args) { + const request = args.request; + if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") { + client.setFeature(context, "PROTOCOL_RPC_V2_CBOR", "M"); + } + if (typeof config.retryStrategy === "function") { + const retryStrategy = await config.retryStrategy(); + if (typeof retryStrategy.mode === "string") { + switch (retryStrategy.mode) { + case utilRetry.RETRY_MODES.ADAPTIVE: + client.setFeature(context, "RETRY_MODE_ADAPTIVE", "F"); + break; + case utilRetry.RETRY_MODES.STANDARD: + client.setFeature(context, "RETRY_MODE_STANDARD", "E"); + break; + } + } + } + if (typeof config.accountIdEndpointMode === "function") { + const endpointV2 = context.endpointV2; + if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { + client.setFeature(context, "ACCOUNT_ID_ENDPOINT", "O"); + } + switch (await config.accountIdEndpointMode?.()) { + case "disabled": + client.setFeature(context, "ACCOUNT_ID_MODE_DISABLED", "Q"); + break; + case "preferred": + client.setFeature(context, "ACCOUNT_ID_MODE_PREFERRED", "P"); + break; + case "required": + client.setFeature(context, "ACCOUNT_ID_MODE_REQUIRED", "R"); + break; + } + } + const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity; + if (identity?.$source) { + const credentials = identity; + if (credentials.accountId) { + client.setFeature(context, "RESOLVED_ACCOUNT_ID", "T"); + } + for (const [key, value] of Object.entries(credentials.$source ?? {})) { + client.setFeature(context, key, value); + } } } - } - if (typeof config.accountIdEndpointMode === "function") { - const endpointV2 = context.endpointV2; - if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { - setFeature2(context, "ACCOUNT_ID_ENDPOINT", "O"); - } - switch (await config.accountIdEndpointMode?.()) { - case "disabled": - setFeature2(context, "ACCOUNT_ID_MODE_DISABLED", "Q"); + var USER_AGENT2 = "user-agent"; + var X_AMZ_USER_AGENT = "x-amz-user-agent"; + var SPACE = " "; + var UA_NAME_SEPARATOR = "/"; + var UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g; + var UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g; + var UA_ESCAPE_CHAR = "-"; + var BYTE_LIMIT = 1024; + function encodeFeatures(features) { + let buffer = ""; + for (const key in features) { + const val = features[key]; + if (buffer.length + val.length + 1 <= BYTE_LIMIT) { + if (buffer.length) { + buffer += "," + val; + } else { + buffer += val; + } + continue; + } break; - case "preferred": - setFeature2(context, "ACCOUNT_ID_MODE_PREFERRED", "P"); - break; - case "required": - setFeature2(context, "ACCOUNT_ID_MODE_REQUIRED", "R"); - break; - } - } - const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity; - if (identity?.$source) { - const credentials = identity; - if (credentials.accountId) { - setFeature2(context, "RESOLVED_ACCOUNT_ID", "T"); - } - for (const [key, value] of Object.entries(credentials.$source ?? {})) { - setFeature2(context, key, value); - } - } -} -var ACCOUNT_ID_ENDPOINT_REGEX; -var init_check_features = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/check-features.js"() { - init_retry2(); - init_setFeature(); - ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/constants.js -var USER_AGENT, X_AMZ_USER_AGENT, SPACE, UA_NAME_SEPARATOR, UA_NAME_ESCAPE_REGEX, UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR; -var init_constants6 = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/constants.js"() { - USER_AGENT = "user-agent"; - X_AMZ_USER_AGENT = "x-amz-user-agent"; - SPACE = " "; - UA_NAME_SEPARATOR = "/"; - UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g; - UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g; - UA_ESCAPE_CHAR = "-"; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/encode-features.js -function encodeFeatures(features) { - let buffer = ""; - for (const key in features) { - const val = features[key]; - if (buffer.length + val.length + 1 <= BYTE_LIMIT) { - if (buffer.length) { - buffer += "," + val; - } else { - buffer += val; } - continue; + return buffer; } - break; - } - return buffer; -} -var BYTE_LIMIT; -var init_encode_features = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/encode-features.js"() { - BYTE_LIMIT = 1024; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/user-agent-middleware.js -var userAgentMiddleware, escapeUserAgent, getUserAgentMiddlewareOptions, getUserAgentPlugin; -var init_user_agent_middleware = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-user-agent/user-agent-middleware.js"() { - init_protocols(); - init_partition(); - init_check_features(); - init_constants6(); - init_encode_features(); - userAgentMiddleware = (options) => (next, context) => async (args) => { + var userAgentMiddleware = (options) => (next, context) => async (args) => { const { request } = args; - if (!HttpRequest.isInstance(request)) { + if (!protocolHttp.HttpRequest.isInstance(request)) { return next(args); } const { headers } = request; const userAgent = context?.userAgent?.map(escapeUserAgent) || []; - const defaultUserAgent2 = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); await checkFeatures(context, options, args); const awsContext = context; - defaultUserAgent2.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`); + defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`); const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || []; const appId = await options.userAgentAppId(); if (appId) { - defaultUserAgent2.push(escapeUserAgent([`app`, `${appId}`])); + defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`])); } - const prefix = getUserAgentPrefix(); - const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent2, ...userAgent, ...customUserAgent]).join(SPACE); + const prefix = utilEndpoints.getUserAgentPrefix(); + const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); const normalUAValue = [ - ...defaultUserAgent2.filter((section) => section.startsWith("aws-sdk-")), + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), ...customUserAgent ].join(SPACE); if (options.runtime !== "browser") { if (normalUAValue) { - headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; + headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT2]} ${normalUAValue}` : normalUAValue; } - headers[USER_AGENT] = sdkUserAgentValue; + headers[USER_AGENT2] = sdkUserAgentValue; } else { headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; } @@ -30805,7 +29710,7 @@ var init_user_agent_middleware = __esm({ request }); }; - escapeUserAgent = (userAgentPair) => { + var escapeUserAgent = (userAgentPair) => { const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); @@ -30825,1398 +29730,2384 @@ var init_user_agent_middleware = __esm({ } }, ""); }; - getUserAgentMiddlewareOptions = { + var getUserAgentMiddlewareOptions = { name: "getUserAgentMiddleware", step: "build", priority: "low", tags: ["SET_USER_AGENT", "USER_AGENT"], override: true }; - getUserAgentPlugin = (config) => ({ + var getUserAgentPlugin5 = (config) => ({ applyToStack: (clientStack) => { clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); } }); + exports2.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID; + exports2.getUserAgentMiddlewareOptions = getUserAgentMiddlewareOptions; + exports2.getUserAgentPlugin = getUserAgentPlugin5; + exports2.resolveUserAgentConfig = resolveUserAgentConfig5; + exports2.userAgentMiddleware = userAgentMiddleware; } }); -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getRuntimeUserAgentPair.js -var import_node_process, getRuntimeUserAgentPair; -var init_getRuntimeUserAgentPair = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getRuntimeUserAgentPair.js"() { - import_node_process = require("node:process"); - getRuntimeUserAgentPair = () => { - const runtimesToCheck = ["deno", "bun", "llrt"]; - for (const runtime of runtimesToCheck) { - if (import_node_process.versions[runtime]) { - return [`md/${runtime}`, import_node_process.versions[runtime]]; +// node_modules/@smithy/util-config-provider/dist-cjs/index.js +var require_dist_cjs25 = __commonJS({ + "node_modules/@smithy/util-config-provider/dist-cjs/index.js"(exports2) { + "use strict"; + var booleanSelector = (obj, key, type) => { + if (!(key in obj)) + return void 0; + if (obj[key] === "true") + return true; + if (obj[key] === "false") + return false; + throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); + }; + var numberSelector = (obj, key, type) => { + if (!(key in obj)) + return void 0; + const numberValue = parseInt(obj[key], 10); + if (Number.isNaN(numberValue)) { + throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); + } + return numberValue; + }; + exports2.SelectorType = void 0; + (function(SelectorType) { + SelectorType["ENV"] = "env"; + SelectorType["CONFIG"] = "shared config entry"; + })(exports2.SelectorType || (exports2.SelectorType = {})); + exports2.booleanSelector = booleanSelector; + exports2.numberSelector = numberSelector; + } +}); + +// node_modules/@smithy/config-resolver/dist-cjs/index.js +var require_dist_cjs26 = __commonJS({ + "node_modules/@smithy/config-resolver/dist-cjs/index.js"(exports2) { + "use strict"; + var utilConfigProvider = require_dist_cjs25(); + var utilMiddleware = require_dist_cjs6(); + var utilEndpoints = require_dist_cjs20(); + var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; + var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; + var DEFAULT_USE_DUALSTACK_ENDPOINT = false; + var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS5 = { + environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV), + configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.CONFIG), + default: false + }; + var nodeDualstackConfigSelectors = { + environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV), + configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.CONFIG), + default: void 0 + }; + var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; + var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; + var DEFAULT_USE_FIPS_ENDPOINT = false; + var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS5 = { + environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV), + configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.CONFIG), + default: false + }; + var nodeFipsConfigSelectors = { + environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV), + configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.CONFIG), + default: void 0 + }; + var resolveCustomEndpointsConfig = (input) => { + const { tls: tls8, endpoint, urlParser, useDualstackEndpoint } = input; + return Object.assign(input, { + tls: tls8 ?? true, + endpoint: utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), + isCustomEndpoint: true, + useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false) + }); + }; + var getEndpointFromRegion = async (input) => { + const { tls: tls8 = true } = input; + const region = await input.region(); + const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!dnsHostRegex.test(region)) { + throw new Error("Invalid region in client config"); + } + const useDualstackEndpoint = await input.useDualstackEndpoint(); + const useFipsEndpoint = await input.useFipsEndpoint(); + const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); + } + return input.urlParser(`${tls8 ? "https:" : "http:"}//${hostname}`); + }; + var resolveEndpointsConfig = (input) => { + const useDualstackEndpoint = utilMiddleware.normalizeProvider(input.useDualstackEndpoint ?? false); + const { endpoint, useFipsEndpoint, urlParser, tls: tls8 } = input; + return Object.assign(input, { + tls: tls8 ?? true, + endpoint: endpoint ? utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint, + useDualstackEndpoint + }); + }; + var REGION_ENV_NAME = "AWS_REGION"; + var REGION_INI_NAME = "region"; + var NODE_REGION_CONFIG_OPTIONS5 = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + } + }; + var NODE_REGION_CONFIG_FILE_OPTIONS5 = { + preferredFile: "credentials" + }; + var validRegions = /* @__PURE__ */ new Set(); + var checkRegion = (region, check = utilEndpoints.isValidHostLabel) => { + if (!validRegions.has(region) && !check(region)) { + if (region === "*") { + console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`); + } else { + throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`); } + } else { + validRegions.add(region); } - return ["md/nodejs", import_node_process.versions.node]; }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getNodeModulesParentDirs.js -var import_node_path6, getNodeModulesParentDirs; -var init_getNodeModulesParentDirs = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getNodeModulesParentDirs.js"() { - import_node_path6 = require("node:path"); - getNodeModulesParentDirs = (dirname3) => { - const cwd = process.cwd(); - if (!dirname3) { - return [cwd]; + var isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); + var getRealRegion = (region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region; + var resolveRegionConfig5 = (input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); } - const normalizedPath = (0, import_node_path6.normalize)(dirname3); - const parts = normalizedPath.split(import_node_path6.sep); - const nodeModulesIndex = parts.indexOf("node_modules"); - const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(import_node_path6.sep) : normalizedPath; - if (cwd === parentDir) { - return [cwd]; - } - return [parentDir, cwd]; - }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getSanitizedTypeScriptVersion.js -var SEMVER_REGEX, getSanitizedTypeScriptVersion; -var init_getSanitizedTypeScriptVersion = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getSanitizedTypeScriptVersion.js"() { - SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/; - getSanitizedTypeScriptVersion = (version = "") => { - const match = version.match(SEMVER_REGEX); - if (!match) { - return void 0; - } - const [major, minor, patch, prerelease] = [match[1], match[2], match[3], match[4]]; - return prerelease ? `${major}.${minor}.${patch}-${prerelease}` : `${major}.${minor}.${patch}`; - }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getSanitizedDevTypeScriptVersion.js -var ALLOWED_PREFIXES, ALLOWED_DIST_TAGS, getSanitizedDevTypeScriptVersion; -var init_getSanitizedDevTypeScriptVersion = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getSanitizedDevTypeScriptVersion.js"() { - init_getSanitizedTypeScriptVersion(); - ALLOWED_PREFIXES = ["^", "~", ">=", "<=", ">", "<"]; - ALLOWED_DIST_TAGS = ["latest", "beta", "dev", "rc", "insiders", "next"]; - getSanitizedDevTypeScriptVersion = (version = "") => { - if (ALLOWED_DIST_TAGS.includes(version)) { - return version; - } - const prefix = ALLOWED_PREFIXES.find((p2) => version.startsWith(p2)) ?? ""; - const sanitizedTypeScriptVersion = getSanitizedTypeScriptVersion(version.slice(prefix.length)); - if (!sanitizedTypeScriptVersion) { - return void 0; - } - return `${prefix}${sanitizedTypeScriptVersion}`; - }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getTypeScriptUserAgentPair.js -var import_promises3, import_node_path7, tscVersion, TS_PACKAGE_JSON, getTypeScriptUserAgentPair; -var init_getTypeScriptUserAgentPair = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getTypeScriptUserAgentPair.js"() { - init_config2(); - import_promises3 = require("node:fs/promises"); - import_node_path7 = require("node:path"); - init_getNodeModulesParentDirs(); - init_getSanitizedDevTypeScriptVersion(); - init_getSanitizedTypeScriptVersion(); - TS_PACKAGE_JSON = (0, import_node_path7.join)("node_modules", "typescript", "package.json"); - getTypeScriptUserAgentPair = async () => { - if (tscVersion === null) { - return void 0; - } else if (typeof tscVersion === "string") { - return ["md/tsc", tscVersion]; - } - let isTypeScriptDetectionDisabled = false; - try { - isTypeScriptDetectionDisabled = booleanSelector(process.env, "AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED", SelectorType.ENV) || false; - } catch { - } - if (isTypeScriptDetectionDisabled) { - tscVersion = null; - return void 0; - } - const dirname3 = typeof __dirname !== "undefined" ? __dirname : void 0; - const nodeModulesParentDirs = getNodeModulesParentDirs(dirname3); - let versionFromApp; - for (const nodeModulesParentDir of nodeModulesParentDirs) { - try { - const appPackageJsonPath = (0, import_node_path7.join)(nodeModulesParentDir, "package.json"); - const packageJson = await (0, import_promises3.readFile)(appPackageJsonPath, "utf-8"); - const { dependencies, devDependencies } = JSON.parse(packageJson); - const version = devDependencies?.typescript ?? dependencies?.typescript; - if (typeof version !== "string") { - continue; + return Object.assign(input, { + region: async () => { + const providedRegion = typeof region === "function" ? await region() : region; + const realRegion = getRealRegion(providedRegion); + checkRegion(realRegion); + return realRegion; + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; } - versionFromApp = version; - break; - } catch { + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); } - } - if (!versionFromApp) { - tscVersion = null; - return void 0; - } - let versionFromNodeModules; - for (const nodeModulesParentDir of nodeModulesParentDirs) { - try { - const tsPackageJsonPath = (0, import_node_path7.join)(nodeModulesParentDir, TS_PACKAGE_JSON); - const packageJson = await (0, import_promises3.readFile)(tsPackageJsonPath, "utf-8"); - const { version } = JSON.parse(packageJson); - const sanitizedVersion2 = getSanitizedTypeScriptVersion(version); - if (typeof sanitizedVersion2 !== "string") { - continue; - } - versionFromNodeModules = sanitizedVersion2; - break; - } catch { - } - } - if (versionFromNodeModules) { - tscVersion = versionFromNodeModules; - return ["md/tsc", tscVersion]; - } - const sanitizedVersion = getSanitizedDevTypeScriptVersion(versionFromApp); - if (typeof sanitizedVersion !== "string") { - tscVersion = null; - return void 0; - } - tscVersion = `dev_${sanitizedVersion}`; - return ["md/tsc", tscVersion]; + }); }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/crt-availability.js -var crtAvailability; -var init_crt_availability = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/crt-availability.js"() { - crtAvailability = { - isCrtAvailable: false - }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/is-crt-available.js -var isCrtAvailable; -var init_is_crt_available = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/is-crt-available.js"() { - init_crt_availability(); - isCrtAvailable = () => { - if (crtAvailability.isCrtAvailable) { - return ["md/crt-avail"]; + var getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname; + var getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0; + var getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws"; + var getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { + if (signingRegion) { + return signingRegion; + } else if (useFipsEndpoint) { + const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); + const regionRegexmatchArray = hostname.match(regionRegexJs); + if (regionRegexmatchArray) { + return regionRegexmatchArray[0].slice(1, -1); + } } - return null; }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/defaultUserAgent.js -var import_node_os2, import_node_process2, createDefaultUserAgentProvider, defaultUserAgent; -var init_defaultUserAgent = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/defaultUserAgent.js"() { - import_node_os2 = require("node:os"); - import_node_process2 = require("node:process"); - init_getRuntimeUserAgentPair(); - init_getTypeScriptUserAgentPair(); - init_is_crt_available(); - init_crt_availability(); - createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => { - const runtimeUserAgentPair = getRuntimeUserAgentPair(); - return async (config) => { - const sections = [ - ["aws-sdk-js", clientVersion], - ["ua", "2.1"], - [`os/${(0, import_node_os2.platform)()}`, (0, import_node_os2.release)()], - ["lang/js"], - runtimeUserAgentPair - ]; - const typescriptUserAgentPair = await getTypeScriptUserAgentPair(); - if (typescriptUserAgentPair) { - sections.push(typescriptUserAgentPair); + var getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash }) => { + const partition = getResolvedPartition(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions); + const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions); + const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); + if (hostname === void 0) { + throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); + } + const signingRegion = getResolvedSigningRegion(hostname, { + signingRegion: regionHash[resolvedRegion]?.signingRegion, + regionRegex: partitionHash[partition].regionRegex, + useFipsEndpoint + }); + return { + partition, + signingService, + hostname, + ...signingRegion && { signingRegion }, + ...regionHash[resolvedRegion]?.signingService && { + signingService: regionHash[resolvedRegion].signingService } - const crtAvailable = isCrtAvailable(); - if (crtAvailable) { - sections.push(crtAvailable); - } - if (serviceId) { - sections.push([`api/${serviceId}`, clientVersion]); - } - if (import_node_process2.env.AWS_EXECUTION_ENV) { - sections.push([`exec-env/${import_node_process2.env.AWS_EXECUTION_ENV}`]); - } - const appId = await config?.userAgentAppId?.(); - const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; - return resolvedUserAgent; }; }; - defaultUserAgent = createDefaultUserAgentProvider; + exports2.CONFIG_USE_DUALSTACK_ENDPOINT = CONFIG_USE_DUALSTACK_ENDPOINT; + exports2.CONFIG_USE_FIPS_ENDPOINT = CONFIG_USE_FIPS_ENDPOINT; + exports2.DEFAULT_USE_DUALSTACK_ENDPOINT = DEFAULT_USE_DUALSTACK_ENDPOINT; + exports2.DEFAULT_USE_FIPS_ENDPOINT = DEFAULT_USE_FIPS_ENDPOINT; + exports2.ENV_USE_DUALSTACK_ENDPOINT = ENV_USE_DUALSTACK_ENDPOINT; + exports2.ENV_USE_FIPS_ENDPOINT = ENV_USE_FIPS_ENDPOINT; + exports2.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS5; + exports2.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS5; + exports2.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS5; + exports2.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS5; + exports2.REGION_ENV_NAME = REGION_ENV_NAME; + exports2.REGION_INI_NAME = REGION_INI_NAME; + exports2.getRegionInfo = getRegionInfo; + exports2.nodeDualstackConfigSelectors = nodeDualstackConfigSelectors; + exports2.nodeFipsConfigSelectors = nodeFipsConfigSelectors; + exports2.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig; + exports2.resolveEndpointsConfig = resolveEndpointsConfig; + exports2.resolveRegionConfig = resolveRegionConfig5; } }); -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/nodeAppIdConfigOptions.js -var UA_APP_ID_ENV_NAME, UA_APP_ID_INI_NAME, UA_APP_ID_INI_NAME_DEPRECATED, NODE_APP_ID_CONFIG_OPTIONS; -var init_nodeAppIdConfigOptions = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/nodeAppIdConfigOptions.js"() { - init_configurations2(); - UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; - UA_APP_ID_INI_NAME = "sdk_ua_app_id"; - UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id"; - NODE_APP_ID_CONFIG_OPTIONS = { - environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME], - configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], - default: DEFAULT_UA_APP_ID +// node_modules/@smithy/middleware-content-length/dist-cjs/index.js +var require_dist_cjs27 = __commonJS({ + "node_modules/@smithy/middleware-content-length/dist-cjs/index.js"(exports2) { + "use strict"; + var protocolHttp = require_dist_cjs2(); + var CONTENT_LENGTH_HEADER = "content-length"; + function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (protocolHttp.HttpRequest.isInstance(request)) { + const { body, headers } = request; + if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { + try { + const length = bodyLengthChecker(body); + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER]: String(length) + }; + } catch (error2) { + } + } + } + return next({ + ...args, + request + }); + }; + } + var contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true }; + var getContentLengthPlugin5 = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + } + }); + exports2.contentLengthMiddleware = contentLengthMiddleware; + exports2.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions; + exports2.getContentLengthPlugin = getContentLengthPlugin5; } }); -// node_modules/bowser/es5.js -var require_es5 = __commonJS({ - "node_modules/bowser/es5.js"(exports2, module2) { - !(function(e5, t) { - "object" == typeof exports2 && "object" == typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports2 ? exports2.bowser = t() : e5.bowser = t(); - })(exports2, (function() { - return (function(e5) { - var t = {}; - function r5(i5) { - if (t[i5]) return t[i5].exports; - var n3 = t[i5] = { i: i5, l: false, exports: {} }; - return e5[i5].call(n3.exports, n3, n3.exports, r5), n3.l = true, n3.exports; +// node_modules/@smithy/property-provider/dist-cjs/index.js +var require_dist_cjs28 = __commonJS({ + "node_modules/@smithy/property-provider/dist-cjs/index.js"(exports2) { + "use strict"; + var ProviderError2 = class _ProviderError extends Error { + name = "ProviderError"; + tryNextLink; + constructor(message, options = true) { + let logger2; + let tryNextLink = true; + if (typeof options === "boolean") { + logger2 = void 0; + tryNextLink = options; + } else if (options != null && typeof options === "object") { + logger2 = options.logger; + tryNextLink = options.tryNextLink ?? true; } - return r5.m = e5, r5.c = t, r5.d = function(e6, t2, i5) { - r5.o(e6, t2) || Object.defineProperty(e6, t2, { enumerable: true, get: i5 }); - }, r5.r = function(e6) { - "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e6, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e6, "__esModule", { value: true }); - }, r5.t = function(e6, t2) { - if (1 & t2 && (e6 = r5(e6)), 8 & t2) return e6; - if (4 & t2 && "object" == typeof e6 && e6 && e6.__esModule) return e6; - var i5 = /* @__PURE__ */ Object.create(null); - if (r5.r(i5), Object.defineProperty(i5, "default", { enumerable: true, value: e6 }), 2 & t2 && "string" != typeof e6) for (var n3 in e6) r5.d(i5, n3, function(t3) { - return e6[t3]; - }.bind(null, n3)); - return i5; - }, r5.n = function(e6) { - var t2 = e6 && e6.__esModule ? function() { - return e6.default; - } : function() { - return e6; - }; - return r5.d(t2, "a", t2), t2; - }, r5.o = function(e6, t2) { - return Object.prototype.hasOwnProperty.call(e6, t2); - }, r5.p = "", r5(r5.s = 90); - })({ 17: function(e5, t, r5) { - "use strict"; - t.__esModule = true, t.default = void 0; - var i5 = r5(18), n3 = (function() { - function e6() { - } - return e6.getFirstMatch = function(e7, t2) { - var r6 = t2.match(e7); - return r6 && r6.length > 0 && r6[1] || ""; - }, e6.getSecondMatch = function(e7, t2) { - var r6 = t2.match(e7); - return r6 && r6.length > 1 && r6[2] || ""; - }, e6.matchAndReturnConst = function(e7, t2, r6) { - if (e7.test(t2)) return r6; - }, e6.getWindowsVersionName = function(e7) { - switch (e7) { - case "NT": - return "NT"; - case "XP": - return "XP"; - case "NT 5.0": - return "2000"; - case "NT 5.1": - return "XP"; - case "NT 5.2": - return "2003"; - case "NT 6.0": - return "Vista"; - case "NT 6.1": - return "7"; - case "NT 6.2": - return "8"; - case "NT 6.3": - return "8.1"; - case "NT 10.0": - return "10"; - default: - return; - } - }, e6.getMacOSVersionName = function(e7) { - var t2 = e7.split(".").splice(0, 2).map((function(e8) { - return parseInt(e8, 10) || 0; - })); - t2.push(0); - var r6 = t2[0], i6 = t2[1]; - if (10 === r6) switch (i6) { - case 5: - return "Leopard"; - case 6: - return "Snow Leopard"; - case 7: - return "Lion"; - case 8: - return "Mountain Lion"; - case 9: - return "Mavericks"; - case 10: - return "Yosemite"; - case 11: - return "El Capitan"; - case 12: - return "Sierra"; - case 13: - return "High Sierra"; - case 14: - return "Mojave"; - case 15: - return "Catalina"; - default: - return; - } - switch (r6) { - case 11: - return "Big Sur"; - case 12: - return "Monterey"; - case 13: - return "Ventura"; - case 14: - return "Sonoma"; - case 15: - return "Sequoia"; - default: - return; - } - }, e6.getAndroidVersionName = function(e7) { - var t2 = e7.split(".").splice(0, 2).map((function(e8) { - return parseInt(e8, 10) || 0; - })); - if (t2.push(0), !(1 === t2[0] && t2[1] < 5)) return 1 === t2[0] && t2[1] < 6 ? "Cupcake" : 1 === t2[0] && t2[1] >= 6 ? "Donut" : 2 === t2[0] && t2[1] < 2 ? "Eclair" : 2 === t2[0] && 2 === t2[1] ? "Froyo" : 2 === t2[0] && t2[1] > 2 ? "Gingerbread" : 3 === t2[0] ? "Honeycomb" : 4 === t2[0] && t2[1] < 1 ? "Ice Cream Sandwich" : 4 === t2[0] && t2[1] < 4 ? "Jelly Bean" : 4 === t2[0] && t2[1] >= 4 ? "KitKat" : 5 === t2[0] ? "Lollipop" : 6 === t2[0] ? "Marshmallow" : 7 === t2[0] ? "Nougat" : 8 === t2[0] ? "Oreo" : 9 === t2[0] ? "Pie" : void 0; - }, e6.getVersionPrecision = function(e7) { - return e7.split(".").length; - }, e6.compareVersions = function(t2, r6, i6) { - void 0 === i6 && (i6 = false); - var n4 = e6.getVersionPrecision(t2), a5 = e6.getVersionPrecision(r6), o2 = Math.max(n4, a5), s = 0, u = e6.map([t2, r6], (function(t3) { - var r7 = o2 - e6.getVersionPrecision(t3), i7 = t3 + new Array(r7 + 1).join(".0"); - return e6.map(i7.split("."), (function(e7) { - return new Array(20 - e7.length).join("0") + e7; - })).reverse(); - })); - for (i6 && (s = o2 - Math.min(n4, a5)), o2 -= 1; o2 >= s; ) { - if (u[0][o2] > u[1][o2]) return 1; - if (u[0][o2] === u[1][o2]) { - if (o2 === s) return 0; - o2 -= 1; - } else if (u[0][o2] < u[1][o2]) return -1; - } - }, e6.map = function(e7, t2) { - var r6, i6 = []; - if (Array.prototype.map) return Array.prototype.map.call(e7, t2); - for (r6 = 0; r6 < e7.length; r6 += 1) i6.push(t2(e7[r6])); - return i6; - }, e6.find = function(e7, t2) { - var r6, i6; - if (Array.prototype.find) return Array.prototype.find.call(e7, t2); - for (r6 = 0, i6 = e7.length; r6 < i6; r6 += 1) { - var n4 = e7[r6]; - if (t2(n4, r6)) return n4; - } - }, e6.assign = function(e7) { - for (var t2, r6, i6 = e7, n4 = arguments.length, a5 = new Array(n4 > 1 ? n4 - 1 : 0), o2 = 1; o2 < n4; o2++) a5[o2 - 1] = arguments[o2]; - if (Object.assign) return Object.assign.apply(Object, [e7].concat(a5)); - var s = function() { - var e8 = a5[t2]; - "object" == typeof e8 && null !== e8 && Object.keys(e8).forEach((function(t3) { - i6[t3] = e8[t3]; - })); - }; - for (t2 = 0, r6 = a5.length; t2 < r6; t2 += 1) s(); - return e7; - }, e6.getBrowserAlias = function(e7) { - return i5.BROWSER_ALIASES_MAP[e7]; - }, e6.getBrowserTypeByAlias = function(e7) { - return i5.BROWSER_MAP[e7] || ""; - }, e6; - })(); - t.default = n3, e5.exports = t.default; - }, 18: function(e5, t, r5) { - "use strict"; - t.__esModule = true, t.ENGINE_MAP = t.OS_MAP = t.PLATFORMS_MAP = t.BROWSER_MAP = t.BROWSER_ALIASES_MAP = void 0; - t.BROWSER_ALIASES_MAP = { AmazonBot: "amazonbot", "Amazon Silk": "amazon_silk", "Android Browser": "android", BaiduSpider: "baiduspider", Bada: "bada", BingCrawler: "bingcrawler", Brave: "brave", BlackBerry: "blackberry", "ChatGPT-User": "chatgpt_user", Chrome: "chrome", ClaudeBot: "claudebot", Chromium: "chromium", Diffbot: "diffbot", DuckDuckBot: "duckduckbot", DuckDuckGo: "duckduckgo", Electron: "electron", Epiphany: "epiphany", FacebookExternalHit: "facebookexternalhit", Firefox: "firefox", Focus: "focus", Generic: "generic", "Google Search": "google_search", Googlebot: "googlebot", GPTBot: "gptbot", "Internet Explorer": "ie", InternetArchiveCrawler: "internetarchivecrawler", "K-Meleon": "k_meleon", LibreWolf: "librewolf", Linespider: "linespider", Maxthon: "maxthon", "Meta-ExternalAds": "meta_externalads", "Meta-ExternalAgent": "meta_externalagent", "Meta-ExternalFetcher": "meta_externalfetcher", "Meta-WebIndexer": "meta_webindexer", "Microsoft Edge": "edge", "MZ Browser": "mz", "NAVER Whale Browser": "naver", "OAI-SearchBot": "oai_searchbot", Omgilibot: "omgilibot", Opera: "opera", "Opera Coast": "opera_coast", "Pale Moon": "pale_moon", PerplexityBot: "perplexitybot", "Perplexity-User": "perplexity_user", PhantomJS: "phantomjs", PingdomBot: "pingdombot", Puffin: "puffin", QQ: "qq", QQLite: "qqlite", QupZilla: "qupzilla", Roku: "roku", Safari: "safari", Sailfish: "sailfish", "Samsung Internet for Android": "samsung_internet", SlackBot: "slackbot", SeaMonkey: "seamonkey", Sleipnir: "sleipnir", "Sogou Browser": "sogou", Swing: "swing", Tizen: "tizen", "UC Browser": "uc", Vivaldi: "vivaldi", "WebOS Browser": "webos", WeChat: "wechat", YahooSlurp: "yahooslurp", "Yandex Browser": "yandex", YandexBot: "yandexbot", YouBot: "youbot" }; - t.BROWSER_MAP = { amazonbot: "AmazonBot", amazon_silk: "Amazon Silk", android: "Android Browser", baiduspider: "BaiduSpider", bada: "Bada", bingcrawler: "BingCrawler", blackberry: "BlackBerry", brave: "Brave", chatgpt_user: "ChatGPT-User", chrome: "Chrome", claudebot: "ClaudeBot", chromium: "Chromium", diffbot: "Diffbot", duckduckbot: "DuckDuckBot", duckduckgo: "DuckDuckGo", edge: "Microsoft Edge", electron: "Electron", epiphany: "Epiphany", facebookexternalhit: "FacebookExternalHit", firefox: "Firefox", focus: "Focus", generic: "Generic", google_search: "Google Search", googlebot: "Googlebot", gptbot: "GPTBot", ie: "Internet Explorer", internetarchivecrawler: "InternetArchiveCrawler", k_meleon: "K-Meleon", librewolf: "LibreWolf", linespider: "Linespider", maxthon: "Maxthon", meta_externalads: "Meta-ExternalAds", meta_externalagent: "Meta-ExternalAgent", meta_externalfetcher: "Meta-ExternalFetcher", meta_webindexer: "Meta-WebIndexer", mz: "MZ Browser", naver: "NAVER Whale Browser", oai_searchbot: "OAI-SearchBot", omgilibot: "Omgilibot", opera: "Opera", opera_coast: "Opera Coast", pale_moon: "Pale Moon", perplexitybot: "PerplexityBot", perplexity_user: "Perplexity-User", phantomjs: "PhantomJS", pingdombot: "PingdomBot", puffin: "Puffin", qq: "QQ Browser", qqlite: "QQ Browser Lite", qupzilla: "QupZilla", roku: "Roku", safari: "Safari", sailfish: "Sailfish", samsung_internet: "Samsung Internet for Android", seamonkey: "SeaMonkey", slackbot: "SlackBot", sleipnir: "Sleipnir", sogou: "Sogou Browser", swing: "Swing", tizen: "Tizen", uc: "UC Browser", vivaldi: "Vivaldi", webos: "WebOS Browser", wechat: "WeChat", yahooslurp: "YahooSlurp", yandex: "Yandex Browser", yandexbot: "YandexBot", youbot: "YouBot" }; - t.PLATFORMS_MAP = { bot: "bot", desktop: "desktop", mobile: "mobile", tablet: "tablet", tv: "tv" }; - t.OS_MAP = { Android: "Android", Bada: "Bada", BlackBerry: "BlackBerry", ChromeOS: "Chrome OS", HarmonyOS: "HarmonyOS", iOS: "iOS", Linux: "Linux", MacOS: "macOS", PlayStation4: "PlayStation 4", Roku: "Roku", Tizen: "Tizen", WebOS: "WebOS", Windows: "Windows", WindowsPhone: "Windows Phone" }; - t.ENGINE_MAP = { Blink: "Blink", EdgeHTML: "EdgeHTML", Gecko: "Gecko", Presto: "Presto", Trident: "Trident", WebKit: "WebKit" }; - }, 90: function(e5, t, r5) { - "use strict"; - t.__esModule = true, t.default = void 0; - var i5, n3 = (i5 = r5(91)) && i5.__esModule ? i5 : { default: i5 }, a5 = r5(18); - function o2(e6, t2) { - for (var r6 = 0; r6 < t2.length; r6++) { - var i6 = t2[r6]; - i6.enumerable = i6.enumerable || false, i6.configurable = true, "value" in i6 && (i6.writable = true), Object.defineProperty(e6, i6.key, i6); - } - } - var s = (function() { - function e6() { - } - var t2, r6, i6; - return e6.getParser = function(e7, t3, r7) { - if (void 0 === t3 && (t3 = false), void 0 === r7 && (r7 = null), "string" != typeof e7) throw new Error("UserAgent should be a string"); - return new n3.default(e7, t3, r7); - }, e6.parse = function(e7, t3) { - return void 0 === t3 && (t3 = null), new n3.default(e7, t3).getResult(); - }, t2 = e6, i6 = [{ key: "BROWSER_MAP", get: function() { - return a5.BROWSER_MAP; - } }, { key: "ENGINE_MAP", get: function() { - return a5.ENGINE_MAP; - } }, { key: "OS_MAP", get: function() { - return a5.OS_MAP; - } }, { key: "PLATFORMS_MAP", get: function() { - return a5.PLATFORMS_MAP; - } }], (r6 = null) && o2(t2.prototype, r6), i6 && o2(t2, i6), e6; - })(); - t.default = s, e5.exports = t.default; - }, 91: function(e5, t, r5) { - "use strict"; - t.__esModule = true, t.default = void 0; - var i5 = u(r5(92)), n3 = u(r5(93)), a5 = u(r5(94)), o2 = u(r5(95)), s = u(r5(17)); - function u(e6) { - return e6 && e6.__esModule ? e6 : { default: e6 }; - } - var d5 = (function() { - function e6(e7, t3, r6) { - if (void 0 === t3 && (t3 = false), void 0 === r6 && (r6 = null), null == e7 || "" === e7) throw new Error("UserAgent parameter can't be empty"); - this._ua = e7; - var i6 = false; - "boolean" == typeof t3 ? (i6 = t3, this._hints = r6) : this._hints = null != t3 && "object" == typeof t3 ? t3 : null, this.parsedResult = {}, true !== i6 && this.parse(); - } - var t2 = e6.prototype; - return t2.getHints = function() { - return this._hints; - }, t2.hasBrand = function(e7) { - if (!this._hints || !Array.isArray(this._hints.brands)) return false; - var t3 = e7.toLowerCase(); - return this._hints.brands.some((function(e8) { - return e8.brand && e8.brand.toLowerCase() === t3; - })); - }, t2.getBrandVersion = function(e7) { - if (this._hints && Array.isArray(this._hints.brands)) { - var t3 = e7.toLowerCase(), r6 = this._hints.brands.find((function(e8) { - return e8.brand && e8.brand.toLowerCase() === t3; - })); - return r6 ? r6.version : void 0; - } - }, t2.getUA = function() { - return this._ua; - }, t2.test = function(e7) { - return e7.test(this._ua); - }, t2.parseBrowser = function() { - var e7 = this; - this.parsedResult.browser = {}; - var t3 = s.default.find(i5.default, (function(t4) { - if ("function" == typeof t4.test) return t4.test(e7); - if (Array.isArray(t4.test)) return t4.test.some((function(t5) { - return e7.test(t5); - })); - throw new Error("Browser's test function is not valid"); - })); - return t3 && (this.parsedResult.browser = t3.describe(this.getUA(), this)), this.parsedResult.browser; - }, t2.getBrowser = function() { - return this.parsedResult.browser ? this.parsedResult.browser : this.parseBrowser(); - }, t2.getBrowserName = function(e7) { - return e7 ? String(this.getBrowser().name).toLowerCase() || "" : this.getBrowser().name || ""; - }, t2.getBrowserVersion = function() { - return this.getBrowser().version; - }, t2.getOS = function() { - return this.parsedResult.os ? this.parsedResult.os : this.parseOS(); - }, t2.parseOS = function() { - var e7 = this; - this.parsedResult.os = {}; - var t3 = s.default.find(n3.default, (function(t4) { - if ("function" == typeof t4.test) return t4.test(e7); - if (Array.isArray(t4.test)) return t4.test.some((function(t5) { - return e7.test(t5); - })); - throw new Error("Browser's test function is not valid"); - })); - return t3 && (this.parsedResult.os = t3.describe(this.getUA())), this.parsedResult.os; - }, t2.getOSName = function(e7) { - var t3 = this.getOS().name; - return e7 ? String(t3).toLowerCase() || "" : t3 || ""; - }, t2.getOSVersion = function() { - return this.getOS().version; - }, t2.getPlatform = function() { - return this.parsedResult.platform ? this.parsedResult.platform : this.parsePlatform(); - }, t2.getPlatformType = function(e7) { - void 0 === e7 && (e7 = false); - var t3 = this.getPlatform().type; - return e7 ? String(t3).toLowerCase() || "" : t3 || ""; - }, t2.parsePlatform = function() { - var e7 = this; - this.parsedResult.platform = {}; - var t3 = s.default.find(a5.default, (function(t4) { - if ("function" == typeof t4.test) return t4.test(e7); - if (Array.isArray(t4.test)) return t4.test.some((function(t5) { - return e7.test(t5); - })); - throw new Error("Browser's test function is not valid"); - })); - return t3 && (this.parsedResult.platform = t3.describe(this.getUA())), this.parsedResult.platform; - }, t2.getEngine = function() { - return this.parsedResult.engine ? this.parsedResult.engine : this.parseEngine(); - }, t2.getEngineName = function(e7) { - return e7 ? String(this.getEngine().name).toLowerCase() || "" : this.getEngine().name || ""; - }, t2.parseEngine = function() { - var e7 = this; - this.parsedResult.engine = {}; - var t3 = s.default.find(o2.default, (function(t4) { - if ("function" == typeof t4.test) return t4.test(e7); - if (Array.isArray(t4.test)) return t4.test.some((function(t5) { - return e7.test(t5); - })); - throw new Error("Browser's test function is not valid"); - })); - return t3 && (this.parsedResult.engine = t3.describe(this.getUA())), this.parsedResult.engine; - }, t2.parse = function() { - return this.parseBrowser(), this.parseOS(), this.parsePlatform(), this.parseEngine(), this; - }, t2.getResult = function() { - return s.default.assign({}, this.parsedResult); - }, t2.satisfies = function(e7) { - var t3 = this, r6 = {}, i6 = 0, n4 = {}, a6 = 0; - if (Object.keys(e7).forEach((function(t4) { - var o4 = e7[t4]; - "string" == typeof o4 ? (n4[t4] = o4, a6 += 1) : "object" == typeof o4 && (r6[t4] = o4, i6 += 1); - })), i6 > 0) { - var o3 = Object.keys(r6), u2 = s.default.find(o3, (function(e8) { - return t3.isOS(e8); - })); - if (u2) { - var d6 = this.satisfies(r6[u2]); - if (void 0 !== d6) return d6; - } - var c5 = s.default.find(o3, (function(e8) { - return t3.isPlatform(e8); - })); - if (c5) { - var f5 = this.satisfies(r6[c5]); - if (void 0 !== f5) return f5; - } - } - if (a6 > 0) { - var l3 = Object.keys(n4), b6 = s.default.find(l3, (function(e8) { - return t3.isBrowser(e8, true); - })); - if (void 0 !== b6) return this.compareVersion(n4[b6]); - } - }, t2.isBrowser = function(e7, t3) { - void 0 === t3 && (t3 = false); - var r6 = this.getBrowserName().toLowerCase(), i6 = e7.toLowerCase(), n4 = s.default.getBrowserTypeByAlias(i6); - return t3 && n4 && (i6 = n4.toLowerCase()), i6 === r6; - }, t2.compareVersion = function(e7) { - var t3 = [0], r6 = e7, i6 = false, n4 = this.getBrowserVersion(); - if ("string" == typeof n4) return ">" === e7[0] || "<" === e7[0] ? (r6 = e7.substr(1), "=" === e7[1] ? (i6 = true, r6 = e7.substr(2)) : t3 = [], ">" === e7[0] ? t3.push(1) : t3.push(-1)) : "=" === e7[0] ? r6 = e7.substr(1) : "~" === e7[0] && (i6 = true, r6 = e7.substr(1)), t3.indexOf(s.default.compareVersions(n4, r6, i6)) > -1; - }, t2.isOS = function(e7) { - return this.getOSName(true) === String(e7).toLowerCase(); - }, t2.isPlatform = function(e7) { - return this.getPlatformType(true) === String(e7).toLowerCase(); - }, t2.isEngine = function(e7) { - return this.getEngineName(true) === String(e7).toLowerCase(); - }, t2.is = function(e7, t3) { - return void 0 === t3 && (t3 = false), this.isBrowser(e7, t3) || this.isOS(e7) || this.isPlatform(e7); - }, t2.some = function(e7) { - var t3 = this; - return void 0 === e7 && (e7 = []), e7.some((function(e8) { - return t3.is(e8); - })); - }, e6; - })(); - t.default = d5, e5.exports = t.default; - }, 92: function(e5, t, r5) { - "use strict"; - t.__esModule = true, t.default = void 0; - var i5, n3 = (i5 = r5(17)) && i5.__esModule ? i5 : { default: i5 }; - var a5 = /version\/(\d+(\.?_?\d+)+)/i, o2 = [{ test: [/gptbot/i], describe: function(e6) { - var t2 = { name: "GPTBot" }, r6 = n3.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/chatgpt-user/i], describe: function(e6) { - var t2 = { name: "ChatGPT-User" }, r6 = n3.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/oai-searchbot/i], describe: function(e6) { - var t2 = { name: "OAI-SearchBot" }, r6 = n3.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/claudebot/i, /claude-web/i, /claude-user/i, /claude-searchbot/i], describe: function(e6) { - var t2 = { name: "ClaudeBot" }, r6 = n3.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/omgilibot/i, /webzio-extended/i], describe: function(e6) { - var t2 = { name: "Omgilibot" }, r6 = n3.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/diffbot/i], describe: function(e6) { - var t2 = { name: "Diffbot" }, r6 = n3.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/perplexitybot/i], describe: function(e6) { - var t2 = { name: "PerplexityBot" }, r6 = n3.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/perplexity-user/i], describe: function(e6) { - var t2 = { name: "Perplexity-User" }, r6 = n3.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/youbot/i], describe: function(e6) { - var t2 = { name: "YouBot" }, r6 = n3.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/meta-webindexer/i], describe: function(e6) { - var t2 = { name: "Meta-WebIndexer" }, r6 = n3.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/meta-externalads/i], describe: function(e6) { - var t2 = { name: "Meta-ExternalAds" }, r6 = n3.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/meta-externalagent/i], describe: function(e6) { - var t2 = { name: "Meta-ExternalAgent" }, r6 = n3.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/meta-externalfetcher/i], describe: function(e6) { - var t2 = { name: "Meta-ExternalFetcher" }, r6 = n3.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/googlebot/i], describe: function(e6) { - var t2 = { name: "Googlebot" }, r6 = n3.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/linespider/i], describe: function(e6) { - var t2 = { name: "Linespider" }, r6 = n3.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/amazonbot/i], describe: function(e6) { - var t2 = { name: "AmazonBot" }, r6 = n3.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/bingbot/i], describe: function(e6) { - var t2 = { name: "BingCrawler" }, r6 = n3.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/baiduspider/i], describe: function(e6) { - var t2 = { name: "BaiduSpider" }, r6 = n3.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/duckduckbot/i], describe: function(e6) { - var t2 = { name: "DuckDuckBot" }, r6 = n3.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/ia_archiver/i], describe: function(e6) { - var t2 = { name: "InternetArchiveCrawler" }, r6 = n3.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/facebookexternalhit/i, /facebookcatalog/i], describe: function() { - return { name: "FacebookExternalHit" }; - } }, { test: [/slackbot/i, /slack-imgProxy/i], describe: function(e6) { - var t2 = { name: "SlackBot" }, r6 = n3.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/yahoo!?[\s/]*slurp/i], describe: function() { - return { name: "YahooSlurp" }; - } }, { test: [/yandexbot/i, /yandexmobilebot/i], describe: function() { - return { name: "YandexBot" }; - } }, { test: [/pingdom/i], describe: function() { - return { name: "PingdomBot" }; - } }, { test: [/opera/i], describe: function(e6) { - var t2 = { name: "Opera" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/opr\/|opios/i], describe: function(e6) { - var t2 = { name: "Opera" }, r6 = n3.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/SamsungBrowser/i], describe: function(e6) { - var t2 = { name: "Samsung Internet for Android" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/Whale/i], describe: function(e6) { - var t2 = { name: "NAVER Whale Browser" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/PaleMoon/i], describe: function(e6) { - var t2 = { name: "Pale Moon" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/MZBrowser/i], describe: function(e6) { - var t2 = { name: "MZ Browser" }, r6 = n3.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/focus/i], describe: function(e6) { - var t2 = { name: "Focus" }, r6 = n3.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/swing/i], describe: function(e6) { - var t2 = { name: "Swing" }, r6 = n3.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/coast/i], describe: function(e6) { - var t2 = { name: "Opera Coast" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/opt\/\d+(?:.?_?\d+)+/i], describe: function(e6) { - var t2 = { name: "Opera Touch" }, r6 = n3.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/yabrowser/i], describe: function(e6) { - var t2 = { name: "Yandex Browser" }, r6 = n3.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/ucbrowser/i], describe: function(e6) { - var t2 = { name: "UC Browser" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/Maxthon|mxios/i], describe: function(e6) { - var t2 = { name: "Maxthon" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/epiphany/i], describe: function(e6) { - var t2 = { name: "Epiphany" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/puffin/i], describe: function(e6) { - var t2 = { name: "Puffin" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/sleipnir/i], describe: function(e6) { - var t2 = { name: "Sleipnir" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/k-meleon/i], describe: function(e6) { - var t2 = { name: "K-Meleon" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/micromessenger/i], describe: function(e6) { - var t2 = { name: "WeChat" }, r6 = n3.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/qqbrowser/i], describe: function(e6) { - var t2 = { name: /qqbrowserlite/i.test(e6) ? "QQ Browser Lite" : "QQ Browser" }, r6 = n3.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/msie|trident/i], describe: function(e6) { - var t2 = { name: "Internet Explorer" }, r6 = n3.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/\sedg\//i], describe: function(e6) { - var t2 = { name: "Microsoft Edge" }, r6 = n3.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/edg([ea]|ios)/i], describe: function(e6) { - var t2 = { name: "Microsoft Edge" }, r6 = n3.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/vivaldi/i], describe: function(e6) { - var t2 = { name: "Vivaldi" }, r6 = n3.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/seamonkey/i], describe: function(e6) { - var t2 = { name: "SeaMonkey" }, r6 = n3.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/sailfish/i], describe: function(e6) { - var t2 = { name: "Sailfish" }, r6 = n3.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/silk/i], describe: function(e6) { - var t2 = { name: "Amazon Silk" }, r6 = n3.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/phantom/i], describe: function(e6) { - var t2 = { name: "PhantomJS" }, r6 = n3.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/slimerjs/i], describe: function(e6) { - var t2 = { name: "SlimerJS" }, r6 = n3.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/blackberry|\bbb\d+/i, /rim\stablet/i], describe: function(e6) { - var t2 = { name: "BlackBerry" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/(web|hpw)[o0]s/i], describe: function(e6) { - var t2 = { name: "WebOS Browser" }, r6 = n3.default.getFirstMatch(a5, e6) || n3.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/bada/i], describe: function(e6) { - var t2 = { name: "Bada" }, r6 = n3.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/tizen/i], describe: function(e6) { - var t2 = { name: "Tizen" }, r6 = n3.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/qupzilla/i], describe: function(e6) { - var t2 = { name: "QupZilla" }, r6 = n3.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/librewolf/i], describe: function(e6) { - var t2 = { name: "LibreWolf" }, r6 = n3.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/firefox|iceweasel|fxios/i], describe: function(e6) { - var t2 = { name: "Firefox" }, r6 = n3.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/electron/i], describe: function(e6) { - var t2 = { name: "Electron" }, r6 = n3.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/sogoumobilebrowser/i, /metasr/i, /se 2\.[x]/i], describe: function(e6) { - var t2 = { name: "Sogou Browser" }, r6 = n3.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i, e6), i6 = n3.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, e6), a6 = n3.default.getFirstMatch(/se ([\d.]+)x/i, e6), o3 = r6 || i6 || a6; - return o3 && (t2.version = o3), t2; - } }, { test: [/MiuiBrowser/i], describe: function(e6) { - var t2 = { name: "Miui" }, r6 = n3.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: function(e6) { - return !!e6.hasBrand("DuckDuckGo") || e6.test(/\sDdg\/[\d.]+$/i); - }, describe: function(e6, t2) { - var r6 = { name: "DuckDuckGo" }; - if (t2) { - var i6 = t2.getBrandVersion("DuckDuckGo"); - if (i6) return r6.version = i6, r6; - } - var a6 = n3.default.getFirstMatch(/\sDdg\/([\d.]+)$/i, e6); - return a6 && (r6.version = a6), r6; - } }, { test: function(e6) { - return e6.hasBrand("Brave"); - }, describe: function(e6, t2) { - var r6 = { name: "Brave" }; - if (t2) { - var i6 = t2.getBrandVersion("Brave"); - if (i6) return r6.version = i6, r6; - } - return r6; - } }, { test: [/chromium/i], describe: function(e6) { - var t2 = { name: "Chromium" }, r6 = n3.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, e6) || n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/chrome|crios|crmo/i], describe: function(e6) { - var t2 = { name: "Chrome" }, r6 = n3.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/GSA/i], describe: function(e6) { - var t2 = { name: "Google Search" }, r6 = n3.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: function(e6) { - var t2 = !e6.test(/like android/i), r6 = e6.test(/android/i); - return t2 && r6; - }, describe: function(e6) { - var t2 = { name: "Android Browser" }, r6 = n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/playstation 4/i], describe: function(e6) { - var t2 = { name: "PlayStation 4" }, r6 = n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/safari|applewebkit/i], describe: function(e6) { - var t2 = { name: "Safari" }, r6 = n3.default.getFirstMatch(a5, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/.*/i], describe: function(e6) { - var t2 = -1 !== e6.search("\\(") ? /^(.*)\/(.*)[ \t]\((.*)/ : /^(.*)\/(.*) /; - return { name: n3.default.getFirstMatch(t2, e6), version: n3.default.getSecondMatch(t2, e6) }; - } }]; - t.default = o2, e5.exports = t.default; - }, 93: function(e5, t, r5) { - "use strict"; - t.__esModule = true, t.default = void 0; - var i5, n3 = (i5 = r5(17)) && i5.__esModule ? i5 : { default: i5 }, a5 = r5(18); - var o2 = [{ test: [/Roku\/DVP/], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i, e6); - return { name: a5.OS_MAP.Roku, version: t2 }; - } }, { test: [/windows phone/i], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, e6); - return { name: a5.OS_MAP.WindowsPhone, version: t2 }; - } }, { test: [/windows /i], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i, e6), r6 = n3.default.getWindowsVersionName(t2); - return { name: a5.OS_MAP.Windows, version: t2, versionName: r6 }; - } }, { test: [/Macintosh(.*?) FxiOS(.*?)\//], describe: function(e6) { - var t2 = { name: a5.OS_MAP.iOS }, r6 = n3.default.getSecondMatch(/(Version\/)(\d[\d.]+)/, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/macintosh/i], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, e6).replace(/[_\s]/g, "."), r6 = n3.default.getMacOSVersionName(t2), i6 = { name: a5.OS_MAP.MacOS, version: t2 }; - return r6 && (i6.versionName = r6), i6; - } }, { test: [/(ipod|iphone|ipad)/i], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i, e6).replace(/[_\s]/g, "."); - return { name: a5.OS_MAP.iOS, version: t2 }; - } }, { test: [/OpenHarmony/i], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i, e6); - return { name: a5.OS_MAP.HarmonyOS, version: t2 }; - } }, { test: function(e6) { - var t2 = !e6.test(/like android/i), r6 = e6.test(/android/i); - return t2 && r6; - }, describe: function(e6) { - var t2 = n3.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, e6), r6 = n3.default.getAndroidVersionName(t2), i6 = { name: a5.OS_MAP.Android, version: t2 }; - return r6 && (i6.versionName = r6), i6; - } }, { test: [/(web|hpw)[o0]s/i], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i, e6), r6 = { name: a5.OS_MAP.WebOS }; - return t2 && t2.length && (r6.version = t2), r6; - } }, { test: [/blackberry|\bbb\d+/i, /rim\stablet/i], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i, e6) || n3.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, e6) || n3.default.getFirstMatch(/\bbb(\d+)/i, e6); - return { name: a5.OS_MAP.BlackBerry, version: t2 }; - } }, { test: [/bada/i], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, e6); - return { name: a5.OS_MAP.Bada, version: t2 }; - } }, { test: [/tizen/i], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, e6); - return { name: a5.OS_MAP.Tizen, version: t2 }; - } }, { test: [/linux/i], describe: function() { - return { name: a5.OS_MAP.Linux }; - } }, { test: [/CrOS/], describe: function() { - return { name: a5.OS_MAP.ChromeOS }; - } }, { test: [/PlayStation 4/], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, e6); - return { name: a5.OS_MAP.PlayStation4, version: t2 }; - } }]; - t.default = o2, e5.exports = t.default; - }, 94: function(e5, t, r5) { - "use strict"; - t.__esModule = true, t.default = void 0; - var i5, n3 = (i5 = r5(17)) && i5.__esModule ? i5 : { default: i5 }, a5 = r5(18); - var o2 = [{ test: [/googlebot/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Google" }; - } }, { test: [/linespider/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Line" }; - } }, { test: [/amazonbot/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Amazon" }; - } }, { test: [/gptbot/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "OpenAI" }; - } }, { test: [/chatgpt-user/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "OpenAI" }; - } }, { test: [/oai-searchbot/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "OpenAI" }; - } }, { test: [/baiduspider/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Baidu" }; - } }, { test: [/bingbot/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Bing" }; - } }, { test: [/duckduckbot/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "DuckDuckGo" }; - } }, { test: [/claudebot/i, /claude-web/i, /claude-user/i, /claude-searchbot/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Anthropic" }; - } }, { test: [/omgilibot/i, /webzio-extended/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Webz.io" }; - } }, { test: [/diffbot/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Diffbot" }; - } }, { test: [/perplexitybot/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Perplexity AI" }; - } }, { test: [/perplexity-user/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Perplexity AI" }; - } }, { test: [/youbot/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "You.com" }; - } }, { test: [/ia_archiver/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Internet Archive" }; - } }, { test: [/meta-webindexer/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Meta" }; - } }, { test: [/meta-externalads/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Meta" }; - } }, { test: [/meta-externalagent/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Meta" }; - } }, { test: [/meta-externalfetcher/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Meta" }; - } }, { test: [/facebookexternalhit/i, /facebookcatalog/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Meta" }; - } }, { test: [/slackbot/i, /slack-imgProxy/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Slack" }; - } }, { test: [/yahoo/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Yahoo" }; - } }, { test: [/yandexbot/i, /yandexmobilebot/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Yandex" }; - } }, { test: [/pingdom/i], describe: function() { - return { type: a5.PLATFORMS_MAP.bot, vendor: "Pingdom" }; - } }, { test: [/huawei/i], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/(can-l01)/i, e6) && "Nova", r6 = { type: a5.PLATFORMS_MAP.mobile, vendor: "Huawei" }; - return t2 && (r6.model = t2), r6; - } }, { test: [/nexus\s*(?:7|8|9|10).*/i], describe: function() { - return { type: a5.PLATFORMS_MAP.tablet, vendor: "Nexus" }; - } }, { test: [/ipad/i], describe: function() { - return { type: a5.PLATFORMS_MAP.tablet, vendor: "Apple", model: "iPad" }; - } }, { test: [/Macintosh(.*?) FxiOS(.*?)\//], describe: function() { - return { type: a5.PLATFORMS_MAP.tablet, vendor: "Apple", model: "iPad" }; - } }, { test: [/kftt build/i], describe: function() { - return { type: a5.PLATFORMS_MAP.tablet, vendor: "Amazon", model: "Kindle Fire HD 7" }; - } }, { test: [/silk/i], describe: function() { - return { type: a5.PLATFORMS_MAP.tablet, vendor: "Amazon" }; - } }, { test: [/tablet(?! pc)/i], describe: function() { - return { type: a5.PLATFORMS_MAP.tablet }; - } }, { test: function(e6) { - var t2 = e6.test(/ipod|iphone/i), r6 = e6.test(/like (ipod|iphone)/i); - return t2 && !r6; - }, describe: function(e6) { - var t2 = n3.default.getFirstMatch(/(ipod|iphone)/i, e6); - return { type: a5.PLATFORMS_MAP.mobile, vendor: "Apple", model: t2 }; - } }, { test: [/nexus\s*[0-6].*/i, /galaxy nexus/i], describe: function() { - return { type: a5.PLATFORMS_MAP.mobile, vendor: "Nexus" }; - } }, { test: [/Nokia/i], describe: function(e6) { - var t2 = n3.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i, e6), r6 = { type: a5.PLATFORMS_MAP.mobile, vendor: "Nokia" }; - return t2 && (r6.model = t2), r6; - } }, { test: [/[^-]mobi/i], describe: function() { - return { type: a5.PLATFORMS_MAP.mobile }; - } }, { test: function(e6) { - return "blackberry" === e6.getBrowserName(true); - }, describe: function() { - return { type: a5.PLATFORMS_MAP.mobile, vendor: "BlackBerry" }; - } }, { test: function(e6) { - return "bada" === e6.getBrowserName(true); - }, describe: function() { - return { type: a5.PLATFORMS_MAP.mobile }; - } }, { test: function(e6) { - return "windows phone" === e6.getBrowserName(); - }, describe: function() { - return { type: a5.PLATFORMS_MAP.mobile, vendor: "Microsoft" }; - } }, { test: function(e6) { - var t2 = Number(String(e6.getOSVersion()).split(".")[0]); - return "android" === e6.getOSName(true) && t2 >= 3; - }, describe: function() { - return { type: a5.PLATFORMS_MAP.tablet }; - } }, { test: function(e6) { - return "android" === e6.getOSName(true); - }, describe: function() { - return { type: a5.PLATFORMS_MAP.mobile }; - } }, { test: [/smart-?tv|smarttv/i], describe: function() { - return { type: a5.PLATFORMS_MAP.tv }; - } }, { test: [/netcast/i], describe: function() { - return { type: a5.PLATFORMS_MAP.tv }; - } }, { test: function(e6) { - return "macos" === e6.getOSName(true); - }, describe: function() { - return { type: a5.PLATFORMS_MAP.desktop, vendor: "Apple" }; - } }, { test: function(e6) { - return "windows" === e6.getOSName(true); - }, describe: function() { - return { type: a5.PLATFORMS_MAP.desktop }; - } }, { test: function(e6) { - return "linux" === e6.getOSName(true); - }, describe: function() { - return { type: a5.PLATFORMS_MAP.desktop }; - } }, { test: function(e6) { - return "playstation 4" === e6.getOSName(true); - }, describe: function() { - return { type: a5.PLATFORMS_MAP.tv }; - } }, { test: function(e6) { - return "roku" === e6.getOSName(true); - }, describe: function() { - return { type: a5.PLATFORMS_MAP.tv }; - } }]; - t.default = o2, e5.exports = t.default; - }, 95: function(e5, t, r5) { - "use strict"; - t.__esModule = true, t.default = void 0; - var i5, n3 = (i5 = r5(17)) && i5.__esModule ? i5 : { default: i5 }, a5 = r5(18); - var o2 = [{ test: function(e6) { - return "microsoft edge" === e6.getBrowserName(true); - }, describe: function(e6) { - if (/\sedg\//i.test(e6)) return { name: a5.ENGINE_MAP.Blink }; - var t2 = n3.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, e6); - return { name: a5.ENGINE_MAP.EdgeHTML, version: t2 }; - } }, { test: [/trident/i], describe: function(e6) { - var t2 = { name: a5.ENGINE_MAP.Trident }, r6 = n3.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: function(e6) { - return e6.test(/presto/i); - }, describe: function(e6) { - var t2 = { name: a5.ENGINE_MAP.Presto }, r6 = n3.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: function(e6) { - var t2 = e6.test(/gecko/i), r6 = e6.test(/like gecko/i); - return t2 && !r6; - }, describe: function(e6) { - var t2 = { name: a5.ENGINE_MAP.Gecko }, r6 = n3.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }, { test: [/(apple)?webkit\/537\.36/i], describe: function() { - return { name: a5.ENGINE_MAP.Blink }; - } }, { test: [/(apple)?webkit/i], describe: function(e6) { - var t2 = { name: a5.ENGINE_MAP.WebKit }, r6 = n3.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i, e6); - return r6 && (t2.version = r6), t2; - } }]; - t.default = o2, e5.exports = t.default; - } }); - })); - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.js -var createUserAgentStringParsingProvider; -var init_createUserAgentStringParsingProvider = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.js"() { - createUserAgentStringParsingProvider = ({ serviceId, clientVersion }) => async (config) => { - const module2 = await Promise.resolve().then(() => __toESM(require_es5())); - const parse = module2.parse ?? module2.default.parse ?? (() => ""); - const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ? parse(window.navigator.userAgent) : void 0; - const sections = [ - ["aws-sdk-js", clientVersion], - ["ua", "2.1"], - [`os/${parsedUA?.os?.name || "other"}`, parsedUA?.os?.version], - ["lang/js"], - ["md/browser", `${parsedUA?.browser?.name ?? "unknown"}_${parsedUA?.browser?.version ?? "unknown"}`] - ]; - if (serviceId) { - sections.push([`api/${serviceId}`, clientVersion]); + super(message); + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, _ProviderError.prototype); + logger2?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); } - const appId = await config?.userAgentAppId?.(); - if (appId) { - sections.push([`app/${appId}`]); + static from(error2, options = true) { + return Object.assign(new this(error2.message, options), error2); } - return sections; }; + var CredentialsProviderError = class _CredentialsProviderError extends ProviderError2 { + name = "CredentialsProviderError"; + constructor(message, options = true) { + super(message, options); + Object.setPrototypeOf(this, _CredentialsProviderError.prototype); + } + }; + var TokenProviderError = class _TokenProviderError extends ProviderError2 { + name = "TokenProviderError"; + constructor(message, options = true) { + super(message, options); + Object.setPrototypeOf(this, _TokenProviderError.prototype); + } + }; + var chain = (...providers) => async () => { + if (providers.length === 0) { + throw new ProviderError2("No providers in chain"); + } + let lastProviderError; + for (const provider of providers) { + try { + const credentials = await provider(); + return credentials; + } catch (err) { + lastProviderError = err; + if (err?.tryNextLink) { + continue; + } + throw err; + } + } + throw lastProviderError; + }; + var fromStatic = (staticValue) => () => Promise.resolve(staticValue); + var memoize = (provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }; + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; + }; + exports2.CredentialsProviderError = CredentialsProviderError; + exports2.ProviderError = ProviderError2; + exports2.TokenProviderError = TokenProviderError; + exports2.chain = chain; + exports2.fromStatic = fromStatic; + exports2.memoize = memoize; } }); -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js -var fallback; -var init_defaultUserAgent2 = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js"() { - fallback = { - os(ua) { - if (/iPhone|iPad|iPod/.test(ua)) - return "iOS"; - if (/Macintosh|Mac OS X/.test(ua)) - return "macOS"; - if (/Windows NT/.test(ua)) - return "Windows"; - if (/Android/.test(ua)) - return "Android"; - if (/Linux/.test(ua)) - return "Linux"; +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +var require_getHomeDir = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHomeDir = void 0; + var os_1 = require("os"); + var path_1 = require("path"); + var homeDirCache = {}; + var getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; + } + return "DEFAULT"; + }; + var getHomeDir = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); + return homeDirCache[homeDirCacheKey]; + }; + exports2.getHomeDir = getHomeDir; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +var require_getSSOTokenFilepath = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSSOTokenFilepath = void 0; + var crypto_1 = require("crypto"); + var path_1 = require("path"); + var getHomeDir_1 = require_getHomeDir(); + var getSSOTokenFilepath = (id) => { + const hasher = (0, crypto_1.createHash)("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); + }; + exports2.getSSOTokenFilepath = getSSOTokenFilepath; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +var require_getSSOTokenFromFile = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSSOTokenFromFile = exports2.tokenIntercept = void 0; + var promises_1 = require("fs/promises"); + var getSSOTokenFilepath_1 = require_getSSOTokenFilepath(); + exports2.tokenIntercept = {}; + var getSSOTokenFromFile = async (id) => { + if (exports2.tokenIntercept[id]) { + return exports2.tokenIntercept[id]; + } + const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); + const ssoTokenText = await (0, promises_1.readFile)(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); + }; + exports2.getSSOTokenFromFile = getSSOTokenFromFile; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/readFile.js +var require_readFile = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/readFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readFile = exports2.fileIntercept = exports2.filePromises = void 0; + var promises_1 = require("node:fs/promises"); + exports2.filePromises = {}; + exports2.fileIntercept = {}; + var readFile = (path3, options) => { + if (exports2.fileIntercept[path3] !== void 0) { + return exports2.fileIntercept[path3]; + } + if (!exports2.filePromises[path3] || options?.ignoreCache) { + exports2.filePromises[path3] = (0, promises_1.readFile)(path3, "utf8"); + } + return exports2.filePromises[path3]; + }; + exports2.readFile = readFile; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +var require_dist_cjs29 = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js"(exports2) { + "use strict"; + var getHomeDir = require_getHomeDir(); + var getSSOTokenFilepath = require_getSSOTokenFilepath(); + var getSSOTokenFromFile = require_getSSOTokenFromFile(); + var path3 = require("path"); + var types3 = require_dist_cjs(); + var readFile = require_readFile(); + var ENV_PROFILE = "AWS_PROFILE"; + var DEFAULT_PROFILE = "default"; + var getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; + var CONFIG_PREFIX_SEPARATOR = "."; + var getConfigData = (data3) => Object.entries(data3).filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; + } + return Object.values(types3.IniSectionType).includes(key.substring(0, indexOfSeparator)); + }).reduce((acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === types3.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; + }, { + ...data3.default && { default: data3.default } + }); + var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; + var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path3.join(getHomeDir.getHomeDir(), ".aws", "config"); + var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; + var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path3.join(getHomeDir.getHomeDir(), ".aws", "credentials"); + var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; + var profileNameBlockList = ["__proto__", "profile __proto__"]; + var parseIni2 = (iniData) => { + const map2 = {}; + let currentSection; + let currentSubSection; + for (const iniLine of iniData.split(/\r?\n/)) { + const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); + const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; + if (isSection) { + currentSection = void 0; + currentSubSection = void 0; + const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); + const matches = prefixKeyRegex.exec(sectionName); + if (matches) { + const [, prefix, , name] = matches; + if (Object.values(types3.IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); + } + } else { + currentSection = sectionName; + } + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); + } + } else if (currentSection) { + const indexOfEqualsSign = trimmedLine.indexOf("="); + if (![0, -1].includes(indexOfEqualsSign)) { + const [name, value] = [ + trimmedLine.substring(0, indexOfEqualsSign).trim(), + trimmedLine.substring(indexOfEqualsSign + 1).trim() + ]; + if (value === "") { + currentSubSection = name; + } else { + if (currentSubSection && iniLine.trimStart() === iniLine) { + currentSubSection = void 0; + } + map2[currentSection] = map2[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; + map2[currentSection][key] = value; + } + } + } + } + return map2; + }; + var swallowError$1 = () => ({}); + var loadSharedConfigFiles = async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const homeDir = getHomeDir.getHomeDir(); + const relativeHomeDirPrefix = "~/"; + let resolvedFilepath = filepath; + if (filepath.startsWith(relativeHomeDirPrefix)) { + resolvedFilepath = path3.join(homeDir, filepath.slice(2)); + } + let resolvedConfigFilepath = configFilepath; + if (configFilepath.startsWith(relativeHomeDirPrefix)) { + resolvedConfigFilepath = path3.join(homeDir, configFilepath.slice(2)); + } + const parsedFiles = await Promise.all([ + readFile.readFile(resolvedConfigFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni2).then(getConfigData).catch(swallowError$1), + readFile.readFile(resolvedFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni2).catch(swallowError$1) + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1] + }; + }; + var getSsoSessionData = (data3) => Object.entries(data3).filter(([key]) => key.startsWith(types3.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); + var swallowError = () => ({}); + var loadSsoSessionData = async (init = {}) => readFile.readFile(init.configFilepath ?? getConfigFilepath()).then(parseIni2).then(getSsoSessionData).catch(swallowError); + var mergeConfigFiles = (...files) => { + const merged = {}; + for (const file2 of files) { + for (const [key, values] of Object.entries(file2)) { + if (merged[key] !== void 0) { + Object.assign(merged[key], values); + } else { + merged[key] = values; + } + } + } + return merged; + }; + var parseKnownFiles = async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); + }; + var externalDataInterceptor = { + getFileRecord() { + return readFile.fileIntercept; + }, + interceptFile(path4, contents) { + readFile.fileIntercept[path4] = Promise.resolve(contents); + }, + getTokenRecord() { + return getSSOTokenFromFile.tokenIntercept; + }, + interceptToken(id, contents) { + getSSOTokenFromFile.tokenIntercept[id] = contents; + } + }; + exports2.getSSOTokenFromFile = getSSOTokenFromFile.getSSOTokenFromFile; + exports2.readFile = readFile.readFile; + exports2.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; + exports2.DEFAULT_PROFILE = DEFAULT_PROFILE; + exports2.ENV_PROFILE = ENV_PROFILE; + exports2.externalDataInterceptor = externalDataInterceptor; + exports2.getProfileName = getProfileName; + exports2.loadSharedConfigFiles = loadSharedConfigFiles; + exports2.loadSsoSessionData = loadSsoSessionData; + exports2.parseKnownFiles = parseKnownFiles; + Object.prototype.hasOwnProperty.call(getHomeDir, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: getHomeDir["__proto__"] + }); + Object.keys(getHomeDir).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = getHomeDir[k5]; + }); + Object.prototype.hasOwnProperty.call(getSSOTokenFilepath, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: getSSOTokenFilepath["__proto__"] + }); + Object.keys(getSSOTokenFilepath).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = getSSOTokenFilepath[k5]; + }); + } +}); + +// node_modules/@smithy/node-config-provider/dist-cjs/index.js +var require_dist_cjs30 = __commonJS({ + "node_modules/@smithy/node-config-provider/dist-cjs/index.js"(exports2) { + "use strict"; + var propertyProvider = require_dist_cjs28(); + var sharedIniFileLoader = require_dist_cjs29(); + function getSelectorName(functionString) { + try { + const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); + constants.delete("CONFIG"); + constants.delete("CONFIG_PREFIX_SEPARATOR"); + constants.delete("ENV"); + return [...constants].join(", "); + } catch (e5) { + return functionString; + } + } + var fromEnv = (envVarSelector, options) => async () => { + try { + const config = envVarSelector(process.env, options); + if (config === void 0) { + throw new Error(); + } + return config; + } catch (e5) { + throw new propertyProvider.CredentialsProviderError(e5.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger }); + } + }; + var fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = sharedIniFileLoader.getProfileName(init); + const { configFile, credentialsFile } = await sharedIniFileLoader.loadSharedConfigFiles(init); + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; + try { + const cfgFile = preferredFile === "config" ? configFile : credentialsFile; + const configValue = configSelector(mergedProfile, cfgFile); + if (configValue === void 0) { + throw new Error(); + } + return configValue; + } catch (e5) { + throw new propertyProvider.CredentialsProviderError(e5.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger }); + } + }; + var isFunction = (func) => typeof func === "function"; + var fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue); + var loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { + const { signingName, logger: logger2 } = configuration; + const envOptions = { signingName, logger: logger2 }; + return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); + }; + exports2.loadConfig = loadConfig; + } +}); + +// node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js +var require_getEndpointUrlConfig = __commonJS({ + "node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getEndpointUrlConfig = void 0; + var shared_ini_file_loader_1 = require_dist_cjs29(); + var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; + var CONFIG_ENDPOINT_URL = "endpoint_url"; + var getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env) => { + const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); + const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; return void 0; }, - browser(ua) { - if (/EdgiOS|EdgA|Edg\//.test(ua)) - return "Microsoft Edge"; - if (/Firefox\//.test(ua)) - return "Firefox"; - if (/Chrome\//.test(ua)) - return "Chrome"; - if (/Safari\//.test(ua)) - return "Safari"; - return void 0; - } - }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/isIpAddress.js -var init_isIpAddress2 = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/isIpAddress.js"() { - init_endpoints(); - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/isVirtualHostableS3Bucket.js -var isVirtualHostableS3Bucket; -var init_isVirtualHostableS3Bucket = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/isVirtualHostableS3Bucket.js"() { - init_endpoints(); - init_isIpAddress2(); - isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { - if (allowSubDomains) { - for (const label of value.split(".")) { - if (!isVirtualHostableS3Bucket(label)) { - return false; + configFileSelector: (profile, config) => { + if (config && profile.services) { + const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (servicesSection) { + const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); + const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl2) + return endpointUrl2; } } - return true; - } - if (!isValidHostLabel(value)) { - return false; - } - if (value.length < 3 || value.length > 63) { - return false; - } - if (value !== value.toLowerCase()) { - return false; - } - if (isIpAddress(value)) { - return false; - } - return true; - }; + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return void 0; + }, + default: void 0 + }); + exports2.getEndpointUrlConfig = getEndpointUrlConfig; } }); -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js -var ARN_DELIMITER, RESOURCE_DELIMITER, parseArn; -var init_parseArn = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js"() { - ARN_DELIMITER = ":"; - RESOURCE_DELIMITER = "/"; - parseArn = (value) => { - const segments = value.split(ARN_DELIMITER); - if (segments.length < 6) - return null; - const [arn, partition2, service, region, accountId, ...resourcePath] = segments; - if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") - return null; - const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); +// node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +var require_getEndpointFromConfig = __commonJS({ + "node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getEndpointFromConfig = void 0; + var node_config_provider_1 = require_dist_cjs30(); + var getEndpointUrlConfig_1 = require_getEndpointUrlConfig(); + var getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId ?? ""))(); + exports2.getEndpointFromConfig = getEndpointFromConfig; + } +}); + +// node_modules/@smithy/middleware-serde/dist-cjs/index.js +var require_dist_cjs31 = __commonJS({ + "node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2) { + "use strict"; + var protocolHttp = require_dist_cjs2(); + var endpoints = (init_endpoints(), __toCommonJS(endpoints_exports)); + var deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + 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 (protocolHttp.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; + } + }; + var findHeader2 = (pattern, headers) => { + return (headers.find(([k5]) => { + return k5.match(pattern); + }) || [void 0, void 0])[1]; + }; + var serializerMiddleware = (options, serializer) => (next, context) => async (args) => { + const endpointConfig = options; + const endpoint = context.endpointV2 ? async () => endpoints.toEndpointV1(context.endpointV2) : endpointConfig.endpoint; + if (!endpoint) { + throw new Error("No valid endpoint provider available."); + } + const request = await serializer(args.input, { ...options, endpoint }); + return next({ + ...args, + request + }); + }; + var deserializerMiddlewareOption2 = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true + }; + var serializerMiddlewareOption2 = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + function getSerdePlugin(config, serializer, deserializer) { return { - partition: partition2, - service, - region, - accountId, - resourceId + applyToStack: (commandStack) => { + commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption2); + commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption2); + } + }; + } + exports2.deserializerMiddleware = deserializerMiddleware; + exports2.deserializerMiddlewareOption = deserializerMiddlewareOption2; + exports2.getSerdePlugin = getSerdePlugin; + exports2.serializerMiddleware = serializerMiddleware; + exports2.serializerMiddlewareOption = serializerMiddlewareOption2; + } +}); + +// node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +var require_dist_cjs32 = __commonJS({ + "node_modules/@smithy/middleware-endpoint/dist-cjs/index.js"(exports2) { + "use strict"; + var core5 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var utilMiddleware = require_dist_cjs6(); + var getEndpointFromConfig = require_getEndpointFromConfig(); + var urlParser = require_dist_cjs18(); + var middlewareSerde = require_dist_cjs31(); + var resolveParamsForS3 = async (endpointParams) => { + const bucket = endpointParams?.Bucket || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; + }; + var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; + var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; + var DOTS_PATTERN = /\.\./; + var isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); + var isArnBucketName = (bucketName) => { + const [arn, partition, service, , , bucket] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = Boolean(isArn && partition && service && bucket); + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return isValidArn; + }; + var createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => { + const configProvider = async () => { + let configValue; + if (isClientContextParam) { + const clientContextParams = config.clientContextParams; + const nestedValue = clientContextParams?.[configKey]; + configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey]; + } else { + configValue = config[configKey] ?? config[canonicalEndpointParamKey]; + } + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }; + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; + return configValue; + }; + } + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = credentials?.accountId ?? credentials?.AccountId; + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + if (config.isCustomEndpoint === false) { + return void 0; + } + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname, port, path: path3 } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path3}`; + } + } + return endpoint; + }; + } + return configProvider; + }; + var toEndpointV12 = (endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = urlParser.parseUrl(endpoint.url); + if (endpoint.headers) { + v1Endpoint.headers = {}; + for (const [name, values] of Object.entries(endpoint.headers)) { + v1Endpoint.headers[name.toLowerCase()] = values.join(", "); + } + } + return v1Endpoint; + } + return endpoint; + } + return urlParser.parseUrl(endpoint); + }; + var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.isCustomEndpoint) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } else { + endpointFromConfig = await getEndpointFromConfig.getEndpointFromConfig(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV12(endpointFromConfig)); + clientConfig.isCustomEndpoint = true; + } + } + const endpointParams = await resolveParams2(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context); + if (clientConfig.isCustomEndpoint && clientConfig.endpoint) { + const customEndpoint = await clientConfig.endpoint(); + if (customEndpoint?.headers) { + endpoint.headers ??= {}; + for (const [name, value] of Object.entries(customEndpoint.headers)) { + endpoint.headers[name] = Array.isArray(value) ? value : [value]; + } + } + } + return endpoint; + }; + var resolveParams2 = async (commandInput, instructionsSupplier, clientConfig) => { + const endpointParams = {}; + const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")(); + break; + case "operationContextParams": + endpointParams[name] = instruction.get(commandInput); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; + }; + var endpointMiddleware = ({ config, instructions }) => { + return (next, context) => async (args) => { + if (config.isCustomEndpoint) { + core5.setFeature(context, "ENDPOINT_OVERRIDE", "N"); + } + const endpoint = await getEndpointFromInstructions(args.input, { + getEndpointParameterInstructions() { + return instructions; + } + }, { ...config }, context); + context.endpointV2 = endpoint; + context.authSchemes = endpoint.properties?.authSchemes; + const authScheme = context.authSchemes?.[0]; + if (authScheme) { + context["signing_region"] = authScheme.signingRegion; + context["signing_service"] = authScheme.signingName; + const smithyContext = utilMiddleware.getSmithyContext(context); + const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, authScheme.properties); + } + } + return next({ + ...args + }); }; }; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/aws.js -var awsEndpointFunctions; -var init_aws = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/aws.js"() { - init_endpoints(); - init_isVirtualHostableS3Bucket(); - init_parseArn(); - init_partition(); - awsEndpointFunctions = { - isVirtualHostableS3Bucket, - parseArn, - partition + var endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: middlewareSerde.serializerMiddlewareOption.name }; - customEndpointFunctions.aws = awsEndpointFunctions; - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/resolveEndpoint.js -var init_resolveEndpoint2 = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/resolveEndpoint.js"() { - init_endpoints(); - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/resolveDefaultAwsRegionalEndpointsConfig.js -var resolveDefaultAwsRegionalEndpointsConfig, toEndpointV12; -var init_resolveDefaultAwsRegionalEndpointsConfig = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/resolveDefaultAwsRegionalEndpointsConfig.js"() { - init_protocols(); - resolveDefaultAwsRegionalEndpointsConfig = (input) => { - if (typeof input.endpointProvider !== "function") { - throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); + var getEndpointPlugin6 = (config, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(endpointMiddleware({ + config, + instructions + }), endpointMiddlewareOptions); } + }); + var resolveEndpointConfig5 = (input) => { + const tls8 = input.tls ?? true; + const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV12(await utilMiddleware.normalizeProvider(endpoint)()) : void 0; + const isCustomEndpoint = !!endpoint; + const resolvedConfig = Object.assign(input, { + endpoint: customEndpointProvider, + tls: tls8, + isCustomEndpoint, + useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false), + useFipsEndpoint: utilMiddleware.normalizeProvider(useFipsEndpoint ?? false) + }); + let configuredEndpointPromise = void 0; + resolvedConfig.serviceConfiguredEndpoint = async () => { + if (input.serviceId && !configuredEndpointPromise) { + configuredEndpointPromise = getEndpointFromConfig.getEndpointFromConfig(input.serviceId); + } + return configuredEndpointPromise; + }; + return resolvedConfig; + }; + var resolveEndpointRequiredConfig = (input) => { const { endpoint } = input; if (endpoint === void 0) { input.endpoint = async () => { - return toEndpointV12(input.endpointProvider({ - Region: typeof input.region === "function" ? await input.region() : input.region, - UseDualStack: typeof input.useDualstackEndpoint === "function" ? await input.useDualstackEndpoint() : input.useDualstackEndpoint, - UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, - Endpoint: void 0 - }, { logger: input.logger })); + throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint."); }; } return input; }; - toEndpointV12 = (endpoint) => parseUrl(endpoint.url); + exports2.endpointMiddleware = endpointMiddleware; + exports2.endpointMiddlewareOptions = endpointMiddlewareOptions; + exports2.getEndpointFromInstructions = getEndpointFromInstructions; + exports2.getEndpointPlugin = getEndpointPlugin6; + exports2.resolveEndpointConfig = resolveEndpointConfig5; + exports2.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig; + exports2.resolveParams = resolveParams2; + exports2.toEndpointV1 = toEndpointV12; } }); -// node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/types/EndpointError.js -var init_EndpointError2 = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/types/EndpointError.js"() { - init_endpoints(); - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/awsRegionConfig.js -var init_awsRegionConfig = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/awsRegionConfig.js"() { - init_config2(); - init_config2(); - } -}); - -// node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/stsRegionDefaultResolver.js -function stsRegionDefaultResolver(loaderConfig = {}) { - return loadConfig({ - ...NODE_REGION_CONFIG_OPTIONS, - async default() { - 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."); +// node_modules/@smithy/middleware-stack/dist-cjs/index.js +var require_dist_cjs33 = __commonJS({ + "node_modules/@smithy/middleware-stack/dist-cjs/index.js"(exports2) { + "use strict"; + var getAllAliases = (name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); } - return "us-east-1"; - } - }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }); -} -var warning2; -var init_stsRegionDefaultResolver = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/stsRegionDefaultResolver.js"() { - init_config2(); - warning2 = { - silence: false + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } + } + return _aliases; }; + var getMiddlewareNameWithAliases = (name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; + }; + var constructStack = () => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = /* @__PURE__ */ new Set(); + const sort = (entries) => entries.sort((a5, b6) => stepWeights[b6.step] - stepWeights[a5.step] || priorityWeights[b6.priority || "normal"] - priorityWeights[a5.priority || "normal"]); + const removeByName = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const removeByReference = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const cloneTo = (toStack) => { + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + toStack.identifyOnResolve?.(stack.identifyOnResolve()); + return toStack; + }; + const expandRelativeMiddlewareList = (from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }; + const getMiddlewareList = (debug19 = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === void 0) { + if (debug19) { + return; + } + throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, []); + return mainChain; + }; + const stack = { + add: (middleware, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a5) => a5 === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.`); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a5) => a5 === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.`); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? mw.relation + " " + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler, context) => { + for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { + handler = middleware(handler, context); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + } + }; + return stack; + }; + var stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 + }; + var priorityWeights = { + high: 3, + normal: 2, + low: 1 + }; + exports2.constructStack = constructStack; } }); -// node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/extensions.js -var getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration; -var init_extensions = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/region-config-resolver/extensions.js"() { - getAwsRegionExtensionConfiguration = (runtimeConfig) => { +// node_modules/@smithy/smithy-client/dist-cjs/index.js +var require_dist_cjs34 = __commonJS({ + "node_modules/@smithy/smithy-client/dist-cjs/index.js"(exports2) { + "use strict"; + var middlewareStack = require_dist_cjs33(); + var types3 = require_dist_cjs(); + var schema = (init_schema(), __toCommonJS(schema_exports)); + var serde = (init_serde(), __toCommonJS(serde_exports)); + var protocols2 = (init_protocols(), __toCommonJS(protocols_exports)); + var Client2 = class { + config; + middlewareStack = middlewareStack.constructStack(); + initConfig; + handlers; + constructor(config) { + this.config = config; + const { protocol, protocolSettings } = config; + if (protocolSettings) { + if (typeof protocol === "function") { + config.protocol = new protocol(protocolSettings); + } + } + } + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; + let handler; + if (useHandlerCache) { + if (!this.handlers) { + this.handlers = /* @__PURE__ */ new WeakMap(); + } + const handlers = this.handlers; + if (handlers.has(command.constructor)) { + handler = handlers.get(command.constructor); + } else { + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + handlers.set(command.constructor, handler); + } + } else { + delete this.handlers; + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + } + if (callback) { + handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => { + }); + } else { + return handler(command).then((result) => result.output); + } + } + destroy() { + this.config?.requestHandler?.destroy?.(); + delete this.handlers; + } + }; + var SENSITIVE_STRING$1 = "***SensitiveInformation***"; + function schemaLogFilter(schema$1, data3) { + if (data3 == null) { + return data3; + } + const ns = schema.NormalizedSchema.of(schema$1); + if (ns.getMergedTraits().sensitive) { + return SENSITIVE_STRING$1; + } + if (ns.isListSchema()) { + const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING$1; + } + } else if (ns.isMapSchema()) { + const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING$1; + } + } 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 Command = class { + middlewareStack = 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, + [types3.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); + } + }; + var 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; + }; + } + }; + var SENSITIVE_STRING = "***SensitiveInformation***"; + var createAggregatedClient5 = (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); + }; + } + } + }; + var 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; + } + }; + var decorateServiceException2 = (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; + }; + var 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 decorateServiceException2(response, parsedBody); + }; + var withBaseException = (ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; + }; + var 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"] + }); + var loadConfigsForDefaultMode5 = (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 {}; + } + }; + var warningEmitted = false; + var emitWarningIfUnsupportedVersion6 = (version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { + warningEmitted = true; + } + }; + var knownAlgorithms = Object.values(types3.AlgorithmId); + var getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in types3.AlgorithmId) { + const algorithmId = 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 { - setRegion(region) { - runtimeConfig.region = region; + 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); }, - region() { - return runtimeConfig.region; + checksumAlgorithms() { + return checksumAlgorithms; } }; }; - resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => { + var resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + const id = checksumAlgorithm.algorithmId(); + if (knownAlgorithms.includes(id)) { + runtimeConfig[id] = checksumAlgorithm.checksumConstructor(); + } + }); + return runtimeConfig; + }; + var getRetryConfiguration = (runtimeConfig) => { return { - region: awsRegionExtensionConfiguration.region() + setRetryStrategy(retryStrategy) { + runtimeConfig.retryStrategy = retryStrategy; + }, + retryStrategy() { + return runtimeConfig.retryStrategy; + } }; }; + var resolveRetryRuntimeConfig = (retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; + }; + var getDefaultExtensionConfiguration5 = (runtimeConfig) => { + return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); + }; + var getDefaultClientConfiguration = getDefaultExtensionConfiguration5; + var resolveDefaultRuntimeConfig5 = (config) => { + return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config)); + }; + var getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; + var getValueFromTextNode3 = (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] = getValueFromTextNode3(obj[key]); + } + } + return obj; + }; + var isSerializableHeaderValue = (value) => { + return value != null; + }; + var NoOpLogger5 = class { + trace() { + } + debug() { + } + info() { + } + warn() { + } + error() { + } + }; + 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 = (target) => { + const output = {}; + for (const [k5, v] of Object.entries(target || {})) { + output[k5] = [, v]; + } + return output; + }; + var take = (source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; + }; + var 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; + }, {})); + }; + var 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; + } + } + }; + var nonNullish = (_) => _ != null; + var pass = (_) => _; + var serializeFloat = (value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } + }; + var serializeDateTime = (date2) => date2.toISOString().replace(".000Z", "Z"); + var _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; + }; + exports2.collectBody = protocols2.collectBody; + exports2.extendedEncodeURIComponent = protocols2.extendedEncodeURIComponent; + exports2.resolvedPath = protocols2.resolvedPath; + exports2.Client = Client2; + exports2.Command = Command; + exports2.NoOpLogger = NoOpLogger5; + exports2.SENSITIVE_STRING = SENSITIVE_STRING; + exports2.ServiceException = ServiceException; + exports2._json = _json; + exports2.convertMap = convertMap; + exports2.createAggregatedClient = createAggregatedClient5; + exports2.decorateServiceException = decorateServiceException2; + exports2.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion6; + exports2.getArrayIfSingleItem = getArrayIfSingleItem; + exports2.getDefaultClientConfiguration = getDefaultClientConfiguration; + exports2.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration5; + exports2.getValueFromTextNode = getValueFromTextNode3; + exports2.isSerializableHeaderValue = isSerializableHeaderValue; + exports2.loadConfigsForDefaultMode = loadConfigsForDefaultMode5; + exports2.map = map2; + exports2.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig5; + exports2.serializeDateTime = serializeDateTime; + exports2.serializeFloat = serializeFloat; + exports2.take = take; + exports2.throwDefaultError = throwDefaultError; + exports2.withBaseException = withBaseException; + Object.prototype.hasOwnProperty.call(serde, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: serde["__proto__"] + }); + Object.keys(serde).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = serde[k5]; + }); } }); -// node_modules/@aws-sdk/core/dist-es/submodules/client/index.js -var client_exports2 = {}; -__export(client_exports2, { - DEFAULT_UA_APP_ID: () => DEFAULT_UA_APP_ID, - EndpointError: () => EndpointError, - NODE_APP_ID_CONFIG_OPTIONS: () => NODE_APP_ID_CONFIG_OPTIONS, - NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, - NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, - REGION_ENV_NAME: () => REGION_ENV_NAME, - REGION_INI_NAME: () => REGION_INI_NAME, - UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME, - UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME, - awsEndpointFunctions: () => awsEndpointFunctions, - createDefaultUserAgentProvider: () => createDefaultUserAgentProvider, - createUserAgentStringParsingProvider: () => createUserAgentStringParsingProvider, - crtAvailability: () => crtAvailability, - defaultUserAgent: () => defaultUserAgent, - emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, - fallback: () => fallback, - getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration, - getHostHeaderPlugin: () => getHostHeaderPlugin, - getLoggerPlugin: () => getLoggerPlugin, - getLongPollPlugin: () => getLongPollPlugin, - getRecursionDetectionPlugin: () => getRecursionDetectionPlugin, - getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions, - getUserAgentPlugin: () => getUserAgentPlugin, - getUserAgentPrefix: () => getUserAgentPrefix, - hostHeaderMiddleware: () => hostHeaderMiddleware, - hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, - isIpAddress: () => isIpAddress, - isVirtualHostableS3Bucket: () => isVirtualHostableS3Bucket, - loggerMiddleware: () => loggerMiddleware, - loggerMiddlewareOptions: () => loggerMiddlewareOptions, - parseArn: () => parseArn, - partition: () => partition, - recursionDetectionMiddleware: () => recursionDetectionMiddleware, - recursionDetectionMiddlewareOptions: () => recursionDetectionMiddlewareOptions, - resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration, - resolveDefaultAwsRegionalEndpointsConfig: () => resolveDefaultAwsRegionalEndpointsConfig, - resolveEndpoint: () => resolveEndpoint, - resolveHostHeaderConfig: () => resolveHostHeaderConfig, - resolveRegionConfig: () => resolveRegionConfig, - resolveUserAgentConfig: () => resolveUserAgentConfig, - setCredentialFeature: () => setCredentialFeature, - setFeature: () => setFeature2, - setPartitionInfo: () => setPartitionInfo, - setTokenFeature: () => setTokenFeature, - state: () => state, - stsRegionDefaultResolver: () => stsRegionDefaultResolver, - stsRegionWarning: () => warning2, - toEndpointV1: () => toEndpointV12, - useDefaultPartitionInfo: () => useDefaultPartitionInfo, - userAgentMiddleware: () => userAgentMiddleware +// node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js +var require_isStreamingPayload = __commonJS({ + "node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isStreamingPayload = void 0; + var stream_1 = require("stream"); + var isStreamingPayload = (request) => request?.body instanceof stream_1.Readable || typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream; + exports2.isStreamingPayload = isStreamingPayload; + } }); -var init_client3 = __esm({ - "node_modules/@aws-sdk/core/dist-es/submodules/client/index.js"() { - init_emitWarningIfUnsupportedVersion(); - init_longPollMiddleware(); - init_setCredentialFeature(); - init_setFeature(); - init_setTokenFeature(); - init_hostHeaderMiddleware(); - init_loggerMiddleware(); - init_configuration(); - init_getRecursionDetectionPlugin(); - init_recursionDetectionMiddleware(); - init_configurations2(); - init_user_agent_middleware(); - init_defaultUserAgent(); - init_nodeAppIdConfigOptions(); - init_defaultUserAgent2(); - init_createUserAgentStringParsingProvider(); - init_aws(); - init_resolveEndpoint2(); - init_resolveDefaultAwsRegionalEndpointsConfig(); - init_isIpAddress2(); - init_isVirtualHostableS3Bucket(); - init_parseArn(); - init_partition(); - init_EndpointError2(); - init_awsRegionConfig(); - init_stsRegionDefaultResolver(); - init_extensions(); + +// node_modules/@smithy/middleware-retry/dist-cjs/index.js +var require_dist_cjs35 = __commonJS({ + "node_modules/@smithy/middleware-retry/dist-cjs/index.js"(exports2) { + "use strict"; + var utilRetry = require_dist_cjs23(); + var protocolHttp = require_dist_cjs2(); + var serviceErrorClassification = require_dist_cjs22(); + var uuid = require_dist_cjs19(); + var utilMiddleware = require_dist_cjs6(); + var smithyClient = require_dist_cjs34(); + var isStreamingPayload = require_isStreamingPayload(); + var serde = (init_serde(), __toCommonJS(serde_exports)); + var 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}`); + }; + var getDefaultRetryQuota = (initialRetryTokens, options) => { + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = utilRetry.NO_RETRY_INCREMENT; + const retryCost = utilRetry.RETRY_COST; + const timeoutRetryCost = utilRetry.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)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error2); + availableCapacity -= capacityAmount; + return capacityAmount; + }; + const releaseRetryTokens = (capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount ?? noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }; + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens + }); + }; + var defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(utilRetry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + var defaultRetryDecider = (error2) => { + if (!error2) { + return false; + } + return serviceErrorClassification.isRetryableByTrait(error2) || serviceErrorClassification.isClockSkewError(error2) || serviceErrorClassification.isThrottlingError(error2) || serviceErrorClassification.isTransientError(error2); + }; + var StandardRetryStrategy = class { + maxAttemptsProvider; + retryDecider; + delayDecider; + retryQuota; + mode = utilRetry.RETRY_MODES.STANDARD; + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.retryDecider = options?.retryDecider ?? defaultRetryDecider; + this.delayDecider = options?.delayDecider ?? defaultDelayDecider; + this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(utilRetry.INITIAL_RETRY_TOKENS); + } + shouldRetry(error2, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error2) && this.retryQuota.hasRetryTokens(error2); + } + async getMaxAttempts() { + let maxAttempts; + try { + maxAttempts = await this.maxAttemptsProvider(); + } catch (error2) { + maxAttempts = utilRetry.DEFAULT_MAX_ATTEMPTS; + } + return maxAttempts; + } + async retry(next, args, options) { + let retryTokenAmount; + let attempts = 0; + let totalDelay = 0; + const maxAttempts = await this.getMaxAttempts(); + const { request } = args; + if (protocolHttp.HttpRequest.isInstance(request)) { + request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4(); + } + while (true) { + try { + if (protocolHttp.HttpRequest.isInstance(request)) { + request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + if (options?.beforeRequest) { + await options.beforeRequest(); + } + const { response, output } = await next(args); + if (options?.afterRequest) { + options.afterRequest(response); + } + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } catch (e5) { + const err = asSdkError(e5); + attempts++; + if (this.shouldRetry(err, attempts, maxAttempts)) { + retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); + const delayFromDecider = this.delayDecider(serviceErrorClassification.isThrottlingError(err) ? utilRetry.THROTTLING_RETRY_DELAY_BASE : utilRetry.DEFAULT_RETRY_DELAY_BASE, attempts); + const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); + const delay = Math.max(delayFromResponse || 0, delayFromDecider); + totalDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + continue; + } + if (!err.$metadata) { + err.$metadata = {}; + } + err.$metadata.attempts = attempts; + err.$metadata.totalRetryDelay = totalDelay; + throw err; + } + } + } + }; + var getDelayFromRetryAfterHeader = (response) => { + if (!protocolHttp.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return retryAfterSeconds * 1e3; + const retryAfterDate = new Date(retryAfter); + return retryAfterDate.getTime() - Date.now(); + }; + var AdaptiveRetryStrategy = class extends StandardRetryStrategy { + rateLimiter; + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options ?? {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter ?? new utilRetry.DefaultRateLimiter(); + this.mode = utilRetry.RETRY_MODES.ADAPTIVE; + } + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + } + }); + } + }; + var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; + var CONFIG_MAX_ATTEMPTS = "max_attempts"; + var NODE_MAX_ATTEMPT_CONFIG_OPTIONS5 = { + environmentVariableSelector: (env) => { + const value = env[ENV_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[CONFIG_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + default: utilRetry.DEFAULT_MAX_ATTEMPTS + }; + var resolveRetryConfig5 = (input) => { + const { retryStrategy, retryMode } = input; + const maxAttempts = utilMiddleware.normalizeProvider(input.maxAttempts ?? utilRetry.DEFAULT_MAX_ATTEMPTS); + let controller = retryStrategy ? Promise.resolve(retryStrategy) : void 0; + const getDefault = async () => await utilMiddleware.normalizeProvider(retryMode)() === utilRetry.RETRY_MODES.ADAPTIVE ? new utilRetry.AdaptiveRetryStrategy(maxAttempts) : new utilRetry.StandardRetryStrategy(maxAttempts); + return Object.assign(input, { + maxAttempts, + retryStrategy: () => controller ??= getDefault() + }); + }; + var ENV_RETRY_MODE = "AWS_RETRY_MODE"; + var CONFIG_RETRY_MODE = "retry_mode"; + var NODE_RETRY_MODE_CONFIG_OPTIONS5 = { + environmentVariableSelector: (env) => env[ENV_RETRY_MODE], + configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + default: utilRetry.DEFAULT_RETRY_MODE + }; + var omitRetryHeadersMiddleware = () => (next) => async (args) => { + const { request } = args; + if (protocolHttp.HttpRequest.isInstance(request)) { + delete request.headers[utilRetry.INVOCATION_ID_HEADER]; + delete request.headers[utilRetry.REQUEST_HEADER]; + } + return next(args); + }; + var omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true + }; + var getOmitRetryHeadersPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); + } + }); + function parseRetryAfterHeader(response, logger2) { + if (!protocolHttp.HttpResponse.isInstance(response)) { + return; + } + for (const header of Object.keys(response.headers)) { + const h5 = header.toLowerCase(); + if (h5 === "retry-after") { + const retryAfter = response.headers[header]; + let retryAfterSeconds = NaN; + if (retryAfter.endsWith("GMT")) { + try { + const date2 = serde.parseRfc7231DateTime(retryAfter); + retryAfterSeconds = (date2.getTime() - Date.now()) / 1e3; + } catch (e5) { + logger2?.trace?.("Failed to parse retry-after header"); + logger2?.trace?.(e5); + } + } else if (retryAfter.match(/ GMT, ((\d+)|(\d+\.\d+))$/)) { + retryAfterSeconds = Number(retryAfter.match(/ GMT, ([\d.]+)$/)?.[1]); + } else if (retryAfter.match(/^((\d+)|(\d+\.\d+))$/)) { + retryAfterSeconds = Number(retryAfter); + } else if (Date.parse(retryAfter) >= Date.now()) { + retryAfterSeconds = (Date.parse(retryAfter) - Date.now()) / 1e3; + } + if (isNaN(retryAfterSeconds)) { + return; + } + return new Date(Date.now() + retryAfterSeconds * 1e3); + } else if (h5 === "x-amz-retry-after") { + const v = response.headers[header]; + const backoffMilliseconds = Number(v); + if (isNaN(backoffMilliseconds)) { + logger2?.trace?.(`Failed to parse x-amz-retry-after=${v}`); + return; + } + return new Date(Date.now() + backoffMilliseconds); + } + } + } + function getRetryAfterHint(response, logger2) { + return parseRetryAfterHeader(response, logger2); + } + var retryMiddleware = (options) => (next, context) => async (args) => { + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken((context["partition_id"] ?? "") + (context.__retryLongPoll ? ":longpoll" : "")); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request } = args; + const isRequest = protocolHttp.HttpRequest.isInstance(request); + if (isRequest) { + request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4(); + } + while (true) { + try { + if (isRequest) { + request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } catch (e5) { + const retryErrorInfo = getRetryErrorInfo(e5, options.logger); + lastError = asSdkError(e5); + if (isRequest && isStreamingPayload.isStreamingPayload(request)) { + (context.logger instanceof smithyClient.NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request."); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } catch (refreshError) { + if (typeof refreshError.$backoff === "number") { + await cooldown(refreshError.$backoff); + } + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; + } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += delay; + await cooldown(delay); + } + } + } else { + retryStrategy = retryStrategy; + if (retryStrategy?.mode) { + context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; + } + return retryStrategy.retry(next, args); + } + }; + var cooldown = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + var isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined"; + var getRetryErrorInfo = (error2, logger2) => { + const errorInfo = { + error: error2, + errorType: getRetryErrorType(error2) + }; + const retryAfterHint = parseRetryAfterHeader(error2.$response, logger2); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; + }; + var getRetryErrorType = (error2) => { + if (serviceErrorClassification.isThrottlingError(error2)) + return "THROTTLING"; + if (serviceErrorClassification.isTransientError(error2)) + return "TRANSIENT"; + if (serviceErrorClassification.isServerError(error2)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; + }; + var retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true + }; + var getRetryPlugin5 = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); + } + }); + exports2.AdaptiveRetryStrategy = AdaptiveRetryStrategy; + exports2.CONFIG_MAX_ATTEMPTS = CONFIG_MAX_ATTEMPTS; + exports2.CONFIG_RETRY_MODE = CONFIG_RETRY_MODE; + exports2.ENV_MAX_ATTEMPTS = ENV_MAX_ATTEMPTS; + exports2.ENV_RETRY_MODE = ENV_RETRY_MODE; + exports2.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = NODE_MAX_ATTEMPT_CONFIG_OPTIONS5; + exports2.NODE_RETRY_MODE_CONFIG_OPTIONS = NODE_RETRY_MODE_CONFIG_OPTIONS5; + exports2.StandardRetryStrategy = StandardRetryStrategy; + exports2.defaultDelayDecider = defaultDelayDecider; + exports2.defaultRetryDecider = defaultRetryDecider; + exports2.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin; + exports2.getRetryAfterHint = getRetryAfterHint; + exports2.getRetryPlugin = getRetryPlugin5; + exports2.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware; + exports2.omitRetryHeadersMiddlewareOptions = omitRetryHeadersMiddlewareOptions; + exports2.resolveRetryConfig = resolveRetryConfig5; + exports2.retryMiddleware = retryMiddleware; + exports2.retryMiddlewareOptions = retryMiddlewareOptions; } }); // node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js -var getDateHeader; +var import_protocol_http9, getDateHeader; var init_getDateHeader = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js"() { - init_protocols(); - getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0; + import_protocol_http9 = __toESM(require_dist_cjs2()); + getDateHeader = (response) => import_protocol_http9.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0; } }); @@ -32253,7 +32144,7 @@ var init_getUpdatedSystemClockOffset = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js -var init_utils3 = __esm({ +var init_utils = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js"() { init_getDateHeader(); init_getSkewCorrectedDate(); @@ -32262,11 +32153,11 @@ var init_utils3 = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js -var throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer, AWSSDKSigV4Signer; +var import_protocol_http10, throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer, AWSSDKSigV4Signer; var init_AwsSdkSigV4Signer = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js"() { - init_protocols(); - init_utils3(); + import_protocol_http10 = __toESM(require_dist_cjs2()); + init_utils(); throwSigningPropertyError = (name, property) => { if (!property) { throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); @@ -32292,7 +32183,7 @@ var init_AwsSdkSigV4Signer = __esm({ }; AwsSdkSigV4Signer = class { async sign(httpRequest, identity, signingProperties) { - if (!HttpRequest.isInstance(httpRequest)) { + if (!import_protocol_http10.HttpRequest.isInstance(httpRequest)) { throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); } const validatedProps = await validateSigningProperties(signingProperties); @@ -32314,18 +32205,18 @@ var init_AwsSdkSigV4Signer = __esm({ return signedRequest; } errorHandler(signingProperties) { - return (error3) => { - const serverTime = error3.ServerTime ?? getDateHeader(error3.$response); + return (error2) => { + const serverTime = error2.ServerTime ?? getDateHeader(error2.$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 && error3.$metadata) { - error3.$metadata.clockSkewCorrected = true; + if (clockSkewCorrected && error2.$metadata) { + error2.$metadata.clockSkewCorrected = true; } } - throw error3; + throw error2; }; } successHandler(httpResponse, signingProperties) { @@ -32341,15 +32232,15 @@ var init_AwsSdkSigV4Signer = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js -var AwsSdkSigV4ASigner; +var import_protocol_http11, AwsSdkSigV4ASigner; var init_AwsSdkSigV4ASigner = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js"() { - init_protocols(); - init_utils3(); + import_protocol_http11 = __toESM(require_dist_cjs2()); + init_utils(); init_AwsSdkSigV4Signer(); AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer { async sign(httpRequest, identity, signingProperties) { - if (!HttpRequest.isInstance(httpRequest)) { + if (!import_protocol_http11.HttpRequest.isInstance(httpRequest)) { throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); } const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties); @@ -32391,15 +32282,15 @@ var init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = __esm({ NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE"; NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference"; NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = { - environmentVariableSelector: (env2, options) => { + environmentVariableSelector: (env, options) => { if (options?.signingName) { const bearerTokenKey = getBearerTokenEnvKey(options.signingName); - if (bearerTokenKey in env2) + if (bearerTokenKey in env) return ["httpBearerAuth"]; } - if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env2)) + if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env)) return void 0; - return getArrayForCommaSeparatedString(env2[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]); + return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]); }, configFileSelector: (profile) => { if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) @@ -32412,21 +32303,21 @@ var init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js -var resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS; +var import_property_provider, resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS; var init_resolveAwsSdkSigV4AConfig = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js"() { init_dist_es(); - init_config2(); + import_property_provider = __toESM(require_dist_cjs28()); resolveAwsSdkSigV4AConfig = (config) => { - config.sigv4aSigningRegionSet = normalizeProvider2(config.sigv4aSigningRegionSet); + config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet); return config; }; NODE_SIGV4A_CONFIG_OPTIONS = { - environmentVariableSelector(env2) { - if (env2.AWS_SIGV4A_SIGNING_REGION_SET) { - return env2.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim()); + environmentVariableSelector(env) { + if (env.AWS_SIGV4A_SIGNING_REGION_SET) { + return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim()); } - throw new ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", { + throw new import_property_provider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", { tryNextLink: true }); }, @@ -32434,7 +32325,7 @@ var init_resolveAwsSdkSigV4AConfig = __esm({ if (profile.sigv4a_signing_region_set) { return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim()); } - throw new ProviderError("sigv4a_signing_region_set not set in profile.", { + throw new import_property_provider.ProviderError("sigv4a_signing_region_set not set in profile.", { tryNextLink: true }); }, @@ -32444,136 +32335,15 @@ var init_resolveAwsSdkSigV4AConfig = __esm({ }); // node_modules/@smithy/signature-v4/dist-cjs/index.js -var require_dist_cjs5 = __commonJS({ +var require_dist_cjs36 = __commonJS({ "node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2) { "use strict"; - var serde = (init_serde(), __toCommonJS(serde_exports)); - var client = (init_client2(), __toCommonJS(client_exports)); - var protocols2 = (init_protocols(), __toCommonJS(protocols_exports)); - var HeaderFormatter = class { - format(headers) { - const chunks = []; - for (const headerName of Object.keys(headers)) { - const bytes = serde.fromUtf8(headerName); - chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); - } - const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); - let position = 0; - for (const chunk of chunks) { - out.set(chunk, position); - position += chunk.byteLength; - } - return out; - } - formatHeaderValue(header) { - switch (header.type) { - case "boolean": - return Uint8Array.from([header.value ? 0 : 1]); - case "byte": - return Uint8Array.from([2, header.value]); - case "short": - const shortView = new DataView(new ArrayBuffer(3)); - shortView.setUint8(0, 3); - shortView.setInt16(1, header.value, false); - return new Uint8Array(shortView.buffer); - case "integer": - const intView = new DataView(new ArrayBuffer(5)); - intView.setUint8(0, 4); - intView.setInt32(1, header.value, false); - return new Uint8Array(intView.buffer); - case "long": - const longBytes = new Uint8Array(9); - longBytes[0] = 5; - longBytes.set(header.value.bytes, 1); - return longBytes; - case "binary": - const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); - binView.setUint8(0, 6); - binView.setUint16(1, header.value.byteLength, false); - const binBytes = new Uint8Array(binView.buffer); - binBytes.set(header.value, 3); - return binBytes; - case "string": - const utf8Bytes = serde.fromUtf8(header.value); - const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); - strView.setUint8(0, 7); - strView.setUint16(1, utf8Bytes.byteLength, false); - const strBytes = new Uint8Array(strView.buffer); - strBytes.set(utf8Bytes, 3); - return strBytes; - case "timestamp": - const tsBytes = new Uint8Array(9); - tsBytes[0] = 8; - tsBytes.set(Int642.fromNumber(header.value.valueOf()).bytes, 1); - return tsBytes; - case "uuid": - if (!UUID_PATTERN2.test(header.value)) { - throw new Error(`Invalid UUID received: ${header.value}`); - } - const uuidBytes = new Uint8Array(17); - uuidBytes[0] = 9; - uuidBytes.set(serde.fromHex(header.value.replace(/\-/g, "")), 1); - return uuidBytes; - } - } - }; - var HEADER_VALUE_TYPE2; - (function(HEADER_VALUE_TYPE3) { - HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolTrue"] = 0] = "boolTrue"; - HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolFalse"] = 1] = "boolFalse"; - HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byte"] = 2] = "byte"; - HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["short"] = 3] = "short"; - HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["integer"] = 4] = "integer"; - HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["long"] = 5] = "long"; - HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byteArray"] = 6] = "byteArray"; - HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["string"] = 7] = "string"; - HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["timestamp"] = 8] = "timestamp"; - HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["uuid"] = 9] = "uuid"; - })(HEADER_VALUE_TYPE2 || (HEADER_VALUE_TYPE2 = {})); - var UUID_PATTERN2 = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; - var Int642 = class _Int64 { - bytes; - constructor(bytes) { - this.bytes = bytes; - if (bytes.byteLength !== 8) { - throw new Error("Int64 buffers must be exactly 8 bytes"); - } - } - static fromNumber(number) { - if (number > 9223372036854776e3 || number < -9223372036854776e3) { - throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); - } - const bytes = new Uint8Array(8); - for (let i5 = 7, remaining = Math.abs(Math.round(number)); i5 > -1 && remaining > 0; i5--, remaining /= 256) { - bytes[i5] = remaining; - } - if (number < 0) { - negate2(bytes); - } - return new _Int64(bytes); - } - valueOf() { - const bytes = this.bytes.slice(0); - const negative = bytes[0] & 128; - if (negative) { - negate2(bytes); - } - return parseInt(serde.toHex(bytes), 16) * (negative ? -1 : 1); - } - toString() { - return String(this.valueOf()); - } - }; - function negate2(bytes) { - for (let i5 = 0; i5 < 8; i5++) { - bytes[i5] ^= 255; - } - for (let i5 = 7; i5 > -1; i5--) { - bytes[i5]++; - if (bytes[i5] !== 0) - break; - } - } + var utilHexEncoding = require_dist_cjs15(); + var utilUtf8 = require_dist_cjs9(); + var isArrayBuffer = require_dist_cjs7(); + var protocolHttp = require_dist_cjs2(); + var utilMiddleware = require_dist_cjs6(); + var utilUriEscape = require_dist_cjs11(); var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; var AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; @@ -32617,6 +32387,224 @@ var require_dist_cjs5 = __commonJS({ var MAX_CACHE_SIZE = 50; var KEY_TYPE_IDENTIFIER = "aws4_request"; var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + var signingKeyCache = {}; + var cacheQueue = []; + var createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`; + var getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${utilHexEncoding.toHex(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return signingKeyCache[cacheKey] = key; + }; + var clearCredentialCache = () => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); + }; + var hmac = (ctor, secret, data3) => { + const hash = new ctor(secret); + hash.update(utilUtf8.toUint8Array(data3)); + return hash.digest(); + }; + var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == void 0) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; + }; + var getPayloadHash = async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == void 0) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer.isArrayBuffer(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update(utilUtf8.toUint8Array(body)); + return utilHexEncoding.toHex(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; + }; + var HeaderFormatter = class { + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = utilUtf8.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = utilUtf8.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(utilHexEncoding.fromHex(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + }; + var HEADER_VALUE_TYPE; + (function(HEADER_VALUE_TYPE2) { + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["short"] = 3] = "short"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["long"] = 5] = "long"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["string"] = 7] = "string"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["uuid"] = 9] = "uuid"; + })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); + var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + var Int64 = class _Int64 { + bytes; + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number) { + if (number > 9223372036854776e3 || number < -9223372036854776e3) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i5 = 7, remaining = Math.abs(Math.round(number)); i5 > -1 && remaining > 0; i5--, remaining /= 256) { + bytes[i5] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new _Int64(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt(utilHexEncoding.toHex(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + function negate(bytes) { + for (let i5 = 0; i5 < 8; i5++) { + bytes[i5] ^= 255; + } + for (let i5 = 7; i5 > -1; i5--) { + bytes[i5]++; + if (bytes[i5] !== 0) + break; + } + } + var hasHeader = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; + }; + var moveHeadersToQuery = (request, options = {}) => { + const { headers, query = {} } = protocolHttp.HttpRequest.clone(request); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request, + headers, + query + }; + }; + var prepareRequest = (request) => { + request = protocolHttp.HttpRequest.clone(request); + for (const headerName of Object.keys(request.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; + } + } + return request; + }; var getCanonicalQuery = ({ query = {} }) => { const keys = []; const serialized = {}; @@ -32624,13 +32612,13 @@ var require_dist_cjs5 = __commonJS({ if (key.toLowerCase() === SIGNATURE_HEADER) { continue; } - const encodedKey = protocols2.escapeUri(key); + const encodedKey = utilUriEscape.escapeUri(key); keys.push(encodedKey); const value = query[key]; if (typeof value === "string") { - serialized[encodedKey] = `${encodedKey}=${protocols2.escapeUri(value)}`; + serialized[encodedKey] = `${encodedKey}=${utilUriEscape.escapeUri(value)}`; } else if (Array.isArray(value)) { - serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${protocols2.escapeUri(value2)}`]), []).sort().join("&"); + serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${utilUriEscape.escapeUri(value2)}`]), []).sort().join("&"); } } return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); @@ -32660,8 +32648,8 @@ var require_dist_cjs5 = __commonJS({ this.sha256 = sha256; this.uriEscapePath = uriEscapePath; this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; - this.regionProvider = client.normalizeProvider(region); - this.credentialProvider = client.normalizeProvider(credentials); + this.regionProvider = utilMiddleware.normalizeProvider(region); + this.credentialProvider = utilMiddleware.normalizeProvider(credentials); } createCanonicalRequest(request, canonicalHeaders, payloadHash) { const sortedHeaders = Object.keys(canonicalHeaders).sort(); @@ -32675,12 +32663,12 @@ ${payloadHash}`; } async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { const hash = new this.sha256(); - hash.update(serde.toUint8Array(canonicalRequest)); + hash.update(utilUtf8.toUint8Array(canonicalRequest)); const hashedRequest = await hash.digest(); return `${algorithmIdentifier} ${longDate} ${credentialScope} -${serde.toHex(hashedRequest)}`; +${utilHexEncoding.toHex(hashedRequest)}`; } getCanonicalPath({ path: path3 }) { if (this.uriEscapePath) { @@ -32697,7 +32685,7 @@ ${serde.toHex(hashedRequest)}`; } } const normalizedPath = `${path3?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path3?.endsWith("/") ? "/" : ""}`; - const doubleEncoded = protocols2.escapeUri(normalizedPath); + const doubleEncoded = utilUriEscape.escapeUri(normalizedPath); return doubleEncoded.replace(/%2F/g, "/"); } return path3; @@ -32718,100 +32706,6 @@ ${serde.toHex(hashedRequest)}`; return Object.keys(headers).sort().join(";"); } }; - var signingKeyCache = {}; - var cacheQueue = []; - var createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`; - var getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => { - const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); - const cacheKey = `${shortDate}:${region}:${service}:${serde.toHex(credsHash)}:${credentials.sessionToken}`; - if (cacheKey in signingKeyCache) { - return signingKeyCache[cacheKey]; - } - cacheQueue.push(cacheKey); - while (cacheQueue.length > MAX_CACHE_SIZE) { - delete signingKeyCache[cacheQueue.shift()]; - } - let key = `AWS4${credentials.secretAccessKey}`; - for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { - key = await hmac(sha256Constructor, key, signable); - } - return signingKeyCache[cacheKey] = key; - }; - var clearCredentialCache = () => { - cacheQueue.length = 0; - Object.keys(signingKeyCache).forEach((cacheKey) => { - delete signingKeyCache[cacheKey]; - }); - }; - var hmac = (ctor, secret, data3) => { - const hash = new ctor(secret); - hash.update(serde.toUint8Array(data3)); - return hash.digest(); - }; - var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => { - const canonical = {}; - for (const headerName of Object.keys(headers).sort()) { - if (headers[headerName] == void 0) { - continue; - } - const canonicalHeaderName = headerName.toLowerCase(); - if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { - if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { - continue; - } - } - canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); - } - return canonical; - }; - var getPayloadHash = async ({ headers, body }, hashConstructor) => { - for (const headerName of Object.keys(headers)) { - if (headerName.toLowerCase() === SHA256_HEADER) { - return headers[headerName]; - } - } - if (body == void 0) { - return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; - } else if (typeof body === "string" || ArrayBuffer.isView(body) || serde.isArrayBuffer(body)) { - const hashCtor = new hashConstructor(); - hashCtor.update(serde.toUint8Array(body)); - return serde.toHex(await hashCtor.digest()); - } - return UNSIGNED_PAYLOAD; - }; - var hasHeader = (soughtHeader, headers) => { - soughtHeader = soughtHeader.toLowerCase(); - for (const headerName of Object.keys(headers)) { - if (soughtHeader === headerName.toLowerCase()) { - return true; - } - } - return false; - }; - var moveHeadersToQuery = (request, options = {}) => { - const { headers, query = {} } = protocols2.HttpRequest.clone(request); - for (const name of Object.keys(headers)) { - const lname = name.toLowerCase(); - if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) { - query[name] = headers[name]; - delete headers[name]; - } - } - return { - ...request, - headers, - query - }; - }; - var prepareRequest = (request) => { - request = protocols2.HttpRequest.clone(request); - for (const headerName of Object.keys(request.headers)) { - if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { - delete request.headers[headerName]; - } - } - return request; - }; var SignatureV42 = class extends SignatureV4Base { headerFormatter = new HeaderFormatter(); constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) { @@ -32865,7 +32759,7 @@ ${serde.toHex(hashedRequest)}`; const hashedPayload = await getPayloadHash({ headers: {}, body: payload2 }, this.sha256); const hash = new this.sha256(); hash.update(headers); - const hashedHeaders = serde.toHex(await hash.digest()); + const hashedHeaders = utilHexEncoding.toHex(await hash.digest()); const stringToSign = [ EVENT_ALGORITHM_IDENTIFIER, longDate, @@ -32902,8 +32796,8 @@ ${serde.toHex(hashedRequest)}`; const region = signingRegion ?? await this.regionProvider(); const { shortDate } = this.formatDate(signingDate); const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); - hash.update(serde.toUint8Array(stringToSign)); - return serde.toHex(await hash.digest()); + hash.update(utilUtf8.toUint8Array(stringToSign)); + return utilHexEncoding.toHex(await hash.digest()); } async signRequest(requestToSign, { signingDate = /* @__PURE__ */ new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) { const credentials = await this.credentialProvider(); @@ -32928,8 +32822,8 @@ ${serde.toHex(hashedRequest)}`; async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER); const hash = new this.sha256(await keyPromise); - hash.update(serde.toUint8Array(stringToSign)); - return serde.toHex(await hash.digest()); + hash.update(utilUtf8.toUint8Array(stringToSign)); + return utilHexEncoding.toHex(await hash.digest()); } getSigningKey(credentials, region, shortDate, service) { return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); @@ -32991,7 +32885,7 @@ function normalizeCredentialProvider(config, { credentials, credentialDefaultPro } } else { if (credentialDefaultProvider) { - credentialsProvider = normalizeProvider2(credentialDefaultProvider(Object.assign({}, config, { + credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config, { parentClientConfig: config }))); } else { @@ -33015,9 +32909,9 @@ function bindCallerConfig(config, credentialsProvider) { var import_signature_v4, resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config; var init_resolveAwsSdkSigV4Config = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"() { - init_client3(); + init_client(); init_dist_es(); - import_signature_v4 = __toESM(require_dist_cjs5()); + import_signature_v4 = __toESM(require_dist_cjs36()); resolveAwsSdkSigV4Config = (config) => { let inputCredentials = config.credentials; let isUserSupplied = !!config.credentials; @@ -33060,9 +32954,9 @@ var init_resolveAwsSdkSigV4Config = __esm({ const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config; let signer; if (config.signer) { - signer = normalizeProvider2(config.signer); + signer = normalizeProvider(config.signer); } else if (config.regionInfoProvider) { - signer = () => normalizeProvider2(config.region)().then(async (region) => [ + signer = () => normalizeProvider(config.region)().then(async (region) => [ await config.regionInfoProvider(region, { useFipsEndpoint: await config.useFipsEndpoint(), useDualstackEndpoint: await config.useDualstackEndpoint() @@ -33088,7 +32982,7 @@ var init_resolveAwsSdkSigV4Config = __esm({ authScheme = Object.assign({}, { name: "sigv4", signingName: config.signingName || config.defaultSigningName, - signingRegion: await normalizeProvider2(config.region)(), + signingRegion: await normalizeProvider(config.region)(), properties: {} }, authScheme); const signingRegion = authScheme.signingRegion; @@ -33150,2198 +33044,47 @@ var init_httpAuthSchemes2 = __esm({ } }); -// node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js -var require_dist_cjs6 = __commonJS({ - "node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js"(exports2) { - "use strict"; - var signatureV4 = require_dist_cjs5(); - var signatureV4CrtContainer = { - CrtSignerV4: null - }; - var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token"; - var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase(); - var SignatureV4SignWithCredentials = class extends signatureV4.SignatureV4 { - async signWithCredentials(requestToSign, credentials, options) { - const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); - requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken; - const privateAccess = this; - setSingleOverride(privateAccess, credentialsWithoutSessionToken); - return privateAccess.signRequest(requestToSign, options ?? {}); - } - async presignWithCredentials(requestToSign, credentials, options) { - const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); - delete requestToSign.headers[SESSION_TOKEN_HEADER]; - requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; - requestToSign.query = requestToSign.query ?? {}; - requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; - const privateAccess = this; - setSingleOverride(privateAccess, credentialsWithoutSessionToken); - return this.presign(requestToSign, options); - } - }; - function getCredentialsWithoutSessionToken(credentials) { - return { - accessKeyId: credentials.accessKeyId, - secretAccessKey: credentials.secretAccessKey, - expiration: credentials.expiration - }; - } - function setSingleOverride(privateAccess, credentialsWithoutSessionToken) { - const currentCredentialProvider = privateAccess.credentialProvider; - privateAccess.credentialProvider = () => { - privateAccess.credentialProvider = currentCredentialProvider; - return Promise.resolve(credentialsWithoutSessionToken); - }; - } - var SignatureV4MultiRegion3 = class { - sigv4aSigner; - sigv4Signer; - signerOptions; - static sigv4aDependency() { - if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") { - return "crt"; - } else if (typeof signatureV4.signatureV4aContainer.SignatureV4a === "function") { - return "js"; - } - return "none"; - } - constructor(options) { - this.sigv4Signer = new SignatureV4SignWithCredentials(options); - this.signerOptions = options; - } - async sign(requestToSign, options = {}) { - if (options.signingRegion === "*") { - return this.getSigv4aSigner().sign(requestToSign, options); - } - return this.sigv4Signer.sign(requestToSign, options); - } - async signWithCredentials(requestToSign, credentials, options = {}) { - if (options.signingRegion === "*") { - const signer = this.getSigv4aSigner(); - const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; - if (CrtSignerV4 && signer instanceof CrtSignerV4) { - return signer.signWithCredentials(requestToSign, credentials, options); - } else { - throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); - } - } - return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options); - } - async presign(originalRequest, options = {}) { - if (options.signingRegion === "*") { - const signer = this.getSigv4aSigner(); - const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; - if (CrtSignerV4 && signer instanceof CrtSignerV4) { - return signer.presign(originalRequest, options); - } else { - throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); - } - } - return this.sigv4Signer.presign(originalRequest, options); - } - async presignWithCredentials(originalRequest, credentials, options = {}) { - if (options.signingRegion === "*") { - throw new Error("Method presignWithCredentials is not supported for [signingRegion=*]."); - } - return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options); - } - getSigv4aSigner() { - if (!this.sigv4aSigner) { - const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; - const JsSigV4aSigner = signatureV4.signatureV4aContainer.SignatureV4a; - if (this.signerOptions.runtime === "node") { - if (!CrtSignerV4 && !JsSigV4aSigner) { - throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); - } - if (CrtSignerV4 && typeof CrtSignerV4 === "function") { - this.sigv4aSigner = new CrtSignerV4({ - ...this.signerOptions, - signingAlgorithm: 1 - }); - } else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") { - this.sigv4aSigner = new JsSigV4aSigner({ - ...this.signerOptions - }); - } else { - throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); - } - } else { - if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") { - throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a"); - } - this.sigv4aSigner = new JsSigV4aSigner({ - ...this.signerOptions - }); - } - } - return this.sigv4aSigner; - } - }; - exports2.SignatureV4MultiRegion = SignatureV4MultiRegion3; - exports2.SignatureV4SignWithCredentials = SignatureV4SignWithCredentials; - exports2.signatureV4CrtContainer = signatureV4CrtContainer; - } -}); - -// node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/bdd.js -var require_bdd = __commonJS({ - "node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/bdd.js"(exports2) { +// node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/toStream.js +var require_toStream = __commonJS({ + "node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/toStream.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.bdd = void 0; - var endpoints_1 = (init_endpoints(), __toCommonJS(endpoints_exports)); - var q2 = "ref"; - var a5 = -1; - var b6 = true; - var c5 = "isSet"; - var d5 = "PartitionResult"; - var e5 = "booleanEquals"; - var f5 = "stringEquals"; - var g5 = "getAttr"; - var h5 = "us-east-1"; - var i5 = "sigv4"; - var j5 = "sts"; - var k5 = "https://sts.{Region}.{PartitionResult#dnsSuffix}"; - var l3 = { [q2]: "Endpoint" }; - var m3 = { [q2]: "Region" }; - var n3 = { [q2]: d5 }; - var o2 = {}; - var p2 = [m3]; - var _data5 = { - conditions: [ - [c5, [l3]], - [c5, p2], - ["aws.partition", p2, d5], - [e5, [{ [q2]: "UseFIPS" }, b6]], - [e5, [{ [q2]: "UseDualStack" }, b6]], - [f5, [m3, "aws-global"]], - [e5, [{ [q2]: "UseGlobalEndpoint" }, b6]], - [f5, [m3, "eu-central-1"]], - [e5, [{ fn: g5, argv: [n3, "supportsDualStack"] }, b6]], - [e5, [{ fn: g5, argv: [n3, "supportsFIPS"] }, b6]], - [f5, [m3, "ap-south-1"]], - [f5, [m3, "eu-north-1"]], - [f5, [m3, "eu-west-1"]], - [f5, [m3, "eu-west-2"]], - [f5, [m3, "eu-west-3"]], - [f5, [m3, "sa-east-1"]], - [f5, [m3, h5]], - [f5, [m3, "us-east-2"]], - [f5, [m3, "us-west-2"]], - [f5, [m3, "us-west-1"]], - [f5, [m3, "ca-central-1"]], - [f5, [m3, "ap-southeast-1"]], - [f5, [m3, "ap-northeast-1"]], - [f5, [m3, "ap-southeast-2"]], - [f5, [{ fn: g5, argv: [n3, "name"] }, "aws-us-gov"]] - ], - results: [ - [a5], - ["https://sts.amazonaws.com", { authSchemes: [{ name: i5, signingName: j5, signingRegion: h5 }] }], - [k5, { authSchemes: [{ name: i5, signingName: j5, signingRegion: "{Region}" }] }], - [a5, "Invalid Configuration: FIPS and custom endpoint are not supported"], - [a5, "Invalid Configuration: Dualstack and custom endpoint are not supported"], - [l3, o2], - ["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", o2], - [a5, "FIPS and DualStack are enabled, but this partition does not support one or both"], - ["https://sts.{Region}.amazonaws.com", o2], - ["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", o2], - [a5, "FIPS is enabled but this partition does not support FIPS"], - ["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", o2], - [a5, "DualStack is enabled but this partition does not support DualStack"], - [k5, o2], - [a5, "Invalid Configuration: Missing Region"] - ] - }; - var root5 = 2; - var r5 = 1e8; - var nodes5 = new Int32Array([ - -1, - 1, - -1, - 0, - 30, - 3, - 1, - 4, - r5 + 14, - 2, - 5, - r5 + 14, - 3, - 25, - 6, - 4, - 24, - 7, - 5, - r5 + 1, - 8, - 6, - 9, - r5 + 13, - 7, - r5 + 1, - 10, - 10, - r5 + 1, - 11, - 11, - r5 + 1, - 12, - 12, - r5 + 1, - 13, - 13, - r5 + 1, - 14, - 14, - r5 + 1, - 15, - 15, - r5 + 1, - 16, - 16, - r5 + 1, - 17, - 17, - r5 + 1, - 18, - 18, - r5 + 1, - 19, - 19, - r5 + 1, - 20, - 20, - r5 + 1, - 21, - 21, - r5 + 1, - 22, - 22, - r5 + 1, - 23, - 23, - r5 + 1, - r5 + 2, - 8, - r5 + 11, - r5 + 12, - 4, - 28, - 26, - 9, - 27, - r5 + 10, - 24, - r5 + 8, - r5 + 9, - 8, - 29, - r5 + 7, - 9, - r5 + 6, - r5 + 7, - 3, - r5 + 3, - 31, - 4, - r5 + 4, - r5 + 5 - ]); - exports2.bdd = endpoints_1.BinaryDecisionDiagram.from(nodes5, root5, _data5.conditions, _data5.results); + exports2.toStream = toStream; + var node_stream_1 = require("node:stream"); + function toStream(bytes) { + return node_stream_1.Readable.from(Buffer.from(bytes)); + } } }); -// node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js -var require_endpointResolver = __commonJS({ - "node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) { +// node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js +var require_dist_cjs37 = __commonJS({ + "node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js"(exports2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultEndpointResolver = void 0; - var client_1 = (init_client3(), __toCommonJS(client_exports2)); - var endpoints_1 = (init_endpoints(), __toCommonJS(endpoints_exports)); - var bdd_1 = require_bdd(); - var cache5 = new endpoints_1.EndpointCache({ - size: 50, - params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"] - }); - var defaultEndpointResolver5 = (endpointParams, context = {}) => { - return cache5.get(endpointParams, () => (0, endpoints_1.decideEndpoint)(bdd_1.bdd, { - endpointParams, - logger: context.logger - })); - }; - exports2.defaultEndpointResolver = defaultEndpointResolver5; - endpoints_1.customEndpointFunctions.aws = client_1.awsEndpointFunctions; - } -}); - -// node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js -var require_httpAuthSchemeProvider = __commonJS({ - "node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.resolveHttpAuthSchemeConfig = exports2.defaultSTSHttpAuthSchemeProvider = exports2.defaultSTSHttpAuthSchemeParametersProvider = void 0; - var httpAuthSchemes_1 = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports)); - var signature_v4_multi_region_1 = require_dist_cjs6(); - var client_1 = (init_client2(), __toCommonJS(client_exports)); - var endpoints_1 = (init_endpoints(), __toCommonJS(endpoints_exports)); - var endpointResolver_1 = require_endpointResolver(); - var createEndpointRuleSetHttpAuthSchemeParametersProvider2 = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => { - if (!input) { - throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`"); - } - const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input); - const instructionsFn = (0, client_1.getSmithyContext)(context)?.commandInstance?.constructor?.getEndpointParameterInstructions; - if (!instructionsFn) { - throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`); - } - const endpointParameters = await (0, endpoints_1.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config); - return Object.assign(defaultParameters, endpointParameters); - }; - var _defaultSTSHttpAuthSchemeParametersProvider2 = async (config, context, input) => { + var validate = (str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6; + var parse = (arn) => { + const segments = arn.split(":"); + if (segments.length < 6 || segments[0] !== "arn") + throw new Error("Malformed ARN"); + const [, partition, service, region, accountId, ...resource] = segments; return { - operation: (0, client_1.getSmithyContext)(context).operation, - region: await (0, client_1.normalizeProvider)(config.region)() || (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })() + partition, + service, + region, + accountId, + resource: resource.join(":") }; }; - exports2.defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider2(_defaultSTSHttpAuthSchemeParametersProvider2); - function createAwsAuthSigv4HttpAuthOption5(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "sts", - region: authParameters.region - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context - } - }) - }; - } - function createAwsAuthSigv4aHttpAuthOption2(authParameters) { - return { - schemeId: "aws.auth#sigv4a", - signingProperties: { - name: "sts", - region: authParameters.region - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context - } - }) - }; - } - function createSmithyApiNoAuthHttpAuthOption5(authParameters) { - return { - schemeId: "smithy.api#noAuth" - }; - } - var createEndpointRuleSetHttpAuthSchemeProvider2 = (defaultEndpointResolver5, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => { - const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => { - const endpoint = defaultEndpointResolver5(authParameters); - const authSchemes = endpoint.properties?.authSchemes; - if (!authSchemes) { - return defaultHttpAuthSchemeResolver(authParameters); - } - const options = []; - for (const scheme of authSchemes) { - const { name: resolvedName, properties = {}, ...rest } = scheme; - const name = resolvedName.toLowerCase(); - if (resolvedName !== name) { - console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`); - } - let schemeId; - if (name === "sigv4a") { - schemeId = "aws.auth#sigv4a"; - const sigv4Present = authSchemes.find((s) => { - const name2 = s.name.toLowerCase(); - return name2 !== "sigv4a" && name2.startsWith("sigv4"); - }); - if (signature_v4_multi_region_1.SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) { - continue; - } - } else if (name.startsWith("sigv4")) { - schemeId = "aws.auth#sigv4"; - } else { - throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`); - } - const createOption = createHttpAuthOptionFunctions[schemeId]; - if (!createOption) { - throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`); - } - const option = createOption(authParameters); - option.schemeId = schemeId; - option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties }; - options.push(option); - } - return options; - }; - return endpointRuleSetHttpAuthSchemeProvider; - }; - var _defaultSTSHttpAuthSchemeProvider2 = (authParameters) => { - const options = []; - switch (authParameters.operation) { - case "AssumeRoleWithSAML": { - options.push(createSmithyApiNoAuthHttpAuthOption5(authParameters)); - options.push(createAwsAuthSigv4aHttpAuthOption2(authParameters)); - break; - } - case "AssumeRoleWithWebIdentity": { - options.push(createSmithyApiNoAuthHttpAuthOption5(authParameters)); - options.push(createAwsAuthSigv4aHttpAuthOption2(authParameters)); - break; - } - default: { - options.push(createAwsAuthSigv4HttpAuthOption5(authParameters)); - options.push(createAwsAuthSigv4aHttpAuthOption2(authParameters)); - } - } - return options; - }; - exports2.defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider2(endpointResolver_1.defaultEndpointResolver, _defaultSTSHttpAuthSchemeProvider2, { - "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption5, - "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption2, - "smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption5 - }); - var resolveHttpAuthSchemeConfig5 = (config) => { - const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config); - const config_1 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4AConfig)(config_0); - return Object.assign(config_1, { - authSchemePreference: (0, client_1.normalizeProvider)(config.authSchemePreference ?? []) - }); - }; - exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig5; - } -}); - -// node_modules/@aws-sdk/client-sts/package.json -var require_package = __commonJS({ - "node_modules/@aws-sdk/client-sts/package.json"(exports2, module2) { - module2.exports = { - name: "@aws-sdk/client-sts", - description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native", - version: "3.1049.0", - scripts: { - build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs", - "build:cjs": "node ../../scripts/compilation/inline client-sts", - "build:es": "tsc -p tsconfig.es.json", - "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"', - "build:types": "premove ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json", - "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", - clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo", - "extract:docs": "api-extractor run --local", - "generate:client": "node ../../scripts/generate-clients/single-service --solo sts", - test: "yarn g:vitest run", - "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", - "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", - "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs", - "test:integration": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts", - "test:integration:watch": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts", - "test:watch": "yarn g:vitest watch" - }, - main: "./dist-cjs/index.js", - types: "./dist-types/index.d.ts", - module: "./dist-es/index.js", - sideEffects: false, - dependencies: { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@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.2", - "@tsconfig/node20": "20.1.8", - "@types/node": "^20.14.8", - concurrently: "7.0.0", - "downlevel-dts": "0.10.1", - premove: "4.0.0", - typescript: "~5.8.3", - vitest: "^4.0.17" - }, - engines: { - node: ">=20.0.0" - }, - typesVersions: { - "<4.5": { - "dist-types/*": [ - "dist-types/ts3.4/*" - ] - } - }, - files: [ - "dist-*/**" - ], - author: { - name: "AWS SDK for JavaScript Team", - url: "https://aws.amazon.com/javascript/" - }, - license: "Apache-2.0", - browser: { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" - }, - "react-native": { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" - }, - homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts", - repository: { - type: "git", - url: "https://github.com/aws/aws-sdk-js-v3.git", - directory: "clients/client-sts" - } - }; - } -}); - -// node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js -var require_dist_cjs7 = __commonJS({ - "node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js"(exports2) { - "use strict"; - var client = (init_client3(), __toCommonJS(client_exports2)); - var config = (init_config2(), __toCommonJS(config_exports)); - var ENV_KEY = "AWS_ACCESS_KEY_ID"; - var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; - var ENV_SESSION = "AWS_SESSION_TOKEN"; - var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; - var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; - var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; - var fromEnv2 = (init) => async () => { - init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); - const accessKeyId = process.env[ENV_KEY]; - const secretAccessKey = process.env[ENV_SECRET]; - const sessionToken = process.env[ENV_SESSION]; - const expiry = process.env[ENV_EXPIRATION]; - const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; - const accountId = process.env[ENV_ACCOUNT_ID]; - if (accessKeyId && secretAccessKey) { - const credentials = { - accessKeyId, - secretAccessKey, - ...sessionToken && { sessionToken }, - ...expiry && { expiration: new Date(expiry) }, - ...credentialScope && { credentialScope }, - ...accountId && { accountId } - }; - client.setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g"); - return credentials; - } - throw new config.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); - }; - exports2.ENV_ACCOUNT_ID = ENV_ACCOUNT_ID; - exports2.ENV_CREDENTIAL_SCOPE = ENV_CREDENTIAL_SCOPE; - exports2.ENV_EXPIRATION = ENV_EXPIRATION; - exports2.ENV_KEY = ENV_KEY; - exports2.ENV_SECRET = ENV_SECRET; - exports2.ENV_SESSION = ENV_SESSION; - exports2.fromEnv = fromEnv2; - } -}); - -// node_modules/@smithy/credential-provider-imds/dist-cjs/index.js -var require_dist_cjs8 = __commonJS({ - "node_modules/@smithy/credential-provider-imds/dist-cjs/index.js"(exports2) { - "use strict"; - var node_url = require("node:url"); - var config = (init_config2(), __toCommonJS(config_exports)); - var node_http = require("node:http"); - var protocols2 = (init_protocols(), __toCommonJS(protocols_exports)); - var isImdsCredentials = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string"; - var fromImdsCredentials = (creds) => ({ - accessKeyId: creds.AccessKeyId, - secretAccessKey: creds.SecretAccessKey, - sessionToken: creds.Token, - expiration: new Date(creds.Expiration), - ...creds.AccountId && { accountId: creds.AccountId } - }); - var DEFAULT_TIMEOUT = 1e3; - var DEFAULT_MAX_RETRIES = 0; - var providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT }) => ({ maxRetries, timeout }); - function httpRequest(options) { - return new Promise((resolve, reject) => { - const req = node_http.request({ - method: "GET", - ...options, - hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1") - }); - req.on("error", (err) => { - reject(Object.assign(new config.ProviderError("Unable to connect to instance metadata service"), err)); - req.destroy(); - }); - req.on("timeout", () => { - reject(new config.ProviderError("TimeoutError from instance metadata service")); - req.destroy(); - }); - req.on("response", (res) => { - const { statusCode = 400 } = res; - if (statusCode < 200 || 300 <= statusCode) { - reject(Object.assign(new config.ProviderError("Error response received from instance metadata service"), { statusCode })); - req.destroy(); - } - const chunks = []; - res.on("data", (chunk) => { - chunks.push(chunk); - }); - res.on("end", () => { - resolve(Buffer.concat(chunks)); - req.destroy(); - }); - }); - req.end(); - }); - } - var retry = (toRetry, maxRetries) => { - let promise = toRetry(); - for (let i5 = 0; i5 < maxRetries; i5++) { - promise = promise.catch(toRetry); - } - return promise; - }; - var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; - var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; - var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; - var fromContainerMetadata = (init = {}) => { - const { timeout, maxRetries } = providerConfigFromInit(init); - return () => retry(async () => { - const requestOptions = await getCmdsUri({ logger: init.logger }); - const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); - if (!isImdsCredentials(credsResponse)) { - throw new config.CredentialsProviderError("Invalid response received from instance metadata service.", { - logger: init.logger - }); - } - return fromImdsCredentials(credsResponse); - }, maxRetries); - }; - var requestFromEcsImds = async (timeout, options) => { - if (process.env[ENV_CMDS_AUTH_TOKEN]) { - options.headers = { - ...options.headers, - Authorization: process.env[ENV_CMDS_AUTH_TOKEN] - }; - } - const buffer = await httpRequest({ - ...options, - timeout - }); - return buffer.toString(); - }; - var CMDS_IP = "169.254.170.2"; - var GREENGRASS_HOSTS = { - localhost: true, - "127.0.0.1": true - }; - var GREENGRASS_PROTOCOLS = { - "http:": true, - "https:": true - }; - var getCmdsUri = async ({ logger: logger2 }) => { - if (process.env[ENV_CMDS_RELATIVE_URI]) { - return { - hostname: CMDS_IP, - path: process.env[ENV_CMDS_RELATIVE_URI] - }; - } - if (process.env[ENV_CMDS_FULL_URI]) { - const parsed = node_url.parse(process.env[ENV_CMDS_FULL_URI]); - if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { - throw new config.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { - tryNextLink: false, - logger: logger2 - }); - } - if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { - throw new config.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { - tryNextLink: false, - logger: logger2 - }); - } - return { - ...parsed, - port: parsed.port ? parseInt(parsed.port, 10) : void 0 - }; - } - throw new config.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, { - tryNextLink: false, - logger: logger2 - }); - }; - var InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends config.CredentialsProviderError { - tryNextLink; - name = "InstanceMetadataV1FallbackError"; - constructor(message, tryNextLink = true) { - super(message, tryNextLink); - this.tryNextLink = tryNextLink; - Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype); - } - }; - exports2.Endpoint = void 0; - (function(Endpoint) { - Endpoint["IPv4"] = "http://169.254.169.254"; - Endpoint["IPv6"] = "http://[fd00:ec2::254]"; - })(exports2.Endpoint || (exports2.Endpoint = {})); - var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; - var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; - var ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], - default: void 0 - }; - var EndpointMode; - (function(EndpointMode2) { - EndpointMode2["IPv4"] = "IPv4"; - EndpointMode2["IPv6"] = "IPv6"; - })(EndpointMode || (EndpointMode = {})); - var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; - var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; - var ENDPOINT_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_MODE_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], - default: EndpointMode.IPv4 - }; - var getInstanceMetadataEndpoint = async () => protocols2.parseUrl(await getFromEndpointConfig() || await getFromEndpointModeConfig()); - var getFromEndpointConfig = async () => config.loadConfig(ENDPOINT_CONFIG_OPTIONS)(); - var getFromEndpointModeConfig = async () => { - const endpointMode = await config.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)(); - switch (endpointMode) { - case EndpointMode.IPv4: - return exports2.Endpoint.IPv4; - case EndpointMode.IPv6: - return exports2.Endpoint.IPv6; - default: - throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); - } - }; - var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; - var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; - var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; - var getExtendedInstanceMetadataCredentials = (credentials, logger2) => { - const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); - const newExpiration = new Date(Date.now() + refreshInterval * 1e3); - logger2.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}. -For more information, please visit: ` + STATIC_STABILITY_DOC_URL); - const originalExpiration = credentials.originalExpiration ?? credentials.expiration; - return { - ...credentials, - ...originalExpiration ? { originalExpiration } : {}, - expiration: newExpiration - }; - }; - var staticStabilityProvider = (provider, options = {}) => { - const logger2 = options?.logger || console; - let pastCredentials; - return async () => { - let credentials; - try { - credentials = await provider(); - if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { - credentials = getExtendedInstanceMetadataCredentials(credentials, logger2); - } - } catch (e5) { - if (pastCredentials) { - logger2.warn("Credential renew failed: ", e5); - credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger2); - } else { - throw e5; - } - } - pastCredentials = credentials; - return credentials; - }; - }; - var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; - var IMDS_TOKEN_PATH = "/latest/api/token"; - var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; - var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; - var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; - var fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }); - var getInstanceMetadataProvider = (init = {}) => { - let disableFetchToken = false; - const { logger: logger2, profile } = init; - const { timeout, maxRetries } = providerConfigFromInit(init); - const getCredentials = async (maxRetries2, options) => { - const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null; - if (isImdsV1Fallback) { - let fallbackBlockedFromProfile = false; - let fallbackBlockedFromProcessEnv = false; - const configValue = await config.loadConfig({ - environmentVariableSelector: (env2) => { - const envValue = env2[AWS_EC2_METADATA_V1_DISABLED]; - fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; - if (envValue === void 0) { - throw new config.CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger }); - } - return fallbackBlockedFromProcessEnv; - }, - configFileSelector: (profile2) => { - const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; - fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; - return fallbackBlockedFromProfile; - }, - default: false - }, { - profile - })(); - if (init.ec2MetadataV1Disabled || configValue) { - const causes = []; - if (init.ec2MetadataV1Disabled) - causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); - if (fallbackBlockedFromProfile) - causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); - if (fallbackBlockedFromProcessEnv) - causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); - throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(", ")}].`); - } - } - const imdsProfile = (await retry(async () => { - let profile2; - try { - profile2 = await getProfile(options); - } catch (err) { - if (err.statusCode === 401) { - disableFetchToken = false; - } - throw err; - } - return profile2; - }, maxRetries2)).trim(); - return retry(async () => { - let creds; - try { - creds = await getCredentialsFromProfile(imdsProfile, options, init); - } catch (err) { - if (err.statusCode === 401) { - disableFetchToken = false; - } - throw err; - } - return creds; - }, maxRetries2); - }; - return async () => { - const endpoint = await getInstanceMetadataEndpoint(); - if (disableFetchToken) { - logger2?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); - return getCredentials(maxRetries, { ...endpoint, timeout }); - } else { - let token; - try { - token = (await getMetadataToken({ ...endpoint, timeout })).toString(); - } catch (error3) { - if (error3?.statusCode === 400) { - throw Object.assign(error3, { - message: "EC2 Metadata token request returned error" - }); - } else if (error3.message === "TimeoutError" || [403, 404, 405].includes(error3.statusCode)) { - disableFetchToken = true; - } - logger2?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); - return getCredentials(maxRetries, { ...endpoint, timeout }); - } - return getCredentials(maxRetries, { - ...endpoint, - headers: { - [X_AWS_EC2_METADATA_TOKEN]: token - }, - timeout - }); - } - }; - }; - var getMetadataToken = async (options) => httpRequest({ - ...options, - path: IMDS_TOKEN_PATH, - method: "PUT", - headers: { - "x-aws-ec2-metadata-token-ttl-seconds": "21600" - } - }); - var getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(); - var getCredentialsFromProfile = async (profile, options, init) => { - const credentialsResponse = JSON.parse((await httpRequest({ - ...options, - path: IMDS_PATH + profile - })).toString()); - if (!isImdsCredentials(credentialsResponse)) { - throw new config.CredentialsProviderError("Invalid response received from instance metadata service.", { - logger: init.logger - }); - } - return fromImdsCredentials(credentialsResponse); - }; - exports2.DEFAULT_MAX_RETRIES = DEFAULT_MAX_RETRIES; - exports2.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT; - exports2.ENV_CMDS_AUTH_TOKEN = ENV_CMDS_AUTH_TOKEN; - exports2.ENV_CMDS_FULL_URI = ENV_CMDS_FULL_URI; - exports2.ENV_CMDS_RELATIVE_URI = ENV_CMDS_RELATIVE_URI; - exports2.fromContainerMetadata = fromContainerMetadata; - exports2.fromInstanceMetadata = fromInstanceMetadata; - exports2.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint; - exports2.httpRequest = httpRequest; - exports2.providerConfigFromInit = providerConfigFromInit; - } -}); - -// node_modules/@smithy/node-http-handler/dist-cjs/index.js -var require_dist_cjs9 = __commonJS({ - "node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2) { - "use strict"; - var node_https = require("node:https"); - var protocols2 = (init_protocols(), __toCommonJS(protocols_exports)); - var node_stream = require("node:stream"); - var http22 = require("node:http2"); - function buildAbortError(abortSignal) { - const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0; - if (reason) { - if (reason instanceof Error) { - const abortError3 = new Error("Request aborted"); - abortError3.name = "AbortError"; - abortError3.cause = reason; - return abortError3; - } - const abortError2 = new Error(String(reason)); - abortError2.name = "AbortError"; - return abortError2; - } - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - return abortError; - } - var NODEJS_TIMEOUT_ERROR_CODES2 = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; - var getTransformedHeaders = (headers) => { - const transformedHeaders = {}; - for (const name in headers) { - const headerValues = headers[name]; - transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; - } - return transformedHeaders; - }; - var timing = { - setTimeout: (cb, ms) => setTimeout(cb, ms), - clearTimeout: (timeoutId) => clearTimeout(timeoutId) - }; - var DEFER_EVENT_LISTENER_TIME$2 = 1e3; - var setConnectionTimeout = (request, reject, timeoutInMs = 0) => { - if (!timeoutInMs) { - return -1; - } - const registerTimeout = (offset) => { - const timeoutId = timing.setTimeout(() => { - request.destroy(); - reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), { - name: "TimeoutError" - })); - }, timeoutInMs - offset); - const doWithSocket = (socket) => { - if (socket?.connecting) { - socket.on("connect", () => { - timing.clearTimeout(timeoutId); - }); - } else { - timing.clearTimeout(timeoutId); - } - }; - if (request.socket) { - doWithSocket(request.socket); - } else { - request.on("socket", doWithSocket); - } - }; - if (timeoutInMs < 2e3) { - registerTimeout(0); - return 0; - } - return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2); - }; - var setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger2) => { - if (timeoutInMs) { - return timing.setTimeout(() => { - let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`; - if (throwOnRequestTimeout) { - const error3 = Object.assign(new Error(msg), { - name: "TimeoutError", - code: "ETIMEDOUT" - }); - req.destroy(error3); - reject(error3); - } else { - msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`; - logger2?.warn?.(msg); - } - }, timeoutInMs); - } - return -1; - }; - var DEFER_EVENT_LISTENER_TIME$1 = 3e3; - var setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { - if (keepAlive !== true) { - return -1; - } - const registerListener = () => { - if (request.socket) { - request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); - } else { - request.on("socket", (socket) => { - socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); - }); - } - }; - if (deferTimeMs === 0) { - registerListener(); - return 0; - } - return timing.setTimeout(registerListener, deferTimeMs); - }; - var DEFER_EVENT_LISTENER_TIME = 3e3; - var setSocketTimeout = (request, reject, timeoutInMs = 0) => { - const registerTimeout = (offset) => { - const timeout = timeoutInMs - offset; - const onTimeout = () => { - request.destroy(); - reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" })); - }; - if (request.socket) { - request.socket.setTimeout(timeout, onTimeout); - request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); - } else { - request.setTimeout(timeout, onTimeout); - } - }; - if (0 < timeoutInMs && timeoutInMs < 6e3) { - registerTimeout(0); - return 0; - } - return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); - }; - var MIN_WAIT_TIME = 6e3; - async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) { - const headers = request.headers; - const expect = headers ? headers.Expect || headers.expect : void 0; - let timeoutId = -1; - let sendBody = true; - if (!externalAgent && expect === "100-continue") { - sendBody = await Promise.race([ - new Promise((resolve) => { - timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); - }), - new Promise((resolve) => { - httpRequest.on("continue", () => { - timing.clearTimeout(timeoutId); - resolve(true); - }); - httpRequest.on("response", () => { - timing.clearTimeout(timeoutId); - resolve(false); - }); - httpRequest.on("error", () => { - timing.clearTimeout(timeoutId); - resolve(false); - }); - }) - ]); - } - if (sendBody) { - writeBody(httpRequest, request.body); - } - } - function writeBody(httpRequest, body) { - if (body instanceof node_stream.Readable) { - body.pipe(httpRequest); - return; - } - if (body) { - const isBuffer = Buffer.isBuffer(body); - const isString = typeof body === "string"; - if (isBuffer || isString) { - if (isBuffer && body.byteLength === 0) { - httpRequest.end(); - } else { - httpRequest.end(body); - } - return; - } - const uint8 = body; - if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") { - httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); - return; - } - httpRequest.end(Buffer.from(body)); - return; - } - httpRequest.end(); - } - var DEFAULT_REQUEST_TIMEOUT = 0; - var hAgent = void 0; - var hRequest = void 0; - var NodeHttpHandler2 = class _NodeHttpHandler { - config; - configProvider; - socketWarningTimestamp = 0; - externalAgent = false; - metadata = { handlerProtocol: "http/1.1" }; - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new _NodeHttpHandler(instanceOrOptions); - } - static checkSocketUsage(agent, socketWarningTimestamp, logger2 = console) { - const { sockets, requests, maxSockets } = agent; - if (typeof maxSockets !== "number" || maxSockets === Infinity) { - return socketWarningTimestamp; - } - const interval = 15e3; - if (Date.now() - interval < socketWarningTimestamp) { - return socketWarningTimestamp; - } - if (sockets && requests) { - for (const origin in sockets) { - const socketsInUse = sockets[origin]?.length ?? 0; - const requestsEnqueued = requests[origin]?.length ?? 0; - if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { - logger2?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. -See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html -or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`); - return Date.now(); - } - } - } - return socketWarningTimestamp; - } - constructor(options) { - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options().then((_options) => { - resolve(this.resolveDefaultConfig(_options)); - }).catch(reject); - } else { - resolve(this.resolveDefaultConfig(options)); - } - }); - } - destroy() { - this.config?.httpAgent?.destroy(); - this.config?.httpsAgent?.destroy(); - } - async handle(request, { abortSignal, requestTimeout } = {}) { - if (!this.config) { - this.config = await this.configProvider; - } - const config = this.config; - const isSSL = request.protocol === "https:"; - if (!isSSL && !this.config.httpAgent) { - this.config.httpAgent = await this.config.httpAgentProvider(); - } - return new Promise((_resolve, _reject) => { - let writeRequestBodyPromise = void 0; - let socketWarningTimeoutId = -1; - let connectionTimeoutId = -1; - let requestTimeoutId = -1; - let socketTimeoutId = -1; - let keepAliveTimeoutId = -1; - const clearTimeouts = () => { - timing.clearTimeout(socketWarningTimeoutId); - timing.clearTimeout(connectionTimeoutId); - timing.clearTimeout(requestTimeoutId); - timing.clearTimeout(socketTimeoutId); - timing.clearTimeout(keepAliveTimeoutId); - }; - const resolve = async (arg) => { - await writeRequestBodyPromise; - clearTimeouts(); - _resolve(arg); - }; - const reject = async (arg) => { - await writeRequestBodyPromise; - clearTimeouts(); - _reject(arg); - }; - if (abortSignal?.aborted) { - const abortError = buildAbortError(abortSignal); - reject(abortError); - return; - } - const headers = request.headers; - const expectContinue = headers ? (headers.Expect ?? headers.expect) === "100-continue" : false; - let agent = isSSL ? config.httpsAgent : config.httpAgent; - if (expectContinue && !this.externalAgent) { - agent = new (isSSL ? node_https.Agent : hAgent)({ - keepAlive: false, - maxSockets: Infinity - }); - } - socketWarningTimeoutId = timing.setTimeout(() => { - this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger); - }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2e3) + (config.connectionTimeout ?? 1e3)); - const queryString = request.query ? protocols2.buildQueryString(request.query) : ""; - let auth = void 0; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}`; - } - let path3 = request.path; - if (queryString) { - path3 += `?${queryString}`; - } - if (request.fragment) { - path3 += `#${request.fragment}`; - } - let hostname = request.hostname ?? ""; - if (hostname[0] === "[" && hostname.endsWith("]")) { - hostname = request.hostname.slice(1, -1); - } else { - hostname = request.hostname; - } - const nodeHttpsOptions = { - headers: request.headers, - host: hostname, - method: request.method, - path: path3, - port: request.port, - agent, - auth - }; - const requestFunc = isSSL ? node_https.request : hRequest; - const req = requestFunc(nodeHttpsOptions, (res) => { - const httpResponse = new protocols2.HttpResponse({ - statusCode: res.statusCode || -1, - reason: res.statusMessage, - headers: getTransformedHeaders(res.headers), - body: res - }); - resolve({ response: httpResponse }); - }); - req.on("error", (err) => { - if (NODEJS_TIMEOUT_ERROR_CODES2.includes(err.code)) { - reject(Object.assign(err, { name: "TimeoutError" })); - } else { - reject(err); - } - }); - if (abortSignal) { - const onAbort = () => { - req.destroy(); - const abortError = buildAbortError(abortSignal); - reject(abortError); - }; - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - req.once("close", () => signal.removeEventListener("abort", onAbort)); - } else { - abortSignal.onabort = onAbort; - } - } - const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout; - connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout); - requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console); - socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout); - const httpAgent = nodeHttpsOptions.agent; - if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { - keepAliveTimeoutId = setSocketKeepAlive(req, { - keepAlive: httpAgent.keepAlive, - keepAliveMsecs: httpAgent.keepAliveMsecs - }); - } - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e5) => { - clearTimeouts(); - return _reject(e5); - }); - }); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - resolveDefaultConfig(options) { - const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger: logger2 } = options || {}; - const keepAlive = true; - const maxSockets = 50; - return { - connectionTimeout, - requestTimeout, - socketTimeout, - socketAcquisitionWarningTimeout, - throwOnRequestTimeout, - httpAgentProvider: async () => { - const { Agent: Agent9, request } = await import("node:http"); - hRequest = request; - hAgent = Agent9; - if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") { - this.externalAgent = true; - return httpAgent; - } - return new hAgent({ keepAlive, maxSockets, ...httpAgent }); - }, - httpsAgent: (() => { - if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") { - this.externalAgent = true; - return httpsAgent; - } - return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); - })(), - logger: logger2 - }; - } - }; - var ids = new Uint16Array(1); - var ClientHttp2SessionRef = class { - id = ids[0]++; - total = 0; - max = 0; - session; - refs = 0; - constructor(session) { - session.unref(); - this.session = session; - } - retain() { - if (this.session.destroyed) { - throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session."); - } - this.refs += 1; - this.total += 1; - this.max = Math.max(this.refs, this.max); - this.session.ref(); - } - free() { - if (this.session.destroyed) { - return; - } - this.refs -= 1; - if (this.refs === 0) { - this.session.unref(); - } - if (this.refs < 0) { - throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement."); - } - } - deref() { - return this.session; - } - close() { - if (!this.session.closed) { - this.session.close(); - } - } - destroy() { - this.refs = 0; - if (!this.session.destroyed) { - this.session.destroy(); - } - } - useCount() { - return this.refs; - } - }; - var NodeHttp2ConnectionPool = class { - sessions = []; - maxConcurrency = 0; - constructor(sessions) { - this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session)); - } - poll() { - let cleanup = false; - for (const session of this.sessions) { - if (session.deref().destroyed) { - cleanup = true; - continue; - } - if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) { - return session; - } - } - if (cleanup) { - for (const session of this.sessions) { - if (session.deref().destroyed) { - this.remove(session); - } - } - } - } - offerLast(ref) { - this.sessions.push(ref); - } - remove(ref) { - const ix = this.sessions.indexOf(ref); - if (ix > -1) { - this.sessions.splice(ix, 1); - } - } - [Symbol.iterator]() { - return this.sessions[Symbol.iterator](); - } - setMaxConcurrency(maxConcurrency) { - this.maxConcurrency = maxConcurrency; - } - destroy(ref) { - this.remove(ref); - ref.destroy(); - } - }; - var NodeHttp2ConnectionManager = class { - config; - connectOptions; - connectionPools = /* @__PURE__ */ new Map(); - constructor(config) { - this.config = config; - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrency must be greater than zero."); - } - } - lease(requestContext, connectionConfiguration) { - const url = this.getUrlString(requestContext); - const pool = this.getPool(url); - if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) { - const available = pool.poll(); - if (available) { - available.retain(); - return available; - } - } - const ref = new ClientHttp2SessionRef(this.connect(url)); - const session = ref.deref(); - if (this.config.maxConcurrency) { - session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { - if (err) { - throw new Error("Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString()); - } - }); - } - const graceful = () => { - this.removeFromPoolAndClose(url, ref); - }; - const ensureDestroyed = () => { - this.removeFromPoolAndCheckedDestroy(url, ref); - }; - session.on("goaway", graceful); - session.on("error", ensureDestroyed); - session.on("frameError", ensureDestroyed); - session.on("close", ensureDestroyed); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed); - } - pool.offerLast(ref); - ref.retain(); - return ref; - } - release(_requestContext, ref) { - ref.free(); - } - createIsolatedSession(requestContext, connectionConfiguration) { - const url = this.getUrlString(requestContext); - const ref = new ClientHttp2SessionRef(this.connect(url)); - const session = ref.deref(); - session.settings({ maxConcurrentStreams: 1 }); - const ensureDestroyed = () => { - ref.destroy(); - }; - session.on("error", ensureDestroyed); - session.on("frameError", ensureDestroyed); - session.on("close", ensureDestroyed); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed); - } - ref.retain(); - return ref; - } - destroy() { - for (const [url, connectionPool] of this.connectionPools) { - for (const session of [...connectionPool]) { - session.destroy(); - } - this.connectionPools.delete(url); - } - } - setMaxConcurrentStreams(maxConcurrentStreams) { - if (maxConcurrentStreams && maxConcurrentStreams <= 0) { - throw new RangeError("maxConcurrentStreams must be greater than zero."); - } - this.config.maxConcurrency = maxConcurrentStreams; - for (const pool of this.connectionPools.values()) { - pool.setMaxConcurrency(maxConcurrentStreams); - } - } - setDisableConcurrentStreams(disableConcurrentStreams) { - this.config.disableConcurrency = disableConcurrentStreams; - } - setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions) { - this.connectOptions = nodeHttp2ConnectOptions; - } - debug() { - const pools = {}; - for (const [url, pool] of this.connectionPools) { - const sessions = []; - for (const ref of pool) { - sessions.push({ - id: ref.id, - active: ref.useCount(), - maxConcurrent: ref.max, - totalRequests: ref.total - }); - } - pools[url] = { sessions }; - } - return pools; - } - removeFromPoolAndClose(authority, ref) { - this.connectionPools.get(authority)?.remove(ref); - ref.close(); - } - removeFromPoolAndCheckedDestroy(authority, ref) { - this.connectionPools.get(authority)?.remove(ref); - ref.destroy(); - } - getPool(url) { - if (!this.connectionPools.has(url)) { - const pool = new NodeHttp2ConnectionPool(); - if (this.config.maxConcurrency) { - pool.setMaxConcurrency(this.config.maxConcurrency); - } - this.connectionPools.set(url, pool); - } - return this.connectionPools.get(url); - } - getUrlString(request) { - return request.destination.toString(); - } - connect(url) { - return this.connectOptions === void 0 ? http22.connect(url) : http22.connect(url, this.connectOptions); - } - }; - var NodeHttp2Handler = class _NodeHttp2Handler { - config; - configProvider; - metadata = { handlerProtocol: "h2" }; - connectionManager = new NodeHttp2ConnectionManager({}); - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new _NodeHttp2Handler(instanceOrOptions); - } - constructor(options) { - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options().then((opts) => { - resolve(opts || {}); - }).catch(reject); - } else { - resolve(options || {}); - } - }); - } - destroy() { - this.connectionManager.destroy(); - } - async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) { - if (!this.config) { - this.config = await this.configProvider; - const { disableConcurrentStreams: disableConcurrentStreams2, maxConcurrentStreams, nodeHttp2ConnectOptions } = this.config; - this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams2 ?? false); - if (maxConcurrentStreams) { - this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams); - } - if (nodeHttp2ConnectOptions) { - this.connectionManager.setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions); - } - } - const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; - const useIsolatedSession = disableConcurrentStreams || isEventStream; - const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; - return new Promise((_resolve, _reject) => { - let fulfilled = false; - let writeRequestBodyPromise = void 0; - const resolve = async (arg) => { - await writeRequestBodyPromise; - _resolve(arg); - }; - const reject = async (arg) => { - await writeRequestBodyPromise; - _reject(arg); - }; - if (abortSignal?.aborted) { - fulfilled = true; - const abortError = buildAbortError(abortSignal); - reject(abortError); - return; - } - const { hostname, method, port, protocol, query } = request; - let auth = ""; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}@`; - } - const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; - const requestContext = { destination: new URL(authority) }; - const connectConfig = { - requestTimeout: this.config?.sessionTimeout, - isEventStream - }; - const ref = useIsolatedSession ? this.connectionManager.createIsolatedSession(requestContext, connectConfig) : this.connectionManager.lease(requestContext, connectConfig); - const session = ref.deref(); - const rejectWithDestroy = (err) => { - if (useIsolatedSession) { - ref.destroy(); - } - fulfilled = true; - reject(err); - }; - const queryString = query ? protocols2.buildQueryString(query) : ""; - let path3 = request.path; - if (queryString) { - path3 += `?${queryString}`; - } - if (request.fragment) { - path3 += `#${request.fragment}`; - } - const clientHttp2Stream = session.request({ - ...request.headers, - [http22.constants.HTTP2_HEADER_PATH]: path3, - [http22.constants.HTTP2_HEADER_METHOD]: method - }); - if (effectiveRequestTimeout) { - clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => { - clientHttp2Stream.close(); - const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); - timeoutError.name = "TimeoutError"; - rejectWithDestroy(timeoutError); - }); - } - if (abortSignal) { - const onAbort = () => { - clientHttp2Stream.close(); - const abortError = buildAbortError(abortSignal); - rejectWithDestroy(abortError); - }; - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - clientHttp2Stream.once("close", () => signal.removeEventListener("abort", onAbort)); - } else { - abortSignal.onabort = onAbort; - } - } - clientHttp2Stream.on("frameError", (type, code, id) => { - rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); - }); - clientHttp2Stream.on("error", rejectWithDestroy); - clientHttp2Stream.on("aborted", () => { - rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`)); - }); - clientHttp2Stream.on("response", (headers) => { - const httpResponse = new protocols2.HttpResponse({ - statusCode: headers[":status"] ?? -1, - headers: getTransformedHeaders(headers), - body: clientHttp2Stream - }); - fulfilled = true; - resolve({ response: httpResponse }); - if (useIsolatedSession) { - session.close(); - } - }); - clientHttp2Stream.on("close", () => { - if (useIsolatedSession) { - ref.destroy(); - } else { - this.connectionManager.release(requestContext, ref); - } - if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); - } - }); - writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout); - }); - } - updateHttpClientConfig(key, value) { - this.config = void 0; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - }; - var Collector3 = class extends node_stream.Writable { - bufferedBytes = []; - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); - } - }; - var streamCollector7 = (stream) => { - if (isReadableStreamInstance2(stream)) { - return collectReadableStream2(stream); - } - return new Promise((resolve, reject) => { - const collector = new Collector3(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function() { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }); - }; - var isReadableStreamInstance2 = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; - async function collectReadableStream2(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; - } - isDone = done; - } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; - } - return collected; - } - exports2.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; - exports2.NodeHttp2Handler = NodeHttp2Handler; - exports2.NodeHttpHandler = NodeHttpHandler2; - exports2.streamCollector = streamCollector7; - } -}); - -// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js -var require_checkUrl = __commonJS({ - "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkUrl = void 0; - var config_1 = (init_config2(), __toCommonJS(config_exports)); - var ECS_CONTAINER_HOST = "169.254.170.2"; - var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; - var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; - var checkUrl = (url, logger2) => { - if (url.protocol === "https:") { - return; - } - if (url.hostname === ECS_CONTAINER_HOST || url.hostname === EKS_CONTAINER_HOST_IPv4 || url.hostname === EKS_CONTAINER_HOST_IPv6) { - return; - } - if (url.hostname.includes("[")) { - if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") { - return; - } - } else { - if (url.hostname === "localhost") { - return; - } - const ipComponents = url.hostname.split("."); - const inRange = (component) => { - const num = parseInt(component, 10); - return 0 <= num && num <= 255; - }; - if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) { - return; - } - } - throw new config_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following: - - loopback CIDR 127.0.0.0/8 or [::1/128] - - ECS container host 169.254.170.2 - - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger: logger2 }); - }; - exports2.checkUrl = checkUrl; - } -}); - -// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js -var require_requestHelpers = __commonJS({ - "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createGetRequest = createGetRequest; - exports2.getCredentials = getCredentials; - var config_1 = (init_config2(), __toCommonJS(config_exports)); - var protocols_1 = (init_protocols(), __toCommonJS(protocols_exports)); - var serde_1 = (init_serde(), __toCommonJS(serde_exports)); - var serde_2 = (init_serde(), __toCommonJS(serde_exports)); - function createGetRequest(url) { - return new protocols_1.HttpRequest({ - protocol: url.protocol, - hostname: url.hostname, - port: Number(url.port), - path: url.pathname, - query: Array.from(url.searchParams.entries()).reduce((acc, [k5, v]) => { - acc[k5] = v; - return acc; - }, {}), - fragment: url.hash - }); - } - async function getCredentials(response, logger2) { - const stream = (0, serde_2.sdkStreamMixin)(response.body); - const str = await stream.transformToString(); - if (response.statusCode === 200) { - const parsed = JSON.parse(str); - if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") { - throw new config_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger: logger2 }); - } - return { - accessKeyId: parsed.AccessKeyId, - secretAccessKey: parsed.SecretAccessKey, - sessionToken: parsed.Token, - expiration: (0, serde_1.parseRfc3339DateTime)(parsed.Expiration) - }; - } - if (response.statusCode >= 400 && response.statusCode < 500) { - let parsedBody = {}; - try { - parsedBody = JSON.parse(str); - } catch (e5) { - } - throw Object.assign(new config_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger2 }), { - Code: parsedBody.Code, - Message: parsedBody.Message - }); - } - throw new config_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger2 }); - } - } -}); - -// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js -var require_retry_wrapper = __commonJS({ - "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryWrapper = void 0; - var retryWrapper = (toRetry, maxRetries, delayMs) => { - return async () => { - for (let i5 = 0; i5 < maxRetries; ++i5) { - try { - return await toRetry(); - } catch (e5) { - await new Promise((resolve) => setTimeout(resolve, delayMs)); - } - } - return await toRetry(); - }; - }; - exports2.retryWrapper = retryWrapper; - } -}); - -// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js -var require_fromHttp = __commonJS({ - "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fromHttp = void 0; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var client_1 = (init_client3(), __toCommonJS(client_exports2)); - var config_1 = (init_config2(), __toCommonJS(config_exports)); - var node_http_handler_1 = require_dist_cjs9(); - var promises_1 = tslib_1.__importDefault(require("node:fs/promises")); - var checkUrl_1 = require_checkUrl(); - var requestHelpers_1 = require_requestHelpers(); - var retry_wrapper_1 = require_retry_wrapper(); - var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; - var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; - var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; - var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; - var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; - var fromHttp = (options = {}) => { - options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp"); - let host; - const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI]; - const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; - const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; - const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; - const warn2 = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn ? console.warn : options.logger.warn.bind(options.logger); - if (relative && full) { - warn2("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); - warn2("awsContainerCredentialsFullUri will take precedence."); - } - if (token && tokenFile) { - warn2("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); - warn2("awsContainerAuthorizationToken will take precedence."); - } - if (full) { - host = full; - } else if (relative) { - host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; - } else { - throw new config_1.CredentialsProviderError(`No HTTP credential provider host provided. -Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger }); - } - const url = new URL(host); - (0, checkUrl_1.checkUrl)(url, options.logger); - const requestHandler = node_http_handler_1.NodeHttpHandler.create({ - requestTimeout: options.timeout ?? 1e3, - connectionTimeout: options.timeout ?? 1e3 - }); - return (0, retry_wrapper_1.retryWrapper)(async () => { - const request = (0, requestHelpers_1.createGetRequest)(url); - if (token) { - request.headers.Authorization = token; - } else if (tokenFile) { - request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); - } - try { - const result = await requestHandler.handle(request); - return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z")); - } catch (e5) { - throw new config_1.CredentialsProviderError(String(e5), { logger: options.logger }); - } - }, options.maxRetries ?? 3, options.timeout ?? 1e3); - }; - exports2.fromHttp = fromHttp; - } -}); - -// node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js -var require_dist_cjs10 = __commonJS({ - "node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js"(exports2) { - "use strict"; - var fromHttp = require_fromHttp(); - exports2.fromHttp = fromHttp.fromHttp; - } -}); - -// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js -function createAwsAuthSigv4HttpAuthOption(authParameters) { - return { - schemeId: "aws.auth#sigv4", - signingProperties: { - name: "sso-oauth", - region: authParameters.region - }, - propertiesExtractor: (config, context) => ({ - signingProperties: { - config, - context - } - }) - }; -} -function createSmithyApiNoAuthHttpAuthOption(authParameters) { - return { - schemeId: "smithy.api#noAuth" - }; -} -var defaultSSOOIDCHttpAuthSchemeParametersProvider, defaultSSOOIDCHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig; -var init_httpAuthSchemeProvider = __esm({ - "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js"() { - init_httpAuthSchemes2(); - init_client2(); - defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => { - return { - operation: getSmithyContext(context).operation, - region: await normalizeProvider(config.region)() || (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })() - }; - }; - defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { - const options = []; - switch (authParameters.operation) { - case "CreateToken": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - default: { - options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); - } - } - return options; - }; - resolveHttpAuthSchemeConfig = (config) => { - const config_0 = resolveAwsSdkSigV4Config(config); - return Object.assign(config_0, { - authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) - }); - }; - } -}); - -// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js -var resolveClientEndpointParameters, commonParams; -var init_EndpointParameters = __esm({ - "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js"() { - resolveClientEndpointParameters = (options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "sso-oauth" - }); - }; - commonParams = { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - } -}); - -// node_modules/@aws-sdk/nested-clients/package.json -var package_default; -var init_package = __esm({ - "node_modules/@aws-sdk/nested-clients/package.json"() { - package_default = { - name: "@aws-sdk/nested-clients", - version: "3.997.10", - description: "Nested clients for AWS SDK packages.", - main: "./dist-cjs/index.js", - module: "./dist-es/index.js", - types: "./dist-types/index.d.ts", - scripts: { - build: "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs", - "build:cjs": "node ../../scripts/compilation/inline nested-clients", - "build:es": "tsc -p tsconfig.es.json", - "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"', - "build:types": "tsc -p tsconfig.types.json", - "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", - clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo", - lint: "node ../../scripts/validation/submodules-linter.js --pkg nested-clients", - test: "yarn g:vitest run", - "test:watch": "yarn g:vitest watch" - }, - engines: { - node: ">=20.0.0" - }, - sideEffects: false, - author: { - name: "AWS SDK for JavaScript Team", - url: "https://aws.amazon.com/javascript/" - }, - license: "Apache-2.0", - dependencies: { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@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: { - concurrently: "7.0.0", - "downlevel-dts": "0.10.1", - premove: "4.0.0", - typescript: "~5.8.3" - }, - typesVersions: { - "<4.5": { - "dist-types/*": [ - "dist-types/ts3.4/*" - ] - } - }, - files: [ - "./cognito-identity.d.ts", - "./cognito-identity.js", - "./signin.d.ts", - "./signin.js", - "./sso-oidc.d.ts", - "./sso-oidc.js", - "./sso.d.ts", - "./sso.js", - "./sts.d.ts", - "./sts.js", - "dist-*/**" - ], - browser: { - "./dist-es/submodules/cognito-identity/runtimeConfig": "./dist-es/submodules/cognito-identity/runtimeConfig.browser", - "./dist-es/submodules/signin/runtimeConfig": "./dist-es/submodules/signin/runtimeConfig.browser", - "./dist-es/submodules/sso-oidc/runtimeConfig": "./dist-es/submodules/sso-oidc/runtimeConfig.browser", - "./dist-es/submodules/sso/runtimeConfig": "./dist-es/submodules/sso/runtimeConfig.browser", - "./dist-es/submodules/sts/runtimeConfig": "./dist-es/submodules/sts/runtimeConfig.browser" - }, - "react-native": {}, - homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients", - repository: { - type: "git", - url: "https://github.com/aws/aws-sdk-js-v3.git", - directory: "packages/nested-clients" - }, - exports: { - "./package.json": "./package.json", - "./sso-oidc": { - types: "./dist-types/submodules/sso-oidc/index.d.ts", - module: "./dist-es/submodules/sso-oidc/index.js", - node: "./dist-cjs/submodules/sso-oidc/index.js", - import: "./dist-es/submodules/sso-oidc/index.js", - require: "./dist-cjs/submodules/sso-oidc/index.js" - }, - "./sts": { - types: "./dist-types/submodules/sts/index.d.ts", - module: "./dist-es/submodules/sts/index.js", - node: "./dist-cjs/submodules/sts/index.js", - import: "./dist-es/submodules/sts/index.js", - require: "./dist-cjs/submodules/sts/index.js" - }, - "./signin": { - types: "./dist-types/submodules/signin/index.d.ts", - module: "./dist-es/submodules/signin/index.js", - node: "./dist-cjs/submodules/signin/index.js", - import: "./dist-es/submodules/signin/index.js", - require: "./dist-cjs/submodules/signin/index.js" - }, - "./cognito-identity": { - types: "./dist-types/submodules/cognito-identity/index.d.ts", - module: "./dist-es/submodules/cognito-identity/index.js", - node: "./dist-cjs/submodules/cognito-identity/index.js", - import: "./dist-es/submodules/cognito-identity/index.js", - require: "./dist-cjs/submodules/cognito-identity/index.js" - }, - "./sso": { - types: "./dist-types/submodules/sso/index.d.ts", - module: "./dist-es/submodules/sso/index.js", - node: "./dist-cjs/submodules/sso/index.js", - import: "./dist-es/submodules/sso/index.js", - require: "./dist-cjs/submodules/sso/index.js" - } - } + var build = (arnObject) => { + const { partition = "aws", service, region, accountId, resource } = arnObject; + if ([service, region, accountId, resource].some((segment) => typeof segment !== "string")) { + throw new Error("Input ARN object is invalid"); + } + return `arn:${partition}:${service}:${region}:${accountId}:${resource}`; }; + exports2.build = build; + exports2.parse = parse; + exports2.validate = validate; } }); @@ -35509,7 +33252,7 @@ function bytesToUtf8(bytes, at, to) { if (textDecoder) { return textDecoder.decode(bytes.subarray(at, to)); } - return toUtf8(bytes.subarray(at, to)); + return (0, import_util_utf84.toUtf8)(bytes.subarray(at, to)); } function demote(bigInteger) { const num = Number(bigInteger); @@ -35680,7 +33423,7 @@ function decodeMap(at, to) { const offset = _offset; at += offset; const base = at; - const map3 = {}; + const map2 = {}; for (let i5 = 0; i5 < mapDataLength; ++i5) { if (at >= to) { throw new Error("unexpected end of map payload."); @@ -35693,22 +33436,22 @@ function decodeMap(at, to) { at += _offset; const value = decode(at, to); at += _offset; - map3[key] = value; + map2[key] = value; } _offset = offset + (at - base); - return map3; + return map2; } function decodeMapIndefinite(at, to) { at += 1; const base = at; - const map3 = {}; + const map2 = {}; for (; at < to; ) { if (at >= to) { throw new Error("unexpected end of map payload."); } if (payload[at] === 255) { _offset = at - base + 2; - return map3; + return map2; } const major = (payload[at] & 224) >> 5; if (major !== majorUtf8String) { @@ -35718,7 +33461,7 @@ function decodeMapIndefinite(at, to) { at += _offset; const value = decode(at, to); at += _offset; - map3[key] = value; + map2[key] = value; } throw new Error("expected break marker."); } @@ -35767,10 +33510,11 @@ function castBigInt(bigInt) { } return bigInt; } -var USE_TEXT_DECODER, USE_BUFFER, payload, dataView, textDecoder, _offset, minorValueToArgumentLength; +var import_util_utf84, USE_TEXT_DECODER, USE_BUFFER, payload, dataView, textDecoder, _offset, minorValueToArgumentLength; var init_cbor_decode = __esm({ "node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js"() { init_serde(); + import_util_utf84 = __toESM(require_dist_cjs9()); init_cbor_types(); USE_TEXT_DECODER = typeof TextDecoder !== "undefined"; USE_BUFFER = typeof Buffer !== "undefined"; @@ -35798,7 +33542,7 @@ function ensureSpace(bytes) { } } } -function toUint8Array2() { +function toUint8Array() { const out = alloc(cursor); out.set(data.subarray(0, cursor), 0); cursor = 0; @@ -35846,7 +33590,7 @@ function encode(_input) { encodeHeader(majorUtf8String, Buffer.byteLength(input)); cursor += data.write(input, cursor); } else { - const bytes = fromUtf8(input); + const bytes = (0, import_util_utf85.fromUtf8)(input); encodeHeader(majorUtf8String, bytes.byteLength); data.set(bytes, cursor); cursor += bytes.byteLength; @@ -35975,10 +33719,11 @@ function encode(_input) { throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`); } } -var USE_BUFFER2, initialSize, data, dataView2, cursor; +var import_util_utf85, USE_BUFFER2, initialSize, data, dataView2, cursor; var init_cbor_encode = __esm({ "node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js"() { init_serde(); + import_util_utf85 = __toESM(require_dist_cjs9()); init_cbor_types(); USE_BUFFER2 = typeof Buffer !== "undefined"; initialSize = 2048; @@ -36002,9 +33747,9 @@ var init_cbor = __esm({ serialize(input) { try { encode(input); - return toUint8Array2(); + return toUint8Array(); } catch (e5) { - toUint8Array2(); + toUint8Array(); throw e5; } }, @@ -36061,12 +33806,14 @@ var init_parseCborBody = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js -var CborCodec, CborShapeSerializer, CborShapeDeserializer; +var import_util_base643, CborCodec, CborShapeSerializer, CborShapeDeserializer; var init_CborCodec = __esm({ "node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js"() { init_protocols(); init_schema(); init_serde(); + init_serde(); + import_util_base643 = __toESM(require_dist_cjs10()); init_cbor(); init_parseCborBody(); CborCodec = class extends SerdeContext { @@ -36090,13 +33837,13 @@ var init_CborCodec = __esm({ const ns = NormalizedSchema.of(schema); if (source == null) { if (ns.isIdempotencyToken()) { - return generateIdempotencyToken(); + return (0, import_uuid.v4)(); } return source; } if (ns.isBlobSchema()) { if (typeof source === "string") { - return (this.serdeContext?.base64Decoder ?? fromBase64)(source); + return (this.serdeContext?.base64Decoder ?? import_util_base643.fromBase64)(source); } return source; } @@ -36186,7 +33933,7 @@ var init_CborCodec = __esm({ } if (ns.isBlobSchema()) { if (typeof value === "string") { - return (this.serdeContext?.base64Decoder ?? fromBase64)(value); + return (this.serdeContext?.base64Decoder ?? import_util_base643.fromBase64)(value); } return value; } @@ -36270,12 +34017,13 @@ var init_CborCodec = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js -var SmithyRpcV2CborProtocol; +var import_util_middleware5, SmithyRpcV2CborProtocol; var init_SmithyRpcV2CborProtocol = __esm({ "node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js"() { - init_client2(); init_protocols(); init_schema(); + init_schema(); + import_util_middleware5 = __toESM(require_dist_cjs6()); init_CborCodec(); init_parseCborBody(); SmithyRpcV2CborProtocol = class extends RpcProtocol { @@ -36311,7 +34059,7 @@ var init_SmithyRpcV2CborProtocol = __esm({ } catch (e5) { } } - const { service, operation: operation2 } = getSmithyContext(context); + const { service, operation: operation2 } = (0, import_util_middleware5.getSmithyContext)(context); const path3 = `/service/${service}/operation/${operation2}`; if (request.path.endsWith("/")) { request.path += path3.slice(1); @@ -36355,7 +34103,7 @@ var init_SmithyRpcV2CborProtocol = __esm({ const ns = NormalizedSchema.of(errorSchema); const ErrorCtor = registry.getErrorCtor(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const exception = new ErrorCtor({}); + const exception = new ErrorCtor(message); const output = {}; for (const [name, member2] of ns.structIterator()) { output[name] = this.deserializer.readValue(member2, dataObject[name]); @@ -36382,11 +34130,11 @@ var init_cbor2 = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js -var ProtocolLib; +var import_smithy_client, ProtocolLib; var init_ProtocolLib = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js"() { - init_client2(); init_schema(); + import_smithy_client = __toESM(require_dist_cjs34()); ProtocolLib = class { queryCompat; errorRegistry; @@ -36464,22 +34212,22 @@ var init_ProtocolLib = __esm({ decorateServiceException(exception, additions = {}) { if (this.queryCompat) { const msg = exception.Message ?? additions.Message; - const error3 = decorateServiceException(exception, additions); + const error2 = (0, import_smithy_client.decorateServiceException)(exception, additions); if (msg) { - error3.message = msg; + error2.message = msg; } - 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; + 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; if (reqId) { - error3.RequestId = reqId; + error2.RequestId = reqId; } - return error3; + return error2; } - return decorateServiceException(exception, additions); + return (0, import_smithy_client.decorateServiceException)(exception, additions); } setQueryCompatError(output, response) { const queryErrorHeader = response.headers?.["x-amzn-query-error"]; @@ -36560,7 +34308,7 @@ var init_AwsSmithyRpcV2CborProtocol = __esm({ const ns = NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "UnknownError"; const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error; - const exception = new ErrorCtor({}); + const exception = new ErrorCtor(message); const output = {}; for (const [name, member2] of ns.structIterator()) { if (dataObject[name] != null) { @@ -36588,15 +34336,15 @@ var init_coercing_serializers = __esm({ return val; } if (typeof val === "number" || typeof val === "bigint") { - const warning3 = new Error(`Received number ${val} where a string was expected.`); - warning3.name = "Warning"; - console.warn(warning3); + const warning = new Error(`Received number ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); return String(val); } if (typeof val === "boolean") { - const warning3 = new Error(`Received boolean ${val} where a string was expected.`); - warning3.name = "Warning"; - console.warn(warning3); + const warning = new Error(`Received boolean ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); return String(val); } return val; @@ -36610,9 +34358,9 @@ var init_coercing_serializers = __esm({ if (typeof val === "string") { const lowercase = val.toLowerCase(); if (val !== "" && lowercase !== "false" && lowercase !== "true") { - const warning3 = new Error(`Received string "${val}" where a boolean was expected.`); - warning3.name = "Warning"; - console.warn(warning3); + const warning = new Error(`Received string "${val}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); } return val !== "" && lowercase !== "false"; } @@ -36627,9 +34375,9 @@ var init_coercing_serializers = __esm({ if (typeof val === "string") { const num = Number(val); if (num.toString() !== val) { - const warning3 = new Error(`Received string "${val}" where a number was expected.`); - warning3.name = "Warning"; - console.warn(warning3); + const warning = new Error(`Received string "${val}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); return val; } return num; @@ -36709,17 +34457,17 @@ var init_jsonReviver = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js -var collectBodyString; +var import_smithy_client2, import_util_utf86, collectBodyString; var init_common = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() { - init_protocols(); - init_serde(); - collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => (context?.utf8Encoder ?? toUtf8)(body)); + import_smithy_client2 = __toESM(require_dist_cjs34()); + import_util_utf86 = __toESM(require_dist_cjs9()); + collectBodyString = (streamBody, context) => (0, import_smithy_client2.collectBody)(streamBody, context).then((body) => (context?.utf8Encoder ?? import_util_utf86.toUtf8)(body)); } }); // node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js -var parseJsonBody, parseJsonErrorBody, findKey, sanitizeErrorCode, loadRestJsonErrorCode, loadJsonRpcErrorCode, loadErrorCode; +var parseJsonBody, parseJsonErrorBody, findKey, sanitizeErrorCode, loadRestJsonErrorCode; var init_parseJsonBody = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() { init_common(); @@ -36761,32 +34509,17 @@ var init_parseJsonBody = __esm({ return cleanValue; }; loadRestJsonErrorCode = (output, data3) => { - return loadErrorCode(output, data3, ["header", "code", "type"]); - }; - loadJsonRpcErrorCode = (output, data3, queryCompat = false) => { - return loadErrorCode(output, data3, queryCompat ? ["code", "header", "type"] : ["type", "code", "header"]); - }; - loadErrorCode = ({ headers }, data3, order) => { - while (order.length > 0) { - const location = order.shift(); - switch (location) { - case "header": - const headerKey = findKey(headers ?? {}, "x-amzn-errortype"); - if (headerKey !== void 0) { - return sanitizeErrorCode(headers[headerKey]); - } - break; - case "code": - const codeKey = findKey(data3 ?? {}, "code"); - if (codeKey && data3[codeKey] !== void 0) { - return sanitizeErrorCode(data3[codeKey]); - } - break; - case "type": - if (data3?.__type !== void 0) { - return sanitizeErrorCode(data3.__type); - } - break; + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== void 0) { + return sanitizeErrorCode(output.headers[headerKey]); + } + if (data3 && typeof data3 === "object") { + const codeKey = findKey(data3, "code"); + if (codeKey && data3[codeKey] !== void 0) { + return sanitizeErrorCode(data3[codeKey]); + } + if (data3["__type"] !== void 0) { + return sanitizeErrorCode(data3["__type"]); } } }; @@ -36794,13 +34527,13 @@ var init_parseJsonBody = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js -var JsonShapeDeserializer; +var import_util_base644, JsonShapeDeserializer; var init_JsonShapeDeserializer = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js"() { init_protocols(); init_schema(); init_serde(); - init_serde(); + import_util_base644 = __toESM(require_dist_cjs10()); init_ConfigurableSerdeContext(); init_UnionSerde(); init_jsonReviver(); @@ -36878,7 +34611,7 @@ var init_JsonShapeDeserializer = __esm({ } } if (ns.isBlobSchema() && typeof value === "string") { - return fromBase64(value); + return (0, import_util_base644.fromBase64)(value); } const mediaType = ns.getMergedTraits().mediaType; if (ns.isStringSchema() && typeof value === "string" && mediaType) { @@ -37002,12 +34735,13 @@ var init_jsonReplacer = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js -var JsonShapeSerializer; +var import_util_base645, JsonShapeSerializer; var init_JsonShapeSerializer = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js"() { init_protocols(); init_schema(); init_serde(); + import_util_base645 = __toESM(require_dist_cjs10()); init_ConfigurableSerdeContext(); init_jsonReplacer(); JsonShapeSerializer = class extends SerdeContextConfig { @@ -37111,7 +34845,7 @@ var init_JsonShapeSerializer = __esm({ if (ns === this.rootSchema) { return value; } - return (this.serdeContext?.base64Encoder ?? toBase64)(value); + return (this.serdeContext?.base64Encoder ?? import_util_base645.toBase64)(value); } if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) { const format2 = determineTimestampFormat(ns, this.settings); @@ -37136,7 +34870,7 @@ var init_JsonShapeSerializer = __esm({ } if (ns.isStringSchema()) { if (typeof value === "undefined" && ns.isIdempotencyToken()) { - return generateIdempotencyToken(); + return (0, import_uuid.v4)(); } const mediaType = ns.getMergedTraits().mediaType; if (value != null && mediaType) { @@ -37157,7 +34891,7 @@ var init_JsonShapeSerializer = __esm({ if (ns === this.rootSchema) { return value; } - return (this.serdeContext?.base64Encoder ?? toBase64)(value); + return (this.serdeContext?.base64Encoder ?? import_util_base645.toBase64)(value); } if (typeof value === "bigint") { this.useReplacer = true; @@ -37265,17 +34999,16 @@ var init_AwsJsonRpcProtocol = __esm({ return this.codec; } async handleError(operationSchema, context, response, dataObject, metadata) { - const { awsQueryCompatible } = this; - if (awsQueryCompatible) { + if (this.awsQueryCompatible) { this.mixin.setQueryCompatError(dataObject, response); } - const errorIdentifier = loadJsonRpcErrorCode(response, dataObject, awsQueryCompatible) ?? "Unknown"; + const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace); - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, awsQueryCompatible ? this.mixin.findQueryCompatibleError : void 0); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : void 0); const ns = NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "UnknownError"; const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error; - const exception = new ErrorCtor({}); + const exception = new ErrorCtor(message); const output = {}; const errorDeserializer = this.codec.createDeserializer(); for (const [name, member2] of ns.structIterator()) { @@ -37283,7 +35016,7 @@ var init_AwsJsonRpcProtocol = __esm({ output[name] = errorDeserializer.readObject(member2, dataObject[name]); } } - if (awsQueryCompatible) { + if (this.awsQueryCompatible) { this.mixin.queryCompatOutput(dataObject, output); } throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, { @@ -37423,7 +35156,7 @@ var init_AwsRestJsonProtocol = __esm({ const ns = NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "UnknownError"; const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error; - const exception = new ErrorCtor({}); + const exception = new ErrorCtor(message); await this.deserializeHttpMessage(errorSchema, context, response, dataObject); const output = {}; const errorDeserializer = this.codec.createDeserializer(); @@ -37444,10 +35177,10 @@ var init_AwsRestJsonProtocol = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js -var awsExpectUnion; +var import_smithy_client3, awsExpectUnion; var init_awsExpectUnion = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"() { - init_serde(); + import_smithy_client3 = __toESM(require_dist_cjs34()); awsExpectUnion = (value) => { if (value == null) { return void 0; @@ -37455,7 +35188,7 @@ var init_awsExpectUnion = __esm({ if (typeof value === "object" && "__type" in value) { delete value.__type; } - return expectUnion(value); + return (0, import_smithy_client3.expectUnion)(value); }; } }); @@ -37470,7 +35203,7 @@ var require_fxp = __commonJS({ }, o: (t2, e6) => Object.prototype.hasOwnProperty.call(t2, e6), r: (t2) => { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); } }, e5 = {}; - t.r(e5), t.d(e5, { XMLBuilder: () => Xt, XMLParser: () => Tt, XMLValidator: () => Yt }); + t.r(e5), t.d(e5, { XMLBuilder: () => Bt, XMLParser: () => Tt, XMLValidator: () => Ut }); const n3 = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", i5 = new RegExp("^[" + n3 + "][" + n3 + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); function s(t2, e6) { const n4 = []; @@ -38505,7 +36238,7 @@ var require_fxp = __commonJS({ else if (33 === r7 && 45 === t2.charCodeAt(n4 + 2) && 45 === t2.charCodeAt(n4 + 3)) n4 = dt(t2, "-->", n4 + 3, "StopNode is not closed."); else if (33 === r7 && 91 === t2.charCodeAt(n4 + 2)) n4 = dt(t2, "]]>", n4, "StopNode is not closed.") - 2; else { - const i7 = gt(t2, n4, false); + const i7 = gt(t2, n4, ">"); i7 && ((i7 && i7.tagName) === e6 && "/" !== i7.tagExp[i7.tagExp.length - 1] && s2++, n4 = i7.closeIndex); } } @@ -38610,7 +36343,7 @@ var require_fxp = __commonJS({ if (a6[h6]) { let t3 = vt(a6[h6], e6, n4, i6); const s3 = At(t3, e6); - if (0 === Object.keys(t3).length && e6.alwaysCreateTextNode && (t3[e6.textNodeName] = ""), a6[":@"] ? _t(t3, a6[":@"], i6, e6) : 1 !== Object.keys(t3).length || void 0 === t3[e6.textNodeName] || e6.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e6.alwaysCreateTextNode ? t3[e6.textNodeName] = "" : t3 = "") : t3 = t3[e6.textNodeName], void 0 !== a6[yt] && "object" == typeof t3 && null !== t3 && (t3[yt] = a6[yt]), void 0 !== r6[h6] && Object.prototype.hasOwnProperty.call(r6, h6)) Array.isArray(r6[h6]) || (r6[h6] = [r6[h6]]), r6[h6].push(t3); + if (a6[":@"] ? _t(t3, a6[":@"], i6, e6) : 1 !== Object.keys(t3).length || void 0 === t3[e6.textNodeName] || e6.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e6.alwaysCreateTextNode ? t3[e6.textNodeName] = "" : t3 = "") : t3 = t3[e6.textNodeName], void 0 !== a6[yt] && "object" == typeof t3 && null !== t3 && (t3[yt] = a6[yt]), void 0 !== r6[h6] && Object.prototype.hasOwnProperty.call(r6, h6)) Array.isArray(r6[h6]) || (r6[h6] = [r6[h6]]), r6[h6].push(t3); else { const n5 = e6.jPath ? i6.toString() : i6; e6.isArray(h6, n5, s3) ? r6[h6] = [t3] : r6[h6] = t3; @@ -38666,16 +36399,7 @@ var require_fxp = __commonJS({ return O.getMetaDataSymbol(); } } - function Ct(t2) { - return String(t2).replace(/--/g, "- -").replace(/--/g, "- -").replace(/-$/, "- "); - } - function Pt(t2) { - return String(t2).replace(/\]\]>/g, "]]]]>"); - } - function Ot(t2) { - return String(t2).replace(/"/g, """).replace(/'/g, "'"); - } - function $t(t2, e6) { + function Ct(t2, e6) { let n4 = ""; e6.format && e6.indentBy.length > 0 && (n4 = "\n"); const i6 = []; @@ -38683,120 +36407,123 @@ var require_fxp = __commonJS({ const n5 = e6.stopNodes[t3]; "string" == typeof n5 ? i6.push(new G(n5)) : n5 instanceof G && i6.push(n5); } - return It(t2, e6, n4, new R(), i6); + return Pt(t2, e6, n4, new R(), i6); } - function It(t2, e6, n4, i6, s2) { + function Pt(t2, e6, n4, i6, s2) { let r6 = "", o3 = false; if (e6.maxNestedTags && i6.getDepth() > e6.maxNestedTags) throw new Error("Maximum nested tags exceeded"); if (!Array.isArray(t2)) { if (null != t2) { let n5 = t2.toString(); - return n5 = Ft(n5, e6), n5; + return n5 = Vt(n5, e6), n5; } return ""; } for (let a6 = 0; a6 < t2.length; a6++) { - const h6 = t2[a6], l4 = Vt(h6); + const h6 = t2[a6], l4 = Dt(h6); if (void 0 === l4) continue; - const u2 = Dt(h6[":@"], e6); + const u2 = Ot(h6[":@"], e6); i6.push(l4, u2); - const p3 = kt(i6, s2); + const p3 = jt(i6, s2); if (l4 === e6.textNodeName) { let t3 = h6[l4]; - p3 || (t3 = e6.tagValueProcessor(l4, t3), t3 = Ft(t3, e6)), o3 && (r6 += n4), r6 += t3, o3 = false, i6.pop(); + p3 || (t3 = e6.tagValueProcessor(l4, t3), t3 = Vt(t3, e6)), o3 && (r6 += n4), r6 += t3, o3 = false, i6.pop(); continue; } if (l4 === e6.cdataPropName) { - o3 && (r6 += n4), r6 += ``, o3 = false, i6.pop(); + o3 && (r6 += n4); + const t3 = h6[l4][0][e6.textNodeName]; + r6 += `/g, "]]]]>")}]]>`, o3 = false, i6.pop(); continue; } if (l4 === e6.commentPropName) { - r6 += n4 + ``, o3 = true, i6.pop(); + const t3 = h6[l4][0][e6.textNodeName]; + r6 += n4 + ``, o3 = true, i6.pop(); continue; } if ("?" === l4[0]) { - const t3 = Lt(h6[":@"], e6, p3), s3 = "?xml" === l4 ? "" : n4; + const t3 = Mt(h6[":@"], e6, p3), s3 = "?xml" === l4 ? "" : n4; let a7 = h6[l4][0][e6.textNodeName]; a7 = 0 !== a7.length ? " " + a7 : "", r6 += s3 + `<${l4}${a7}${t3}?>`, o3 = true, i6.pop(); continue; } let c6 = n4; "" !== c6 && (c6 += e6.indentBy); - const d6 = n4 + `<${l4}${Lt(h6[":@"], e6, p3)}`; + const d6 = n4 + `<${l4}${Mt(h6[":@"], e6, p3)}`; let f6; - f6 = p3 ? Mt(h6[l4], e6) : It(h6[l4], e6, c6, i6, s2), -1 !== e6.unpairedTags.indexOf(l4) ? e6.suppressUnpairedNode ? r6 += d6 + ">" : r6 += d6 + "/>" : f6 && 0 !== f6.length || !e6.suppressEmptyNode ? f6 && f6.endsWith(">") ? r6 += d6 + `>${f6}${n4}` : (r6 += d6 + ">", f6 && "" !== n4 && (f6.includes("/>") || f6.includes("`) : r6 += d6 + "/>", o3 = true, i6.pop(); + f6 = p3 ? $t(h6[l4], e6) : Pt(h6[l4], e6, c6, i6, s2), -1 !== e6.unpairedTags.indexOf(l4) ? e6.suppressUnpairedNode ? r6 += d6 + ">" : r6 += d6 + "/>" : f6 && 0 !== f6.length || !e6.suppressEmptyNode ? f6 && f6.endsWith(">") ? r6 += d6 + `>${f6}${n4}` : (r6 += d6 + ">", f6 && "" !== n4 && (f6.includes("/>") || f6.includes("`) : r6 += d6 + "/>", o3 = true, i6.pop(); } return r6; } - function Dt(t2, e6) { + function Ot(t2, e6) { if (!t2 || e6.ignoreAttributes) return null; const n4 = {}; let i6 = false; - for (let s2 in t2) Object.prototype.hasOwnProperty.call(t2, s2) && (n4[s2.startsWith(e6.attributeNamePrefix) ? s2.substr(e6.attributeNamePrefix.length) : s2] = Ot(t2[s2]), i6 = true); + for (let s2 in t2) Object.prototype.hasOwnProperty.call(t2, s2) && (n4[s2.startsWith(e6.attributeNamePrefix) ? s2.substr(e6.attributeNamePrefix.length) : s2] = t2[s2], i6 = true); return i6 ? n4 : null; } - function Mt(t2, e6) { + function $t(t2, e6) { if (!Array.isArray(t2)) return null != t2 ? t2.toString() : ""; let n4 = ""; for (let i6 = 0; i6 < t2.length; i6++) { - const s2 = t2[i6], r6 = Vt(s2); + const s2 = t2[i6], r6 = Dt(s2); if (r6 === e6.textNodeName) n4 += s2[r6]; else if (r6 === e6.cdataPropName) n4 += s2[r6][0][e6.textNodeName]; else if (r6 === e6.commentPropName) n4 += s2[r6][0][e6.textNodeName]; else { if (r6 && "?" === r6[0]) continue; if (r6) { - const t3 = jt(s2[":@"], e6), i7 = Mt(s2[r6], e6); + const t3 = It(s2[":@"], e6), i7 = $t(s2[r6], e6); i7 && 0 !== i7.length ? n4 += `<${r6}${t3}>${i7}` : n4 += `<${r6}${t3}/>`; } } } return n4; } - function jt(t2, e6) { + function It(t2, e6) { let n4 = ""; if (t2 && !e6.ignoreAttributes) for (let i6 in t2) { if (!Object.prototype.hasOwnProperty.call(t2, i6)) continue; let s2 = t2[i6]; - true === s2 && e6.suppressBooleanAttributes ? n4 += ` ${i6.substr(e6.attributeNamePrefix.length)}` : n4 += ` ${i6.substr(e6.attributeNamePrefix.length)}="${Ot(s2)}"`; + true === s2 && e6.suppressBooleanAttributes ? n4 += ` ${i6.substr(e6.attributeNamePrefix.length)}` : n4 += ` ${i6.substr(e6.attributeNamePrefix.length)}="${s2}"`; } return n4; } - function Vt(t2) { + function Dt(t2) { const e6 = Object.keys(t2); for (let n4 = 0; n4 < e6.length; n4++) { const i6 = e6[n4]; if (Object.prototype.hasOwnProperty.call(t2, i6) && ":@" !== i6) return i6; } } - function Lt(t2, e6, n4) { + function Mt(t2, e6, n4) { let i6 = ""; if (t2 && !e6.ignoreAttributes) for (let s2 in t2) { if (!Object.prototype.hasOwnProperty.call(t2, s2)) continue; let r6; - n4 ? r6 = t2[s2] : (r6 = e6.attributeValueProcessor(s2, t2[s2]), r6 = Ft(r6, e6)), true === r6 && e6.suppressBooleanAttributes ? i6 += ` ${s2.substr(e6.attributeNamePrefix.length)}` : i6 += ` ${s2.substr(e6.attributeNamePrefix.length)}="${Ot(r6)}"`; + n4 ? r6 = t2[s2] : (r6 = e6.attributeValueProcessor(s2, t2[s2]), r6 = Vt(r6, e6)), true === r6 && e6.suppressBooleanAttributes ? i6 += ` ${s2.substr(e6.attributeNamePrefix.length)}` : i6 += ` ${s2.substr(e6.attributeNamePrefix.length)}="${r6}"`; } return i6; } - function kt(t2, e6) { + function jt(t2, e6) { if (!e6 || 0 === e6.length) return false; for (let n4 = 0; n4 < e6.length; n4++) if (t2.matches(e6[n4])) return true; return false; } - function Ft(t2, e6) { + function Vt(t2, e6) { if (t2 && t2.length > 0 && e6.processEntities) for (let n4 = 0; n4 < e6.entities.length; n4++) { const i6 = e6.entities[n4]; t2 = t2.replace(i6.regex, i6.val); } return t2; } - const Rt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e6) { + const Lt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e6) { return e6; }, attributeValueProcessor: function(t2, e6) { return e6; }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false, maxNestedTags: 100, jPath: true }; - function Gt(t2) { - if (this.options = Object.assign({}, Rt, t2), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map((t3) => "string" == typeof t3 && t3.startsWith("*.") ? ".." + t3.substring(2) : t3)), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes)) for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + function kt(t2) { + if (this.options = Object.assign({}, Lt, t2), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map((t3) => "string" == typeof t3 && t3.startsWith("*.") ? ".." + t3.substring(2) : t3)), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes)) for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { const e7 = this.options.stopNodes[t3]; "string" == typeof e7 ? this.stopNodeExpressions.push(new G(e7)) : e7 instanceof G && this.stopNodeExpressions.push(e7); } @@ -38808,11 +36535,11 @@ var require_fxp = __commonJS({ if ("string" == typeof n4 && t3 === n4) return true; if (n4 instanceof RegExp && n4.test(t3)) return true; } - } : () => false, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Wt), this.processTextOrObjNode = Bt, this.options.format ? (this.indentate = Ut, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + } : () => false, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Gt), this.processTextOrObjNode = Ft, this.options.format ? (this.indentate = Rt, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { return ""; }, this.tagEndChar = ">", this.newLine = ""); } - function Bt(t2, e6, n4, i6) { + function Ft(t2, e6, n4, i6) { const s2 = this.extractAttributes(t2); if (i6.push(e6, s2), this.checkStopNode(i6)) { const s3 = this.buildRawContent(t2), r7 = this.buildAttributesForStopNode(t2); @@ -38821,25 +36548,25 @@ var require_fxp = __commonJS({ const r6 = this.j2x(t2, n4 + 1, i6); return i6.pop(), void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e6, r6.attrStr, n4, i6) : this.buildObjectNode(r6.val, e6, r6.attrStr, n4); } - function Ut(t2) { + function Rt(t2) { return this.options.indentBy.repeat(t2); } - function Wt(t2) { + function Gt(t2) { return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); } - Gt.prototype.build = function(t2) { - if (this.options.preserveOrder) return $t(t2, this.options); + kt.prototype.build = function(t2) { + if (this.options.preserveOrder) return Ct(t2, this.options); { Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }); const e6 = new R(); return this.j2x(t2, 0, e6).val; } - }, Gt.prototype.j2x = function(t2, e6, n4) { + }, kt.prototype.j2x = function(t2, e6, n4) { let i6 = "", s2 = ""; if (this.options.maxNestedTags && n4.getDepth() >= this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded"); const r6 = this.options.jPath ? n4.toString() : n4, o3 = this.checkStopNode(n4); for (let a6 in t2) if (Object.prototype.hasOwnProperty.call(t2, a6)) if (void 0 === t2[a6]) this.isAttribute(a6) && (s2 += ""); - else if (null === t2[a6]) this.isAttribute(a6) || a6 === this.options.cdataPropName || a6 === this.options.commentPropName ? s2 += "" : "?" === a6[0] ? s2 += this.indentate(e6) + "<" + a6 + "?" + this.tagEndChar : s2 += this.indentate(e6) + "<" + a6 + "/" + this.tagEndChar; + else if (null === t2[a6]) this.isAttribute(a6) || a6 === this.options.cdataPropName ? s2 += "" : "?" === a6[0] ? s2 += this.indentate(e6) + "<" + a6 + "?" + this.tagEndChar : s2 += this.indentate(e6) + "<" + a6 + "/" + this.tagEndChar; else if (t2[a6] instanceof Date) s2 += this.buildTextValNode(t2[a6], a6, "", e6, n4); else if ("object" != typeof t2[a6]) { const h6 = this.isAttribute(a6); @@ -38885,22 +36612,22 @@ var require_fxp = __commonJS({ for (let s3 = 0; s3 < n5; s3++) i6 += this.buildAttrPairStr(e7[s3], "" + t2[a6][e7[s3]], o3); } else s2 += this.processTextOrObjNode(t2[a6], a6, e6, n4); return { attrStr: i6, val: s2 }; - }, Gt.prototype.buildAttrPairStr = function(t2, e6, n4) { - return n4 || (e6 = this.options.attributeValueProcessor(t2, "" + e6), e6 = this.replaceEntitiesValue(e6)), this.options.suppressBooleanAttributes && "true" === e6 ? " " + t2 : " " + t2 + '="' + Ot(e6) + '"'; - }, Gt.prototype.extractAttributes = function(t2) { + }, kt.prototype.buildAttrPairStr = function(t2, e6, n4) { + return n4 || (e6 = this.options.attributeValueProcessor(t2, "" + e6), e6 = this.replaceEntitiesValue(e6)), this.options.suppressBooleanAttributes && "true" === e6 ? " " + t2 : " " + t2 + '="' + e6 + '"'; + }, kt.prototype.extractAttributes = function(t2) { if (!t2 || "object" != typeof t2) return null; const e6 = {}; let n4 = false; if (this.options.attributesGroupName && t2[this.options.attributesGroupName]) { const i6 = t2[this.options.attributesGroupName]; - for (let t3 in i6) Object.prototype.hasOwnProperty.call(i6, t3) && (e6[t3.startsWith(this.options.attributeNamePrefix) ? t3.substring(this.options.attributeNamePrefix.length) : t3] = Ot(i6[t3]), n4 = true); + for (let t3 in i6) Object.prototype.hasOwnProperty.call(i6, t3) && (e6[t3.startsWith(this.options.attributeNamePrefix) ? t3.substring(this.options.attributeNamePrefix.length) : t3] = i6[t3], n4 = true); } else for (let i6 in t2) { if (!Object.prototype.hasOwnProperty.call(t2, i6)) continue; const s2 = this.isAttribute(i6); - s2 && (e6[s2] = Ot(t2[i6]), n4 = true); + s2 && (e6[s2] = t2[i6], n4 = true); } return n4 ? e6 : null; - }, Gt.prototype.buildRawContent = function(t2) { + }, kt.prototype.buildRawContent = function(t2) { if ("string" == typeof t2) return t2; if ("object" != typeof t2 || null === t2) return String(t2); if (void 0 !== t2[this.options.textNodeName]) return t2[this.options.textNodeName]; @@ -38923,7 +36650,7 @@ var require_fxp = __commonJS({ } else e6 += `<${n4}>${i6}`; } return e6; - }, Gt.prototype.buildAttributesForStopNode = function(t2) { + }, kt.prototype.buildAttributesForStopNode = function(t2) { if (!t2 || "object" != typeof t2) return ""; let e6 = ""; if (this.options.attributesGroupName && t2[this.options.attributesGroupName]) { @@ -38942,26 +36669,26 @@ var require_fxp = __commonJS({ } } return e6; - }, Gt.prototype.buildObjectNode = function(t2, e6, n4, i6) { + }, kt.prototype.buildObjectNode = function(t2, e6, n4, i6) { if ("" === t2) return "?" === e6[0] ? this.indentate(i6) + "<" + e6 + n4 + "?" + this.tagEndChar : this.indentate(i6) + "<" + e6 + n4 + this.closeTag(e6) + this.tagEndChar; { let s2 = "` + this.newLine : this.indentate(i6) + "<" + e6 + n4 + r6 + this.tagEndChar + t2 + this.indentate(i6) + s2 : this.indentate(i6) + "<" + e6 + n4 + r6 + ">" + t2 + s2; } - }, Gt.prototype.closeTag = function(t2) { + }, kt.prototype.closeTag = function(t2) { let e6 = ""; return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e6 = "/") : e6 = this.options.suppressEmptyNode ? "/" : `>/g, "]]]]>"); return this.indentate(i6) + `` + this.newLine; } if (false !== this.options.commentPropName && e6 === this.options.commentPropName) { - const e7 = Ct(t2); + const e7 = String(t2).replace(/--/g, "- -").replace(/-$/, "- "); return this.indentate(i6) + `` + this.newLine; } if ("?" === e6[0]) return this.indentate(i6) + "<" + e6 + n4 + "?" + this.tagEndChar; @@ -38969,14 +36696,14 @@ var require_fxp = __commonJS({ let s3 = this.options.tagValueProcessor(e6, t2); return s3 = this.replaceEntitiesValue(s3), "" === s3 ? this.indentate(i6) + "<" + e6 + n4 + this.closeTag(e6) + this.tagEndChar : this.indentate(i6) + "<" + e6 + n4 + ">" + s3 + " 0 && this.options.processEntities) for (let e6 = 0; e6 < this.options.entities.length; e6++) { const n4 = this.options.entities[e6]; t2 = t2.replace(n4.regex, n4.val); } return t2; }; - const Xt = Gt, Yt = { validate: l3 }; + const Bt = kt, Ut = { validate: l3 }; module2.exports = e5; })(); } @@ -39048,12 +36775,12 @@ var require_nodable_entities = __commonJS({ } function mergeEntityMaps(...maps) { const out = /* @__PURE__ */ Object.create(null); - for (const map3 of maps) { - if (!map3) { + for (const map2 of maps) { + if (!map2) { continue; } - for (const key of Object.keys(map3)) { - const raw = map3[key]; + for (const key of Object.keys(map2)) { + const raw = map2[key]; if (typeof raw === "string") { out[key] = raw; } else if (raw && typeof raw === "object" && raw.val !== void 0) { @@ -39132,13 +36859,13 @@ var require_nodable_entities = __commonJS({ this._ncrOnLevel = ncrCfg.onLevel; this._ncrNullLevel = ncrCfg.nullLevel; } - setExternalEntities(map3) { - if (map3) { - for (const key of Object.keys(map3)) { + setExternalEntities(map2) { + if (map2) { + for (const key of Object.keys(map2)) { validateEntityName(key); } } - this._externalMap = mergeEntityMaps(map3); + this._externalMap = mergeEntityMaps(map2); } addExternalEntity(key, value) { validateEntityName(key); @@ -39146,10 +36873,10 @@ var require_nodable_entities = __commonJS({ this._externalMap[key] = value; } } - addInputEntities(map3) { + addInputEntities(map2) { this._totalExpansions = 0; this._expandedLength = 0; - this._inputMap = mergeEntityMaps(map3); + this._inputMap = mergeEntityMaps(map2); } reset() { this._inputMap = /* @__PURE__ */ Object.create(null); @@ -39370,7 +37097,7 @@ var require_xml_parser = __commonJS({ }); // node_modules/@aws-sdk/xml-builder/dist-cjs/index.js -var require_dist_cjs11 = __commonJS({ +var require_dist_cjs38 = __commonJS({ "node_modules/@aws-sdk/xml-builder/dist-cjs/index.js"(exports2) { "use strict"; var xmlParser = require_xml_parser(); @@ -39501,14 +37228,14 @@ var require_dist_cjs11 = __commonJS({ }); // node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js -var import_xml_builder, XmlShapeDeserializer; +var import_xml_builder, import_smithy_client4, import_util_utf87, XmlShapeDeserializer; var init_XmlShapeDeserializer = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js"() { - import_xml_builder = __toESM(require_dist_cjs11()); - init_client2(); + import_xml_builder = __toESM(require_dist_cjs38()); init_protocols(); init_schema(); - init_serde(); + import_smithy_client4 = __toESM(require_dist_cjs34()); + import_util_utf87 = __toESM(require_dist_cjs9()); init_ConfigurableSerdeContext(); init_UnionSerde(); XmlShapeDeserializer = class extends SerdeContextConfig { @@ -39540,7 +37267,7 @@ var init_XmlShapeDeserializer = __esm({ } return output; } - const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes); + const xmlString = (this.serdeContext?.utf8Encoder ?? import_util_utf87.toUtf8)(bytes); const parsedObject = this.parseXml(xmlString); return this.readSchema(schema, key ? parsedObject[key] : parsedObject); } @@ -39645,7 +37372,7 @@ var init_XmlShapeDeserializer = __esm({ parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return getValueFromTextNode(parsedObjToReturn); + return (0, import_smithy_client4.getValueFromTextNode)(parsedObjToReturn); } return {}; } @@ -39654,13 +37381,14 @@ var init_XmlShapeDeserializer = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js -var QueryShapeSerializer; +var import_smithy_client5, import_util_base646, QueryShapeSerializer; var init_QueryShapeSerializer = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js"() { init_protocols(); init_schema(); init_serde(); - init_serde(); + import_smithy_client5 = __toESM(require_dist_cjs34()); + import_util_base646 = __toESM(require_dist_cjs10()); init_ConfigurableSerdeContext(); QueryShapeSerializer = class extends SerdeContextConfig { settings; @@ -39680,7 +37408,7 @@ var init_QueryShapeSerializer = __esm({ if (ns.isBlobSchema()) { if (typeof value === "string" || value instanceof Uint8Array) { this.writeKey(prefix); - this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value)); + this.writeValue((this.serdeContext?.base64Encoder ?? import_util_base646.toBase64)(value)); } } else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) { if (value != null) { @@ -39688,7 +37416,7 @@ var init_QueryShapeSerializer = __esm({ this.writeValue(String(value)); } else if (ns.isIdempotencyToken()) { this.writeKey(prefix); - this.writeValue(generateIdempotencyToken()); + this.writeValue((0, import_uuid.v4)()); } } else if (ns.isBigIntegerSchema()) { if (value != null) { @@ -39709,7 +37437,7 @@ var init_QueryShapeSerializer = __esm({ this.writeValue(value.toISOString().replace(".000Z", "Z")); break; case 6: - this.writeValue(dateToUtcString(value)); + this.writeValue((0, import_smithy_client5.dateToUtcString)(value)); break; case 7: this.writeValue(String(value.getTime() / 1e3)); @@ -39934,7 +37662,7 @@ var init_AwsQueryProtocol = __esm({ const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError); const ns = NormalizedSchema.of(errorSchema); const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error; - const exception = new ErrorCtor({}); + const exception = new ErrorCtor(message); const output = { Type: errorData.Error.Type, Code: errorData.Error.Code, @@ -40008,11 +37736,11 @@ var init_QuerySerializerSettings = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js -var import_xml_builder2, parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode; +var import_xml_builder2, import_smithy_client6, parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode; var init_parseXmlBody = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"() { - import_xml_builder2 = __toESM(require_dist_cjs11()); - init_client2(); + import_xml_builder2 = __toESM(require_dist_cjs38()); + import_smithy_client6 = __toESM(require_dist_cjs34()); init_common(); parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { if (encoded.length) { @@ -40034,7 +37762,7 @@ var init_parseXmlBody = __esm({ parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; delete parsedObjToReturn[textNodeName]; } - return getValueFromTextNode(parsedObjToReturn); + return (0, import_smithy_client6.getValueFromTextNode)(parsedObjToReturn); } return {}; }); @@ -40060,14 +37788,15 @@ var init_parseXmlBody = __esm({ }); // node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js -var import_xml_builder3, XmlShapeSerializer; +var import_xml_builder3, import_smithy_client7, import_util_base647, XmlShapeSerializer; var init_XmlShapeSerializer = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js"() { - import_xml_builder3 = __toESM(require_dist_cjs11()); + import_xml_builder3 = __toESM(require_dist_cjs38()); init_protocols(); init_schema(); init_serde(); - init_serde(); + import_smithy_client7 = __toESM(require_dist_cjs34()); + import_util_base647 = __toESM(require_dist_cjs10()); init_ConfigurableSerdeContext(); XmlShapeSerializer = class extends SerdeContextConfig { settings; @@ -40083,7 +37812,7 @@ var init_XmlShapeSerializer = __esm({ if (ns.isStringSchema() && typeof value === "string") { this.stringBuffer = value; } else if (ns.isBlobSchema()) { - this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? fromBase64)(value); + this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? import_util_base647.fromBase64)(value); } else { this.buffer = this.writeStruct(ns, value, void 0); const traits = ns.getMergedTraits(); @@ -40202,7 +37931,7 @@ var init_XmlShapeSerializer = __esm({ container.addChildNode(listNode); } } - writeMap(mapMember, map3, container, parentXmlns, containerIsMap = false) { + writeMap(mapMember, map2, container, parentXmlns, containerIsMap = false) { if (!mapMember.isMemberSchema()) { throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`); } @@ -40236,8 +37965,8 @@ var init_XmlShapeSerializer = __esm({ entry.addChildNode(valueNode); }; if (flat) { - for (const key in map3) { - const val = map3[key]; + for (const key in map2) { + const val = map2[key]; if (sparse || val != null) { const entry = import_xml_builder3.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); addKeyValue(entry, key, val); @@ -40253,8 +37982,8 @@ var init_XmlShapeSerializer = __esm({ } container.addChildNode(mapNode); } - for (const key in map3) { - const val = map3[key]; + for (const key in map2) { + const val = map2[key]; if (sparse || val != null) { const entry = import_xml_builder3.XmlNode.of("entry"); addKeyValue(entry, key, val); @@ -40271,7 +38000,7 @@ var init_XmlShapeSerializer = __esm({ let nodeContents = null; if (value && typeof value === "object") { if (ns.isBlobSchema()) { - nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value); + nodeContents = (this.serdeContext?.base64Encoder ?? import_util_base647.toBase64)(value); } else if (ns.isTimestampSchema() && value instanceof Date) { const format2 = determineTimestampFormat(ns, this.settings); switch (format2) { @@ -40279,14 +38008,14 @@ var init_XmlShapeSerializer = __esm({ nodeContents = value.toISOString().replace(".000Z", "Z"); break; case 6: - nodeContents = dateToUtcString(value); + nodeContents = (0, import_smithy_client7.dateToUtcString)(value); break; case 7: nodeContents = String(value.getTime() / 1e3); break; default: console.warn("Missing timestamp format, using http date", value); - nodeContents = dateToUtcString(value); + nodeContents = (0, import_smithy_client7.dateToUtcString)(value); break; } } else if (ns.isBigDecimalSchema() && value) { @@ -40305,7 +38034,7 @@ var init_XmlShapeSerializer = __esm({ } if (ns.isStringSchema()) { if (value === void 0 && ns.isIdempotencyToken()) { - nodeContents = generateIdempotencyToken(); + nodeContents = (0, import_uuid.v4)(); } else { nodeContents = String(value); } @@ -40434,7 +38163,7 @@ var init_AwsRestXmlProtocol = __esm({ const ns = NormalizedSchema.of(errorSchema); const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "UnknownError"; const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error; - const exception = new ErrorCtor({}); + const exception = new ErrorCtor(message); await this.deserializeHttpMessage(errorSchema, context, response, dataObject); const output = {}; const errorDeserializer = this.codec.createDeserializer(); @@ -40485,7 +38214,6 @@ __export(protocols_exports2, { _toNum: () => _toNum, _toStr: () => _toStr, awsExpectUnion: () => awsExpectUnion, - loadJsonRpcErrorCode: () => loadJsonRpcErrorCode, loadRestJsonErrorCode: () => loadRestJsonErrorCode, loadRestXmlErrorCode: () => loadRestXmlErrorCode, parseJsonBody: () => parseJsonBody, @@ -40518,11 +38246,2298 @@ var init_protocols2 = __esm({ } }); +// node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +var require_dist_cjs39 = __commonJS({ + "node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js"(exports2) { + "use strict"; + var protocolHttp = require_dist_cjs2(); + var smithyClient = require_dist_cjs34(); + var toStream = require_toStream(); + var utilArnParser = require_dist_cjs37(); + var protocols2 = (init_protocols2(), __toCommonJS(protocols_exports2)); + var schema = (init_schema(), __toCommonJS(schema_exports)); + var signatureV4 = require_dist_cjs36(); + var utilConfigProvider = require_dist_cjs25(); + var client = (init_client(), __toCommonJS(client_exports)); + var core5 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var utilMiddleware = require_dist_cjs6(); + var CONTENT_LENGTH_HEADER = "content-length"; + var DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length"; + function checkContentLengthHeader() { + return (next, context) => async (args) => { + const { request } = args; + if (protocolHttp.HttpRequest.isInstance(request)) { + if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) { + const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`; + if (typeof context?.logger?.warn === "function" && !(context.logger instanceof smithyClient.NoOpLogger)) { + context.logger.warn(message); + } else { + console.warn(message); + } + } + } + return next({ ...args }); + }; + } + var checkContentLengthHeaderMiddlewareOptions = { + step: "finalizeRequest", + tags: ["CHECK_CONTENT_LENGTH_HEADER"], + name: "getCheckContentLengthHeaderPlugin", + override: true + }; + var getCheckContentLengthHeaderPlugin = (unused) => ({ + applyToStack: (clientStack) => { + clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions); + } + }); + var regionRedirectEndpointMiddleware = (config) => { + return (next, context) => async (args) => { + const originalRegion = await config.region(); + const regionProviderRef = config.region; + let unlock = () => { + }; + if (context.__s3RegionRedirect) { + Object.defineProperty(config, "region", { + writable: false, + value: async () => { + return context.__s3RegionRedirect; + } + }); + unlock = () => Object.defineProperty(config, "region", { + writable: true, + value: regionProviderRef + }); + } + try { + const result = await next(args); + if (context.__s3RegionRedirect) { + unlock(); + const region = await config.region(); + if (originalRegion !== region) { + throw new Error("Region was not restored following S3 region redirect."); + } + } + return result; + } catch (e5) { + unlock(); + throw e5; + } + }; + }; + var regionRedirectEndpointMiddlewareOptions = { + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectEndpointMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + function regionRedirectMiddleware(clientConfig) { + return (next, context) => async (args) => { + try { + return await next(args); + } catch (err) { + if (clientConfig.followRegionRedirects) { + const statusCode = err?.$metadata?.httpStatusCode; + const isHeadBucket = context.commandName === "HeadBucketCommand"; + const bucketRegionHeader = err?.$response?.headers?.["x-amz-bucket-region"]; + if (bucketRegionHeader) { + if (statusCode === 301 || statusCode === 400 && (err?.name === "IllegalLocationConstraintException" || isHeadBucket)) { + try { + const actualRegion = bucketRegionHeader; + context.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`); + context.__s3RegionRedirect = actualRegion; + } catch (e5) { + throw new Error("Region redirect failed: " + e5); + } + return next(args); + } + } + } + throw err; + } + }; + } + var regionRedirectMiddlewareOptions = { + step: "initialize", + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectMiddleware", + override: true + }; + var getRegionRedirectMiddlewarePlugin = (clientConfig) => ({ + applyToStack: (clientStack) => { + clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions); + clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions); + } + }); + var s3ExpiresMiddleware = (config) => { + return (next, context) => async (args) => { + const result = await next(args); + const { response } = result; + if (protocolHttp.HttpResponse.isInstance(response)) { + if (response.headers.expires) { + response.headers.expiresstring = response.headers.expires; + try { + smithyClient.parseRfc7231DateTime(response.headers.expires); + } catch (e5) { + context.logger?.warn(`AWS SDK Warning for ${context.clientName}::${context.commandName} response parsing (${response.headers.expires}): ${e5}`); + delete response.headers.expires; + } + } + } + return result; + }; + }; + var s3ExpiresMiddlewareOptions = { + tags: ["S3"], + name: "s3ExpiresMiddleware", + override: true, + relation: "after", + toMiddleware: "deserializerMiddleware" + }; + var getS3ExpiresMiddlewarePlugin = (clientConfig) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(s3ExpiresMiddleware(), s3ExpiresMiddlewareOptions); + } + }); + var S3ExpressIdentityCache = class _S3ExpressIdentityCache { + data; + lastPurgeTime = Date.now(); + static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS = 3e4; + constructor(data3 = {}) { + this.data = data3; + } + get(key) { + const entry = this.data[key]; + if (!entry) { + return; + } + return entry; + } + set(key, entry) { + this.data[key] = entry; + return entry; + } + delete(key) { + delete this.data[key]; + } + async purgeExpired() { + const now = Date.now(); + if (this.lastPurgeTime + _S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) { + return; + } + for (const key in this.data) { + const entry = this.data[key]; + if (!entry.isRefreshing) { + const credential = await entry.identity; + if (credential.expiration) { + if (credential.expiration.getTime() < now) { + delete this.data[key]; + } + } + } + } + } + }; + var S3ExpressIdentityCacheEntry = class { + _identity; + isRefreshing; + accessed; + constructor(_identity, isRefreshing = false, accessed = Date.now()) { + this._identity = _identity; + this.isRefreshing = isRefreshing; + this.accessed = accessed; + } + get identity() { + this.accessed = Date.now(); + return this._identity; + } + }; + var S3ExpressIdentityProviderImpl = class _S3ExpressIdentityProviderImpl { + createSessionFn; + cache; + static REFRESH_WINDOW_MS = 6e4; + constructor(createSessionFn, cache5 = new S3ExpressIdentityCache()) { + this.createSessionFn = createSessionFn; + this.cache = cache5; + } + async getS3ExpressIdentity(awsIdentity, identityProperties) { + const key = identityProperties.Bucket; + const { cache: cache5 } = this; + const entry = cache5.get(key); + if (entry) { + return entry.identity.then((identity) => { + const isExpired = (identity.expiration?.getTime() ?? 0) < Date.now(); + if (isExpired) { + return cache5.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + const isExpiringSoon = (identity.expiration?.getTime() ?? 0) < Date.now() + _S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS; + if (isExpiringSoon && !entry.isRefreshing) { + entry.isRefreshing = true; + this.getIdentity(key).then((id) => { + cache5.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id))); + }); + } + return identity; + }); + } + return cache5.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + async getIdentity(key) { + await this.cache.purgeExpired().catch((error2) => { + console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error2); + }); + const session = await this.createSessionFn(key); + if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) { + throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey."); + } + const identity = { + accessKeyId: session.Credentials.AccessKeyId, + secretAccessKey: session.Credentials.SecretAccessKey, + sessionToken: session.Credentials.SessionToken, + expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : void 0 + }; + return identity; + } + }; + var S3_EXPRESS_BUCKET_TYPE = "Directory"; + var S3_EXPRESS_BACKEND = "S3Express"; + var S3_EXPRESS_AUTH_SCHEME = "sigv4-s3express"; + var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token"; + var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase(); + var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH"; + var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = "s3_disable_express_session_auth"; + var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = { + environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, utilConfigProvider.SelectorType.ENV), + configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, utilConfigProvider.SelectorType.CONFIG), + default: false + }; + var SignatureV4S3Express = class extends signatureV4.SignatureV4 { + async signWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return privateAccess.signRequest(requestToSign, options ?? {}); + } + async presignWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + delete requestToSign.headers[SESSION_TOKEN_HEADER]; + requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + requestToSign.query = requestToSign.query ?? {}; + requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return this.presign(requestToSign, options); + } + }; + function getCredentialsWithoutSessionToken(credentials) { + const credentialsWithoutSessionToken = { + accessKeyId: credentials.accessKeyId, + secretAccessKey: credentials.secretAccessKey, + expiration: credentials.expiration + }; + return credentialsWithoutSessionToken; + } + function setSingleOverride(privateAccess, credentialsWithoutSessionToken) { + const id = setTimeout(() => { + throw new Error("SignatureV4S3Express credential override was created but not called."); + }, 10); + const currentCredentialProvider = privateAccess.credentialProvider; + const overrideCredentialsProviderOnce = () => { + clearTimeout(id); + privateAccess.credentialProvider = currentCredentialProvider; + return Promise.resolve(credentialsWithoutSessionToken); + }; + privateAccess.credentialProvider = overrideCredentialsProviderOnce; + } + var s3ExpressMiddleware = (options) => { + return (next, context) => async (args) => { + if (context.endpointV2) { + const endpoint = context.endpointV2; + const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME; + const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND || endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE; + if (isS3ExpressBucket) { + client.setFeature(context, "S3_EXPRESS_BUCKET", "J"); + context.isS3ExpressBucket = true; + } + if (isS3ExpressAuth) { + const requestBucket = args.input.Bucket; + if (requestBucket) { + const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), { + Bucket: requestBucket + }); + context.s3ExpressIdentity = s3ExpressIdentity; + if (protocolHttp.HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) { + args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken; + } + } + } + } + return next(args); + }; + }; + var s3ExpressMiddlewareOptions = { + name: "s3ExpressMiddleware", + step: "build", + tags: ["S3", "S3_EXPRESS"], + override: true + }; + var getS3ExpressPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions); + } + }); + var signS3Express = async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => { + const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {}); + if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) { + throw new Error("X-Amz-Security-Token must not be set for s3-express requests."); + } + return signedRequest; + }; + var defaultErrorHandler2 = (signingProperties) => (error2) => { + throw error2; + }; + var defaultSuccessHandler2 = (httpResponse, signingProperties) => { + }; + var s3ExpressHttpSigningMiddlewareOptions = core5.httpSigningMiddlewareOptions; + var s3ExpressHttpSigningMiddleware = (config) => (next, context) => async (args) => { + if (!protocolHttp.HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = utilMiddleware.getSmithyContext(context); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme; + let request; + if (context.s3ExpressIdentity) { + request = await signS3Express(context.s3ExpressIdentity, signingProperties, args.request, await config.signer()); + } else { + request = await signer.sign(args.request, identity, signingProperties); + } + const output = await next({ + ...args, + request + }).catch((signer.errorHandler || defaultErrorHandler2)(signingProperties)); + (signer.successHandler || defaultSuccessHandler2)(output.response, signingProperties); + return output; + }; + var getS3ExpressHttpSigningPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(s3ExpressHttpSigningMiddleware(config), core5.httpSigningMiddlewareOptions); + } + }); + var resolveS3Config = (input, { session }) => { + const [s3ClientProvider, CreateSessionCommandCtor] = session; + const { forcePathStyle, useAccelerateEndpoint, disableMultiregionAccessPoints, followRegionRedirects, s3ExpressIdentityProvider, bucketEndpoint, expectContinueHeader } = input; + return Object.assign(input, { + forcePathStyle: forcePathStyle ?? false, + useAccelerateEndpoint: useAccelerateEndpoint ?? false, + disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false, + followRegionRedirects: followRegionRedirects ?? false, + s3ExpressIdentityProvider: s3ExpressIdentityProvider ?? new S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({ + Bucket: key + }))), + bucketEndpoint: bucketEndpoint ?? false, + expectContinueHeader: expectContinueHeader ?? 2097152 + }); + }; + var THROW_IF_EMPTY_BODY = { + CopyObjectCommand: true, + UploadPartCopyCommand: true, + CompleteMultipartUploadCommand: true + }; + var throw200ExceptionsMiddleware = (config) => (next, context) => async (args) => { + const result = await next(args); + const { response } = result; + if (!protocolHttp.HttpResponse.isInstance(response)) { + return result; + } + const { statusCode, body } = response; + if (statusCode < 200 || statusCode >= 300) { + return result; + } + const bodyBytes = await collectBody3(body, config); + response.body = toStream.toStream(bodyBytes); + if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) { + const err = new Error("S3 aborted request"); + err.$metadata = { + httpStatusCode: 503 + }; + err.name = "InternalError"; + throw err; + } + const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16)); + if (bodyStringTail && bodyStringTail.endsWith("")) { + response.statusCode = 503; + } + return result; + }; + var collectBody3 = (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); + }; + var throw200ExceptionsMiddlewareOptions = { + relation: "after", + toMiddleware: "deserializerMiddleware", + tags: ["THROW_200_EXCEPTIONS", "S3"], + name: "throw200ExceptionsMiddleware", + override: true + }; + var getThrow200ExceptionsPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(throw200ExceptionsMiddleware(config), throw200ExceptionsMiddlewareOptions); + } + }); + function bucketEndpointMiddleware(options) { + return (next, context) => async (args) => { + if (options.bucketEndpoint) { + const endpoint = context.endpointV2; + if (endpoint) { + const bucket = args.input.Bucket; + if (typeof bucket === "string") { + try { + const bucketEndpointUrl = new URL(bucket); + context.endpointV2 = { + ...endpoint, + url: bucketEndpointUrl + }; + } catch (e5) { + const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`; + if (context.logger?.constructor?.name === "NoOpLogger") { + console.warn(warning); + } else { + context.logger?.warn?.(warning); + } + throw e5; + } + } + } + } + return next(args); + }; + } + var bucketEndpointMiddlewareOptions = { + name: "bucketEndpointMiddleware", + override: true, + relation: "after", + toMiddleware: "endpointV2Middleware" + }; + function validateBucketNameMiddleware({ bucketEndpoint }) { + return (next) => async (args) => { + const { input: { Bucket } } = args; + if (!bucketEndpoint && typeof Bucket === "string" && !utilArnParser.validate(Bucket) && Bucket.indexOf("/") >= 0) { + const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`); + err.name = "InvalidBucketName"; + throw err; + } + return next({ ...args }); + }; + } + var validateBucketNameMiddlewareOptions = { + step: "initialize", + tags: ["VALIDATE_BUCKET_NAME"], + name: "validateBucketNameMiddleware", + override: true + }; + var getValidateBucketNamePlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions); + clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions); + } + }); + var S3RestXmlProtocol = class extends protocols2.AwsRestXmlProtocol { + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + const ns = schema.NormalizedSchema.of(operationSchema.input); + const staticStructureSchema = ns.getSchema(); + let bucketMemberIndex = 0; + const requiredMemberCount = staticStructureSchema[6] ?? 0; + if (input && typeof input === "object") { + for (const [memberName, memberNs] of ns.structIterator()) { + if (++bucketMemberIndex > requiredMemberCount) { + break; + } + if (memberName === "Bucket") { + if (!input.Bucket && memberNs.getMergedTraits().httpLabel) { + throw new Error(`No value provided for input HTTP label: Bucket.`); + } + break; + } + } + } + return request; + } + }; + exports2.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS; + exports2.S3ExpressIdentityCache = S3ExpressIdentityCache; + exports2.S3ExpressIdentityCacheEntry = S3ExpressIdentityCacheEntry; + exports2.S3ExpressIdentityProviderImpl = S3ExpressIdentityProviderImpl; + exports2.S3RestXmlProtocol = S3RestXmlProtocol; + exports2.SignatureV4S3Express = SignatureV4S3Express; + exports2.checkContentLengthHeader = checkContentLengthHeader; + exports2.checkContentLengthHeaderMiddlewareOptions = checkContentLengthHeaderMiddlewareOptions; + exports2.getCheckContentLengthHeaderPlugin = getCheckContentLengthHeaderPlugin; + exports2.getRegionRedirectMiddlewarePlugin = getRegionRedirectMiddlewarePlugin; + exports2.getS3ExpiresMiddlewarePlugin = getS3ExpiresMiddlewarePlugin; + exports2.getS3ExpressHttpSigningPlugin = getS3ExpressHttpSigningPlugin; + exports2.getS3ExpressPlugin = getS3ExpressPlugin; + exports2.getThrow200ExceptionsPlugin = getThrow200ExceptionsPlugin; + exports2.getValidateBucketNamePlugin = getValidateBucketNamePlugin; + exports2.regionRedirectEndpointMiddleware = regionRedirectEndpointMiddleware; + exports2.regionRedirectEndpointMiddlewareOptions = regionRedirectEndpointMiddlewareOptions; + exports2.regionRedirectMiddleware = regionRedirectMiddleware; + exports2.regionRedirectMiddlewareOptions = regionRedirectMiddlewareOptions; + exports2.resolveS3Config = resolveS3Config; + exports2.s3ExpiresMiddleware = s3ExpiresMiddleware; + exports2.s3ExpiresMiddlewareOptions = s3ExpiresMiddlewareOptions; + exports2.s3ExpressHttpSigningMiddleware = s3ExpressHttpSigningMiddleware; + exports2.s3ExpressHttpSigningMiddlewareOptions = s3ExpressHttpSigningMiddlewareOptions; + exports2.s3ExpressMiddleware = s3ExpressMiddleware; + exports2.s3ExpressMiddlewareOptions = s3ExpressMiddlewareOptions; + exports2.throw200ExceptionsMiddleware = throw200ExceptionsMiddleware; + exports2.throw200ExceptionsMiddlewareOptions = throw200ExceptionsMiddlewareOptions; + exports2.validateBucketNameMiddleware = validateBucketNameMiddleware; + exports2.validateBucketNameMiddlewareOptions = validateBucketNameMiddlewareOptions; + } +}); + +// node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +var require_dist_cjs40 = __commonJS({ + "node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js"(exports2) { + "use strict"; + var middlewareSdkS3 = require_dist_cjs39(); + var signatureV4 = require_dist_cjs36(); + var signatureV4CrtContainer = { + CrtSignerV4: null + }; + var SignatureV4MultiRegion3 = class { + sigv4aSigner; + sigv4Signer; + signerOptions; + static sigv4aDependency() { + if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") { + return "crt"; + } else if (typeof signatureV4.signatureV4aContainer.SignatureV4a === "function") { + return "js"; + } + return "none"; + } + constructor(options) { + this.sigv4Signer = new middlewareSdkS3.SignatureV4S3Express(options); + this.signerOptions = options; + } + async sign(requestToSign, options = {}) { + if (options.signingRegion === "*") { + return this.getSigv4aSigner().sign(requestToSign, options); + } + return this.sigv4Signer.sign(requestToSign, options); + } + async signWithCredentials(requestToSign, credentials, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.signWithCredentials(requestToSign, credentials, options); + } else { + throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options); + } + async presign(originalRequest, options = {}) { + if (options.signingRegion === "*") { + const signer = this.getSigv4aSigner(); + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + if (CrtSignerV4 && signer instanceof CrtSignerV4) { + return signer.presign(originalRequest, options); + } else { + throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`); + } + } + return this.sigv4Signer.presign(originalRequest, options); + } + async presignWithCredentials(originalRequest, credentials, options = {}) { + if (options.signingRegion === "*") { + throw new Error("Method presignWithCredentials is not supported for [signingRegion=*]."); + } + return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options); + } + getSigv4aSigner() { + if (!this.sigv4aSigner) { + const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4; + const JsSigV4aSigner = signatureV4.signatureV4aContainer.SignatureV4a; + if (this.signerOptions.runtime === "node") { + if (!CrtSignerV4 && !JsSigV4aSigner) { + throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + if (CrtSignerV4 && typeof CrtSignerV4 === "function") { + this.sigv4aSigner = new CrtSignerV4({ + ...this.signerOptions, + signingAlgorithm: 1 + }); + } else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") { + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } else { + throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"); + } + } else { + if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") { + throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a"); + } + this.sigv4aSigner = new JsSigV4aSigner({ + ...this.signerOptions + }); + } + } + return this.sigv4aSigner; + } + }; + exports2.SignatureV4MultiRegion = SignatureV4MultiRegion3; + exports2.signatureV4CrtContainer = signatureV4CrtContainer; + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/bdd.js +var require_bdd = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/bdd.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bdd = void 0; + var util_endpoints_1 = require_dist_cjs20(); + var q2 = "ref"; + var a5 = -1; + var b6 = true; + var c5 = "isSet"; + var d5 = "PartitionResult"; + var e5 = "booleanEquals"; + var f5 = "stringEquals"; + var g5 = "getAttr"; + var h5 = "us-east-1"; + var i5 = "sigv4"; + var j5 = "sts"; + var k5 = "https://sts.{Region}.{PartitionResult#dnsSuffix}"; + var l3 = { [q2]: "Endpoint" }; + var m3 = { [q2]: "Region" }; + var n3 = { [q2]: d5 }; + var o2 = {}; + var p2 = [m3]; + var _data5 = { + conditions: [ + [c5, [l3]], + [c5, p2], + ["aws.partition", p2, d5], + [e5, [{ [q2]: "UseFIPS" }, b6]], + [e5, [{ [q2]: "UseDualStack" }, b6]], + [f5, [m3, "aws-global"]], + [e5, [{ [q2]: "UseGlobalEndpoint" }, b6]], + [f5, [m3, "eu-central-1"]], + [e5, [{ fn: g5, argv: [n3, "supportsDualStack"] }, b6]], + [e5, [{ fn: g5, argv: [n3, "supportsFIPS"] }, b6]], + [f5, [m3, "ap-south-1"]], + [f5, [m3, "eu-north-1"]], + [f5, [m3, "eu-west-1"]], + [f5, [m3, "eu-west-2"]], + [f5, [m3, "eu-west-3"]], + [f5, [m3, "sa-east-1"]], + [f5, [m3, h5]], + [f5, [m3, "us-east-2"]], + [f5, [m3, "us-west-2"]], + [f5, [m3, "us-west-1"]], + [f5, [m3, "ca-central-1"]], + [f5, [m3, "ap-southeast-1"]], + [f5, [m3, "ap-northeast-1"]], + [f5, [m3, "ap-southeast-2"]], + [f5, [{ fn: g5, argv: [n3, "name"] }, "aws-us-gov"]] + ], + results: [ + [a5], + ["https://sts.amazonaws.com", { authSchemes: [{ name: i5, signingName: j5, signingRegion: h5 }] }], + [k5, { authSchemes: [{ name: i5, signingName: j5, signingRegion: "{Region}" }] }], + [a5, "Invalid Configuration: FIPS and custom endpoint are not supported"], + [a5, "Invalid Configuration: Dualstack and custom endpoint are not supported"], + [l3, o2], + ["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", o2], + [a5, "FIPS and DualStack are enabled, but this partition does not support one or both"], + ["https://sts.{Region}.amazonaws.com", o2], + ["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", o2], + [a5, "FIPS is enabled but this partition does not support FIPS"], + ["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", o2], + [a5, "DualStack is enabled but this partition does not support DualStack"], + [k5, o2], + [a5, "Invalid Configuration: Missing Region"] + ] + }; + var root5 = 2; + var r5 = 1e8; + var nodes5 = new Int32Array([ + -1, + 1, + -1, + 0, + 30, + 3, + 1, + 4, + r5 + 14, + 2, + 5, + r5 + 14, + 3, + 25, + 6, + 4, + 24, + 7, + 5, + r5 + 1, + 8, + 6, + 9, + r5 + 13, + 7, + r5 + 1, + 10, + 10, + r5 + 1, + 11, + 11, + r5 + 1, + 12, + 12, + r5 + 1, + 13, + 13, + r5 + 1, + 14, + 14, + r5 + 1, + 15, + 15, + r5 + 1, + 16, + 16, + r5 + 1, + 17, + 17, + r5 + 1, + 18, + 18, + r5 + 1, + 19, + 19, + r5 + 1, + 20, + 20, + r5 + 1, + 21, + 21, + r5 + 1, + 22, + 22, + r5 + 1, + 23, + 23, + r5 + 1, + r5 + 2, + 8, + r5 + 11, + r5 + 12, + 4, + 28, + 26, + 9, + 27, + r5 + 10, + 24, + r5 + 8, + r5 + 9, + 8, + 29, + r5 + 7, + 9, + r5 + 6, + r5 + 7, + 3, + r5 + 3, + 31, + 4, + r5 + 4, + r5 + 5 + ]); + exports2.bdd = util_endpoints_1.BinaryDecisionDiagram.from(nodes5, root5, _data5.conditions, _data5.results); + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs21(); + var util_endpoints_2 = require_dist_cjs20(); + var bdd_1 = require_bdd(); + var cache5 = new util_endpoints_2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"] + }); + var defaultEndpointResolver5 = (endpointParams, context = {}) => { + return cache5.get(endpointParams, () => (0, util_endpoints_2.decideEndpoint)(bdd_1.bdd, { + endpointParams, + logger: context.logger + })); + }; + exports2.defaultEndpointResolver = defaultEndpointResolver5; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.resolveStsAuthConfig = exports2.defaultSTSHttpAuthSchemeProvider = exports2.defaultSTSHttpAuthSchemeParametersProvider = void 0; + var httpAuthSchemes_1 = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports)); + var signature_v4_multi_region_1 = require_dist_cjs40(); + var middleware_endpoint_1 = require_dist_cjs32(); + var util_middleware_1 = require_dist_cjs6(); + var endpointResolver_1 = require_endpointResolver(); + var STSClient_1 = require_STSClient(); + var createEndpointRuleSetHttpAuthSchemeParametersProvider2 = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => { + if (!input) { + throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`"); + } + const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input); + const instructionsFn = (0, util_middleware_1.getSmithyContext)(context)?.commandInstance?.constructor?.getEndpointParameterInstructions; + if (!instructionsFn) { + throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`); + } + const endpointParameters = await (0, middleware_endpoint_1.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config); + return Object.assign(defaultParameters, endpointParameters); + }; + var _defaultSTSHttpAuthSchemeParametersProvider2 = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + exports2.defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider2(_defaultSTSHttpAuthSchemeParametersProvider2); + function createAwsAuthSigv4HttpAuthOption5(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sts", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; + } + function createAwsAuthSigv4aHttpAuthOption2(authParameters) { + return { + schemeId: "aws.auth#sigv4a", + signingProperties: { + name: "sts", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; + } + function createSmithyApiNoAuthHttpAuthOption5(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; + } + var createEndpointRuleSetHttpAuthSchemeProvider2 = (defaultEndpointResolver5, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => { + const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => { + const endpoint = defaultEndpointResolver5(authParameters); + const authSchemes = endpoint.properties?.authSchemes; + if (!authSchemes) { + return defaultHttpAuthSchemeResolver(authParameters); + } + const options = []; + for (const scheme of authSchemes) { + const { name: resolvedName, properties = {}, ...rest } = scheme; + const name = resolvedName.toLowerCase(); + if (resolvedName !== name) { + console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`); + } + let schemeId; + if (name === "sigv4a") { + schemeId = "aws.auth#sigv4a"; + const sigv4Present = authSchemes.find((s) => { + const name2 = s.name.toLowerCase(); + return name2 !== "sigv4a" && name2.startsWith("sigv4"); + }); + if (signature_v4_multi_region_1.SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) { + continue; + } + } else if (name.startsWith("sigv4")) { + schemeId = "aws.auth#sigv4"; + } else { + throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`); + } + const createOption = createHttpAuthOptionFunctions[schemeId]; + if (!createOption) { + throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`); + } + const option = createOption(authParameters); + option.schemeId = schemeId; + option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties }; + options.push(option); + } + return options; + }; + return endpointRuleSetHttpAuthSchemeProvider; + }; + var _defaultSTSHttpAuthSchemeProvider2 = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "AssumeRoleWithSAML": { + options.push(createSmithyApiNoAuthHttpAuthOption5(authParameters)); + options.push(createAwsAuthSigv4aHttpAuthOption2(authParameters)); + break; + } + case "AssumeRoleWithWebIdentity": { + options.push(createSmithyApiNoAuthHttpAuthOption5(authParameters)); + options.push(createAwsAuthSigv4aHttpAuthOption2(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption5(authParameters)); + options.push(createAwsAuthSigv4aHttpAuthOption2(authParameters)); + } + } + return options; + }; + exports2.defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider2(endpointResolver_1.defaultEndpointResolver, _defaultSTSHttpAuthSchemeProvider2, { + "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption5, + "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption2, + "smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption5 + }); + var resolveStsAuthConfig2 = (input) => Object.assign(input, { + stsClientCtor: STSClient_1.STSClient + }); + exports2.resolveStsAuthConfig = resolveStsAuthConfig2; + var resolveHttpAuthSchemeConfig5 = (config) => { + const config_0 = (0, exports2.resolveStsAuthConfig)(config); + const config_1 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config_0); + const config_2 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4AConfig)(config_1); + return Object.assign(config_2, { + authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []) + }); + }; + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig5; + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js +var require_EndpointParameters = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.commonParams = exports2.resolveClientEndpointParameters = void 0; + var resolveClientEndpointParameters5 = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + defaultSigningName: "sts" + }); + }; + exports2.resolveClientEndpointParameters = resolveClientEndpointParameters5; + exports2.commonParams = { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + } +}); + +// node_modules/@aws-sdk/client-sts/package.json +var require_package = __commonJS({ + "node_modules/@aws-sdk/client-sts/package.json"(exports2, module2) { + module2.exports = { + name: "@aws-sdk/client-sts", + description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native", + version: "3.1038.0", + scripts: { + build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs", + "build:cjs": "node ../../scripts/compilation/inline client-sts", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"', + "build:types": "premove ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo sts", + test: "yarn g:vitest run", + "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development", + "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts", + "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs", + "test:integration": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts", + "test:integration:watch": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts", + "test:watch": "yarn g:vitest watch" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "^3.974.6", + "@aws-sdk/credential-provider-node": "^3.972.37", + "@aws-sdk/middleware-host-header": "^3.972.10", + "@aws-sdk/middleware-logger": "^3.972.10", + "@aws-sdk/middleware-recursion-detection": "^3.972.11", + "@aws-sdk/middleware-user-agent": "^3.972.36", + "@aws-sdk/region-config-resolver": "^3.972.13", + "@aws-sdk/signature-v4-multi-region": "^3.996.23", + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/util-endpoints": "^3.996.8", + "@aws-sdk/util-user-agent-browser": "^3.972.10", + "@aws-sdk/util-user-agent-node": "^3.973.22", + "@smithy/config-resolver": "^4.4.17", + "@smithy/core": "^3.23.17", + "@smithy/fetch-http-handler": "^5.3.17", + "@smithy/hash-node": "^4.2.14", + "@smithy/invalid-dependency": "^4.2.14", + "@smithy/middleware-content-length": "^4.2.14", + "@smithy/middleware-endpoint": "^4.4.32", + "@smithy/middleware-retry": "^4.5.6", + "@smithy/middleware-serde": "^4.2.20", + "@smithy/middleware-stack": "^4.2.14", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/node-http-handler": "^4.6.1", + "@smithy/protocol-http": "^5.3.14", + "@smithy/smithy-client": "^4.12.13", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-body-length-browser": "^4.2.2", + "@smithy/util-body-length-node": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.49", + "@smithy/util-defaults-mode-node": "^4.2.54", + "@smithy/util-endpoints": "^3.4.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-retry": "^4.3.5", + "@smithy/util-utf8": "^4.2.2", + tslib: "^2.6.2" + }, + devDependencies: { + "@smithy/snapshot-testing": "^2.0.8", + "@tsconfig/node20": "20.1.8", + "@types/node": "^20.14.8", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + premove: "4.0.0", + typescript: "~5.8.3", + vitest: "^4.0.17" + }, + engines: { + node: ">=20.0.0" + }, + typesVersions: { + "<4.5": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-sts" + } + }; + } +}); + +// node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +var require_dist_cjs41 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js"(exports2) { + "use strict"; + var client = (init_client(), __toCommonJS(client_exports)); + var propertyProvider = require_dist_cjs28(); + var ENV_KEY = "AWS_ACCESS_KEY_ID"; + var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; + var ENV_SESSION = "AWS_SESSION_TOKEN"; + var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; + var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; + var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; + var fromEnv = (init) => async () => { + init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); + const accessKeyId = process.env[ENV_KEY]; + const secretAccessKey = process.env[ENV_SECRET]; + const sessionToken = process.env[ENV_SESSION]; + const expiry = process.env[ENV_EXPIRATION]; + const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; + const accountId = process.env[ENV_ACCOUNT_ID]; + if (accessKeyId && secretAccessKey) { + const credentials = { + accessKeyId, + secretAccessKey, + ...sessionToken && { sessionToken }, + ...expiry && { expiration: new Date(expiry) }, + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + client.setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g"); + return credentials; + } + throw new propertyProvider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); + }; + exports2.ENV_ACCOUNT_ID = ENV_ACCOUNT_ID; + exports2.ENV_CREDENTIAL_SCOPE = ENV_CREDENTIAL_SCOPE; + exports2.ENV_EXPIRATION = ENV_EXPIRATION; + exports2.ENV_KEY = ENV_KEY; + exports2.ENV_SECRET = ENV_SECRET; + exports2.ENV_SESSION = ENV_SESSION; + exports2.fromEnv = fromEnv; + } +}); + +// node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +var require_dist_cjs42 = __commonJS({ + "node_modules/@smithy/credential-provider-imds/dist-cjs/index.js"(exports2) { + "use strict"; + var propertyProvider = require_dist_cjs28(); + var url = require("url"); + var buffer = require("buffer"); + var http5 = require("http"); + var nodeConfigProvider = require_dist_cjs30(); + var urlParser = require_dist_cjs18(); + function httpRequest(options) { + return new Promise((resolve, reject) => { + const req = http5.request({ + method: "GET", + ...options, + hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1") + }); + req.on("error", (err) => { + reject(Object.assign(new propertyProvider.ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new propertyProvider.ProviderError("TimeoutError from instance metadata service")); + req.destroy(); + }); + req.on("response", (res) => { + const { statusCode = 400 } = res; + if (statusCode < 200 || 300 <= statusCode) { + reject(Object.assign(new propertyProvider.ProviderError("Error response received from instance metadata service"), { statusCode })); + req.destroy(); + } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(buffer.Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); + } + var isImdsCredentials = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string"; + var fromImdsCredentials = (creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration), + ...creds.AccountId && { accountId: creds.AccountId } + }); + var DEFAULT_TIMEOUT = 1e3; + var DEFAULT_MAX_RETRIES = 0; + var providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT }) => ({ maxRetries, timeout }); + var retry = (toRetry, maxRetries) => { + let promise = toRetry(); + for (let i5 = 0; i5 < maxRetries; i5++) { + promise = promise.catch(toRetry); + } + return promise; + }; + var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; + var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; + var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; + var fromContainerMetadata = (init = {}) => { + const { timeout, maxRetries } = providerConfigFromInit(init); + return () => retry(async () => { + const requestOptions = await getCmdsUri({ logger: init.logger }); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!isImdsCredentials(credsResponse)) { + throw new propertyProvider.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); + } + return fromImdsCredentials(credsResponse); + }, maxRetries); + }; + var requestFromEcsImds = async (timeout, options) => { + if (process.env[ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[ENV_CMDS_AUTH_TOKEN] + }; + } + const buffer2 = await httpRequest({ + ...options, + timeout + }); + return buffer2.toString(); + }; + var CMDS_IP = "169.254.170.2"; + var GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true + }; + var GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true + }; + var getCmdsUri = async ({ logger: logger2 }) => { + if (process.env[ENV_CMDS_RELATIVE_URI]) { + return { + hostname: CMDS_IP, + path: process.env[ENV_CMDS_RELATIVE_URI] + }; + } + if (process.env[ENV_CMDS_FULL_URI]) { + const parsed = url.parse(process.env[ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new propertyProvider.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { + tryNextLink: false, + logger: logger2 + }); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new propertyProvider.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { + tryNextLink: false, + logger: logger2 + }); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : void 0 + }; + } + throw new propertyProvider.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, { + tryNextLink: false, + logger: logger2 + }); + }; + var InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends propertyProvider.CredentialsProviderError { + tryNextLink; + name = "InstanceMetadataV1FallbackError"; + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype); + } + }; + exports2.Endpoint = void 0; + (function(Endpoint) { + Endpoint["IPv4"] = "http://169.254.169.254"; + Endpoint["IPv6"] = "http://[fd00:ec2::254]"; + })(exports2.Endpoint || (exports2.Endpoint = {})); + var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; + var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; + var ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], + default: void 0 + }; + var EndpointMode; + (function(EndpointMode2) { + EndpointMode2["IPv4"] = "IPv4"; + EndpointMode2["IPv6"] = "IPv6"; + })(EndpointMode || (EndpointMode = {})); + var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; + var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; + var ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + default: EndpointMode.IPv4 + }; + var getInstanceMetadataEndpoint = async () => urlParser.parseUrl(await getFromEndpointConfig() || await getFromEndpointModeConfig()); + var getFromEndpointConfig = async () => nodeConfigProvider.loadConfig(ENDPOINT_CONFIG_OPTIONS)(); + var getFromEndpointModeConfig = async () => { + const endpointMode = await nodeConfigProvider.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case EndpointMode.IPv4: + return exports2.Endpoint.IPv4; + case EndpointMode.IPv6: + return exports2.Endpoint.IPv6; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); + } + }; + var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; + var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; + var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; + var getExtendedInstanceMetadataCredentials = (credentials, logger2) => { + const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); + const newExpiration = new Date(Date.now() + refreshInterval * 1e3); + logger2.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}. +For more information, please visit: ` + STATIC_STABILITY_DOC_URL); + const originalExpiration = credentials.originalExpiration ?? credentials.expiration; + return { + ...credentials, + ...originalExpiration ? { originalExpiration } : {}, + expiration: newExpiration + }; + }; + var staticStabilityProvider = (provider, options = {}) => { + const logger2 = options?.logger || console; + let pastCredentials; + return async () => { + let credentials; + try { + credentials = await provider(); + if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { + credentials = getExtendedInstanceMetadataCredentials(credentials, logger2); + } + } catch (e5) { + if (pastCredentials) { + logger2.warn("Credential renew failed: ", e5); + credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger2); + } else { + throw e5; + } + } + pastCredentials = credentials; + return credentials; + }; + }; + var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; + var IMDS_TOKEN_PATH = "/latest/api/token"; + var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; + var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; + var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; + var fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }); + var getInstanceMetadataProvider = (init = {}) => { + let disableFetchToken = false; + const { logger: logger2, profile } = init; + const { timeout, maxRetries } = providerConfigFromInit(init); + const getCredentials = async (maxRetries2, options) => { + const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null; + if (isImdsV1Fallback) { + let fallbackBlockedFromProfile = false; + let fallbackBlockedFromProcessEnv = false; + const configValue = await nodeConfigProvider.loadConfig({ + environmentVariableSelector: (env) => { + const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === void 0) { + throw new propertyProvider.CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger }); + } + return fallbackBlockedFromProcessEnv; + }, + configFileSelector: (profile2) => { + const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; + return fallbackBlockedFromProfile; + }, + default: false + }, { + profile + })(); + if (init.ec2MetadataV1Disabled || configValue) { + const causes = []; + if (init.ec2MetadataV1Disabled) + causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); + if (fallbackBlockedFromProfile) + causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProcessEnv) + causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); + throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(", ")}].`); + } + } + const imdsProfile = (await retry(async () => { + let profile2; + try { + profile2 = await getProfile(options); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return profile2; + }, maxRetries2)).trim(); + return retry(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(imdsProfile, options, init); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return creds; + }, maxRetries2); + }; + return async () => { + const endpoint = await getInstanceMetadataEndpoint(); + if (disableFetchToken) { + logger2?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } else { + let token; + try { + token = (await getMetadataToken({ ...endpoint, timeout })).toString(); + } catch (error2) { + if (error2?.statusCode === 400) { + throw Object.assign(error2, { + message: "EC2 Metadata token request returned error" + }); + } else if (error2.message === "TimeoutError" || [403, 404, 405].includes(error2.statusCode)) { + disableFetchToken = true; + } + logger2?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + return getCredentials(maxRetries, { + ...endpoint, + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token + }, + timeout + }); + } + }; + }; + var getMetadataToken = async (options) => httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600" + } + }); + var getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(); + var getCredentialsFromProfile = async (profile, options, init) => { + const credentialsResponse = JSON.parse((await httpRequest({ + ...options, + path: IMDS_PATH + profile + })).toString()); + if (!isImdsCredentials(credentialsResponse)) { + throw new propertyProvider.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); + } + return fromImdsCredentials(credentialsResponse); + }; + exports2.DEFAULT_MAX_RETRIES = DEFAULT_MAX_RETRIES; + exports2.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT; + exports2.ENV_CMDS_AUTH_TOKEN = ENV_CMDS_AUTH_TOKEN; + exports2.ENV_CMDS_FULL_URI = ENV_CMDS_FULL_URI; + exports2.ENV_CMDS_RELATIVE_URI = ENV_CMDS_RELATIVE_URI; + exports2.fromContainerMetadata = fromContainerMetadata; + exports2.fromInstanceMetadata = fromInstanceMetadata; + exports2.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint; + exports2.httpRequest = httpRequest; + exports2.providerConfigFromInit = providerConfigFromInit; + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +var require_checkUrl = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkUrl = void 0; + var property_provider_1 = require_dist_cjs28(); + var ECS_CONTAINER_HOST = "169.254.170.2"; + var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; + var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; + var checkUrl = (url, logger2) => { + if (url.protocol === "https:") { + return; + } + if (url.hostname === ECS_CONTAINER_HOST || url.hostname === EKS_CONTAINER_HOST_IPv4 || url.hostname === EKS_CONTAINER_HOST_IPv6) { + return; + } + if (url.hostname.includes("[")) { + if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") { + return; + } + } else { + if (url.hostname === "localhost") { + return; + } + const ipComponents = url.hostname.split("."); + const inRange = (component) => { + const num = parseInt(component, 10); + return 0 <= num && num <= 255; + }; + if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) { + return; + } + } + throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following: + - loopback CIDR 127.0.0.0/8 or [::1/128] + - ECS container host 169.254.170.2 + - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger: logger2 }); + }; + exports2.checkUrl = checkUrl; + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +var require_requestHelpers = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createGetRequest = createGetRequest; + exports2.getCredentials = getCredentials; + var property_provider_1 = require_dist_cjs28(); + var protocol_http_1 = require_dist_cjs2(); + var smithy_client_1 = require_dist_cjs34(); + var util_stream_1 = require_dist_cjs16(); + function createGetRequest(url) { + return new protocol_http_1.HttpRequest({ + protocol: url.protocol, + hostname: url.hostname, + port: Number(url.port), + path: url.pathname, + query: Array.from(url.searchParams.entries()).reduce((acc, [k5, v]) => { + acc[k5] = v; + return acc; + }, {}), + fragment: url.hash + }); + } + async function getCredentials(response, logger2) { + const stream = (0, util_stream_1.sdkStreamMixin)(response.body); + const str = await stream.transformToString(); + if (response.statusCode === 200) { + const parsed = JSON.parse(str); + if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") { + throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger: logger2 }); + } + return { + accessKeyId: parsed.AccessKeyId, + secretAccessKey: parsed.SecretAccessKey, + sessionToken: parsed.Token, + expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration) + }; + } + if (response.statusCode >= 400 && response.statusCode < 500) { + let parsedBody = {}; + try { + parsedBody = JSON.parse(str); + } catch (e5) { + } + throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger2 }), { + Code: parsedBody.Code, + Message: parsedBody.Message + }); + } + throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger2 }); + } + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +var require_retry_wrapper = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryWrapper = void 0; + var retryWrapper = (toRetry, maxRetries, delayMs) => { + return async () => { + for (let i5 = 0; i5 < maxRetries; ++i5) { + try { + return await toRetry(); + } catch (e5) { + await new Promise((resolve) => setTimeout(resolve, delayMs)); + } + } + return await toRetry(); + }; + }; + exports2.retryWrapper = retryWrapper; + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +var require_fromHttp = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromHttp = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var client_1 = (init_client(), __toCommonJS(client_exports)); + var node_http_handler_1 = require_dist_cjs13(); + var property_provider_1 = require_dist_cjs28(); + var promises_1 = tslib_1.__importDefault(require("node:fs/promises")); + var checkUrl_1 = require_checkUrl(); + var requestHelpers_1 = require_requestHelpers(); + var retry_wrapper_1 = require_retry_wrapper(); + var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; + var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; + var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; + var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; + var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; + var fromHttp = (options = {}) => { + options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp"); + let host; + const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI]; + const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; + const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; + const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; + const warn2 = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn ? console.warn : options.logger.warn.bind(options.logger); + if (relative && full) { + warn2("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); + warn2("awsContainerCredentialsFullUri will take precedence."); + } + if (token && tokenFile) { + warn2("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); + warn2("awsContainerAuthorizationToken will take precedence."); + } + if (full) { + host = full; + } else if (relative) { + host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; + } else { + throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided. +Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger }); + } + const url = new URL(host); + (0, checkUrl_1.checkUrl)(url, options.logger); + const requestHandler = node_http_handler_1.NodeHttpHandler.create({ + requestTimeout: options.timeout ?? 1e3, + connectionTimeout: options.timeout ?? 1e3 + }); + return (0, retry_wrapper_1.retryWrapper)(async () => { + const request = (0, requestHelpers_1.createGetRequest)(url); + if (token) { + request.headers.Authorization = token; + } else if (tokenFile) { + request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); + } + try { + const result = await requestHandler.handle(request); + return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z")); + } catch (e5) { + throw new property_provider_1.CredentialsProviderError(String(e5), { logger: options.logger }); + } + }, options.maxRetries ?? 3, options.timeout ?? 1e3); + }; + exports2.fromHttp = fromHttp; + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +var require_dist_cjs43 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromHttp = void 0; + var fromHttp_1 = require_fromHttp(); + Object.defineProperty(exports2, "fromHttp", { enumerable: true, get: function() { + return fromHttp_1.fromHttp; + } }); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sso-oauth", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; +} +var import_util_middleware6, defaultSSOOIDCHttpAuthSchemeParametersProvider, defaultSSOOIDCHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig; +var init_httpAuthSchemeProvider = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js"() { + init_httpAuthSchemes2(); + import_util_middleware6 = __toESM(require_dist_cjs6()); + defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, import_util_middleware6.getSmithyContext)(context).operation, + region: await (0, import_util_middleware6.normalizeProvider)(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateToken": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; + }; + resolveHttpAuthSchemeConfig = (config) => { + const config_0 = resolveAwsSdkSigV4Config(config); + return Object.assign(config_0, { + authSchemePreference: (0, import_util_middleware6.normalizeProvider)(config.authSchemePreference ?? []) + }); + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js +var resolveClientEndpointParameters, commonParams; +var init_EndpointParameters = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js"() { + resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "sso-oauth" + }); + }; + commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/package.json +var package_default; +var init_package = __esm({ + "node_modules/@aws-sdk/nested-clients/package.json"() { + package_default = { + name: "@aws-sdk/nested-clients", + version: "3.997.4", + description: "Nested clients for AWS SDK packages.", + main: "./dist-cjs/index.js", + module: "./dist-es/index.js", + types: "./dist-types/index.d.ts", + scripts: { + build: "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs", + "build:cjs": "node ../../scripts/compilation/inline nested-clients", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"', + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo", + lint: "node ../../scripts/validation/submodules-linter.js --pkg nested-clients", + test: "yarn g:vitest run", + "test:watch": "yarn g:vitest watch" + }, + engines: { + node: ">=20.0.0" + }, + sideEffects: false, + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "^3.974.6", + "@aws-sdk/middleware-host-header": "^3.972.10", + "@aws-sdk/middleware-logger": "^3.972.10", + "@aws-sdk/middleware-recursion-detection": "^3.972.11", + "@aws-sdk/middleware-user-agent": "^3.972.36", + "@aws-sdk/region-config-resolver": "^3.972.13", + "@aws-sdk/signature-v4-multi-region": "^3.996.23", + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/util-endpoints": "^3.996.8", + "@aws-sdk/util-user-agent-browser": "^3.972.10", + "@aws-sdk/util-user-agent-node": "^3.973.22", + "@smithy/config-resolver": "^4.4.17", + "@smithy/core": "^3.23.17", + "@smithy/fetch-http-handler": "^5.3.17", + "@smithy/hash-node": "^4.2.14", + "@smithy/invalid-dependency": "^4.2.14", + "@smithy/middleware-content-length": "^4.2.14", + "@smithy/middleware-endpoint": "^4.4.32", + "@smithy/middleware-retry": "^4.5.6", + "@smithy/middleware-serde": "^4.2.20", + "@smithy/middleware-stack": "^4.2.14", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/node-http-handler": "^4.6.1", + "@smithy/protocol-http": "^5.3.14", + "@smithy/smithy-client": "^4.12.13", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-body-length-browser": "^4.2.2", + "@smithy/util-body-length-node": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.49", + "@smithy/util-defaults-mode-node": "^4.2.54", + "@smithy/util-endpoints": "^3.4.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-retry": "^4.3.5", + "@smithy/util-utf8": "^4.2.2", + tslib: "^2.6.2" + }, + devDependencies: { + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + premove: "4.0.0", + typescript: "~5.8.3" + }, + typesVersions: { + "<4.5": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "./cognito-identity.d.ts", + "./cognito-identity.js", + "./signin.d.ts", + "./signin.js", + "./sso-oidc.d.ts", + "./sso-oidc.js", + "./sso.d.ts", + "./sso.js", + "./sts.d.ts", + "./sts.js", + "dist-*/**" + ], + browser: { + "./dist-es/submodules/cognito-identity/runtimeConfig": "./dist-es/submodules/cognito-identity/runtimeConfig.browser", + "./dist-es/submodules/signin/runtimeConfig": "./dist-es/submodules/signin/runtimeConfig.browser", + "./dist-es/submodules/sso-oidc/runtimeConfig": "./dist-es/submodules/sso-oidc/runtimeConfig.browser", + "./dist-es/submodules/sso/runtimeConfig": "./dist-es/submodules/sso/runtimeConfig.browser", + "./dist-es/submodules/sts/runtimeConfig": "./dist-es/submodules/sts/runtimeConfig.browser" + }, + "react-native": {}, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "packages/nested-clients" + }, + exports: { + "./package.json": "./package.json", + "./sso-oidc": { + types: "./dist-types/submodules/sso-oidc/index.d.ts", + module: "./dist-es/submodules/sso-oidc/index.js", + node: "./dist-cjs/submodules/sso-oidc/index.js", + import: "./dist-es/submodules/sso-oidc/index.js", + require: "./dist-cjs/submodules/sso-oidc/index.js" + }, + "./sts": { + types: "./dist-types/submodules/sts/index.d.ts", + module: "./dist-es/submodules/sts/index.js", + node: "./dist-cjs/submodules/sts/index.js", + import: "./dist-es/submodules/sts/index.js", + require: "./dist-cjs/submodules/sts/index.js" + }, + "./signin": { + types: "./dist-types/submodules/signin/index.d.ts", + module: "./dist-es/submodules/signin/index.js", + node: "./dist-cjs/submodules/signin/index.js", + import: "./dist-es/submodules/signin/index.js", + require: "./dist-cjs/submodules/signin/index.js" + }, + "./cognito-identity": { + types: "./dist-types/submodules/cognito-identity/index.d.ts", + module: "./dist-es/submodules/cognito-identity/index.js", + node: "./dist-cjs/submodules/cognito-identity/index.js", + import: "./dist-es/submodules/cognito-identity/index.js", + require: "./dist-cjs/submodules/cognito-identity/index.js" + }, + "./sso": { + types: "./dist-types/submodules/sso/index.d.ts", + module: "./dist-es/submodules/sso/index.js", + node: "./dist-cjs/submodules/sso/index.js", + import: "./dist-es/submodules/sso/index.js", + require: "./dist-cjs/submodules/sso/index.js" + } + } + }; + } +}); + +// node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +var require_dist_cjs44 = __commonJS({ + "node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js"(exports2) { + "use strict"; + var node_os = require("node:os"); + var node_process = require("node:process"); + var utilConfigProvider = require_dist_cjs25(); + var promises = require("node:fs/promises"); + var node_path = require("node:path"); + var middlewareUserAgent = require_dist_cjs24(); + var getRuntimeUserAgentPair = () => { + const runtimesToCheck = ["deno", "bun", "llrt"]; + for (const runtime of runtimesToCheck) { + if (node_process.versions[runtime]) { + return [`md/${runtime}`, node_process.versions[runtime]]; + } + } + return ["md/nodejs", node_process.versions.node]; + }; + var getNodeModulesParentDirs = (dirname3) => { + const cwd = process.cwd(); + if (!dirname3) { + return [cwd]; + } + const normalizedPath = node_path.normalize(dirname3); + const parts = normalizedPath.split(node_path.sep); + const nodeModulesIndex = parts.indexOf("node_modules"); + const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(node_path.sep) : normalizedPath; + if (cwd === parentDir) { + return [cwd]; + } + return [parentDir, cwd]; + }; + var SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/; + var getSanitizedTypeScriptVersion = (version = "") => { + const match = version.match(SEMVER_REGEX); + if (!match) { + return void 0; + } + const [major, minor, patch, prerelease] = [match[1], match[2], match[3], match[4]]; + return prerelease ? `${major}.${minor}.${patch}-${prerelease}` : `${major}.${minor}.${patch}`; + }; + var ALLOWED_PREFIXES = ["^", "~", ">=", "<=", ">", "<"]; + var ALLOWED_DIST_TAGS = ["latest", "beta", "dev", "rc", "insiders", "next"]; + var getSanitizedDevTypeScriptVersion = (version = "") => { + if (ALLOWED_DIST_TAGS.includes(version)) { + return version; + } + const prefix = ALLOWED_PREFIXES.find((p2) => version.startsWith(p2)) ?? ""; + const sanitizedTypeScriptVersion = getSanitizedTypeScriptVersion(version.slice(prefix.length)); + if (!sanitizedTypeScriptVersion) { + return void 0; + } + return `${prefix}${sanitizedTypeScriptVersion}`; + }; + var tscVersion; + var TS_PACKAGE_JSON = node_path.join("node_modules", "typescript", "package.json"); + var getTypeScriptUserAgentPair = async () => { + if (tscVersion === null) { + return void 0; + } else if (typeof tscVersion === "string") { + return ["md/tsc", tscVersion]; + } + let isTypeScriptDetectionDisabled = false; + try { + isTypeScriptDetectionDisabled = utilConfigProvider.booleanSelector(process.env, "AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED", utilConfigProvider.SelectorType.ENV) || false; + } catch { + } + if (isTypeScriptDetectionDisabled) { + tscVersion = null; + return void 0; + } + const dirname3 = typeof __dirname !== "undefined" ? __dirname : void 0; + const nodeModulesParentDirs = getNodeModulesParentDirs(dirname3); + let versionFromApp; + for (const nodeModulesParentDir of nodeModulesParentDirs) { + try { + const appPackageJsonPath = node_path.join(nodeModulesParentDir, "package.json"); + const packageJson = await promises.readFile(appPackageJsonPath, "utf-8"); + const { dependencies, devDependencies } = JSON.parse(packageJson); + const version = devDependencies?.typescript ?? dependencies?.typescript; + if (typeof version !== "string") { + continue; + } + versionFromApp = version; + break; + } catch { + } + } + if (!versionFromApp) { + tscVersion = null; + return void 0; + } + let versionFromNodeModules; + for (const nodeModulesParentDir of nodeModulesParentDirs) { + try { + const tsPackageJsonPath = node_path.join(nodeModulesParentDir, TS_PACKAGE_JSON); + const packageJson = await promises.readFile(tsPackageJsonPath, "utf-8"); + const { version } = JSON.parse(packageJson); + const sanitizedVersion2 = getSanitizedTypeScriptVersion(version); + if (typeof sanitizedVersion2 !== "string") { + continue; + } + versionFromNodeModules = sanitizedVersion2; + break; + } catch { + } + } + if (versionFromNodeModules) { + tscVersion = versionFromNodeModules; + return ["md/tsc", tscVersion]; + } + const sanitizedVersion = getSanitizedDevTypeScriptVersion(versionFromApp); + if (typeof sanitizedVersion !== "string") { + tscVersion = null; + return void 0; + } + tscVersion = `dev_${sanitizedVersion}`; + return ["md/tsc", tscVersion]; + }; + var crtAvailability = { + isCrtAvailable: false + }; + var isCrtAvailable = () => { + if (crtAvailability.isCrtAvailable) { + return ["md/crt-avail"]; + } + return null; + }; + var createDefaultUserAgentProvider5 = ({ serviceId, clientVersion }) => { + const runtimeUserAgentPair = getRuntimeUserAgentPair(); + return async (config) => { + const sections = [ + ["aws-sdk-js", clientVersion], + ["ua", "2.1"], + [`os/${node_os.platform()}`, node_os.release()], + ["lang/js"], + runtimeUserAgentPair + ]; + const typescriptUserAgentPair = await getTypeScriptUserAgentPair(); + if (typescriptUserAgentPair) { + sections.push(typescriptUserAgentPair); + } + const crtAvailable = isCrtAvailable(); + if (crtAvailable) { + sections.push(crtAvailable); + } + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + if (node_process.env.AWS_EXECUTION_ENV) { + sections.push([`exec-env/${node_process.env.AWS_EXECUTION_ENV}`]); + } + const appId = await config?.userAgentAppId?.(); + const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; + return resolvedUserAgent; + }; + }; + var defaultUserAgent = createDefaultUserAgentProvider5; + var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; + var UA_APP_ID_INI_NAME = "sdk_ua_app_id"; + var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id"; + var NODE_APP_ID_CONFIG_OPTIONS5 = { + environmentVariableSelector: (env) => env[UA_APP_ID_ENV_NAME], + configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], + default: middlewareUserAgent.DEFAULT_UA_APP_ID + }; + exports2.NODE_APP_ID_CONFIG_OPTIONS = NODE_APP_ID_CONFIG_OPTIONS5; + exports2.UA_APP_ID_ENV_NAME = UA_APP_ID_ENV_NAME; + exports2.UA_APP_ID_INI_NAME = UA_APP_ID_INI_NAME; + exports2.createDefaultUserAgentProvider = createDefaultUserAgentProvider5; + exports2.crtAvailability = crtAvailability; + exports2.defaultUserAgent = defaultUserAgent; + } +}); + +// node_modules/@smithy/hash-node/dist-cjs/index.js +var require_dist_cjs45 = __commonJS({ + "node_modules/@smithy/hash-node/dist-cjs/index.js"(exports2) { + "use strict"; + var utilBufferFrom = require_dist_cjs8(); + var utilUtf8 = require_dist_cjs9(); + var buffer = require("buffer"); + var crypto3 = require("crypto"); + var Hash5 = class { + algorithmIdentifier; + secret; + hash; + constructor(algorithmIdentifier, secret) { + this.algorithmIdentifier = algorithmIdentifier; + this.secret = secret; + this.reset(); + } + update(toHash, encoding) { + this.hash.update(utilUtf8.toUint8Array(castSourceData(toHash, encoding))); + } + digest() { + return Promise.resolve(this.hash.digest()); + } + reset() { + this.hash = this.secret ? crypto3.createHmac(this.algorithmIdentifier, castSourceData(this.secret)) : crypto3.createHash(this.algorithmIdentifier); + } + }; + function castSourceData(toCast, encoding) { + if (buffer.Buffer.isBuffer(toCast)) { + return toCast; + } + if (typeof toCast === "string") { + return utilBufferFrom.fromString(toCast, encoding); + } + if (ArrayBuffer.isView(toCast)) { + return utilBufferFrom.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + return utilBufferFrom.fromArrayBuffer(toCast); + } + exports2.Hash = Hash5; + } +}); + +// node_modules/@smithy/util-body-length-node/dist-cjs/index.js +var require_dist_cjs46 = __commonJS({ + "node_modules/@smithy/util-body-length-node/dist-cjs/index.js"(exports2) { + "use strict"; + var node_fs = require("node:fs"); + var calculateBodyLength5 = (body) => { + if (!body) { + return 0; + } + if (typeof body === "string") { + return Buffer.byteLength(body); + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } else if (typeof body.start === "number" && typeof body.end === "number") { + return body.end + 1 - body.start; + } else if (body instanceof node_fs.ReadStream) { + if (body.path != null) { + return node_fs.lstatSync(body.path).size; + } else if (typeof body.fd === "number") { + return node_fs.fstatSync(body.fd).size; + } + } + throw new Error(`Body Length computation failed for ${body}`); + }; + exports2.calculateBodyLength = calculateBodyLength5; + } +}); + +// node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +var require_dist_cjs47 = __commonJS({ + "node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js"(exports2) { + "use strict"; + var configResolver = require_dist_cjs26(); + var nodeConfigProvider = require_dist_cjs30(); + var propertyProvider = require_dist_cjs28(); + var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; + var AWS_REGION_ENV = "AWS_REGION"; + var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; + var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; + var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; + var IMDS_REGION_PATH = "/latest/meta-data/placement/region"; + var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; + var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; + var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + return env[AWS_DEFAULTS_MODE_ENV]; + }, + configFileSelector: (profile) => { + return profile[AWS_DEFAULTS_MODE_CONFIG]; + }, + default: "legacy" + }; + var resolveDefaultsModeConfig5 = ({ region = nodeConfigProvider.loadConfig(configResolver.NODE_REGION_CONFIG_OPTIONS), defaultsMode = nodeConfigProvider.loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => propertyProvider.memoize(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode?.toLowerCase()) { + case "auto": + return resolveNodeDefaultsModeAuto(region); + case "in-region": + case "cross-region": + case "mobile": + case "standard": + case "legacy": + return Promise.resolve(mode?.toLocaleLowerCase()); + case void 0: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); + } + }); + var resolveNodeDefaultsModeAuto = async (clientRegion) => { + if (clientRegion) { + const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; + const inferredRegion = await inferPhysicalRegion(); + if (!inferredRegion) { + return "standard"; + } + if (resolvedRegion === inferredRegion) { + return "in-region"; + } else { + return "cross-region"; + } + } + return "standard"; + }; + var inferPhysicalRegion = async () => { + if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { + return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; + } + if (!process.env[ENV_IMDS_DISABLED]) { + try { + const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(require_dist_cjs42())); + const endpoint = await getInstanceMetadataEndpoint(); + return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); + } catch (e5) { + } + } + }; + exports2.resolveDefaultsModeConfig = resolveDefaultsModeConfig5; + } +}); + // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/bdd.js -var k, a, b, c, d, e, f, g, h, i, j, _data, root, r, nodes, bdd; +var import_util_endpoints, k, a, b, c, d, e, f, g, h, i, j, _data, root, r, nodes, bdd; var init_bdd = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/bdd.js"() { - init_endpoints(); + import_util_endpoints = __toESM(require_dist_cjs20()); k = "ref"; a = -1; b = true; @@ -40607,37 +40622,37 @@ var init_bdd = __esm({ r + 2, r + 3 ]); - bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results); + bdd = import_util_endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results); } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js -var cache, defaultEndpointResolver; +var import_util_endpoints2, import_util_endpoints3, cache, defaultEndpointResolver; var init_endpointResolver = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js"() { - init_client3(); - init_endpoints(); + import_util_endpoints2 = __toESM(require_dist_cjs21()); + import_util_endpoints3 = __toESM(require_dist_cjs20()); init_bdd(); - cache = new EndpointCache({ + cache = new import_util_endpoints3.EndpointCache({ size: 50, params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] }); defaultEndpointResolver = (endpointParams, context = {}) => { - return cache.get(endpointParams, () => decideEndpoint(bdd, { + return cache.get(endpointParams, () => (0, import_util_endpoints3.decideEndpoint)(bdd, { endpointParams, logger: context.logger })); }; - customEndpointFunctions.aws = awsEndpointFunctions; + import_util_endpoints3.customEndpointFunctions.aws = import_util_endpoints2.awsEndpointFunctions; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js -var SSOOIDCServiceException; +var import_smithy_client8, SSOOIDCServiceException; var init_SSOOIDCServiceException = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js"() { - init_client2(); - SSOOIDCServiceException = class _SSOOIDCServiceException extends ServiceException { + import_smithy_client8 = __toESM(require_dist_cjs34()); + SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client8.ServiceException { constructor(options) { super(options); Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); @@ -40979,23 +40994,24 @@ var init_schemas_0 = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js -var getRuntimeConfig; +var import_smithy_client9, import_url_parser2, import_util_base648, import_util_utf88, getRuntimeConfig; var init_runtimeConfig_shared = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js"() { init_httpAuthSchemes2(); init_protocols2(); init_dist_es(); - init_client2(); - init_protocols(); - init_serde(); + import_smithy_client9 = __toESM(require_dist_cjs34()); + import_url_parser2 = __toESM(require_dist_cjs18()); + import_util_base648 = __toESM(require_dist_cjs10()); + import_util_utf88 = __toESM(require_dist_cjs9()); init_httpAuthSchemeProvider(); init_endpointResolver(); init_schemas_0(); getRuntimeConfig = (config) => { return { apiVersion: "2019-06-10", - base64Decoder: config?.base64Decoder ?? fromBase64, - base64Encoder: config?.base64Encoder ?? toBase64, + base64Decoder: config?.base64Decoder ?? import_util_base648.fromBase64, + base64Encoder: config?.base64Encoder ?? import_util_base648.toBase64, disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, extensions: config?.extensions ?? [], @@ -41012,7 +41028,7 @@ var init_runtimeConfig_shared = __esm({ signer: new NoAuthSigner() } ], - logger: config?.logger ?? new NoOpLogger(), + logger: config?.logger ?? new import_smithy_client9.NoOpLogger(), protocol: config?.protocol ?? AwsRestJsonProtocol, protocolSettings: config?.protocolSettings ?? { defaultNamespace: "com.amazonaws.ssooidc", @@ -41021,31 +41037,36 @@ var init_runtimeConfig_shared = __esm({ serviceTarget: "AWSSSOOIDCService" }, serviceId: config?.serviceId ?? "SSO OIDC", - urlParser: config?.urlParser ?? parseUrl, - utf8Decoder: config?.utf8Decoder ?? fromUtf8, - utf8Encoder: config?.utf8Encoder ?? toUtf8 + urlParser: config?.urlParser ?? import_url_parser2.parseUrl, + utf8Decoder: config?.utf8Decoder ?? import_util_utf88.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? import_util_utf88.toUtf8 }; }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js -var import_node_http_handler, getRuntimeConfig2; +var import_util_user_agent_node, import_config_resolver, import_hash_node, import_middleware_retry, import_node_config_provider, import_node_http_handler, import_smithy_client10, import_util_body_length_node, import_util_defaults_mode_node, import_util_retry2, getRuntimeConfig2; var init_runtimeConfig = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js"() { init_package(); - init_client3(); + init_client(); init_httpAuthSchemes2(); - init_client2(); - init_config2(); - init_retry2(); - init_serde(); - import_node_http_handler = __toESM(require_dist_cjs9()); + import_util_user_agent_node = __toESM(require_dist_cjs44()); + import_config_resolver = __toESM(require_dist_cjs26()); + import_hash_node = __toESM(require_dist_cjs45()); + import_middleware_retry = __toESM(require_dist_cjs35()); + import_node_config_provider = __toESM(require_dist_cjs30()); + import_node_http_handler = __toESM(require_dist_cjs13()); + import_smithy_client10 = __toESM(require_dist_cjs34()); + import_util_body_length_node = __toESM(require_dist_cjs46()); + import_util_defaults_mode_node = __toESM(require_dist_cjs47()); + import_util_retry2 = __toESM(require_dist_cjs23()); init_runtimeConfig_shared(); getRuntimeConfig2 = (config) => { - emitWarningIfUnsupportedVersion2(process.version); - const defaultsMode = resolveDefaultsModeConfig(config); - const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + (0, import_smithy_client10.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, import_util_defaults_mode_node.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(import_smithy_client10.loadConfigsForDefaultMode); const clientSharedValues = getRuntimeConfig(config); emitWarningIfUnsupportedVersion(process.version); const loaderConfig = { @@ -41057,26 +41078,90 @@ var init_runtimeConfig = __esm({ ...config, runtime: "node", defaultsMode, - authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), - bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), - maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + authSchemePreference: config?.authSchemePreference ?? (0, import_node_config_provider.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? import_util_body_length_node.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, import_util_user_agent_node.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + maxAttempts: config?.maxAttempts ?? (0, import_node_config_provider.loadConfig)(import_middleware_retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), requestHandler: import_node_http_handler.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? loadConfig({ - ...NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE + retryMode: config?.retryMode ?? (0, import_node_config_provider.loadConfig)({ + ...import_middleware_retry.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || import_util_retry2.DEFAULT_RETRY_MODE }, config), - sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + sha256: config?.sha256 ?? import_hash_node.Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? import_node_http_handler.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, import_node_config_provider.loadConfig)(import_util_user_agent_node.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) }; }; } }); +// node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.js +var require_stsRegionDefaultResolver = __commonJS({ + "node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.warning = void 0; + exports2.stsRegionDefaultResolver = stsRegionDefaultResolver2; + var config_resolver_1 = require_dist_cjs26(); + var node_config_provider_1 = require_dist_cjs30(); + function stsRegionDefaultResolver2(loaderConfig = {}) { + return (0, node_config_provider_1.loadConfig)({ + ...config_resolver_1.NODE_REGION_CONFIG_OPTIONS, + async default() { + if (!exports2.warning.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"; + } + }, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }); + } + exports2.warning = { + silence: false + }; + } +}); + +// node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +var require_dist_cjs48 = __commonJS({ + "node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js"(exports2) { + "use strict"; + var stsRegionDefaultResolver2 = require_stsRegionDefaultResolver(); + var configResolver = require_dist_cjs26(); + var getAwsRegionExtensionConfiguration5 = (runtimeConfig) => { + return { + setRegion(region) { + runtimeConfig.region = region; + }, + region() { + return runtimeConfig.region; + } + }; + }; + var resolveAwsRegionExtensionConfiguration5 = (awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region() + }; + }; + exports2.NODE_REGION_CONFIG_FILE_OPTIONS = configResolver.NODE_REGION_CONFIG_FILE_OPTIONS; + exports2.NODE_REGION_CONFIG_OPTIONS = configResolver.NODE_REGION_CONFIG_OPTIONS; + exports2.REGION_ENV_NAME = configResolver.REGION_ENV_NAME; + exports2.REGION_INI_NAME = configResolver.REGION_INI_NAME; + exports2.resolveRegionConfig = configResolver.resolveRegionConfig; + exports2.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration5; + exports2.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration5; + Object.prototype.hasOwnProperty.call(stsRegionDefaultResolver2, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: stsRegionDefaultResolver2["__proto__"] + }); + Object.keys(stsRegionDefaultResolver2).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = stsRegionDefaultResolver2[k5]; + }); + } +}); + // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.js var getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig; var init_httpAuthExtensionConfiguration = __esm({ @@ -41122,59 +41207,62 @@ var init_httpAuthExtensionConfiguration = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js -var resolveRuntimeExtensions; +var import_region_config_resolver, import_protocol_http12, import_smithy_client11, resolveRuntimeExtensions; var init_runtimeExtensions = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js"() { - init_client3(); - init_client2(); - init_protocols(); + import_region_config_resolver = __toESM(require_dist_cjs48()); + import_protocol_http12 = __toESM(require_dist_cjs2()); + import_smithy_client11 = __toESM(require_dist_cjs34()); init_httpAuthExtensionConfiguration(); resolveRuntimeExtensions = (runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + const extensionConfiguration = Object.assign((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client11.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http12.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); + return Object.assign(runtimeConfig, (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client11.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http12.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js -var SSOOIDCClient; +var import_middleware_host_header, import_middleware_logger, import_middleware_recursion_detection, import_middleware_user_agent, import_config_resolver2, import_middleware_content_length, import_middleware_endpoint, import_middleware_retry2, import_smithy_client12, SSOOIDCClient; var init_SSOOIDCClient = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js"() { - init_client3(); + import_middleware_host_header = __toESM(require_dist_cjs3()); + import_middleware_logger = __toESM(require_dist_cjs4()); + import_middleware_recursion_detection = __toESM(require_dist_cjs5()); + import_middleware_user_agent = __toESM(require_dist_cjs24()); + import_config_resolver2 = __toESM(require_dist_cjs26()); init_dist_es(); - init_client2(); - init_config2(); - init_endpoints(); - init_protocols(); - init_retry2(); init_schema(); + import_middleware_content_length = __toESM(require_dist_cjs27()); + import_middleware_endpoint = __toESM(require_dist_cjs32()); + import_middleware_retry2 = __toESM(require_dist_cjs35()); + import_smithy_client12 = __toESM(require_dist_cjs34()); init_httpAuthSchemeProvider(); init_EndpointParameters(); init_runtimeConfig(); init_runtimeExtensions(); - SSOOIDCClient = class extends Client { + SSOOIDCClient = class extends import_smithy_client12.Client { config; constructor(...[configuration]) { const _config_0 = getRuntimeConfig2(configuration || {}); super(_config_0); this.initConfig = _config_0; const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = resolveUserAgentConfig(_config_1); - const _config_3 = resolveRetryConfig(_config_2); - const _config_4 = resolveRegionConfig(_config_3); - const _config_5 = resolveHostHeaderConfig(_config_4); - const _config_6 = resolveEndpointConfig(_config_5); + const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry2.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver2.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); const _config_7 = resolveHttpAuthSchemeConfig(_config_6); const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); this.config = _config_8; this.middlewareStack.use(getSchemaSerdePlugin(this.config)); - this.middlewareStack.use(getUserAgentPlugin(this.config)); - this.middlewareStack.use(getRetryPlugin(this.config)); - this.middlewareStack.use(getContentLengthPlugin(this.config)); - this.middlewareStack.use(getHostHeaderPlugin(this.config)); - this.middlewareStack.use(getLoggerPlugin(this.config)); - this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry2.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider, identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({ @@ -41191,25 +41279,25 @@ var init_SSOOIDCClient = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js -var CreateTokenCommand; +var import_middleware_endpoint2, import_smithy_client13, CreateTokenCommand; var init_CreateTokenCommand = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js"() { - init_client2(); - init_endpoints(); + import_middleware_endpoint2 = __toESM(require_dist_cjs32()); + import_smithy_client13 = __toESM(require_dist_cjs34()); init_EndpointParameters(); init_schemas_0(); - CreateTokenCommand = class extends Command2.classBuilder().ep(commonParams).m(function(Command3, cs, config, o2) { - return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())]; + CreateTokenCommand = class extends import_smithy_client13.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o2) { + return [(0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())]; }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").sc(CreateToken$).build() { }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js -var commands, SSOOIDC; +var import_smithy_client14, commands, SSOOIDC; var init_SSOOIDC = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js"() { - init_client2(); + import_smithy_client14 = __toESM(require_dist_cjs34()); init_CreateTokenCommand(); init_SSOOIDCClient(); commands = { @@ -41217,7 +41305,7 @@ var init_SSOOIDC = __esm({ }; SSOOIDC = class extends SSOOIDCClient { }; - createAggregatedClient(commands, SSOOIDC); + (0, import_smithy_client14.createAggregatedClient)(commands, SSOOIDC); } }); @@ -41253,7 +41341,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: () => Command2, + $Command: () => import_smithy_client13.Command, AccessDeniedException: () => AccessDeniedException, AccessDeniedException$: () => AccessDeniedException$, AccessDeniedExceptionReason: () => AccessDeniedExceptionReason, @@ -41286,7 +41374,7 @@ __export(sso_oidc_exports, { UnauthorizedClientException$: () => UnauthorizedClientException$, UnsupportedGrantTypeException: () => UnsupportedGrantTypeException, UnsupportedGrantTypeException$: () => UnsupportedGrantTypeException$, - __Client: () => Client, + __Client: () => import_smithy_client12.Client, errorTypeRegistries: () => errorTypeRegistries }); var init_sso_oidc = __esm({ @@ -41303,21 +41391,22 @@ var init_sso_oidc = __esm({ }); // node_modules/@aws-sdk/token-providers/dist-cjs/index.js -var require_dist_cjs12 = __commonJS({ +var require_dist_cjs49 = __commonJS({ "node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2) { "use strict"; - var client = (init_client3(), __toCommonJS(client_exports2)); + var client = (init_client(), __toCommonJS(client_exports)); var httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports)); - var config = (init_config2(), __toCommonJS(config_exports)); + var propertyProvider = require_dist_cjs28(); + var sharedIniFileLoader = require_dist_cjs29(); var node_fs = require("node:fs"); var fromEnvSigningName = ({ logger: logger2, signingName } = {}) => async () => { logger2?.debug?.("@aws-sdk/token-providers - fromEnvSigningName"); if (!signingName) { - throw new config.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger2 }); + throw new propertyProvider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger2 }); } const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName); if (!(bearerTokenKey in process.env)) { - throw new config.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger2 }); + throw new propertyProvider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger2 }); } const token = { token: process.env[bearerTokenKey] }; client.setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3"); @@ -41327,11 +41416,11 @@ var require_dist_cjs12 = __commonJS({ var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; var getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => { const { SSOOIDCClient: SSOOIDCClient2 } = await Promise.resolve().then(() => (init_sso_oidc(), sso_oidc_exports)); - const coalesce2 = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop]; + const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop]; const ssoOidcClient = new SSOOIDCClient2(Object.assign({}, init.clientConfig ?? {}, { region: ssoRegion ?? init.clientConfig?.region, - logger: coalesce2("logger"), - userAgentAppId: coalesce2("userAgentAppId") + logger: coalesce("logger"), + userAgentAppId: coalesce("userAgentAppId") })); return ssoOidcClient; }; @@ -41347,51 +41436,51 @@ var require_dist_cjs12 = __commonJS({ }; var validateTokenExpiry = (token) => { if (token.expiration && token.expiration.getTime() < Date.now()) { - throw new config.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); + throw new propertyProvider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); } }; var validateTokenKey = (key, value, forRefresh = false) => { if (typeof value === "undefined") { - throw new config.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false); + throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false); } }; - var { writeFile: writeFile2 } = node_fs.promises; + var { writeFile } = node_fs.promises; var writeSSOTokenToFile = (id, ssoToken) => { - const tokenFilepath = config.getSSOTokenFilepath(id); + const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id); const tokenString = JSON.stringify(ssoToken, null, 2); - return writeFile2(tokenFilepath, tokenString); + return writeFile(tokenFilepath, tokenString); }; var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => { init.logger?.debug("@aws-sdk/token-providers - fromSso"); - const profiles = await config.parseKnownFiles(init); - const profileName = config.getProfileName({ + const profiles = await sharedIniFileLoader.parseKnownFiles(init); + const profileName = sharedIniFileLoader.getProfileName({ profile: init.profile ?? callerClientConfig?.profile }); const profile = profiles[profileName]; if (!profile) { - throw new config.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); + throw new propertyProvider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); } else if (!profile["sso_session"]) { - throw new config.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); + throw new propertyProvider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); } const ssoSessionName = profile["sso_session"]; - const ssoSessions = await config.loadSsoSessionData(init); + const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init); const ssoSession = ssoSessions[ssoSessionName]; if (!ssoSession) { - throw new config.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false); + throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false); } for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { if (!ssoSession[ssoSessionRequiredKey]) { - throw new config.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false); + throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false); } } ssoSession["sso_start_url"]; const ssoRegion = ssoSession["sso_region"]; let ssoToken; try { - ssoToken = await config.getSSOTokenFromFile(ssoSessionName); + ssoToken = await sharedIniFileLoader.getSSOTokenFromFile(ssoSessionName); } catch (e5) { - throw new config.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false); + throw new propertyProvider.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false); } validateTokenKey("accessToken", ssoToken.accessToken); validateTokenKey("expiresAt", ssoToken.expiresAt); @@ -41420,30 +41509,30 @@ var require_dist_cjs12 = __commonJS({ expiresAt: newTokenExpiration.toISOString(), refreshToken: newSsoOidcToken.refreshToken }); - } catch (error3) { + } catch (error2) { } return { token: newSsoOidcToken.accessToken, expiration: newTokenExpiration }; - } catch (error3) { + } catch (error2) { validateTokenExpiry(existingToken); return existingToken; } }; - var fromStatic2 = ({ token, logger: logger2 }) => async () => { + var fromStatic = ({ token, logger: logger2 }) => async () => { logger2?.debug("@aws-sdk/token-providers - fromStatic"); if (!token || !token.token) { - throw new config.TokenProviderError(`Please pass a valid token to fromStatic`, false); + throw new propertyProvider.TokenProviderError(`Please pass a valid token to fromStatic`, false); } return token; }; - var nodeProvider = (init = {}) => config.memoize(config.chain(fromSso(init), async () => { - throw new config.TokenProviderError("Could not load token from any providers", false); + var nodeProvider = (init = {}) => propertyProvider.memoize(propertyProvider.chain(fromSso(init), async () => { + throw new propertyProvider.TokenProviderError("Could not load token from any providers", false); }), (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, (token) => token.expiration !== void 0); exports2.fromEnvSigningName = fromEnvSigningName; exports2.fromSso = fromSso; - exports2.fromStatic = fromStatic2; + exports2.fromStatic = fromStatic; exports2.nodeProvider = nodeProvider; } }); @@ -41469,15 +41558,15 @@ function createSmithyApiNoAuthHttpAuthOption2(authParameters) { schemeId: "smithy.api#noAuth" }; } -var defaultSSOHttpAuthSchemeParametersProvider, defaultSSOHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig2; +var import_util_middleware7, defaultSSOHttpAuthSchemeParametersProvider, defaultSSOHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig2; var init_httpAuthSchemeProvider2 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js"() { init_httpAuthSchemes2(); - init_client2(); + import_util_middleware7 = __toESM(require_dist_cjs6()); defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => { return { - operation: getSmithyContext(context).operation, - region: await normalizeProvider(config.region)() || (() => { + operation: (0, import_util_middleware7.getSmithyContext)(context).operation, + region: await (0, import_util_middleware7.normalizeProvider)(config.region)() || (() => { throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); })() }; @@ -41498,7 +41587,7 @@ var init_httpAuthSchemeProvider2 = __esm({ resolveHttpAuthSchemeConfig2 = (config) => { const config_0 = resolveAwsSdkSigV4Config(config); return Object.assign(config_0, { - authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) + authSchemePreference: (0, import_util_middleware7.normalizeProvider)(config.authSchemePreference ?? []) }); }; } @@ -41525,10 +41614,10 @@ var init_EndpointParameters2 = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js -var k2, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, _data2, root2, r2, nodes2, bdd2; +var import_util_endpoints4, k2, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, _data2, root2, r2, nodes2, bdd2; var init_bdd2 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js"() { - init_endpoints(); + import_util_endpoints4 = __toESM(require_dist_cjs20()); k2 = "ref"; a2 = -1; b2 = true; @@ -41613,37 +41702,37 @@ var init_bdd2 = __esm({ r2 + 2, r2 + 3 ]); - bdd2 = BinaryDecisionDiagram.from(nodes2, root2, _data2.conditions, _data2.results); + bdd2 = import_util_endpoints4.BinaryDecisionDiagram.from(nodes2, root2, _data2.conditions, _data2.results); } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js -var cache2, defaultEndpointResolver2; +var import_util_endpoints5, import_util_endpoints6, cache2, defaultEndpointResolver2; var init_endpointResolver2 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js"() { - init_client3(); - init_endpoints(); + import_util_endpoints5 = __toESM(require_dist_cjs21()); + import_util_endpoints6 = __toESM(require_dist_cjs20()); init_bdd2(); - cache2 = new EndpointCache({ + cache2 = new import_util_endpoints6.EndpointCache({ size: 50, params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] }); defaultEndpointResolver2 = (endpointParams, context = {}) => { - return cache2.get(endpointParams, () => decideEndpoint(bdd2, { + return cache2.get(endpointParams, () => (0, import_util_endpoints6.decideEndpoint)(bdd2, { endpointParams, logger: context.logger })); }; - customEndpointFunctions.aws = awsEndpointFunctions; + import_util_endpoints6.customEndpointFunctions.aws = import_util_endpoints5.awsEndpointFunctions; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js -var SSOServiceException; +var import_smithy_client15, SSOServiceException; var init_SSOServiceException = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js"() { - init_client2(); - SSOServiceException = class _SSOServiceException extends ServiceException { + import_smithy_client15 = __toESM(require_dist_cjs34()); + SSOServiceException = class _SSOServiceException extends import_smithy_client15.ServiceException { constructor(options) { super(options); Object.setPrototypeOf(this, _SSOServiceException.prototype); @@ -41803,23 +41892,24 @@ var init_schemas_02 = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.shared.js -var getRuntimeConfig3; +var import_smithy_client16, import_url_parser3, import_util_base649, import_util_utf89, getRuntimeConfig3; var init_runtimeConfig_shared2 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.shared.js"() { init_httpAuthSchemes2(); init_protocols2(); init_dist_es(); - init_client2(); - init_protocols(); - init_serde(); + import_smithy_client16 = __toESM(require_dist_cjs34()); + import_url_parser3 = __toESM(require_dist_cjs18()); + import_util_base649 = __toESM(require_dist_cjs10()); + import_util_utf89 = __toESM(require_dist_cjs9()); init_httpAuthSchemeProvider2(); init_endpointResolver2(); init_schemas_02(); getRuntimeConfig3 = (config) => { return { apiVersion: "2019-06-10", - base64Decoder: config?.base64Decoder ?? fromBase64, - base64Encoder: config?.base64Encoder ?? toBase64, + base64Decoder: config?.base64Decoder ?? import_util_base649.fromBase64, + base64Encoder: config?.base64Encoder ?? import_util_base649.toBase64, disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? defaultEndpointResolver2, extensions: config?.extensions ?? [], @@ -41836,7 +41926,7 @@ var init_runtimeConfig_shared2 = __esm({ signer: new NoAuthSigner() } ], - logger: config?.logger ?? new NoOpLogger(), + logger: config?.logger ?? new import_smithy_client16.NoOpLogger(), protocol: config?.protocol ?? AwsRestJsonProtocol, protocolSettings: config?.protocolSettings ?? { defaultNamespace: "com.amazonaws.sso", @@ -41845,31 +41935,36 @@ var init_runtimeConfig_shared2 = __esm({ serviceTarget: "SWBPortalService" }, serviceId: config?.serviceId ?? "SSO", - urlParser: config?.urlParser ?? parseUrl, - utf8Decoder: config?.utf8Decoder ?? fromUtf8, - utf8Encoder: config?.utf8Encoder ?? toUtf8 + urlParser: config?.urlParser ?? import_url_parser3.parseUrl, + utf8Decoder: config?.utf8Decoder ?? import_util_utf89.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? import_util_utf89.toUtf8 }; }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js -var import_node_http_handler2, getRuntimeConfig4; +var import_util_user_agent_node2, import_config_resolver3, import_hash_node2, import_middleware_retry3, import_node_config_provider2, import_node_http_handler2, import_smithy_client17, import_util_body_length_node2, import_util_defaults_mode_node2, import_util_retry3, getRuntimeConfig4; var init_runtimeConfig2 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js"() { init_package(); - init_client3(); + init_client(); init_httpAuthSchemes2(); - init_client2(); - init_config2(); - init_retry2(); - init_serde(); - import_node_http_handler2 = __toESM(require_dist_cjs9()); + import_util_user_agent_node2 = __toESM(require_dist_cjs44()); + import_config_resolver3 = __toESM(require_dist_cjs26()); + import_hash_node2 = __toESM(require_dist_cjs45()); + import_middleware_retry3 = __toESM(require_dist_cjs35()); + import_node_config_provider2 = __toESM(require_dist_cjs30()); + import_node_http_handler2 = __toESM(require_dist_cjs13()); + import_smithy_client17 = __toESM(require_dist_cjs34()); + import_util_body_length_node2 = __toESM(require_dist_cjs46()); + import_util_defaults_mode_node2 = __toESM(require_dist_cjs47()); + import_util_retry3 = __toESM(require_dist_cjs23()); init_runtimeConfig_shared2(); getRuntimeConfig4 = (config) => { - emitWarningIfUnsupportedVersion2(process.version); - const defaultsMode = resolveDefaultsModeConfig(config); - const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + (0, import_smithy_client17.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, import_util_defaults_mode_node2.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(import_smithy_client17.loadConfigsForDefaultMode); const clientSharedValues = getRuntimeConfig3(config); emitWarningIfUnsupportedVersion(process.version); const loaderConfig = { @@ -41881,21 +41976,21 @@ var init_runtimeConfig2 = __esm({ ...config, runtime: "node", defaultsMode, - authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), - bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), - maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + authSchemePreference: config?.authSchemePreference ?? (0, import_node_config_provider2.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? import_util_body_length_node2.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, import_util_user_agent_node2.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + maxAttempts: config?.maxAttempts ?? (0, import_node_config_provider2.loadConfig)(import_middleware_retry3.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver3.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), requestHandler: import_node_http_handler2.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? loadConfig({ - ...NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE + retryMode: config?.retryMode ?? (0, import_node_config_provider2.loadConfig)({ + ...import_middleware_retry3.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || import_util_retry3.DEFAULT_RETRY_MODE }, config), - sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + sha256: config?.sha256 ?? import_hash_node2.Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? import_node_http_handler2.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, import_node_config_provider2.loadConfig)(import_util_user_agent_node2.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) }; }; } @@ -41946,59 +42041,62 @@ var init_httpAuthExtensionConfiguration2 = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeExtensions.js -var resolveRuntimeExtensions2; +var import_region_config_resolver2, import_protocol_http13, import_smithy_client18, resolveRuntimeExtensions2; var init_runtimeExtensions2 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeExtensions.js"() { - init_client3(); - init_client2(); - init_protocols(); + import_region_config_resolver2 = __toESM(require_dist_cjs48()); + import_protocol_http13 = __toESM(require_dist_cjs2()); + import_smithy_client18 = __toESM(require_dist_cjs34()); init_httpAuthExtensionConfiguration2(); resolveRuntimeExtensions2 = (runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration2(runtimeConfig)); + const extensionConfiguration = Object.assign((0, import_region_config_resolver2.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client18.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http13.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration2(runtimeConfig)); extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig2(extensionConfiguration)); + return Object.assign(runtimeConfig, (0, import_region_config_resolver2.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client18.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http13.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig2(extensionConfiguration)); }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSOClient.js -var SSOClient; +var import_middleware_host_header2, import_middleware_logger2, import_middleware_recursion_detection2, import_middleware_user_agent2, import_config_resolver4, import_middleware_content_length2, import_middleware_endpoint3, import_middleware_retry4, import_smithy_client19, SSOClient; var init_SSOClient = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSOClient.js"() { - init_client3(); + import_middleware_host_header2 = __toESM(require_dist_cjs3()); + import_middleware_logger2 = __toESM(require_dist_cjs4()); + import_middleware_recursion_detection2 = __toESM(require_dist_cjs5()); + import_middleware_user_agent2 = __toESM(require_dist_cjs24()); + import_config_resolver4 = __toESM(require_dist_cjs26()); init_dist_es(); - init_client2(); - init_config2(); - init_endpoints(); - init_protocols(); - init_retry2(); init_schema(); + import_middleware_content_length2 = __toESM(require_dist_cjs27()); + import_middleware_endpoint3 = __toESM(require_dist_cjs32()); + import_middleware_retry4 = __toESM(require_dist_cjs35()); + import_smithy_client19 = __toESM(require_dist_cjs34()); init_httpAuthSchemeProvider2(); init_EndpointParameters2(); init_runtimeConfig2(); init_runtimeExtensions2(); - SSOClient = class extends Client { + SSOClient = class extends import_smithy_client19.Client { config; constructor(...[configuration]) { const _config_0 = getRuntimeConfig4(configuration || {}); super(_config_0); this.initConfig = _config_0; const _config_1 = resolveClientEndpointParameters2(_config_0); - const _config_2 = resolveUserAgentConfig(_config_1); - const _config_3 = resolveRetryConfig(_config_2); - const _config_4 = resolveRegionConfig(_config_3); - const _config_5 = resolveHostHeaderConfig(_config_4); - const _config_6 = resolveEndpointConfig(_config_5); + const _config_2 = (0, import_middleware_user_agent2.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry4.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver4.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header2.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint3.resolveEndpointConfig)(_config_5); const _config_7 = resolveHttpAuthSchemeConfig2(_config_6); const _config_8 = resolveRuntimeExtensions2(_config_7, configuration?.extensions || []); this.config = _config_8; this.middlewareStack.use(getSchemaSerdePlugin(this.config)); - this.middlewareStack.use(getUserAgentPlugin(this.config)); - this.middlewareStack.use(getRetryPlugin(this.config)); - this.middlewareStack.use(getContentLengthPlugin(this.config)); - this.middlewareStack.use(getHostHeaderPlugin(this.config)); - this.middlewareStack.use(getLoggerPlugin(this.config)); - this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use((0, import_middleware_user_agent2.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry4.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length2.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header2.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger2.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection2.getRecursionDetectionPlugin)(this.config)); this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider, identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({ @@ -42015,25 +42113,25 @@ var init_SSOClient = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js -var GetRoleCredentialsCommand; +var import_middleware_endpoint4, import_smithy_client20, GetRoleCredentialsCommand; var init_GetRoleCredentialsCommand = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js"() { - init_client2(); - init_endpoints(); + import_middleware_endpoint4 = __toESM(require_dist_cjs32()); + import_smithy_client20 = __toESM(require_dist_cjs34()); init_EndpointParameters2(); init_schemas_02(); - GetRoleCredentialsCommand = class extends Command2.classBuilder().ep(commonParams2).m(function(Command3, cs, config, o2) { - return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())]; + GetRoleCredentialsCommand = class extends import_smithy_client20.Command.classBuilder().ep(commonParams2).m(function(Command, cs, config, o2) { + return [(0, import_middleware_endpoint4.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())]; }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").sc(GetRoleCredentials$).build() { }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSO.js -var commands2, SSO; +var import_smithy_client21, commands2, SSO; var init_SSO = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSO.js"() { - init_client2(); + import_smithy_client21 = __toESM(require_dist_cjs34()); init_GetRoleCredentialsCommand(); init_SSOClient(); commands2 = { @@ -42041,7 +42139,7 @@ var init_SSO = __esm({ }; SSO = class extends SSOClient { }; - createAggregatedClient(commands2, SSO); + (0, import_smithy_client21.createAggregatedClient)(commands2, SSO); } }); @@ -42061,7 +42159,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: () => Command2, + $Command: () => import_smithy_client20.Command, GetRoleCredentials$: () => GetRoleCredentials$, GetRoleCredentialsCommand: () => GetRoleCredentialsCommand, GetRoleCredentialsRequest$: () => GetRoleCredentialsRequest$, @@ -42079,7 +42177,7 @@ __export(sso_exports, { TooManyRequestsException$: () => TooManyRequestsException$, UnauthorizedException: () => UnauthorizedException, UnauthorizedException$: () => UnauthorizedException$, - __Client: () => Client, + __Client: () => import_smithy_client19.Client, errorTypeRegistries: () => errorTypeRegistries2 }); var init_sso = __esm({ @@ -42105,12 +42203,13 @@ var require_loadSso_BKDNrsal = __commonJS({ }); // node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js -var require_dist_cjs13 = __commonJS({ +var require_dist_cjs50 = __commonJS({ "node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports2) { "use strict"; - var config = (init_config2(), __toCommonJS(config_exports)); - var client = (init_client3(), __toCommonJS(client_exports2)); - var tokenProviders = require_dist_cjs12(); + var propertyProvider = require_dist_cjs28(); + var sharedIniFileLoader = require_dist_cjs29(); + var client = (init_client(), __toCommonJS(client_exports)); + var tokenProviders = require_dist_cjs49(); var isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"); var SHOULD_FAIL_CREDENTIAL_CHAIN = false; var resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger: logger2 }) => { @@ -42129,23 +42228,23 @@ var require_dist_cjs13 = __commonJS({ expiresAt: new Date(_token.expiration).toISOString() }; } catch (e5) { - throw new config.CredentialsProviderError(e5.message, { + throw new propertyProvider.CredentialsProviderError(e5.message, { tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, logger: logger2 }); } } else { try { - token = await config.getSSOTokenFromFile(ssoStartUrl); + token = await sharedIniFileLoader.getSSOTokenFromFile(ssoStartUrl); } catch (e5) { - throw new config.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, { + throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, { tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, logger: logger2 }); } } if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { - throw new config.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, { + throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, { tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, logger: logger2 }); @@ -42167,14 +42266,14 @@ var require_dist_cjs13 = __commonJS({ accessToken })); } catch (e5) { - throw new config.CredentialsProviderError(e5, { + throw new propertyProvider.CredentialsProviderError(e5, { tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, logger: logger2 }); } const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} } = ssoResp; if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { - throw new config.CredentialsProviderError("SSO returns an invalid temporary credential.", { + throw new propertyProvider.CredentialsProviderError("SSO returns an invalid temporary credential.", { tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, logger: logger2 }); @@ -42197,7 +42296,7 @@ var require_dist_cjs13 = __commonJS({ var validateSsoProfile = (profile, logger2) => { const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { - throw new config.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")} + throw new propertyProvider.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")} Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger: logger2 }); } return profile; @@ -42206,32 +42305,32 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO"); const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; const { ssoClient } = init; - const profileName = config.getProfileName({ + const profileName = sharedIniFileLoader.getProfileName({ profile: init.profile ?? callerClientConfig?.profile }); if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { - const profiles = await config.parseKnownFiles(init); + const profiles = await sharedIniFileLoader.parseKnownFiles(init); const profile = profiles[profileName]; if (!profile) { - throw new config.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger }); + throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger }); } if (!isSsoProfile(profile)) { - throw new config.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { + throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { logger: init.logger }); } if (profile?.sso_session) { - const ssoSessions = await config.loadSsoSessionData(init); + const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init); const session = ssoSessions[profile.sso_session]; const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; if (ssoRegion && ssoRegion !== session.sso_region) { - throw new config.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, { + throw new propertyProvider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, { tryNextLink: false, logger: init.logger }); } if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { - throw new config.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, { + throw new propertyProvider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, { tryNextLink: false, logger: init.logger }); @@ -42257,7 +42356,7 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht logger: init.logger }); } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { - throw new config.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger }); + throw new propertyProvider.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger }); } else { return resolveSSOCredentials({ ssoStartUrl, @@ -42304,15 +42403,15 @@ function createSmithyApiNoAuthHttpAuthOption3(authParameters) { schemeId: "smithy.api#noAuth" }; } -var defaultSigninHttpAuthSchemeParametersProvider, defaultSigninHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig3; +var import_util_middleware8, defaultSigninHttpAuthSchemeParametersProvider, defaultSigninHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig3; var init_httpAuthSchemeProvider3 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthSchemeProvider.js"() { init_httpAuthSchemes2(); - init_client2(); + import_util_middleware8 = __toESM(require_dist_cjs6()); defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => { return { - operation: getSmithyContext(context).operation, - region: await normalizeProvider(config.region)() || (() => { + operation: (0, import_util_middleware8.getSmithyContext)(context).operation, + region: await (0, import_util_middleware8.normalizeProvider)(config.region)() || (() => { throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); })() }; @@ -42333,7 +42432,7 @@ var init_httpAuthSchemeProvider3 = __esm({ resolveHttpAuthSchemeConfig3 = (config) => { const config_0 = resolveAwsSdkSigV4Config(config); return Object.assign(config_0, { - authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) + authSchemePreference: (0, import_util_middleware8.normalizeProvider)(config.authSchemePreference ?? []) }); }; } @@ -42360,10 +42459,10 @@ var init_EndpointParameters3 = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js -var m, a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l, _data3, root3, r3, nodes3, bdd3; +var import_util_endpoints7, m, a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l, _data3, root3, r3, nodes3, bdd3; var init_bdd3 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js"() { - init_endpoints(); + import_util_endpoints7 = __toESM(require_dist_cjs20()); m = "ref"; a3 = -1; b3 = true; @@ -42460,37 +42559,37 @@ var init_bdd3 = __esm({ r3 + 2, r3 + 3 ]); - bdd3 = BinaryDecisionDiagram.from(nodes3, root3, _data3.conditions, _data3.results); + bdd3 = import_util_endpoints7.BinaryDecisionDiagram.from(nodes3, root3, _data3.conditions, _data3.results); } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js -var cache3, defaultEndpointResolver3; +var import_util_endpoints8, import_util_endpoints9, cache3, defaultEndpointResolver3; var init_endpointResolver3 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js"() { - init_client3(); - init_endpoints(); + import_util_endpoints8 = __toESM(require_dist_cjs21()); + import_util_endpoints9 = __toESM(require_dist_cjs20()); init_bdd3(); - cache3 = new EndpointCache({ + cache3 = new import_util_endpoints9.EndpointCache({ size: 50, params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] }); defaultEndpointResolver3 = (endpointParams, context = {}) => { - return cache3.get(endpointParams, () => decideEndpoint(bdd3, { + return cache3.get(endpointParams, () => (0, import_util_endpoints9.decideEndpoint)(bdd3, { endpointParams, logger: context.logger })); }; - customEndpointFunctions.aws = awsEndpointFunctions; + import_util_endpoints9.customEndpointFunctions.aws = import_util_endpoints8.awsEndpointFunctions; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js -var SigninServiceException; +var import_smithy_client22, SigninServiceException; var init_SigninServiceException = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js"() { - init_client2(); - SigninServiceException = class _SigninServiceException extends ServiceException { + import_smithy_client22 = __toESM(require_dist_cjs34()); + SigninServiceException = class _SigninServiceException extends import_smithy_client22.ServiceException { constructor(options) { super(options); Object.setPrototypeOf(this, _SigninServiceException.prototype); @@ -42693,23 +42792,24 @@ var init_schemas_03 = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.shared.js -var getRuntimeConfig5; +var import_smithy_client23, import_url_parser4, import_util_base6410, import_util_utf810, getRuntimeConfig5; var init_runtimeConfig_shared3 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.shared.js"() { init_httpAuthSchemes2(); init_protocols2(); init_dist_es(); - init_client2(); - init_protocols(); - init_serde(); + import_smithy_client23 = __toESM(require_dist_cjs34()); + import_url_parser4 = __toESM(require_dist_cjs18()); + import_util_base6410 = __toESM(require_dist_cjs10()); + import_util_utf810 = __toESM(require_dist_cjs9()); init_httpAuthSchemeProvider3(); init_endpointResolver3(); init_schemas_03(); getRuntimeConfig5 = (config) => { return { apiVersion: "2023-01-01", - base64Decoder: config?.base64Decoder ?? fromBase64, - base64Encoder: config?.base64Encoder ?? toBase64, + base64Decoder: config?.base64Decoder ?? import_util_base6410.fromBase64, + base64Encoder: config?.base64Encoder ?? import_util_base6410.toBase64, disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? defaultEndpointResolver3, extensions: config?.extensions ?? [], @@ -42726,7 +42826,7 @@ var init_runtimeConfig_shared3 = __esm({ signer: new NoAuthSigner() } ], - logger: config?.logger ?? new NoOpLogger(), + logger: config?.logger ?? new import_smithy_client23.NoOpLogger(), protocol: config?.protocol ?? AwsRestJsonProtocol, protocolSettings: config?.protocolSettings ?? { defaultNamespace: "com.amazonaws.signin", @@ -42735,31 +42835,36 @@ var init_runtimeConfig_shared3 = __esm({ serviceTarget: "Signin" }, serviceId: config?.serviceId ?? "Signin", - urlParser: config?.urlParser ?? parseUrl, - utf8Decoder: config?.utf8Decoder ?? fromUtf8, - utf8Encoder: config?.utf8Encoder ?? toUtf8 + urlParser: config?.urlParser ?? import_url_parser4.parseUrl, + utf8Decoder: config?.utf8Decoder ?? import_util_utf810.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? import_util_utf810.toUtf8 }; }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js -var import_node_http_handler3, getRuntimeConfig6; +var import_util_user_agent_node3, import_config_resolver5, import_hash_node3, import_middleware_retry5, import_node_config_provider3, import_node_http_handler3, import_smithy_client24, import_util_body_length_node3, import_util_defaults_mode_node3, import_util_retry4, getRuntimeConfig6; var init_runtimeConfig3 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js"() { init_package(); - init_client3(); + init_client(); init_httpAuthSchemes2(); - init_client2(); - init_config2(); - init_retry2(); - init_serde(); - import_node_http_handler3 = __toESM(require_dist_cjs9()); + import_util_user_agent_node3 = __toESM(require_dist_cjs44()); + import_config_resolver5 = __toESM(require_dist_cjs26()); + import_hash_node3 = __toESM(require_dist_cjs45()); + import_middleware_retry5 = __toESM(require_dist_cjs35()); + import_node_config_provider3 = __toESM(require_dist_cjs30()); + import_node_http_handler3 = __toESM(require_dist_cjs13()); + import_smithy_client24 = __toESM(require_dist_cjs34()); + import_util_body_length_node3 = __toESM(require_dist_cjs46()); + import_util_defaults_mode_node3 = __toESM(require_dist_cjs47()); + import_util_retry4 = __toESM(require_dist_cjs23()); init_runtimeConfig_shared3(); getRuntimeConfig6 = (config) => { - emitWarningIfUnsupportedVersion2(process.version); - const defaultsMode = resolveDefaultsModeConfig(config); - const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + (0, import_smithy_client24.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, import_util_defaults_mode_node3.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(import_smithy_client24.loadConfigsForDefaultMode); const clientSharedValues = getRuntimeConfig5(config); emitWarningIfUnsupportedVersion(process.version); const loaderConfig = { @@ -42771,21 +42876,21 @@ var init_runtimeConfig3 = __esm({ ...config, runtime: "node", defaultsMode, - authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), - bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), - maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + authSchemePreference: config?.authSchemePreference ?? (0, import_node_config_provider3.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? import_util_body_length_node3.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, import_util_user_agent_node3.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + maxAttempts: config?.maxAttempts ?? (0, import_node_config_provider3.loadConfig)(import_middleware_retry5.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? (0, import_node_config_provider3.loadConfig)(import_config_resolver5.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver5.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), requestHandler: import_node_http_handler3.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? loadConfig({ - ...NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE + retryMode: config?.retryMode ?? (0, import_node_config_provider3.loadConfig)({ + ...import_middleware_retry5.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || import_util_retry4.DEFAULT_RETRY_MODE }, config), - sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + sha256: config?.sha256 ?? import_hash_node3.Hash.bind(null, "sha256"), streamCollector: config?.streamCollector ?? import_node_http_handler3.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, import_node_config_provider3.loadConfig)(import_config_resolver5.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, import_node_config_provider3.loadConfig)(import_config_resolver5.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, import_node_config_provider3.loadConfig)(import_util_user_agent_node3.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) }; }; } @@ -42836,59 +42941,62 @@ var init_httpAuthExtensionConfiguration3 = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeExtensions.js -var resolveRuntimeExtensions3; +var import_region_config_resolver3, import_protocol_http14, import_smithy_client25, resolveRuntimeExtensions3; var init_runtimeExtensions3 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeExtensions.js"() { - init_client3(); - init_client2(); - init_protocols(); + import_region_config_resolver3 = __toESM(require_dist_cjs48()); + import_protocol_http14 = __toESM(require_dist_cjs2()); + import_smithy_client25 = __toESM(require_dist_cjs34()); init_httpAuthExtensionConfiguration3(); resolveRuntimeExtensions3 = (runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration3(runtimeConfig)); + const extensionConfiguration = Object.assign((0, import_region_config_resolver3.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client25.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http14.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration3(runtimeConfig)); extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig3(extensionConfiguration)); + return Object.assign(runtimeConfig, (0, import_region_config_resolver3.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client25.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http14.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig3(extensionConfiguration)); }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/SigninClient.js -var SigninClient; +var import_middleware_host_header3, import_middleware_logger3, import_middleware_recursion_detection3, import_middleware_user_agent3, import_config_resolver6, import_middleware_content_length3, import_middleware_endpoint5, import_middleware_retry6, import_smithy_client26, SigninClient; var init_SigninClient = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/SigninClient.js"() { - init_client3(); + import_middleware_host_header3 = __toESM(require_dist_cjs3()); + import_middleware_logger3 = __toESM(require_dist_cjs4()); + import_middleware_recursion_detection3 = __toESM(require_dist_cjs5()); + import_middleware_user_agent3 = __toESM(require_dist_cjs24()); + import_config_resolver6 = __toESM(require_dist_cjs26()); init_dist_es(); - init_client2(); - init_config2(); - init_endpoints(); - init_protocols(); - init_retry2(); init_schema(); + import_middleware_content_length3 = __toESM(require_dist_cjs27()); + import_middleware_endpoint5 = __toESM(require_dist_cjs32()); + import_middleware_retry6 = __toESM(require_dist_cjs35()); + import_smithy_client26 = __toESM(require_dist_cjs34()); init_httpAuthSchemeProvider3(); init_EndpointParameters3(); init_runtimeConfig3(); init_runtimeExtensions3(); - SigninClient = class extends Client { + SigninClient = class extends import_smithy_client26.Client { config; constructor(...[configuration]) { const _config_0 = getRuntimeConfig6(configuration || {}); super(_config_0); this.initConfig = _config_0; const _config_1 = resolveClientEndpointParameters3(_config_0); - const _config_2 = resolveUserAgentConfig(_config_1); - const _config_3 = resolveRetryConfig(_config_2); - const _config_4 = resolveRegionConfig(_config_3); - const _config_5 = resolveHostHeaderConfig(_config_4); - const _config_6 = resolveEndpointConfig(_config_5); + const _config_2 = (0, import_middleware_user_agent3.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry6.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver6.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header3.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint5.resolveEndpointConfig)(_config_5); const _config_7 = resolveHttpAuthSchemeConfig3(_config_6); const _config_8 = resolveRuntimeExtensions3(_config_7, configuration?.extensions || []); this.config = _config_8; this.middlewareStack.use(getSchemaSerdePlugin(this.config)); - this.middlewareStack.use(getUserAgentPlugin(this.config)); - this.middlewareStack.use(getRetryPlugin(this.config)); - this.middlewareStack.use(getContentLengthPlugin(this.config)); - this.middlewareStack.use(getHostHeaderPlugin(this.config)); - this.middlewareStack.use(getLoggerPlugin(this.config)); - this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use((0, import_middleware_user_agent3.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry6.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length3.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header3.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger3.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection3.getRecursionDetectionPlugin)(this.config)); this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider, identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({ @@ -42905,25 +43013,25 @@ var init_SigninClient = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js -var CreateOAuth2TokenCommand; +var import_middleware_endpoint6, import_smithy_client27, CreateOAuth2TokenCommand; var init_CreateOAuth2TokenCommand = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js"() { - init_client2(); - init_endpoints(); + import_middleware_endpoint6 = __toESM(require_dist_cjs32()); + import_smithy_client27 = __toESM(require_dist_cjs34()); init_EndpointParameters3(); init_schemas_03(); - CreateOAuth2TokenCommand = class extends Command2.classBuilder().ep(commonParams3).m(function(Command3, cs, config, o2) { - return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())]; + CreateOAuth2TokenCommand = class extends import_smithy_client27.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config, o2) { + return [(0, import_middleware_endpoint6.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())]; }).s("Signin", "CreateOAuth2Token", {}).n("SigninClient", "CreateOAuth2TokenCommand").sc(CreateOAuth2Token$).build() { }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/Signin.js -var commands3, Signin; +var import_smithy_client28, commands3, Signin; var init_Signin = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/Signin.js"() { - init_client2(); + import_smithy_client28 = __toESM(require_dist_cjs34()); init_CreateOAuth2TokenCommand(); init_SigninClient(); commands3 = { @@ -42931,7 +43039,7 @@ var init_Signin = __esm({ }; Signin = class extends SigninClient { }; - createAggregatedClient(commands3, Signin); + (0, import_smithy_client28.createAggregatedClient)(commands3, Signin); } }); @@ -42966,7 +43074,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: () => Command2, + $Command: () => import_smithy_client27.Command, AccessDeniedException: () => AccessDeniedException2, AccessDeniedException$: () => AccessDeniedException$2, AccessToken$: () => AccessToken$, @@ -42987,7 +43095,7 @@ __export(signin_exports, { TooManyRequestsError$: () => TooManyRequestsError$, ValidationException: () => ValidationException, ValidationException$: () => ValidationException$, - __Client: () => Client, + __Client: () => import_smithy_client26.Client, errorTypeRegistries: () => errorTypeRegistries3 }); var init_signin = __esm({ @@ -43004,12 +43112,13 @@ var init_signin = __esm({ }); // node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js -var require_dist_cjs14 = __commonJS({ +var require_dist_cjs51 = __commonJS({ "node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js"(exports2) { "use strict"; - var client = (init_client3(), __toCommonJS(client_exports2)); - var config = (init_config2(), __toCommonJS(config_exports)); - var protocols2 = (init_protocols(), __toCommonJS(protocols_exports)); + var client = (init_client(), __toCommonJS(client_exports)); + var propertyProvider = require_dist_cjs28(); + var sharedIniFileLoader = require_dist_cjs29(); + var protocolHttp = require_dist_cjs2(); var node_crypto = require("node:crypto"); var node_fs = require("node:fs"); var node_os = require("node:os"); @@ -43027,7 +43136,7 @@ var require_dist_cjs14 = __commonJS({ async loadCredentials() { const token = await this.loadToken(); if (!token) { - throw new config.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger }); + throw new propertyProvider.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger }); } const accessToken = token.accessToken; const now = Date.now(); @@ -43082,7 +43191,7 @@ var require_dist_cjs14 = __commonJS({ const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {}; const { refreshToken, expiresIn } = response.tokenOutput ?? {}; if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) { - throw new config.CredentialsProviderError("Token refresh response missing required fields", { + throw new propertyProvider.CredentialsProviderError("Token refresh response missing required fields", { logger: this.logger, tryNextLink: false }); @@ -43109,9 +43218,9 @@ var require_dist_cjs14 = __commonJS({ accountId: newAccessToken.accountId, expiration }; - } catch (error3) { - if (error3.name === "AccessDeniedException") { - const errorType = error3.error; + } catch (error2) { + if (error2.name === "AccessDeniedException") { + const errorType = error2.error; let message; switch (errorType) { case "TOKEN_EXPIRED": @@ -43124,11 +43233,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(error3)}. Please re-authenticate using \`aws login\``; + message = `Failed to refresh token: ${String(error2)}. Please re-authenticate using \`aws login\``; } - throw new config.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false }); + throw new propertyProvider.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false }); } - throw new config.CredentialsProviderError(`Failed to refresh token: ${String(error3)}. Please re-authenticate using aws login`, { logger: this.logger }); + throw new propertyProvider.CredentialsProviderError(`Failed to refresh token: ${String(error2)}. Please re-authenticate using aws login`, { logger: this.logger }); } } async loadToken() { @@ -43136,7 +43245,7 @@ var require_dist_cjs14 = __commonJS({ try { let tokenData; try { - tokenData = await config.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache }); + tokenData = await sharedIniFileLoader.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache }); } catch { tokenData = await node_fs.promises.readFile(tokenFilePath, "utf8"); } @@ -43146,14 +43255,14 @@ var require_dist_cjs14 = __commonJS({ missingFields.push("accountId"); } if (missingFields.length > 0) { - throw new config.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, { + throw new propertyProvider.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, { logger: this.logger, tryNextLink: false }); } return token; - } catch (error3) { - throw new config.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error3)}`, { + } catch (error2) { + throw new propertyProvider.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error2)}`, { logger: this.logger, tryNextLink: false }); @@ -43164,7 +43273,7 @@ var require_dist_cjs14 = __commonJS({ const directory = node_path.dirname(tokenFilePath); try { await node_fs.promises.mkdir(directory, { recursive: true }); - } catch (error3) { + } catch (error2) { } await node_fs.promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8"); } @@ -43197,7 +43306,7 @@ var require_dist_cjs14 = __commonJS({ } createDPoPInterceptor(middlewareStack) { middlewareStack.add((next) => async (args) => { - if (protocols2.HttpRequest.isInstance(args.request)) { + if (protocolHttp.HttpRequest.isInstance(args.request)) { const request = args.request; const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : ""}${request.path}`; const dpop = await this.generateDpop(request.method, actualEndpoint); @@ -43255,20 +43364,20 @@ var require_dist_cjs14 = __commonJS({ const rawSignature = this.derToRawSignature(asn1Signature); const signatureB64 = rawSignature.toString("base64url"); return `${message}.${signatureB64}`; - } catch (error3) { - throw new config.CredentialsProviderError(`Failed to generate Dpop proof: ${error3 instanceof Error ? error3.message : String(error3)}`, { logger: this.logger, tryNextLink: false }); + } catch (error2) { + throw new propertyProvider.CredentialsProviderError(`Failed to generate Dpop proof: ${error2 instanceof Error ? error2.message : String(error2)}`, { logger: this.logger, tryNextLink: false }); } } }; var fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => { init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials"); - const profiles = await config.parseKnownFiles(init || {}); - const profileName = config.getProfileName({ + const profiles = await sharedIniFileLoader.parseKnownFiles(init || {}); + const profileName = sharedIniFileLoader.getProfileName({ profile: init?.profile ?? callerClientConfig?.profile }); const profile = profiles[profileName]; if (!profile?.login_session) { - throw new config.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, { + throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, { tryNextLink: true, logger: init?.logger }); @@ -43282,10 +43391,10 @@ var require_dist_cjs14 = __commonJS({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js -var q, a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l2, m2, n, o, p, _data4, root4, r4, nodes4, bdd4; +var import_util_endpoints10, q, a4, b4, c4, d4, e4, f4, g4, h4, i4, j4, k4, l2, m2, n, o, p, _data4, root4, r4, nodes4, bdd4; var init_bdd4 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js"() { - init_endpoints(); + import_util_endpoints10 = __toESM(require_dist_cjs20()); q = "ref"; a4 = -1; b4 = true; @@ -43446,28 +43555,28 @@ var init_bdd4 = __esm({ r4 + 4, r4 + 5 ]); - bdd4 = BinaryDecisionDiagram.from(nodes4, root4, _data4.conditions, _data4.results); + bdd4 = import_util_endpoints10.BinaryDecisionDiagram.from(nodes4, root4, _data4.conditions, _data4.results); } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js -var cache4, defaultEndpointResolver4; +var import_util_endpoints11, import_util_endpoints12, cache4, defaultEndpointResolver4; var init_endpointResolver4 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js"() { - init_client3(); - init_endpoints(); + import_util_endpoints11 = __toESM(require_dist_cjs21()); + import_util_endpoints12 = __toESM(require_dist_cjs20()); init_bdd4(); - cache4 = new EndpointCache({ + cache4 = new import_util_endpoints12.EndpointCache({ size: 50, params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"] }); defaultEndpointResolver4 = (endpointParams, context = {}) => { - return cache4.get(endpointParams, () => decideEndpoint(bdd4, { + return cache4.get(endpointParams, () => (0, import_util_endpoints12.decideEndpoint)(bdd4, { endpointParams, logger: context.logger })); }; - customEndpointFunctions.aws = awsEndpointFunctions; + import_util_endpoints12.customEndpointFunctions.aws = import_util_endpoints11.awsEndpointFunctions; } }); @@ -43507,30 +43616,31 @@ function createSmithyApiNoAuthHttpAuthOption4(authParameters) { schemeId: "smithy.api#noAuth" }; } -var import_signature_v4_multi_region, createEndpointRuleSetHttpAuthSchemeParametersProvider, _defaultSTSHttpAuthSchemeParametersProvider, defaultSTSHttpAuthSchemeParametersProvider, createEndpointRuleSetHttpAuthSchemeProvider, _defaultSTSHttpAuthSchemeProvider, defaultSTSHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig4; +var import_signature_v4_multi_region, import_middleware_endpoint7, import_util_middleware9, createEndpointRuleSetHttpAuthSchemeParametersProvider, _defaultSTSHttpAuthSchemeParametersProvider, defaultSTSHttpAuthSchemeParametersProvider, createEndpointRuleSetHttpAuthSchemeProvider, _defaultSTSHttpAuthSchemeProvider, defaultSTSHttpAuthSchemeProvider, resolveStsAuthConfig, resolveHttpAuthSchemeConfig4; var init_httpAuthSchemeProvider4 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js"() { init_httpAuthSchemes2(); - import_signature_v4_multi_region = __toESM(require_dist_cjs6()); - init_client2(); - init_endpoints(); + import_signature_v4_multi_region = __toESM(require_dist_cjs40()); + import_middleware_endpoint7 = __toESM(require_dist_cjs32()); + import_util_middleware9 = __toESM(require_dist_cjs6()); init_endpointResolver4(); + init_STSClient(); createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => { if (!input) { throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`"); } const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input); - const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor?.getEndpointParameterInstructions; + const instructionsFn = (0, import_util_middleware9.getSmithyContext)(context)?.commandInstance?.constructor?.getEndpointParameterInstructions; if (!instructionsFn) { throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`); } - const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config); + const endpointParameters = await (0, import_middleware_endpoint7.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config); return Object.assign(defaultParameters, endpointParameters); }; _defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => { return { - operation: getSmithyContext(context).operation, - region: await normalizeProvider(config.region)() || (() => { + operation: (0, import_util_middleware9.getSmithyContext)(context).operation, + region: await (0, import_util_middleware9.normalizeProvider)(config.region)() || (() => { throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); })() }; @@ -43598,11 +43708,15 @@ var init_httpAuthSchemeProvider4 = __esm({ "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption, "smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption4 }); + resolveStsAuthConfig = (input) => Object.assign(input, { + stsClientCtor: STSClient + }); resolveHttpAuthSchemeConfig4 = (config) => { - const config_0 = resolveAwsSdkSigV4Config(config); - const config_1 = resolveAwsSdkSigV4AConfig(config_0); - return Object.assign(config_1, { - authSchemePreference: normalizeProvider(config.authSchemePreference ?? []) + const config_0 = resolveStsAuthConfig(config); + const config_1 = resolveAwsSdkSigV4Config(config_0); + const config_2 = resolveAwsSdkSigV4AConfig(config_1); + return Object.assign(config_2, { + authSchemePreference: (0, import_util_middleware9.normalizeProvider)(config.authSchemePreference ?? []) }); }; } @@ -43631,11 +43745,11 @@ var init_EndpointParameters4 = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js -var STSServiceException; +var import_smithy_client29, STSServiceException; var init_STSServiceException = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js"() { - init_client2(); - STSServiceException = class _STSServiceException extends ServiceException { + import_smithy_client29 = __toESM(require_dist_cjs34()); + STSServiceException = class _STSServiceException extends import_smithy_client29.ServiceException { constructor(options) { super(options); Object.setPrototypeOf(this, _STSServiceException.prototype); @@ -43937,24 +44051,25 @@ var init_schemas_04 = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js -var import_signature_v4_multi_region2, getRuntimeConfig7; +var import_signature_v4_multi_region2, import_smithy_client30, import_url_parser5, import_util_base6411, import_util_utf811, getRuntimeConfig7; var init_runtimeConfig_shared4 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js"() { init_httpAuthSchemes2(); init_protocols2(); - import_signature_v4_multi_region2 = __toESM(require_dist_cjs6()); + import_signature_v4_multi_region2 = __toESM(require_dist_cjs40()); init_dist_es(); - init_client2(); - init_protocols(); - init_serde(); + import_smithy_client30 = __toESM(require_dist_cjs34()); + import_url_parser5 = __toESM(require_dist_cjs18()); + import_util_base6411 = __toESM(require_dist_cjs10()); + import_util_utf811 = __toESM(require_dist_cjs9()); init_httpAuthSchemeProvider4(); init_endpointResolver4(); init_schemas_04(); getRuntimeConfig7 = (config) => { return { apiVersion: "2011-06-15", - base64Decoder: config?.base64Decoder ?? fromBase64, - base64Encoder: config?.base64Encoder ?? toBase64, + base64Decoder: config?.base64Decoder ?? import_util_base6411.fromBase64, + base64Encoder: config?.base64Encoder ?? import_util_base6411.toBase64, disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? defaultEndpointResolver4, extensions: config?.extensions ?? [], @@ -43976,7 +44091,7 @@ var init_runtimeConfig_shared4 = __esm({ signer: new NoAuthSigner() } ], - logger: config?.logger ?? new NoOpLogger(), + logger: config?.logger ?? new import_smithy_client30.NoOpLogger(), protocol: config?.protocol ?? AwsQueryProtocol, protocolSettings: config?.protocolSettings ?? { defaultNamespace: "com.amazonaws.sts", @@ -43987,32 +44102,37 @@ var init_runtimeConfig_shared4 = __esm({ }, serviceId: config?.serviceId ?? "STS", signerConstructor: config?.signerConstructor ?? import_signature_v4_multi_region2.SignatureV4MultiRegion, - urlParser: config?.urlParser ?? parseUrl, - utf8Decoder: config?.utf8Decoder ?? fromUtf8, - utf8Encoder: config?.utf8Encoder ?? toUtf8 + urlParser: config?.urlParser ?? import_url_parser5.parseUrl, + utf8Decoder: config?.utf8Decoder ?? import_util_utf811.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? import_util_utf811.toUtf8 }; }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js -var import_node_http_handler4, getRuntimeConfig8; +var import_util_user_agent_node4, import_config_resolver7, import_hash_node4, import_middleware_retry7, import_node_config_provider4, import_node_http_handler4, import_smithy_client31, import_util_body_length_node4, import_util_defaults_mode_node4, import_util_retry5, getRuntimeConfig8; var init_runtimeConfig4 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js"() { init_package(); - init_client3(); + init_client(); init_httpAuthSchemes2(); + import_util_user_agent_node4 = __toESM(require_dist_cjs44()); + import_config_resolver7 = __toESM(require_dist_cjs26()); init_dist_es(); - init_client2(); - init_config2(); - init_retry2(); - init_serde(); - import_node_http_handler4 = __toESM(require_dist_cjs9()); + import_hash_node4 = __toESM(require_dist_cjs45()); + import_middleware_retry7 = __toESM(require_dist_cjs35()); + import_node_config_provider4 = __toESM(require_dist_cjs30()); + import_node_http_handler4 = __toESM(require_dist_cjs13()); + import_smithy_client31 = __toESM(require_dist_cjs34()); + import_util_body_length_node4 = __toESM(require_dist_cjs46()); + import_util_defaults_mode_node4 = __toESM(require_dist_cjs47()); + import_util_retry5 = __toESM(require_dist_cjs23()); init_runtimeConfig_shared4(); getRuntimeConfig8 = (config) => { - emitWarningIfUnsupportedVersion2(process.version); - const defaultsMode = resolveDefaultsModeConfig(config); - const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + (0, import_smithy_client31.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, import_util_defaults_mode_node4.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(import_smithy_client31.loadConfigsForDefaultMode); const clientSharedValues = getRuntimeConfig7(config); emitWarningIfUnsupportedVersion(process.version); const loaderConfig = { @@ -44024,9 +44144,9 @@ var init_runtimeConfig4 = __esm({ ...config, runtime: "node", defaultsMode, - authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), - bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + authSchemePreference: config?.authSchemePreference ?? (0, import_node_config_provider4.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? import_util_body_length_node4.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, import_util_user_agent_node4.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), httpAuthSchemes: config?.httpAuthSchemes ?? [ { schemeId: "aws.auth#sigv4", @@ -44044,19 +44164,19 @@ var init_runtimeConfig4 = __esm({ signer: new NoAuthSigner() } ], - maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + maxAttempts: config?.maxAttempts ?? (0, import_node_config_provider4.loadConfig)(import_middleware_retry7.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? (0, import_node_config_provider4.loadConfig)(import_config_resolver7.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver7.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), requestHandler: import_node_http_handler4.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? loadConfig({ - ...NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE + retryMode: config?.retryMode ?? (0, import_node_config_provider4.loadConfig)({ + ...import_middleware_retry7.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || import_util_retry5.DEFAULT_RETRY_MODE }, config), - sha256: config?.sha256 ?? Hash.bind(null, "sha256"), - sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig), + sha256: config?.sha256 ?? import_hash_node4.Hash.bind(null, "sha256"), + sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, import_node_config_provider4.loadConfig)(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig), streamCollector: config?.streamCollector ?? import_node_http_handler4.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, import_node_config_provider4.loadConfig)(import_config_resolver7.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, import_node_config_provider4.loadConfig)(import_config_resolver7.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, import_node_config_provider4.loadConfig)(import_util_user_agent_node4.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) }; }; } @@ -44107,59 +44227,62 @@ var init_httpAuthExtensionConfiguration4 = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js -var resolveRuntimeExtensions4; +var import_region_config_resolver4, import_protocol_http15, import_smithy_client32, resolveRuntimeExtensions4; var init_runtimeExtensions4 = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js"() { - init_client3(); - init_client2(); - init_protocols(); + import_region_config_resolver4 = __toESM(require_dist_cjs48()); + import_protocol_http15 = __toESM(require_dist_cjs2()); + import_smithy_client32 = __toESM(require_dist_cjs34()); init_httpAuthExtensionConfiguration4(); resolveRuntimeExtensions4 = (runtimeConfig, extensions) => { - const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration4(runtimeConfig)); + const extensionConfiguration = Object.assign((0, import_region_config_resolver4.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client32.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http15.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration4(runtimeConfig)); extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig4(extensionConfiguration)); + return Object.assign(runtimeConfig, (0, import_region_config_resolver4.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client32.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http15.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig4(extensionConfiguration)); }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js -var STSClient; +var import_middleware_host_header4, import_middleware_logger4, import_middleware_recursion_detection4, import_middleware_user_agent4, import_config_resolver8, import_middleware_content_length4, import_middleware_endpoint8, import_middleware_retry8, import_smithy_client33, STSClient; var init_STSClient = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js"() { - init_client3(); + import_middleware_host_header4 = __toESM(require_dist_cjs3()); + import_middleware_logger4 = __toESM(require_dist_cjs4()); + import_middleware_recursion_detection4 = __toESM(require_dist_cjs5()); + import_middleware_user_agent4 = __toESM(require_dist_cjs24()); + import_config_resolver8 = __toESM(require_dist_cjs26()); init_dist_es(); - init_client2(); - init_config2(); - init_endpoints(); - init_protocols(); - init_retry2(); init_schema(); + import_middleware_content_length4 = __toESM(require_dist_cjs27()); + import_middleware_endpoint8 = __toESM(require_dist_cjs32()); + import_middleware_retry8 = __toESM(require_dist_cjs35()); + import_smithy_client33 = __toESM(require_dist_cjs34()); init_httpAuthSchemeProvider4(); init_EndpointParameters4(); init_runtimeConfig4(); init_runtimeExtensions4(); - STSClient = class extends Client { + STSClient = class extends import_smithy_client33.Client { config; constructor(...[configuration]) { const _config_0 = getRuntimeConfig8(configuration || {}); super(_config_0); this.initConfig = _config_0; const _config_1 = resolveClientEndpointParameters4(_config_0); - const _config_2 = resolveUserAgentConfig(_config_1); - const _config_3 = resolveRetryConfig(_config_2); - const _config_4 = resolveRegionConfig(_config_3); - const _config_5 = resolveHostHeaderConfig(_config_4); - const _config_6 = resolveEndpointConfig(_config_5); + const _config_2 = (0, import_middleware_user_agent4.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry8.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver8.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header4.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint8.resolveEndpointConfig)(_config_5); const _config_7 = resolveHttpAuthSchemeConfig4(_config_6); const _config_8 = resolveRuntimeExtensions4(_config_7, configuration?.extensions || []); this.config = _config_8; this.middlewareStack.use(getSchemaSerdePlugin(this.config)); - this.middlewareStack.use(getUserAgentPlugin(this.config)); - this.middlewareStack.use(getRetryPlugin(this.config)); - this.middlewareStack.use(getContentLengthPlugin(this.config)); - this.middlewareStack.use(getHostHeaderPlugin(this.config)); - this.middlewareStack.use(getLoggerPlugin(this.config)); - this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use((0, import_middleware_user_agent4.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry8.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length4.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header4.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger4.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection4.getRecursionDetectionPlugin)(this.config)); this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider, identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({ @@ -44177,40 +44300,40 @@ var init_STSClient = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js -var AssumeRoleCommand; +var import_middleware_endpoint9, import_smithy_client34, AssumeRoleCommand; var init_AssumeRoleCommand = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js"() { - init_client2(); - init_endpoints(); + import_middleware_endpoint9 = __toESM(require_dist_cjs32()); + import_smithy_client34 = __toESM(require_dist_cjs34()); init_EndpointParameters4(); init_schemas_04(); - AssumeRoleCommand = class extends Command2.classBuilder().ep(commonParams4).m(function(Command3, cs, config, o2) { - return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())]; + AssumeRoleCommand = class extends import_smithy_client34.Command.classBuilder().ep(commonParams4).m(function(Command, cs, config, o2) { + return [(0, import_middleware_endpoint9.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(AssumeRole$).build() { }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js -var AssumeRoleWithWebIdentityCommand; +var import_middleware_endpoint10, import_smithy_client35, AssumeRoleWithWebIdentityCommand; var init_AssumeRoleWithWebIdentityCommand = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js"() { - init_client2(); - init_endpoints(); + import_middleware_endpoint10 = __toESM(require_dist_cjs32()); + import_smithy_client35 = __toESM(require_dist_cjs34()); init_EndpointParameters4(); init_schemas_04(); - AssumeRoleWithWebIdentityCommand = class extends Command2.classBuilder().ep(commonParams4).m(function(Command3, cs, config, o2) { - return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())]; + AssumeRoleWithWebIdentityCommand = class extends import_smithy_client35.Command.classBuilder().ep(commonParams4).m(function(Command, cs, config, o2) { + return [(0, import_middleware_endpoint10.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(AssumeRoleWithWebIdentity$).build() { }; } }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js -var commands4, STS; +var import_smithy_client36, commands4, STS; var init_STS = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js"() { - init_client2(); + import_smithy_client36 = __toESM(require_dist_cjs34()); init_AssumeRoleCommand(); init_AssumeRoleWithWebIdentityCommand(); init_STSClient(); @@ -44220,7 +44343,7 @@ var init_STS = __esm({ }; STS = class extends STSClient { }; - createAggregatedClient(commands4, STS); + (0, import_smithy_client36.createAggregatedClient)(commands4, STS); } }); @@ -44239,10 +44362,11 @@ var init_models_04 = __esm({ }); // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js -var getAccountIdFromAssumedRoleUser, resolveRegion, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity, isH2; +var import_region_config_resolver5, getAccountIdFromAssumedRoleUser, resolveRegion, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity, isH2; var init_defaultStsRoleAssumers = __esm({ "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js"() { - init_client3(); + init_client(); + import_region_config_resolver5 = __toESM(require_dist_cjs48()); init_AssumeRoleCommand(); init_AssumeRoleWithWebIdentityCommand(); getAccountIdFromAssumedRoleUser = (assumedRoleUser) => { @@ -44258,7 +44382,7 @@ var init_defaultStsRoleAssumers = __esm({ const region = typeof _region === "function" ? await _region() : _region; const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; let stsDefaultRegion = ""; - const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)()); + const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await (0, import_region_config_resolver5.stsRegionDefaultResolver)(loaderConfig)()); credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`); return resolvedRegion; }; @@ -44378,7 +44502,6 @@ var init_defaultRoleAssumers = __esm({ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/index.js var sts_exports = {}; __export(sts_exports, { - $Command: () => Command2, AssumeRole$: () => AssumeRole$, AssumeRoleCommand: () => AssumeRoleCommand, AssumeRoleRequest$: () => AssumeRoleRequest$, @@ -44410,7 +44533,7 @@ __export(sts_exports, { STSServiceException: () => STSServiceException, STSServiceException$: () => STSServiceException$, Tag$: () => Tag$, - __Client: () => Client, + __Client: () => import_smithy_client33.Client, decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider, errorTypeRegistries: () => errorTypeRegistries4, getDefaultRoleAssumer: () => getDefaultRoleAssumer2, @@ -44430,13 +44553,14 @@ var init_sts = __esm({ }); // node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js -var require_dist_cjs15 = __commonJS({ +var require_dist_cjs52 = __commonJS({ "node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2) { "use strict"; - var config = (init_config2(), __toCommonJS(config_exports)); + var sharedIniFileLoader = require_dist_cjs29(); + var propertyProvider = require_dist_cjs28(); var node_child_process = require("node:child_process"); var node_util = require("node:util"); - var client = (init_client3(), __toCommonJS(client_exports2)); + var client = (init_client(), __toCommonJS(client_exports)); var getValidatedProcessCredentials = (profileName, data3, profiles) => { if (data3.Version !== 1) { throw Error(`Profile ${profileName} credential_process did not return Version 1.`); @@ -44471,7 +44595,7 @@ var require_dist_cjs15 = __commonJS({ if (profiles[profileName]) { const credentialProcess = profile["credential_process"]; if (credentialProcess !== void 0) { - const execPromise = node_util.promisify(config.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec); + const execPromise = node_util.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec); try { const { stdout } = await execPromise(credentialProcess); let data3; @@ -44481,22 +44605,22 @@ var require_dist_cjs15 = __commonJS({ throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); } return getValidatedProcessCredentials(profileName, data3, profiles); - } catch (error3) { - throw new config.CredentialsProviderError(error3.message, { logger: logger2 }); + } catch (error2) { + throw new propertyProvider.CredentialsProviderError(error2.message, { logger: logger2 }); } } else { - throw new config.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger: logger2 }); + throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger: logger2 }); } } else { - throw new config.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, { + throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, { logger: logger2 }); } }; var fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => { init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess"); - const profiles = await config.parseKnownFiles(init); - return resolveProcessCredentials(config.getProfileName({ + const profiles = await sharedIniFileLoader.parseKnownFiles(init); + return resolveProcessCredentials(sharedIniFileLoader.getProfileName({ profile: init.profile ?? callerClientConfig?.profile }), profiles, init.logger); }; @@ -44508,6 +44632,43 @@ var require_dist_cjs15 = __commonJS({ var require_fromWebToken = __commonJS({ "node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.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.fromWebToken = void 0; var fromWebToken = (init) => async (awsIdentityProperties) => { @@ -44515,7 +44676,7 @@ var require_fromWebToken = __commonJS({ const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init; let { roleAssumerWithWebIdentity } = init; if (!roleAssumerWithWebIdentity) { - const { getDefaultRoleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity3 } = await Promise.resolve().then(() => (init_sts(), sts_exports)); + const { getDefaultRoleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity3 } = await Promise.resolve().then(() => __importStar2((init_sts(), __toCommonJS(sts_exports)))); roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity3({ ...init.clientConfig, credentialProviderLogger: init.logger, @@ -44545,8 +44706,9 @@ var require_fromTokenFile = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fromTokenFile = void 0; - var client_1 = (init_client3(), __toCommonJS(client_exports2)); - var config_1 = (init_config2(), __toCommonJS(config_exports)); + var client_1 = (init_client(), __toCommonJS(client_exports)); + var property_provider_1 = require_dist_cjs28(); + var shared_ini_file_loader_1 = require_dist_cjs29(); var node_fs_1 = require("node:fs"); var fromWebToken_1 = require_fromWebToken(); var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; @@ -44558,13 +44720,13 @@ var require_fromTokenFile = __commonJS({ const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN]; const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME]; if (!webIdentityTokenFile || !roleArn) { - throw new config_1.CredentialsProviderError("Web identity configuration not specified", { + throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified", { logger: init.logger }); } const credentials = await (0, fromWebToken_1.fromWebToken)({ ...init, - webIdentityToken: config_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), + webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), roleArn, roleSessionName })(awsIdentityProperties); @@ -44578,7 +44740,7 @@ var require_fromTokenFile = __commonJS({ }); // node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js -var require_dist_cjs16 = __commonJS({ +var require_dist_cjs53 = __commonJS({ "node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2) { "use strict"; var fromTokenFile = require_fromTokenFile(); @@ -44601,35 +44763,36 @@ var require_dist_cjs16 = __commonJS({ }); // node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js -var require_dist_cjs17 = __commonJS({ +var require_dist_cjs54 = __commonJS({ "node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2) { "use strict"; - var config = (init_config2(), __toCommonJS(config_exports)); - var client = (init_client3(), __toCommonJS(client_exports2)); - var credentialProviderLogin = require_dist_cjs14(); + var sharedIniFileLoader = require_dist_cjs29(); + var propertyProvider = require_dist_cjs28(); + var client = (init_client(), __toCommonJS(client_exports)); + var credentialProviderLogin = require_dist_cjs51(); var resolveCredentialSource = (credentialSource, profileName, logger2) => { const sourceProvidersMap = { EcsContainer: async (options) => { - const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs10())); - const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs8())); + const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs43())); + const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs42())); logger2?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"); - return async () => config.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider); + return async () => propertyProvider.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider); }, Ec2InstanceMetadata: async (options) => { logger2?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata"); - const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs8())); + const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs42())); return async () => fromInstanceMetadata(options)().then(setNamedProvider); }, Environment: async (options) => { logger2?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); - const { fromEnv: fromEnv2 } = await Promise.resolve().then(() => __toESM(require_dist_cjs7())); - return async () => fromEnv2(options)().then(setNamedProvider); + const { fromEnv } = await Promise.resolve().then(() => __toESM(require_dist_cjs41())); + return async () => fromEnv(options)().then(setNamedProvider); } }; if (credentialSource in sourceProvidersMap) { return sourceProvidersMap[credentialSource]; } else { - throw new config.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger: logger2 }); + throw new propertyProvider.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger: logger2 }); } }; var setNamedProvider = (creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"); @@ -44667,7 +44830,7 @@ var require_dist_cjs17 = __commonJS({ }, options.clientPlugins); } if (source_profile && source_profile in visitedProfiles) { - throw new config.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${config.getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger }); + throw new propertyProvider.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${sharedIniFileLoader.getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger }); } options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`); const sourceCredsProvider = source_profile ? resolveProfileData2(source_profile, profiles, options, callerClientConfig, { @@ -44686,7 +44849,7 @@ var require_dist_cjs17 = __commonJS({ const { mfa_serial } = profileData; if (mfa_serial) { if (!options.mfaCodeProvider) { - throw new config.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false }); + throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false }); } params.SerialNumber = mfa_serial; params.TokenCode = await options.mfaCodeProvider(mfa_serial); @@ -44709,12 +44872,12 @@ var require_dist_cjs17 = __commonJS({ return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC"); }; var isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string"; - var resolveProcessCredentials = async (options, profile) => Promise.resolve().then(() => __toESM(require_dist_cjs15())).then(({ fromProcess }) => fromProcess({ + var resolveProcessCredentials = async (options, profile) => Promise.resolve().then(() => __toESM(require_dist_cjs52())).then(({ fromProcess }) => fromProcess({ ...options, profile })().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v"))); var resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => { - const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs13())); + const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs50())); return fromSSO({ profile, logger: options.logger, @@ -44744,7 +44907,7 @@ var require_dist_cjs17 = __commonJS({ return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n"); }; var isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1; - var resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => Promise.resolve().then(() => __toESM(require_dist_cjs16())).then(({ fromTokenFile }) => fromTokenFile({ + var resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => Promise.resolve().then(() => __toESM(require_dist_cjs53())).then(({ fromTokenFile }) => fromTokenFile({ webIdentityTokenFile: profile.web_identity_token_file, roleArn: profile.role_arn, roleSessionName: profile.role_session_name, @@ -44777,12 +44940,12 @@ var require_dist_cjs17 = __commonJS({ if (isLoginProfile(data3)) { return resolveLoginCredentials(profileName, options, callerClientConfig); } - throw new config.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger }); + throw new propertyProvider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger }); }; var fromIni = (init = {}) => async ({ callerClientConfig } = {}) => { init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni"); - const profiles = await config.parseKnownFiles(init); - return resolveProfileData(config.getProfileName({ + const profiles = await sharedIniFileLoader.parseKnownFiles(init); + return resolveProfileData(sharedIniFileLoader.getProfileName({ profile: init.profile ?? callerClientConfig?.profile }), profiles, init, callerClientConfig); }; @@ -44791,35 +44954,36 @@ var require_dist_cjs17 = __commonJS({ }); // node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js -var require_dist_cjs18 = __commonJS({ +var require_dist_cjs55 = __commonJS({ "node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2) { "use strict"; - var credentialProviderEnv = require_dist_cjs7(); - var config = (init_config2(), __toCommonJS(config_exports)); - var ENV_IMDS_DISABLED2 = "AWS_EC2_METADATA_DISABLED"; + var credentialProviderEnv = require_dist_cjs41(); + var propertyProvider = require_dist_cjs28(); + var sharedIniFileLoader = require_dist_cjs29(); + var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; var remoteProvider = async (init) => { - const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs8())); + const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs42())); if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) { init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata"); - const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs10())); - return config.chain(fromHttp(init), fromContainerMetadata(init)); + const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs43())); + return propertyProvider.chain(fromHttp(init), fromContainerMetadata(init)); } - if (process.env[ENV_IMDS_DISABLED2] && process.env[ENV_IMDS_DISABLED2] !== "false") { + if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") { return async () => { - throw new config.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger }); + throw new propertyProvider.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger }); }; } init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"); return fromInstanceMetadata(init); }; function memoizeChain(providers, treatAsExpired) { - const chain2 = internalCreateChain(providers); + const chain = internalCreateChain(providers); let activeLock; let passiveLock; let credentials; const provider = async (options) => { if (options?.forceRefresh) { - return await chain2(options); + return await chain(options); } if (credentials?.expiration) { if (credentials?.expiration?.getTime() < Date.now()) { @@ -44831,14 +44995,14 @@ var require_dist_cjs18 = __commonJS({ } else if (!credentials || treatAsExpired?.(credentials)) { if (credentials) { if (!passiveLock) { - passiveLock = chain2(options).then((c5) => { + passiveLock = chain(options).then((c5) => { credentials = c5; }).finally(() => { passiveLock = void 0; }); } } else { - activeLock = chain2(options).then((c5) => { + activeLock = chain(options).then((c5) => { credentials = c5; }).finally(() => { activeLock = void 0; @@ -44868,7 +45032,7 @@ var require_dist_cjs18 = __commonJS({ var multipleCredentialSourceWarningEmitted = false; var defaultProvider = (init = {}) => memoizeChain([ async () => { - const profile = init.profile ?? process.env[config.ENV_PROFILE]; + const profile = init.profile ?? process.env[sharedIniFileLoader.ENV_PROFILE]; if (profile) { const envStaticCredentialsAreSet = process.env[credentialProviderEnv.ENV_KEY] && process.env[credentialProviderEnv.ENV_SECRET]; if (envStaticCredentialsAreSet) { @@ -44886,7 +45050,7 @@ var require_dist_cjs18 = __commonJS({ multipleCredentialSourceWarningEmitted = true; } } - throw new config.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", { + throw new propertyProvider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", { logger: init.logger, tryNextLink: true }); @@ -44898,24 +45062,24 @@ var require_dist_cjs18 = __commonJS({ init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO"); const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { - throw new config.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger }); + throw new propertyProvider.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger }); } - const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs13())); + const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs50())); return fromSSO(init)(awsIdentityProperties); }, async (awsIdentityProperties) => { init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni"); - const { fromIni } = await Promise.resolve().then(() => __toESM(require_dist_cjs17())); + const { fromIni } = await Promise.resolve().then(() => __toESM(require_dist_cjs54())); return fromIni(init)(awsIdentityProperties); }, async (awsIdentityProperties) => { init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess"); - const { fromProcess } = await Promise.resolve().then(() => __toESM(require_dist_cjs15())); + const { fromProcess } = await Promise.resolve().then(() => __toESM(require_dist_cjs52())); return fromProcess(init)(awsIdentityProperties); }, async (awsIdentityProperties) => { init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile"); - const { fromTokenFile } = await Promise.resolve().then(() => __toESM(require_dist_cjs16())); + const { fromTokenFile } = await Promise.resolve().then(() => __toESM(require_dist_cjs53())); return fromTokenFile(init)(awsIdentityProperties); }, async () => { @@ -44923,7 +45087,7 @@ var require_dist_cjs18 = __commonJS({ return (await remoteProvider(init))(); }, async () => { - throw new config.CredentialsProviderError("Could not load credentials from any providers", { + throw new propertyProvider.CredentialsProviderError("Could not load credentials from any providers", { tryNextLink: false, logger: init.logger }); @@ -44943,11 +45107,11 @@ var require_STSServiceException = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.STSServiceException = exports2.__ServiceException = void 0; - var client_1 = (init_client2(), __toCommonJS(client_exports)); + var smithy_client_1 = require_dist_cjs34(); Object.defineProperty(exports2, "__ServiceException", { enumerable: true, get: function() { - return client_1.ServiceException; + return smithy_client_1.ServiceException; } }); - var STSServiceException2 = class _STSServiceException extends client_1.ServiceException { + var STSServiceException2 = class _STSServiceException extends smithy_client_1.ServiceException { constructor(options) { super(options); Object.setPrototypeOf(this, _STSServiceException.prototype); @@ -45726,19 +45890,20 @@ var require_runtimeConfig_shared = __commonJS({ exports2.getRuntimeConfig = void 0; var httpAuthSchemes_1 = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports)); var protocols_1 = (init_protocols2(), __toCommonJS(protocols_exports2)); - var signature_v4_multi_region_1 = require_dist_cjs6(); + var signature_v4_multi_region_1 = require_dist_cjs40(); var core_1 = (init_dist_es(), __toCommonJS(dist_es_exports)); - var client_1 = (init_client2(), __toCommonJS(client_exports)); - var protocols_2 = (init_protocols(), __toCommonJS(protocols_exports)); - var serde_1 = (init_serde(), __toCommonJS(serde_exports)); + var smithy_client_1 = require_dist_cjs34(); + var url_parser_1 = require_dist_cjs18(); + var util_base64_1 = require_dist_cjs10(); + var util_utf8_1 = require_dist_cjs9(); var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider(); var endpointResolver_1 = require_endpointResolver(); var schemas_0_1 = require_schemas_0(); var getRuntimeConfig9 = (config) => { return { apiVersion: "2011-06-15", - base64Decoder: config?.base64Decoder ?? serde_1.fromBase64, - base64Encoder: config?.base64Encoder ?? serde_1.toBase64, + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, extensions: config?.extensions ?? [], @@ -45760,7 +45925,7 @@ var require_runtimeConfig_shared = __commonJS({ signer: new core_1.NoAuthSigner() } ], - logger: config?.logger ?? new client_1.NoOpLogger(), + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), protocol: config?.protocol ?? protocols_1.AwsQueryProtocol, protocolSettings: config?.protocolSettings ?? { defaultNamespace: "com.amazonaws.sts", @@ -45771,9 +45936,9 @@ var require_runtimeConfig_shared = __commonJS({ }, serviceId: config?.serviceId ?? "STS", signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion, - urlParser: config?.urlParser ?? protocols_2.parseUrl, - utf8Decoder: config?.utf8Decoder ?? serde_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? serde_1.toUtf8 + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 }; }; exports2.getRuntimeConfig = getRuntimeConfig9; @@ -45788,20 +45953,25 @@ var require_runtimeConfig = __commonJS({ exports2.getRuntimeConfig = void 0; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var package_json_1 = tslib_1.__importDefault(require_package()); - var client_1 = (init_client3(), __toCommonJS(client_exports2)); + var client_1 = (init_client(), __toCommonJS(client_exports)); var httpAuthSchemes_1 = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports)); - var credential_provider_node_1 = require_dist_cjs18(); + var credential_provider_node_1 = require_dist_cjs55(); + var util_user_agent_node_1 = require_dist_cjs44(); + var config_resolver_1 = require_dist_cjs26(); var core_1 = (init_dist_es(), __toCommonJS(dist_es_exports)); - var client_2 = (init_client2(), __toCommonJS(client_exports)); - var config_1 = (init_config2(), __toCommonJS(config_exports)); - var retry_1 = (init_retry2(), __toCommonJS(retry_exports)); - var serde_1 = (init_serde(), __toCommonJS(serde_exports)); - var node_http_handler_1 = require_dist_cjs9(); + var hash_node_1 = require_dist_cjs45(); + var middleware_retry_1 = require_dist_cjs35(); + var node_config_provider_1 = require_dist_cjs30(); + var node_http_handler_1 = require_dist_cjs13(); + var smithy_client_1 = require_dist_cjs34(); + var util_body_length_node_1 = require_dist_cjs46(); + var util_defaults_mode_node_1 = require_dist_cjs47(); + var util_retry_1 = require_dist_cjs23(); var runtimeConfig_shared_1 = require_runtimeConfig_shared(); var getRuntimeConfig9 = (config) => { - (0, client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode); + (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); (0, client_1.emitWarningIfUnsupportedVersion)(process.version); const loaderConfig = { @@ -45813,10 +45983,10 @@ var require_runtimeConfig = __commonJS({ ...config, runtime: "node", defaultsMode, - authSchemePreference: config?.authSchemePreference ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), - bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength, + authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), httpAuthSchemes: config?.httpAuthSchemes ?? [ { schemeId: "aws.auth#sigv4", @@ -45834,61 +46004,35 @@ var require_runtimeConfig = __commonJS({ signer: new core_1.NoAuthSigner() } ], - maxAttempts: config?.maxAttempts ?? (0, config_1.loadConfig)(retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? (0, config_1.loadConfig)(config_1.NODE_REGION_CONFIG_OPTIONS, { ...config_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? (0, config_1.loadConfig)({ - ...retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE + retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE }, config), - sha256: config?.sha256 ?? serde_1.Hash.bind(null, "sha256"), - sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, node_config_provider_1.loadConfig)(httpAuthSchemes_1.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig), streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - userAgentAppId: config?.userAgentAppId ?? (0, config_1.loadConfig)(client_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) }; }; exports2.getRuntimeConfig = getRuntimeConfig9; } }); -// node_modules/@aws-sdk/client-sts/dist-cjs/index.js -var require_dist_cjs19 = __commonJS({ - "node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2) { +// node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js +var require_httpAuthExtensionConfiguration = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js"(exports2) { "use strict"; - var client$1 = (init_client3(), __toCommonJS(client_exports2)); - 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)); - var protocols2 = (init_protocols(), __toCommonJS(protocols_exports)); - var retry = (init_retry2(), __toCommonJS(retry_exports)); - var schema = (init_schema(), __toCommonJS(schema_exports)); - var httpAuthSchemeProvider = require_httpAuthSchemeProvider(); - var runtimeConfig = require_runtimeConfig(); - var schemas_0 = require_schemas_0(); - var errors = require_errors2(); - var STSServiceException2 = require_STSServiceException(); - var resolveClientEndpointParameters5 = (options) => { - return Object.assign(options, { - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - useGlobalEndpoint: options.useGlobalEndpoint ?? false, - defaultSigningName: "sts" - }); - }; - var commonParams5 = { - UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } - }; - var getHttpAuthExtensionConfiguration5 = (runtimeConfig2) => { - const _httpAuthSchemes = runtimeConfig2.httpAuthSchemes; - let _httpAuthSchemeProvider = runtimeConfig2.httpAuthSchemeProvider; - let _credentials = runtimeConfig2.credentials; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthRuntimeConfig = exports2.getHttpAuthExtensionConfiguration = void 0; + var getHttpAuthExtensionConfiguration5 = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; return { setHttpAuthScheme(httpAuthScheme) { const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); @@ -45901,8 +46045,8 @@ var require_dist_cjs19 = __commonJS({ httpAuthSchemes() { return _httpAuthSchemes; }, - setHttpAuthSchemeProvider(httpAuthSchemeProvider2) { - _httpAuthSchemeProvider = httpAuthSchemeProvider2; + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; }, httpAuthSchemeProvider() { return _httpAuthSchemeProvider; @@ -45915,95 +46059,155 @@ var require_dist_cjs19 = __commonJS({ } }; }; - var resolveHttpAuthRuntimeConfig5 = (config2) => { + exports2.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration5; + var resolveHttpAuthRuntimeConfig5 = (config) => { return { - httpAuthSchemes: config2.httpAuthSchemes(), - httpAuthSchemeProvider: config2.httpAuthSchemeProvider(), - credentials: config2.credentials() + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() }; }; - var resolveRuntimeExtensions5 = (runtimeConfig2, extensions) => { - const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig2), client.getDefaultExtensionConfiguration(runtimeConfig2), protocols2.getHttpHandlerExtensionConfiguration(runtimeConfig2), getHttpAuthExtensionConfiguration5(runtimeConfig2)); + exports2.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig5; + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js +var require_runtimeExtensions = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveRuntimeExtensions = void 0; + var region_config_resolver_1 = require_dist_cjs48(); + var protocol_http_1 = require_dist_cjs2(); + var smithy_client_1 = require_dist_cjs34(); + var httpAuthExtensionConfiguration_1 = require_httpAuthExtensionConfiguration(); + var resolveRuntimeExtensions5 = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)); extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return Object.assign(runtimeConfig2, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols2.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig5(extensionConfiguration)); + return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration)); }; - var STSClient3 = class extends client.Client { + exports2.resolveRuntimeExtensions = resolveRuntimeExtensions5; + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +var require_STSClient = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.STSClient = exports2.__Client = void 0; + var middleware_host_header_1 = require_dist_cjs3(); + var middleware_logger_1 = require_dist_cjs4(); + var middleware_recursion_detection_1 = require_dist_cjs5(); + var middleware_user_agent_1 = require_dist_cjs24(); + var config_resolver_1 = require_dist_cjs26(); + var core_1 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var schema_1 = (init_schema(), __toCommonJS(schema_exports)); + var middleware_content_length_1 = require_dist_cjs27(); + var middleware_endpoint_1 = require_dist_cjs32(); + var middleware_retry_1 = require_dist_cjs35(); + var smithy_client_1 = require_dist_cjs34(); + Object.defineProperty(exports2, "__Client", { enumerable: true, get: function() { + return smithy_client_1.Client; + } }); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider(); + var EndpointParameters_1 = require_EndpointParameters(); + var runtimeConfig_1 = require_runtimeConfig(); + var runtimeExtensions_1 = require_runtimeExtensions(); + var STSClient3 = class extends smithy_client_1.Client { config; constructor(...[configuration]) { - const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {}); + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); super(_config_0); this.initConfig = _config_0; - const _config_1 = resolveClientEndpointParameters5(_config_0); - const _config_2 = client$1.resolveUserAgentConfig(_config_1); - const _config_3 = retry.resolveRetryConfig(_config_2); - const _config_4 = config.resolveRegionConfig(_config_3); - const _config_5 = client$1.resolveHostHeaderConfig(_config_4); - const _config_6 = endpoints.resolveEndpointConfig(_config_5); - const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6); - const _config_8 = resolveRuntimeExtensions5(_config_7, configuration?.extensions || []); + const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); + const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2); + const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3); + const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5); + const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); this.config = _config_8; - this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config)); - this.middlewareStack.use(client$1.getUserAgentPlugin(this.config)); - this.middlewareStack.use(retry.getRetryPlugin(this.config)); - this.middlewareStack.use(protocols2.getContentLengthPlugin(this.config)); - 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(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { - httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSTSHttpAuthSchemeParametersProvider, - identityProviderConfigProvider: async (config2) => new core.DefaultIdentityProviderConfig({ - "aws.auth#sigv4": config2.credentials, - "aws.auth#sigv4a": config2.credentials + this.middlewareStack.use((0, schema_1.getSchemaSerdePlugin)(this.config)); + this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + "aws.auth#sigv4a": config.credentials }) })); - this.middlewareStack.use(core.getHttpSigningPlugin(this.config)); + this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config)); } destroy() { super.destroy(); } }; - var AssumeRoleCommand3 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; + exports2.STSClient = STSClient3; + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/index.js +var require_dist_cjs56 = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2) { + "use strict"; + var STSClient3 = require_STSClient(); + var smithyClient = require_dist_cjs34(); + var middlewareEndpoint = require_dist_cjs32(); + var EndpointParameters = require_EndpointParameters(); + var schemas_0 = require_schemas_0(); + var errors = require_errors2(); + var client = (init_client(), __toCommonJS(client_exports)); + var regionConfigResolver = require_dist_cjs48(); + var STSServiceException2 = require_STSServiceException(); + var AssumeRoleCommand3 = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o2) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(schemas_0.AssumeRole$).build() { }; - var AssumeRoleWithSAMLCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; + var AssumeRoleWithSAMLCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o2) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {}).n("STSClient", "AssumeRoleWithSAMLCommand").sc(schemas_0.AssumeRoleWithSAML$).build() { }; - var AssumeRoleWithWebIdentityCommand3 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; + var AssumeRoleWithWebIdentityCommand3 = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o2) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(schemas_0.AssumeRoleWithWebIdentity$).build() { }; - var AssumeRootCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; + var AssumeRootCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o2) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "AssumeRoot", {}).n("STSClient", "AssumeRootCommand").sc(schemas_0.AssumeRoot$).build() { }; - var DecodeAuthorizationMessageCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; + var DecodeAuthorizationMessageCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o2) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {}).n("STSClient", "DecodeAuthorizationMessageCommand").sc(schemas_0.DecodeAuthorizationMessage$).build() { }; - var GetAccessKeyInfoCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; + var GetAccessKeyInfoCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o2) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {}).n("STSClient", "GetAccessKeyInfoCommand").sc(schemas_0.GetAccessKeyInfo$).build() { }; - var GetCallerIdentityCommand2 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; + var GetCallerIdentityCommand2 = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o2) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {}).n("STSClient", "GetCallerIdentityCommand").sc(schemas_0.GetCallerIdentity$).build() { }; - var GetDelegatedAccessTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; + var GetDelegatedAccessTokenCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o2) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetDelegatedAccessToken", {}).n("STSClient", "GetDelegatedAccessTokenCommand").sc(schemas_0.GetDelegatedAccessToken$).build() { }; - var GetFederationTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; + var GetFederationTokenCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o2) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {}).n("STSClient", "GetFederationTokenCommand").sc(schemas_0.GetFederationToken$).build() { }; - var GetSessionTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; + var GetSessionTokenCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o2) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {}).n("STSClient", "GetSessionTokenCommand").sc(schemas_0.GetSessionToken$).build() { }; - var GetWebIdentityTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) { - return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())]; + var GetWebIdentityTokenCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o2) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; }).s("AWSSecurityTokenServiceV20110615", "GetWebIdentityToken", {}).n("STSClient", "GetWebIdentityTokenCommand").sc(schemas_0.GetWebIdentityToken$).build() { }; var commands5 = { @@ -46019,9 +46223,9 @@ var require_dist_cjs19 = __commonJS({ GetSessionTokenCommand, GetWebIdentityTokenCommand }; - var STS2 = class extends STSClient3 { + var STS2 = class extends STSClient3.STSClient { }; - client.createAggregatedClient(commands5, STS2); + smithyClient.createAggregatedClient(commands5, STS2); var getAccountIdFromAssumedRoleUser2 = (assumedRoleUser) => { if (typeof assumedRoleUser?.Arn === "string") { const arnComponents = assumedRoleUser.Arn.split(":"); @@ -46035,7 +46239,7 @@ var require_dist_cjs19 = __commonJS({ const region = typeof _region === "function" ? await _region() : _region; const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; let stsDefaultRegion = ""; - const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await client$1.stsRegionDefaultResolver(loaderConfig)()); + const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)()); credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`); return resolvedRegion; }; @@ -46074,7 +46278,7 @@ var require_dist_cjs19 = __commonJS({ ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }, ...accountId && { accountId } }; - client$1.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i"); + client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i"); return credentials; }; }; @@ -46111,9 +46315,9 @@ var require_dist_cjs19 = __commonJS({ ...accountId && { accountId } }; if (accountId) { - client$1.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T"); + client.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T"); } - client$1.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k"); + client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k"); return credentials; }; }; @@ -46125,23 +46329,22 @@ var require_dist_cjs19 = __commonJS({ return baseCtor; else return class CustomizableSTSClient extends baseCtor { - constructor(config2) { - super(config2); + constructor(config) { + super(config); for (const customization of customizations) { this.middlewareStack.use(customization); } } }; }; - var getDefaultRoleAssumer3 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor2(STSClient3, stsPlugins)); - var getDefaultRoleAssumerWithWebIdentity3 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor2(STSClient3, stsPlugins)); + var getDefaultRoleAssumer3 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor2(STSClient3.STSClient, stsPlugins)); + var getDefaultRoleAssumerWithWebIdentity3 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor2(STSClient3.STSClient, stsPlugins)); var decorateDefaultCredentialProvider2 = (provider) => (input) => provider({ roleAssumer: getDefaultRoleAssumer3(input), roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity3(input), ...input }); - exports2.$Command = client.Command; - exports2.__Client = client.Client; + exports2.$Command = smithyClient.Command; exports2.STSServiceException = STSServiceException2.STSServiceException; exports2.AssumeRoleCommand = AssumeRoleCommand3; exports2.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand; @@ -46155,10 +46358,16 @@ var require_dist_cjs19 = __commonJS({ exports2.GetSessionTokenCommand = GetSessionTokenCommand; exports2.GetWebIdentityTokenCommand = GetWebIdentityTokenCommand; exports2.STS = STS2; - exports2.STSClient = STSClient3; exports2.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider2; exports2.getDefaultRoleAssumer = getDefaultRoleAssumer3; exports2.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity3; + Object.prototype.hasOwnProperty.call(STSClient3, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { + enumerable: true, + value: STSClient3["__proto__"] + }); + Object.keys(STSClient3).forEach(function(k5) { + if (k5 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k5)) exports2[k5] = STSClient3[k5]; + }); Object.prototype.hasOwnProperty.call(schemas_0, "__proto__") && !Object.prototype.hasOwnProperty.call(exports2, "__proto__") && Object.defineProperty(exports2, "__proto__", { enumerable: true, value: schemas_0["__proto__"] @@ -46183,15 +46392,15 @@ var init_helpers = __esm({ }); // node_modules/proxy-agent/node_modules/agent-base/dist/index.js -var net, http2, import_https, INTERNAL, Agent4; +var net, http, import_https, INTERNAL, Agent2; var init_dist = __esm({ "node_modules/proxy-agent/node_modules/agent-base/dist/index.js"() { net = __toESM(require("net"), 1); - http2 = __toESM(require("http"), 1); + http = __toESM(require("http"), 1); import_https = require("https"); init_helpers(); INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); - Agent4 = class extends http2.Agent { + Agent2 = class extends http.Agent { constructor(opts) { super(opts); this[INTERNAL] = {}; @@ -46424,7 +46633,7 @@ var require_ms = __commonJS({ // node_modules/debug/src/common.js var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { - function setup(env2) { + function setup(env) { createDebug16.debug = createDebug16; createDebug16.default = createDebug16; createDebug16.coerce = coerce; @@ -46433,8 +46642,8 @@ var require_common = __commonJS({ createDebug16.enabled = enabled; createDebug16.humanize = require_ms(); createDebug16.destroy = destroy; - Object.keys(env2).forEach((key) => { - createDebug16[key] = env2[key]; + Object.keys(env).forEach((key) => { + createDebug16[key] = env[key]; }); createDebug16.names = []; createDebug16.skips = []; @@ -46453,11 +46662,11 @@ var require_common = __commonJS({ let enableOverride = null; let namespacesCache; let enabledCache; - function debug17(...args) { - if (!debug17.enabled) { + function debug19(...args) { + if (!debug19.enabled) { return; } - const self = debug17; + const self = debug19; const curr = Number(/* @__PURE__ */ new Date()); const ms = curr - (prevTime || curr); self.diff = ms; @@ -46487,12 +46696,12 @@ var require_common = __commonJS({ const logFn = self.log || createDebug16.log; logFn.apply(self, args); } - debug17.namespace = namespace; - debug17.useColors = createDebug16.useColors(); - debug17.color = createDebug16.selectColor(namespace); - debug17.extend = extend; - debug17.destroy = createDebug16.destroy; - Object.defineProperty(debug17, "enabled", { + debug19.namespace = namespace; + debug19.useColors = createDebug16.useColors(); + debug19.color = createDebug16.selectColor(namespace); + debug19.extend = extend; + debug19.destroy = createDebug16.destroy; + Object.defineProperty(debug19, "enabled", { enumerable: true, configurable: false, get: () => { @@ -46510,9 +46719,9 @@ var require_common = __commonJS({ } }); if (typeof createDebug16.init === "function") { - createDebug16.init(debug17); + createDebug16.init(debug19); } - return debug17; + return debug19; } function extend(namespace, delimiter) { const newDebug = createDebug16(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); @@ -46524,8 +46733,8 @@ var require_common = __commonJS({ createDebug16.namespaces = namespaces; createDebug16.names = []; createDebug16.skips = []; - const split2 = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean); - for (const ns of split2) { + const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean); + for (const ns of split) { if (ns[0] === "-") { createDebug16.skips.push(ns.slice(1)); } else { @@ -46736,14 +46945,14 @@ var require_browser = __commonJS({ } else { exports2.storage.removeItem("debug"); } - } catch (error3) { + } catch (error2) { } } function load() { let r5; try { r5 = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG"); - } catch (error3) { + } catch (error2) { } if (!r5 && typeof process !== "undefined" && "env" in process) { r5 = process.env.DEBUG; @@ -46753,7 +46962,7 @@ var require_browser = __commonJS({ function localstorage() { try { return localStorage; - } catch (error3) { + } catch (error2) { } } module2.exports = require_common()(exports2); @@ -46761,8 +46970,8 @@ var require_browser = __commonJS({ formatters.j = function(v) { try { return JSON.stringify(v); - } catch (error3) { - return "[UnexpectedJSONParseError]: " + error3.message; + } catch (error2) { + return "[UnexpectedJSONParseError]: " + error2.message; } }; } @@ -46785,23 +46994,23 @@ var require_has_flag = __commonJS({ var require_supports_color = __commonJS({ "node_modules/supports-color/index.js"(exports2, module2) { "use strict"; - var os7 = require("os"); + var os3 = require("os"); var tty = require("tty"); var hasFlag = require_has_flag(); - var { env: env2 } = process; + var { env } = process; var forceColor; if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { forceColor = 0; } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { forceColor = 1; } - if ("FORCE_COLOR" in env2) { - if (env2.FORCE_COLOR === "true") { + if ("FORCE_COLOR" in env) { + if (env.FORCE_COLOR === "true") { forceColor = 1; - } else if (env2.FORCE_COLOR === "false") { + } else if (env.FORCE_COLOR === "false") { forceColor = 0; } else { - forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3); + forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); } } function translateLevel(level) { @@ -46829,44 +47038,44 @@ var require_supports_color = __commonJS({ return 0; } const min = forceColor || 0; - if (env2.TERM === "dumb") { + if (env.TERM === "dumb") { return min; } if (process.platform === "win32") { - const osRelease = os7.release().split("."); + const osRelease = os3.release().split("."); if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } return 1; } - if ("CI" in env2) { - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") { + if ("CI" in env) { + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { return 1; } return min; } - if ("TEAMCITY_VERSION" in env2) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0; + if ("TEAMCITY_VERSION" in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; } - if (env2.COLORTERM === "truecolor") { + if (env.COLORTERM === "truecolor") { return 3; } - if ("TERM_PROGRAM" in env2) { - const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10); - switch (env2.TERM_PROGRAM) { + if ("TERM_PROGRAM" in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env.TERM_PROGRAM) { case "iTerm.app": return version >= 3 ? 3 : 2; case "Apple_Terminal": return 2; } } - if (/-256(color)?$/i.test(env2.TERM)) { + if (/-256(color)?$/i.test(env.TERM)) { return 2; } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) { + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { return 1; } - if ("COLORTERM" in env2) { + if ("COLORTERM" in env) { return 1; } return min; @@ -46982,7 +47191,7 @@ var require_node = __commonJS({ 221 ]; } - } catch (error3) { + } catch (error2) { } exports2.inspectOpts = Object.keys(process.env).filter((key) => { return /^debug_/i.test(key); @@ -47037,11 +47246,11 @@ var require_node = __commonJS({ function load() { return process.env.DEBUG; } - function init(debug17) { - debug17.inspectOpts = {}; + function init(debug19) { + debug19.inspectOpts = {}; const keys = Object.keys(exports2.inspectOpts); for (let i5 = 0; i5 < keys.length; i5++) { - debug17.inspectOpts[keys[i5]] = exports2.inspectOpts[keys[i5]]; + debug19.inspectOpts[keys[i5]] = exports2.inspectOpts[keys[i5]]; } } module2.exports = require_common()(exports2); @@ -47083,22 +47292,22 @@ function omit(obj, ...keys) { } return ret; } -var net2, tls, import_debug5, import_events, import_url, debug2, HttpProxyAgent; +var net2, tls, import_debug, import_events, import_url, debug3, HttpProxyAgent; var init_dist2 = __esm({ "node_modules/proxy-agent/node_modules/http-proxy-agent/dist/index.js"() { net2 = __toESM(require("net"), 1); tls = __toESM(require("tls"), 1); - import_debug5 = __toESM(require_src(), 1); + import_debug = __toESM(require_src(), 1); import_events = require("events"); init_dist(); import_url = require("url"); - debug2 = (0, import_debug5.default)("http-proxy-agent"); - HttpProxyAgent = class extends Agent4 { + debug3 = (0, import_debug.default)("http-proxy-agent"); + HttpProxyAgent = class extends Agent2 { constructor(proxy, opts) { super(opts); this.proxy = typeof proxy === "string" ? new import_url.URL(proxy) : proxy; this.proxyHeaders = opts?.headers ?? {}; - debug2("Creating new HttpProxyAgent instance: %o", this.proxy.href); + debug3("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 = { @@ -47144,21 +47353,21 @@ var init_dist2 = __esm({ } let first; let endOfHeaders; - debug2("Regenerating stored HTTP header string for request"); + debug3("Regenerating stored HTTP header string for request"); req._implicitHeader(); if (req.outputData && req.outputData.length > 0) { - debug2("Patching connection write() output buffer with updated header"); + debug3("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); - debug2("Output buffer: %o", req.outputData[0].data); + debug3("Output buffer: %o", req.outputData[0].data); } let socket; if (this.proxy.protocol === "https:") { - debug2("Creating `tls.Socket`: %o", this.connectOpts); + debug3("Creating `tls.Socket`: %o", this.connectOpts); socket = tls.connect(this.connectOpts); } else { - debug2("Creating `net.Socket`: %o", this.connectOpts); + debug3("Creating `net.Socket`: %o", this.connectOpts); socket = net2.connect(this.connectOpts); } await (0, import_events.once)(socket, "connect"); @@ -47188,12 +47397,12 @@ function parseProxyResponse(socket) { } function onend() { cleanup(); - debug3("onend"); + debug4("onend"); reject(new Error("Proxy connection ended before receiving CONNECT response")); } function onerror(err) { cleanup(); - debug3("onerror %o", err); + debug4("onerror %o", err); reject(err); } function ondata(b6) { @@ -47202,7 +47411,7 @@ function parseProxyResponse(socket) { const buffered = Buffer.concat(buffers, buffersLength); const endOfHeaders = buffered.indexOf("\r\n\r\n"); if (endOfHeaders === -1) { - debug3("have not received end of HTTP headers yet..."); + debug4("have not received end of HTTP headers yet..."); read(); return; } @@ -47235,7 +47444,7 @@ function parseProxyResponse(socket) { headers[key] = value; } } - debug3("got proxy server response: %o %o", firstLine, headers); + debug4("got proxy server response: %o %o", firstLine, headers); cleanup(); resolve({ connect: { @@ -47251,11 +47460,11 @@ function parseProxyResponse(socket) { read(); }); } -var import_debug6, debug3; +var import_debug2, debug4; 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); - debug3 = (0, import_debug6.default)("https-proxy-agent:parse-proxy-response"); + import_debug2 = __toESM(require_src(), 1); + debug4 = (0, import_debug2.default)("https-proxy-agent:parse-proxy-response"); } }); @@ -47277,17 +47486,17 @@ function omit2(obj, ...keys) { } return ret; } -var net3, tls2, import_assert, import_debug7, import_url2, debug4, setServernameFromNonIpHost, HttpsProxyAgent; +var net3, tls2, import_assert, import_debug3, import_url2, debug5, setServernameFromNonIpHost, HttpsProxyAgent; var init_dist3 = __esm({ "node_modules/proxy-agent/node_modules/https-proxy-agent/dist/index.js"() { net3 = __toESM(require("net"), 1); tls2 = __toESM(require("tls"), 1); import_assert = __toESM(require("assert"), 1); - import_debug7 = __toESM(require_src(), 1); + import_debug3 = __toESM(require_src(), 1); init_dist(); import_url2 = require("url"); init_parse_proxy_response(); - debug4 = (0, import_debug7.default)("https-proxy-agent"); + debug5 = (0, import_debug3.default)("https-proxy-agent"); setServernameFromNonIpHost = (options) => { if (options.servername === void 0 && options.host && !net3.isIP(options.host)) { return { @@ -47297,13 +47506,13 @@ var init_dist3 = __esm({ } return options; }; - HttpsProxyAgent = class extends Agent4 { + HttpsProxyAgent = class extends Agent2 { 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 ?? {}; - debug4("Creating new HttpsProxyAgent instance: %o", this.proxy.href); + debug5("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 = { @@ -47325,10 +47534,10 @@ var init_dist3 = __esm({ } let socket; if (proxy.protocol === "https:") { - debug4("Creating `tls.Socket`: %o", this.connectOpts); + debug5("Creating `tls.Socket`: %o", this.connectOpts); socket = tls2.connect(setServernameFromNonIpHost(this.connectOpts)); } else { - debug4("Creating `net.Socket`: %o", this.connectOpts); + debug5("Creating `net.Socket`: %o", this.connectOpts); socket = net3.connect(this.connectOpts); } const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; @@ -47356,7 +47565,7 @@ var init_dist3 = __esm({ if (connect13.statusCode === 200) { req.once("socket", resume); if (opts.secureEndpoint) { - debug4("Upgrading socket connection to TLS"); + debug5("Upgrading socket connection to TLS"); return tls2.connect({ ...omit2(setServernameFromNonIpHost(opts), "host", "path", "port"), socket @@ -47368,7 +47577,7 @@ var init_dist3 = __esm({ const fakeSocket = new net3.Socket({ writable: false }); fakeSocket.readable = true; req.once("socket", (s) => { - debug4("Replaying proxy buffer for failed request"); + debug5("Replaying proxy buffer for failed request"); (0, import_assert.default)(s.listenerCount("data") > 0); s.push(buffered); s.push(null); @@ -47381,7 +47590,7 @@ var init_dist3 = __esm({ }); // node_modules/smart-buffer/build/utils.js -var require_utils2 = __commonJS({ +var require_utils3 = __commonJS({ "node_modules/smart-buffer/build/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -47454,7 +47663,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_utils2(); + var utils_1 = require_utils3(); var DEFAULT_SMARTBUFFER_SIZE = 4096; var DEFAULT_SMARTBUFFER_ENCODING = "utf8"; var SmartBuffer = class _SmartBuffer { @@ -48747,23 +48956,6 @@ var require_util9 = __commonJS({ } }); -// node_modules/ip-address/dist/address-error.js -var require_address_error = __commonJS({ - "node_modules/ip-address/dist/address-error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AddressError = void 0; - var AddressError = class extends Error { - constructor(message, parseMessage) { - super(message); - this.name = "AddressError"; - this.parseMessage = parseMessage; - } - }; - exports2.AddressError = AddressError; - } -}); - // node_modules/ip-address/dist/common.js var require_common2 = __commonJS({ "node_modules/ip-address/dist/common.js"(exports2) { @@ -48771,11 +48963,9 @@ var require_common2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isInSubnet = isInSubnet; exports2.isCorrect = isCorrect; - exports2.prefixLengthFromMask = prefixLengthFromMask; exports2.numberToPaddedHex = numberToPaddedHex; exports2.stringToPaddedHex = stringToPaddedHex; exports2.testBit = testBit; - var address_error_1 = require_address_error(); function isInSubnet(address) { if (this.subnetMask < address.subnetMask) { return false; @@ -48796,20 +48986,6 @@ var require_common2 = __commonJS({ return this.parsedSubnet === String(this.subnetMask); }; } - function prefixLengthFromMask(value, totalBits) { - const binary = value.toString(2).padStart(totalBits, "0"); - if (binary.length > totalBits) { - throw new address_error_1.AddressError("Invalid subnet mask."); - } - const firstZero = binary.indexOf("0"); - if (firstZero === -1) { - return totalBits; - } - if (binary.slice(firstZero).includes("1")) { - throw new address_error_1.AddressError("Invalid subnet mask."); - } - return firstZero; - } function numberToPaddedHex(number) { return number.toString(16).padStart(2, "0"); } @@ -48840,6 +49016,23 @@ var require_constants7 = __commonJS({ } }); +// node_modules/ip-address/dist/address-error.js +var require_address_error = __commonJS({ + "node_modules/ip-address/dist/address-error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AddressError = void 0; + var AddressError = class extends Error { + constructor(message, parseMessage) { + super(message); + this.name = "AddressError"; + this.parseMessage = parseMessage; + } + }; + exports2.AddressError = AddressError; + } +}); + // node_modules/ip-address/dist/ipv4.js var require_ipv4 = __commonJS({ "node_modules/ip-address/dist/ipv4.js"(exports2) { @@ -48874,40 +49067,32 @@ var require_ipv4 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Address4 = void 0; var common = __importStar2(require_common2()); - var constants3 = __importStar2(require_constants7()); + var constants = __importStar2(require_constants7()); var address_error_1 = require_address_error(); - var isCorrect4 = common.isCorrect(constants3.BITS); var Address4 = class _Address4 { constructor(address) { - this.groups = constants3.GROUPS; + this.groups = constants.GROUPS; this.parsedAddress = []; this.parsedSubnet = ""; this.subnet = "/32"; this.subnetMask = 32; this.v4 = true; - this.isCorrect = isCorrect4; + this.isCorrect = common.isCorrect(constants.BITS); this.isInSubnet = common.isInSubnet; this.address = address; - const subnet = constants3.RE_SUBNET_STRING.exec(address); + const subnet = constants.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 > constants3.BITS) { + if (this.subnetMask < 0 || this.subnetMask > constants.BITS) { throw new address_error_1.AddressError("Invalid subnet mask."); } - address = address.replace(constants3.RE_SUBNET_STRING, ""); + address = address.replace(constants.RE_SUBNET_STRING, ""); } this.addressMinusSuffix = address; this.parsedAddress = this.parse(address); } - /** - * Returns true if the given string is a valid IPv4 address (with optional - * CIDR subnet), false otherwise. Host bits in the subnet portion are - * allowed (e.g. `192.168.1.5/24` is valid); for strict network-address - * validation compare `correctForm()` to `startAddress().correctForm()`, - * or use `networkForm()`. - */ static isValid(address) { try { new _Address4(address); @@ -48916,122 +49101,56 @@ var require_ipv4 = __commonJS({ return false; } } - /** - * Parses an IPv4 address string into its four octet groups and stores the - * result on `this.parsedAddress`. Called automatically by the constructor; - * you typically don't need to call it directly. Throws `AddressError` if - * the input is not a valid IPv4 address. + /* + * Parses a v4 address */ parse(address) { const groups = address.split("."); - if (!address.match(constants3.RE_ADDRESS)) { + if (!address.match(constants.RE_ADDRESS)) { throw new address_error_1.AddressError("Invalid IPv4 address."); } return groups; } /** - * Returns the address in correct form: octets joined with `.` and any - * leading zeros stripped (e.g. `192.168.1.1`). For IPv4 this matches the - * canonical dotted-decimal representation. + * Returns the correct form of an address + * @memberof Address4 + * @instance + * @returns {String} */ correctForm() { return this.parsedAddress.map((part) => parseInt(part, 10)).join("."); } /** - * Construct an `Address4` from an address and a dotted-decimal subnet - * mask given as separate strings (e.g. as returned by Node's - * `os.networkInterfaces()`). Throws `AddressError` if the mask is - * non-contiguous (e.g. `255.0.255.0`). - * @example - * var address = Address4.fromAddressAndMask('192.168.1.1', '255.255.255.0'); - * address.subnetMask; // 24 - */ - static fromAddressAndMask(address, mask) { - const bits = common.prefixLengthFromMask(new _Address4(mask).bigInt(), constants3.BITS); - return new _Address4(`${address}/${bits}`); - } - /** - * Construct an `Address4` from an address and a Cisco-style wildcard mask - * given as separate strings (e.g. `0.0.0.255` for a `/24`). The wildcard - * mask is the bitwise inverse of the subnet mask. Throws `AddressError` - * if the mask is non-contiguous (e.g. `0.255.0.255`). - * @example - * var address = Address4.fromAddressAndWildcardMask('10.0.0.1', '0.0.0.255'); - * address.subnetMask; // 24 - */ - static fromAddressAndWildcardMask(address, wildcardMask) { - const wildcard = new _Address4(wildcardMask).bigInt(); - const allOnes = (BigInt(1) << BigInt(constants3.BITS)) - BigInt(1); - const mask = wildcard ^ allOnes; - const bits = common.prefixLengthFromMask(mask, constants3.BITS); - return new _Address4(`${address}/${bits}`); - } - /** - * Construct an `Address4` from a wildcard pattern with trailing `*` - * octets. The number of trailing wildcards determines the prefix - * length: each `*` represents 8 bits. - * - * Only trailing whole-octet wildcards are supported. Partial-octet - * wildcards (e.g. `192.168.0.1*`) and interior wildcards (e.g. - * `192.*.0.1`) throw `AddressError`. - * @example - * Address4.fromWildcard('192.168.0.*').subnet; // '/24' - * Address4.fromWildcard('192.168.*.*').subnet; // '/16' - * Address4.fromWildcard('*.*.*.*').subnet; // '/0' - */ - static fromWildcard(input) { - const groups = input.split("."); - if (groups.length !== constants3.GROUPS) { - throw new address_error_1.AddressError("Wildcard pattern must have 4 octets"); - } - let firstWildcard = -1; - for (let i5 = 0; i5 < groups.length; i5++) { - if (groups[i5] === "*") { - if (firstWildcard === -1) { - firstWildcard = i5; - } - } else if (firstWildcard !== -1) { - throw new address_error_1.AddressError("Wildcard `*` must only appear in trailing octets (e.g. `192.168.0.*`)"); - } - } - const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard; - const replaced = groups.map((g5) => g5 === "*" ? "0" : g5); - const subnetBits = constants3.BITS - trailing * 8; - return new _Address4(`${replaced.join(".")}/${subnetBits}`); - } - /** - * Converts a hex string to an IPv4 address object. Accepts 8 hex digits - * with optional `:` separators (e.g. `'7f000001'` or `'7f:00:00:01'`). - * Throws `AddressError` for any other length or for non-hex characters. + * Converts a hex string to an IPv4 address object + * @memberof Address4 + * @static * @param {string} hex - a hex string to convert * @returns {Address4} */ static fromHex(hex) { - const stripped = hex.replace(/:/g, ""); - if (!/^[0-9a-fA-F]{8}$/.test(stripped)) { - throw new address_error_1.AddressError("IPv4 hex must be exactly 8 hex digits"); - } + const padded = hex.replace(/:/g, "").padStart(8, "0"); const groups = []; - for (let i5 = 0; i5 < 8; i5 += 2) { - groups.push(parseInt(stripped.slice(i5, i5 + 2), 16)); + let i5; + for (i5 = 0; i5 < 8; i5 += 2) { + const h5 = padded.slice(i5, i5 + 2); + groups.push(parseInt(h5, 16)); } return new _Address4(groups.join(".")); } /** - * Converts an integer into a IPv4 address object. The integer must be a - * non-negative safe integer in the range `[0, 2**32 - 1]`; otherwise - * `AddressError` is thrown. + * Converts an integer into a IPv4 address object + * @memberof Address4 + * @static * @param {integer} integer - a number to convert * @returns {Address4} */ static fromInteger(integer) { - if (!Number.isInteger(integer) || integer < 0 || integer > 4294967295) { - throw new address_error_1.AddressError("IPv4 integer must be in the range 0 to 2**32 - 1"); - } - return _Address4.fromHex(integer.toString(16).padStart(8, "0")); + return _Address4.fromHex(integer.toString(16)); } /** * Return an address from in-addr.arpa form + * @memberof Address4 + * @static * @param {string} arpaFormAddress - an 'in-addr.arpa' form ipv4 address * @returns {Adress4} * @example @@ -49045,15 +49164,17 @@ var require_ipv4 = __commonJS({ } /** * Converts an IPv4 address object to a hex string + * @memberof Address4 + * @instance * @returns {String} */ toHex() { return this.parsedAddress.map((part) => common.stringToPaddedHex(part)).join(":"); } /** - * Converts an IPv4 address object to an array of bytes. - * - * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toArray())`. + * Converts an IPv4 address object to an array of bytes + * @memberof Address4 + * @instance * @returns {Array} */ toArray() { @@ -49061,18 +49182,22 @@ var require_ipv4 = __commonJS({ } /** * Converts an IPv4 address object to an IPv6 address group + * @memberof Address4 + * @instance * @returns {String} */ toGroup6() { const output = []; let i5; - for (i5 = 0; i5 < constants3.GROUPS; i5 += 2) { + for (i5 = 0; i5 < constants.GROUPS; i5 += 2) { output.push(`${common.stringToPaddedHex(this.parsedAddress[i5])}${common.stringToPaddedHex(this.parsedAddress[i5 + 1])}`); } return output.join(":"); } /** * Returns the address as a `bigint` + * @memberof Address4 + * @instance * @returns {bigint} */ bigInt() { @@ -49080,14 +49205,18 @@ var require_ipv4 = __commonJS({ } /** * Helper function getting start address. + * @memberof Address4 + * @instance * @returns {bigint} */ _startAddress() { - return BigInt(`0b${this.mask() + "0".repeat(constants3.BITS - this.subnetMask)}`); + return BigInt(`0b${this.mask() + "0".repeat(constants.BITS - this.subnetMask)}`); } /** * The first address in the range given by this address' subnet. * Often referred to as the Network Address. + * @memberof Address4 + * @instance * @returns {Address4} */ startAddress() { @@ -49096,6 +49225,8 @@ var require_ipv4 = __commonJS({ /** * The first host address in the range given by this address's subnet ie * the first address after the Network Address + * @memberof Address4 + * @instance * @returns {Address4} */ startAddressExclusive() { @@ -49104,14 +49235,18 @@ var require_ipv4 = __commonJS({ } /** * Helper function getting end address. + * @memberof Address4 + * @instance * @returns {bigint} */ _endAddress() { - return BigInt(`0b${this.mask() + "1".repeat(constants3.BITS - this.subnetMask)}`); + return BigInt(`0b${this.mask() + "1".repeat(constants.BITS - this.subnetMask)}`); } /** * The last address in the range given by this address' subnet * Often referred to as the Broadcast + * @memberof Address4 + * @instance * @returns {Address4} */ endAddress() { @@ -49120,6 +49255,8 @@ var require_ipv4 = __commonJS({ /** * The last host address in the range given by this address's subnet ie * the last address prior to the Broadcast Address + * @memberof Address4 + * @instance * @returns {Address4} */ endAddressExclusive() { @@ -49127,76 +49264,20 @@ var require_ipv4 = __commonJS({ return _Address4.fromBigInt(this._endAddress() - adjust); } /** - * The dotted-decimal form of the subnet mask, e.g. `255.255.240.0` for - * a `/20`. Returns an `Address4`; call `.correctForm()` for the string. - * @returns {Address4} - */ - subnetMaskAddress() { - return _Address4.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(constants3.BITS - this.subnetMask)}`)); - } - /** - * The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is - * the bitwise inverse of `subnetMaskAddress()`. Returns an `Address4`; - * call `.correctForm()` for the string. - * @returns {Address4} - */ - wildcardMask() { - return _Address4.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(constants3.BITS - this.subnetMask)}`)); - } - /** - * The network address in CIDR string form, e.g. `192.168.1.0/24` for - * `192.168.1.5/24`. For an address with no explicit subnet the prefix is - * `/32`, e.g. `networkForm()` on `192.168.1.5` returns `192.168.1.5/32`. - * @returns {string} - */ - networkForm() { - return `${this.startAddress().correctForm()}/${this.subnetMask}`; - } - /** - * Converts a BigInt to a v4 address object. The value must be in the - * range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown. + * Converts a BigInt to a v4 address object + * @memberof Address4 + * @static * @param {bigint} bigInt - a BigInt to convert * @returns {Address4} */ static fromBigInt(bigInt) { - if (bigInt < 0n || bigInt > 0xffffffffn) { - throw new address_error_1.AddressError("IPv4 BigInt must be in the range 0 to 2**32 - 1"); - } - return _Address4.fromHex(bigInt.toString(16).padStart(8, "0")); - } - /** - * Convert a byte array to an Address4 object. - * - * To convert from a Node.js `Buffer`, spread it: `Address4.fromByteArray([...buf])`. - * @param {Array} bytes - an array of 4 bytes (0-255) - * @returns {Address4} - */ - static fromByteArray(bytes) { - if (bytes.length !== 4) { - throw new address_error_1.AddressError("IPv4 addresses require exactly 4 bytes"); - } - for (let i5 = 0; i5 < bytes.length; i5++) { - if (!Number.isInteger(bytes[i5]) || bytes[i5] < 0 || bytes[i5] > 255) { - throw new address_error_1.AddressError("All bytes must be integers between 0 and 255"); - } - } - return this.fromUnsignedByteArray(bytes); - } - /** - * Convert an unsigned byte array to an Address4 object - * @param {Array} bytes - an array of 4 unsigned bytes (0-255) - * @returns {Address4} - */ - static fromUnsignedByteArray(bytes) { - if (bytes.length !== 4) { - throw new address_error_1.AddressError("IPv4 addresses require exactly 4 bytes"); - } - const address = bytes.join("."); - return new _Address4(address); + return _Address4.fromHex(bigInt.toString(16)); } /** * Returns the first n bits of the address, defaulting to the * subnet mask + * @memberof Address4 + * @instance * @returns {String} */ mask(mask) { @@ -49207,6 +49288,8 @@ var require_ipv4 = __commonJS({ } /** * Returns the bits in the given range as a base-2 string + * @memberof Address4 + * @instance * @returns {string} */ getBitsBase2(start, end) { @@ -49214,8 +49297,10 @@ var require_ipv4 = __commonJS({ } /** * Return the reversed ip6.arpa form of the address + * @memberof Address4 * @param {Object} options * @param {boolean} options.omitSuffix - omit the "in-addr.arpa" suffix + * @instance * @returns {String} */ reverseForm(options) { @@ -49230,62 +49315,21 @@ var require_ipv4 = __commonJS({ } /** * Returns true if the given address is a multicast address + * @memberof Address4 + * @instance * @returns {boolean} */ isMulticast() { - return this.isInSubnet(MULTICAST_V4); - } - /** - * Returns true if the address is in one of the [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private address ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`). - * @returns {boolean} - */ - isPrivate() { - return PRIVATE_V4.some((subnet) => this.isInSubnet(subnet)); - } - /** - * Returns true if the address is in the loopback range `127.0.0.0/8` ([RFC 1122](https://datatracker.ietf.org/doc/html/rfc1122)). - * @returns {boolean} - */ - isLoopback() { - return this.isInSubnet(LOOPBACK_V4); - } - /** - * Returns true if the address is in the link-local range `169.254.0.0/16` ([RFC 3927](https://datatracker.ietf.org/doc/html/rfc3927)). - * @returns {boolean} - */ - isLinkLocal() { - return this.isInSubnet(LINK_LOCAL_V4); - } - /** - * Returns true if the address is the unspecified address `0.0.0.0`. - * @returns {boolean} - */ - isUnspecified() { - return this.isInSubnet(UNSPECIFIED_V4); - } - /** - * Returns true if the address is the limited broadcast address `255.255.255.255` ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)). - * @returns {boolean} - */ - isBroadcast() { - return this.isInSubnet(BROADCAST_V4); - } - /** - * Returns true if the address is in the carrier-grade NAT range `100.64.0.0/10` ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)). - * @returns {boolean} - */ - isCGNAT() { - return this.isInSubnet(CGNAT_V4); + return this.isInSubnet(new _Address4("224.0.0.0/4")); } /** * Returns a zero-padded base-2 string representation of the address + * @memberof Address4 + * @instance * @returns {string} */ binaryZeroPad() { - if (this._binaryZeroPad === void 0) { - this._binaryZeroPad = this.bigInt().toString(2).padStart(constants3.BITS, "0"); - } - return this._binaryZeroPad; + return this.bigInt().toString(2).padStart(constants.BITS, "0"); } /** * Groups an IPv4 address for inclusion at the end of an IPv6 address @@ -49293,21 +49337,10 @@ var require_ipv4 = __commonJS({ */ groupForV6() { const segments = this.parsedAddress; - return this.address.replace(constants3.RE_ADDRESS, `${segments.slice(0, 2).join(".")}.${segments.slice(2, 4).join(".")}`); + return this.address.replace(constants.RE_ADDRESS, `${segments.slice(0, 2).join(".")}.${segments.slice(2, 4).join(".")}`); } }; exports2.Address4 = Address4; - var MULTICAST_V4 = new Address4("224.0.0.0/4"); - var PRIVATE_V4 = [ - new Address4("10.0.0.0/8"), - new Address4("172.16.0.0/12"), - new Address4("192.168.0.0/16") - ]; - var LOOPBACK_V4 = new Address4("127.0.0.0/8"); - var LINK_LOCAL_V4 = new Address4("169.254.0.0/16"); - var UNSPECIFIED_V4 = new Address4("0.0.0.0/32"); - var BROADCAST_V4 = new Address4("255.255.255.255/32"); - var CGNAT_V4 = new Address4("100.64.0.0/10"); } }); @@ -49351,12 +49384,7 @@ var require_constants8 = __commonJS({ "::/128": "Unspecified", "::1/128": "Loopback", "ff00::/8": "Multicast", - "fe80::/10": "Link-local unicast", - "fc00::/7": "Unique local", - "2002::/16": "6to4", - "2001:db8::/32": "Documentation", - "64:ff9b::/96": "NAT64 (well-known)", - "64:ff9b:1::/48": "NAT64 (local-use)" + "fe80::/10": "Link-local unicast" }; exports2.RE_BAD_CHARACTERS = /([^0-9a-f:/%])/gi; exports2.RE_BAD_ADDRESS = /([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi; @@ -49372,23 +49400,19 @@ var require_helpers = __commonJS({ "node_modules/ip-address/dist/v6/helpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.escapeHtml = escapeHtml; exports2.spanAllZeroes = spanAllZeroes; exports2.spanAll = spanAll; exports2.spanLeadingZeroes = spanLeadingZeroes; exports2.simpleGroup = simpleGroup; - function escapeHtml(s) { - return s.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); - } function spanAllZeroes(s) { - return escapeHtml(s).replace(/(0+)/g, '$1'); + return s.replace(/(0+)/g, '$1'); } function spanAll(s, offset = 0) { const letters = s.split(""); - return letters.map((n3, i5) => `${spanAllZeroes(n3)}`).join(""); + return letters.map((n3, i5) => `${spanAllZeroes(n3)}`).join(""); } - function spanLeadingZeroesSimple(group4) { - return escapeHtml(group4).replace(/^(0+)/, '$1'); + function spanLeadingZeroesSimple(group) { + return group.replace(/^(0+)/, '$1'); } function spanLeadingZeroes(address) { const groups = address.split(":"); @@ -49447,27 +49471,27 @@ var require_regular_expressions = __commonJS({ function groupPossibilities(possibilities) { return `(${possibilities.join("|")})`; } - function padGroup(group4) { - if (group4.length < 4) { - return `0{0,${4 - group4.length}}${group4}`; + function padGroup(group) { + if (group.length < 4) { + return `0{0,${4 - group.length}}${group}`; } - return group4; + return group; } exports2.ADDRESS_BOUNDARY = "[^A-Fa-f0-9:]"; function simpleRegularExpression(groups) { const zeroIndexes = []; - groups.forEach((group4, i5) => { - const groupInteger = parseInt(group4, 16); + groups.forEach((group, i5) => { + const groupInteger = parseInt(group, 16); if (groupInteger === 0) { zeroIndexes.push(i5); } }); - const possibilities = zeroIndexes.map((zeroIndex) => groups.map((group4, i5) => { + const possibilities = zeroIndexes.map((zeroIndex) => groups.map((group, i5) => { if (i5 === zeroIndex) { const elision = i5 === 0 || i5 === v6.GROUPS - 1 ? ":" : ""; - return groupPossibilities([padGroup(group4), elision]); + return groupPossibilities([padGroup(group), elision]); } - return padGroup(group4); + return padGroup(group); }).join(":")); possibilities.push(groups.map(padGroup).join(":")); return groupPossibilities(possibilities); @@ -49539,7 +49563,6 @@ var require_ipv6 = __commonJS({ var regular_expressions_1 = require_regular_expressions(); var address_error_1 = require_address_error(); var common_1 = require_common2(); - var isCorrect6 = common.isCorrect(constants6.BITS); function assert4(condition) { if (!condition) { throw new Error("Assertion failed."); @@ -49585,7 +49608,7 @@ var require_ipv6 = __commonJS({ this.v4 = false; this.zone = ""; this.isInSubnet = common.isInSubnet; - this.isCorrect = isCorrect6; + this.isCorrect = common.isCorrect(constants6.BITS); if (optionalGroups === void 0) { this.groups = constants6.GROUPS; } else { @@ -49612,13 +49635,6 @@ var require_ipv6 = __commonJS({ this.addressMinusSuffix = address; this.parsedAddress = this.parse(this.addressMinusSuffix); } - /** - * Returns true if the given string is a valid IPv6 address (with optional - * CIDR subnet and zone identifier), false otherwise. Host bits in the - * subnet portion are allowed (e.g. `2001:db8::1/32` is valid); for strict - * network-address validation compare `correctForm()` to - * `startAddress().correctForm()`, or use `networkForm()`. - */ static isValid(address) { try { new _Address6(address); @@ -49628,8 +49644,9 @@ var require_ipv6 = __commonJS({ } } /** - * Convert a BigInt to a v6 address object. The value must be in the - * range `[0, 2**128 - 1]`; otherwise `AddressError` is thrown. + * Convert a BigInt to a v6 address object + * @memberof Address6 + * @static * @param {bigint} bigInt - a BigInt to convert * @returns {Address6} * @example @@ -49638,21 +49655,19 @@ var require_ipv6 = __commonJS({ * address.correctForm(); // '::e8:d4a5:1000' */ static fromBigInt(bigInt) { - if (bigInt < 0n || bigInt > (1n << BigInt(constants6.BITS)) - 1n) { - throw new address_error_1.AddressError("IPv6 BigInt must be in the range 0 to 2**128 - 1"); - } const hex = bigInt.toString(16).padStart(32, "0"); const groups = []; - for (let i5 = 0; i5 < constants6.GROUPS; i5++) { + let i5; + for (i5 = 0; i5 < constants6.GROUPS; i5++) { groups.push(hex.slice(i5 * 4, (i5 + 1) * 4)); } return new _Address6(groups.join(":")); } /** - * Parse a URL (with optional bracketed host and port) into an address and - * port. Returns either `{ address, port }` on success or - * `{ error, address: null, port: null }` if the URL could not be parsed. - * Ports are returned as numbers (or `null` if absent or out of range). + * Convert a URL (with optional port number) to an address object + * @memberof Address6 + * @static + * @param {string} url - a URL with optional port number * @example * var addressAndPort = Address6.fromURL('http://[ffff::]:8080/foo/'); * addressAndPort.address.correctForm(); // 'ffff::' @@ -49700,89 +49715,10 @@ var require_ipv6 = __commonJS({ port }; } - /** - * Construct an `Address6` from an address and a hex subnet mask given as - * separate strings (e.g. as returned by Node's `os.networkInterfaces()`). - * Throws `AddressError` if the mask is non-contiguous (e.g. - * `ffff::ffff`). - * @example - * var address = Address6.fromAddressAndMask('fe80::1', 'ffff:ffff:ffff:ffff::'); - * address.subnetMask; // 64 - */ - static fromAddressAndMask(address, mask) { - const bits = common.prefixLengthFromMask(new _Address6(mask).bigInt(), constants6.BITS); - return new _Address6(`${address}/${bits}`); - } - /** - * Construct an `Address6` from an address and a Cisco-style wildcard mask - * given as separate strings (e.g. `::ffff:ffff:ffff:ffff` for a `/64`). - * The wildcard mask is the bitwise inverse of the subnet mask. Throws - * `AddressError` if the mask is non-contiguous. - * @example - * var address = Address6.fromAddressAndWildcardMask('fe80::1', '::ffff:ffff:ffff:ffff'); - * address.subnetMask; // 64 - */ - static fromAddressAndWildcardMask(address, wildcardMask) { - const wildcard = new _Address6(wildcardMask).bigInt(); - const allOnes = (BigInt(1) << BigInt(constants6.BITS)) - BigInt(1); - const mask = wildcard ^ allOnes; - const bits = common.prefixLengthFromMask(mask, constants6.BITS); - return new _Address6(`${address}/${bits}`); - } - /** - * Construct an `Address6` from a wildcard pattern with trailing `*` - * groups. The number of trailing wildcards determines the prefix - * length: each `*` represents 16 bits. `::` is expanded to zero groups - * (not wildcards) before evaluating trailing wildcards. - * - * Only trailing whole-group wildcards are supported. Partial-group - * wildcards (e.g. `2001:db8::0*`) and interior wildcards (e.g. - * `*::1`) throw `AddressError`. - * @example - * Address6.fromWildcard('2001:db8:*:*:*:*:*:*').subnet; // '/32' - * Address6.fromWildcard('2001:db8::*').subnet; // '/112' - * Address6.fromWildcard('*:*:*:*:*:*:*:*').subnet; // '/0' - */ - static fromWildcard(input) { - if (input.includes("%") || input.includes("/")) { - throw new address_error_1.AddressError("Wildcard pattern must not include a zone or CIDR suffix"); - } - const halves = input.split("::"); - if (halves.length > 2) { - throw new address_error_1.AddressError("Wildcard pattern cannot contain more than one '::'"); - } - let groups; - if (halves.length === 2) { - const left = halves[0] === "" ? [] : halves[0].split(":"); - const right = halves[1] === "" ? [] : halves[1].split(":"); - const remaining = constants6.GROUPS - left.length - right.length; - if (remaining < 1) { - throw new address_error_1.AddressError("Wildcard pattern with '::' has too many groups"); - } - groups = [...left, ...new Array(remaining).fill("0"), ...right]; - } else { - groups = input.split(":"); - } - if (groups.length !== constants6.GROUPS) { - throw new address_error_1.AddressError("Wildcard pattern must have 8 groups"); - } - let firstWildcard = -1; - for (let i5 = 0; i5 < groups.length; i5++) { - if (groups[i5] === "*") { - if (firstWildcard === -1) { - firstWildcard = i5; - } - } else if (firstWildcard !== -1) { - throw new address_error_1.AddressError("Wildcard `*` must only appear in trailing groups (e.g. `2001:db8:*:*:*:*:*:*`)"); - } - } - const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard; - const replaced = groups.map((g5) => g5 === "*" ? "0" : g5); - const subnetBits = constants6.BITS - trailing * 16; - return new _Address6(`${replaced.join(":")}/${subnetBits}`); - } /** * Create an IPv6-mapped address given an IPv4 address + * @memberof Address6 + * @static * @param {string} address - An IPv4 address string * @returns {Address6} * @example @@ -49797,6 +49733,8 @@ var require_ipv6 = __commonJS({ } /** * Return an address from ip6.arpa form + * @memberof Address6 + * @static * @param {string} arpaFormAddress - an 'ip6.arpa' form address * @returns {Adress6} * @example @@ -49819,6 +49757,8 @@ var require_ipv6 = __commonJS({ } /** * Return the Microsoft UNC transcription of the address + * @memberof Address6 + * @instance * @returns {String} the Microsoft UNC transcription of the address */ microsoftTranscription() { @@ -49826,6 +49766,8 @@ var require_ipv6 = __commonJS({ } /** * Return the first n bits of the address, defaulting to the subnet mask + * @memberof Address6 + * @instance * @param {number} [mask=subnet] - the number of bits to mask * @returns {String} the first n bits of the address as a string */ @@ -49834,6 +49776,8 @@ var require_ipv6 = __commonJS({ } /** * Return the number of possible subnets of a given size in the address + * @memberof Address6 + * @instance * @param {number} [subnetSize=128] - the subnet size * @returns {String} */ @@ -49849,6 +49793,8 @@ var require_ipv6 = __commonJS({ } /** * Helper function getting start address. + * @memberof Address6 + * @instance * @returns {bigint} */ _startAddress() { @@ -49857,6 +49803,8 @@ var require_ipv6 = __commonJS({ /** * The first address in the range given by this address' subnet * Often referred to as the Network Address. + * @memberof Address6 + * @instance * @returns {Address6} */ startAddress() { @@ -49865,6 +49813,8 @@ var require_ipv6 = __commonJS({ /** * The first host address in the range given by this address's subnet ie * the first address after the Network Address + * @memberof Address6 + * @instance * @returns {Address6} */ startAddressExclusive() { @@ -49873,6 +49823,8 @@ var require_ipv6 = __commonJS({ } /** * Helper function getting end address. + * @memberof Address6 + * @instance * @returns {bigint} */ _endAddress() { @@ -49881,6 +49833,8 @@ var require_ipv6 = __commonJS({ /** * The last address in the range given by this address' subnet * Often referred to as the Broadcast + * @memberof Address6 + * @instance * @returns {Address6} */ endAddress() { @@ -49889,6 +49843,8 @@ var require_ipv6 = __commonJS({ /** * The last host address in the range given by this address's subnet ie * the last address prior to the Broadcast Address + * @memberof Address6 + * @instance * @returns {Address6} */ endAddressExclusive() { @@ -49896,69 +49852,36 @@ var require_ipv6 = __commonJS({ return _Address6.fromBigInt(this._endAddress() - adjust); } /** - * The hex form of the subnet mask, e.g. `ffff:ffff:ffff:ffff::` for a - * `/64`. Returns an `Address6`; call `.correctForm()` for the string. - * @returns {Address6} - */ - subnetMaskAddress() { - return _Address6.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(constants6.BITS - this.subnetMask)}`)); - } - /** - * The Cisco-style wildcard mask, e.g. `::ffff:ffff:ffff:ffff` for a - * `/64`. This is the bitwise inverse of `subnetMaskAddress()`. Returns - * an `Address6`; call `.correctForm()` for the string. - * @returns {Address6} - */ - wildcardMask() { - return _Address6.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(constants6.BITS - this.subnetMask)}`)); - } - /** - * The network address in CIDR string form, e.g. `2001:db8::/32` for - * `2001:db8::1/32`. For an address with no explicit subnet the prefix - * is `/128`, e.g. `networkForm()` on `2001:db8::1` returns - * `2001:db8::1/128`. - * @returns {string} - */ - networkForm() { - return `${this.startAddress().correctForm()}/${this.subnetMask}`; - } - /** - * Return the scope of the address. The 4-bit scope field - * ([RFC 4291 §2.7](https://datatracker.ietf.org/doc/html/rfc4291#section-2.7)) - * is only defined for multicast addresses; for unicast addresses the scope - * is derived from the address type per - * [RFC 4007 §6](https://datatracker.ietf.org/doc/html/rfc4007#section-6). + * Return the scope of the address + * @memberof Address6 + * @instance * @returns {String} */ getScope() { - const type = this.getType(); - if (type === "Multicast" || type.startsWith("Multicast ")) { - const scope = constants6.SCOPES[parseInt(this.getBits(12, 16).toString(10), 10)]; - return scope || "Unknown"; + let scope = constants6.SCOPES[parseInt(this.getBits(12, 16).toString(10), 10)]; + if (this.getType() === "Global unicast" && scope !== "Link local") { + scope = "Global"; } - if (type === "Link-local unicast" || type === "Loopback") { - return "Link local"; - } - if (type === "Unspecified") { - return "Unknown"; - } - return "Global"; + return scope || "Unknown"; } /** * Return the type of the address + * @memberof Address6 + * @instance * @returns {String} */ getType() { - for (let i5 = 0; i5 < TYPE_SUBNETS.length; i5++) { - const entry = TYPE_SUBNETS[i5]; - if (this.isInSubnet(entry[0])) { - return entry[1]; + for (const subnet of Object.keys(constants6.TYPES)) { + if (this.isInSubnet(new _Address6(subnet))) { + return constants6.TYPES[subnet]; } } return "Global unicast"; } /** * Return the bits in the given range as a BigInt + * @memberof Address6 + * @instance * @returns {bigint} */ getBits(start, end) { @@ -49966,6 +49889,8 @@ var require_ipv6 = __commonJS({ } /** * Return the bits in the given range as a base-2 string + * @memberof Address6 + * @instance * @returns {String} */ getBitsBase2(start, end) { @@ -49973,6 +49898,8 @@ var require_ipv6 = __commonJS({ } /** * Return the bits in the given range as a base-16 string + * @memberof Address6 + * @instance * @returns {String} */ getBitsBase16(start, end) { @@ -49984,6 +49911,8 @@ var require_ipv6 = __commonJS({ } /** * Return the bits that are set past the subnet mask length + * @memberof Address6 + * @instance * @returns {String} */ getBitsPastSubnet() { @@ -49991,8 +49920,10 @@ var require_ipv6 = __commonJS({ } /** * Return the reversed ip6.arpa form of the address + * @memberof Address6 * @param {Object} options * @param {boolean} options.omitSuffix - omit the "ip6.arpa" suffix + * @instance * @returns {String} */ reverseForm(options) { @@ -50013,10 +49944,10 @@ var require_ipv6 = __commonJS({ return "ip6.arpa."; } /** - * Returns the address in correct form, per - * [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952): leading zeros - * stripped, the longest run of zero groups collapsed to `::`, and hex digits - * lowercased (e.g. `2001:db8::1`). This is the recommended form for display. + * Return the correct form of the address + * @memberof Address6 + * @instance + * @returns {String} */ correctForm() { let i5; @@ -50058,6 +49989,8 @@ var require_ipv6 = __commonJS({ } /** * Return a zero-padded base-2 string representation of the address + * @memberof Address6 + * @instance * @returns {String} * @example * var address = new Address6('2001:4860:4001:803::1011'); @@ -50066,22 +49999,10 @@ var require_ipv6 = __commonJS({ * // 0000000000000000000000000000000000000000000000000001000000010001' */ binaryZeroPad() { - if (this._binaryZeroPad === void 0) { - this._binaryZeroPad = this.bigInt().toString(2).padStart(constants6.BITS, "0"); - } - return this._binaryZeroPad; + return this.bigInt().toString(2).padStart(constants6.BITS, "0"); } - /** - * Parses a v4-in-v6 string (e.g. `::ffff:192.168.0.1`) by extracting the - * trailing IPv4 address into `this.address4` / `this.parsedAddress4` and - * returning the address with the v4 portion converted to two v6 groups. - * Used internally by `parse()`. - */ // TODO: Improve the semantics of this helper function parse4in6(address) { - if (address.indexOf(".") === -1) { - return address; - } const groups = address.split(":"); const lastGroup = groups.slice(-1)[0]; const address4 = lastGroup.match(constants4.RE_ADDRESS); @@ -50090,10 +50011,7 @@ var require_ipv6 = __commonJS({ this.address4 = new ipv4_1.Address4(this.parsedAddress4); for (let i5 = 0; i5 < this.address4.groups; i5++) { if (/^0[0-9]+/.test(this.address4.parsedAddress[i5])) { - const highlighted = this.address4.parsedAddress.map(spanLeadingZeroes4).join("."); - const prefix = groups.slice(0, -1).map(helpers.escapeHtml).join(":"); - const separator = groups.length > 1 ? ":" : ""; - throw new address_error_1.AddressError("IPv4 addresses can't have leading zeroes.", `${prefix}${separator}${highlighted}`); + throw new address_error_1.AddressError("IPv4 addresses can't have leading zeroes.", address.replace(constants4.RE_ADDRESS, this.address4.parsedAddress.map(spanLeadingZeroes4).join("."))); } } this.v4 = true; @@ -50102,13 +50020,6 @@ var require_ipv6 = __commonJS({ } return address; } - /** - * Parses an IPv6 address string into its 8 hexadecimal groups (expanding - * any `::` elision and any trailing v4-in-v6 portion) and stores the result - * on `this.parsedAddress`. Called automatically by the constructor; you - * typically don't need to call it directly. Throws `AddressError` if the - * input is malformed. - */ // TODO: Make private? parse(address) { address = this.parse4in6(address); @@ -50149,23 +50060,25 @@ var require_ipv6 = __commonJS({ } else { throw new address_error_1.AddressError("Too many :: groups found"); } - groups = groups.map((group4) => parseInt(group4, 16).toString(16)); + groups = groups.map((group) => parseInt(group, 16).toString(16)); if (groups.length !== this.groups) { throw new address_error_1.AddressError("Incorrect number of groups found"); } return groups; } /** - * Returns the canonical (fully expanded) form of the address: all 8 groups, - * each padded to 4 hex digits, with no `::` collapsing - * (e.g. `2001:0db8:0000:0000:0000:0000:0000:0001`). Useful for sorting and - * byte-exact comparison. + * Return the canonical form of the address + * @memberof Address6 + * @instance + * @returns {String} */ canonicalForm() { return this.parsedAddress.map(paddedHex).join(":"); } /** * Return the decimal form of the address + * @memberof Address6 + * @instance * @returns {String} */ decimal() { @@ -50173,6 +50086,8 @@ var require_ipv6 = __commonJS({ } /** * Return the address as a BigInt + * @memberof Address6 + * @instance * @returns {bigint} */ bigInt() { @@ -50180,6 +50095,8 @@ var require_ipv6 = __commonJS({ } /** * Return the last two groups of this address as an IPv4 address string + * @memberof Address6 + * @instance * @returns {Address4} * @example * var address = new Address6('2001:4860:4001::1825:bf11'); @@ -50187,10 +50104,12 @@ var require_ipv6 = __commonJS({ */ to4() { const binary = this.binaryZeroPad().split(""); - return ipv4_1.Address4.fromHex(BigInt(`0b${binary.slice(96, 128).join("")}`).toString(16).padStart(8, "0")); + return ipv4_1.Address4.fromHex(BigInt(`0b${binary.slice(96, 128).join("")}`).toString(16)); } /** * Return the v4-in-v6 form of the address + * @memberof Address6 + * @instance * @returns {String} */ to4in6() { @@ -50204,10 +50123,10 @@ var require_ipv6 = __commonJS({ return correct + infix + address4.address; } /** - * Decodes the Teredo tunneling fields embedded in this address. Returns the - * Teredo prefix, server IPv4, client IPv4, raw flag bits, cone-NAT flag, - * UDP port, and Microsoft-format flag breakdown (reserved, universal/local, - * group/individual, nonce). Only meaningful for addresses in `2001::/32`. + * Return an object containing the Teredo properties of the address + * @memberof Address6 + * @instance + * @returns {Object} */ inspectTeredo() { const prefix = this.getBitsBase16(0, 32); @@ -50215,7 +50134,7 @@ var require_ipv6 = __commonJS({ const udpPort = (bitsForUdpPort ^ BigInt("0xffff")).toString(); const server4 = ipv4_1.Address4.fromHex(this.getBitsBase16(32, 64)); const bitsForClient4 = this.getBits(96, 128); - const client4 = ipv4_1.Address4.fromHex((bitsForClient4 ^ BigInt("0xffffffff")).toString(16).padStart(8, "0")); + const client4 = ipv4_1.Address4.fromHex((bitsForClient4 ^ BigInt("0xffffffff")).toString(16)); const flagsBase2 = this.getBitsBase2(64, 80); const coneNat = (0, common_1.testBit)(flagsBase2, 15); const reserved = (0, common_1.testBit)(flagsBase2, 14); @@ -50238,9 +50157,10 @@ var require_ipv6 = __commonJS({ }; } /** - * Decodes the 6to4 tunneling fields embedded in this address. Returns the - * 6to4 prefix and the embedded IPv4 gateway address. Only meaningful for - * addresses in `2002::/16`. + * Return an object containing the 6to4 properties of the address + * @memberof Address6 + * @instance + * @returns {Object} */ inspect6to4() { const prefix = this.getBitsBase16(0, 16); @@ -50252,6 +50172,8 @@ var require_ipv6 = __commonJS({ } /** * Return a v6 6to4 address from a v6 v4inv6 address + * @memberof Address6 + * @instance * @returns {Address6} */ to6to4() { @@ -50268,73 +50190,9 @@ var require_ipv6 = __commonJS({ return new _Address6(addr6to4); } /** - * Embed an IPv4 address into a NAT64 IPv6 address using the encoding - * defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052). - * The default prefix is the well-known prefix `64:ff9b::/96`. The prefix - * length must be one of 32, 40, 48, 56, 64, or 96; for prefixes shorter - * than /64 the IPv4 octets are split around the reserved bits 64–71. - * @example - * Address6.fromAddress4Nat64('192.0.2.33').correctForm(); // '64:ff9b::c000:221' - * Address6.fromAddress4Nat64('192.0.2.33', '2001:db8::/32').correctForm(); // '2001:db8:c000:221::' - */ - static fromAddress4Nat64(address, prefix = "64:ff9b::/96") { - const v42 = new ipv4_1.Address4(address); - const prefix6 = new _Address6(prefix); - const pl = prefix6.subnetMask; - if (pl !== 32 && pl !== 40 && pl !== 48 && pl !== 56 && pl !== 64 && pl !== 96) { - throw new address_error_1.AddressError("NAT64 prefix length must be 32, 40, 48, 56, 64, or 96"); - } - const prefixBits = prefix6.binaryZeroPad(); - const v4Bits = v42.binaryZeroPad(); - let bits; - if (pl === 96) { - bits = prefixBits.slice(0, 96) + v4Bits; - } else { - const beforeU = 64 - pl; - bits = prefixBits.slice(0, pl) + v4Bits.slice(0, beforeU) + "00000000" + v4Bits.slice(beforeU) + "0".repeat(128 - 72 - (32 - beforeU)); - } - const hex = BigInt(`0b${bits}`).toString(16).padStart(32, "0"); - const groups = []; - for (let i5 = 0; i5 < 8; i5++) { - groups.push(hex.slice(i5 * 4, (i5 + 1) * 4)); - } - return new _Address6(groups.join(":")); - } - /** - * Extract the embedded IPv4 address from a NAT64 IPv6 address using the - * encoding defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052). - * The default prefix is the well-known prefix `64:ff9b::/96`. Returns - * `null` if this address is not contained within the given prefix. - * @example - * new Address6('64:ff9b::c000:221').toAddress4Nat64()!.correctForm(); // '192.0.2.33' - */ - toAddress4Nat64(prefix = "64:ff9b::/96") { - const prefix6 = new _Address6(prefix); - const pl = prefix6.subnetMask; - if (pl !== 32 && pl !== 40 && pl !== 48 && pl !== 56 && pl !== 64 && pl !== 96) { - throw new address_error_1.AddressError("NAT64 prefix length must be 32, 40, 48, 56, 64, or 96"); - } - if (!this.isInSubnet(prefix6)) { - return null; - } - const bits = this.binaryZeroPad(); - let v4Bits; - if (pl === 96) { - v4Bits = bits.slice(96, 128); - } else { - const beforeU = 64 - pl; - v4Bits = bits.slice(pl, pl + beforeU) + bits.slice(72, 72 + (32 - beforeU)); - } - const octets = []; - for (let i5 = 0; i5 < 4; i5++) { - octets.push(parseInt(v4Bits.slice(i5 * 8, (i5 + 1) * 8), 2).toString()); - } - return new ipv4_1.Address4(octets.join(".")); - } - /** - * Return a byte array. - * - * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toByteArray())`. + * Return a byte array + * @memberof Address6 + * @instance * @returns {Array} */ toByteArray() { @@ -50348,27 +50206,27 @@ var require_ipv6 = __commonJS({ return bytes; } /** - * Return an unsigned byte array. - * - * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toUnsignedByteArray())`. + * Return an unsigned byte array + * @memberof Address6 + * @instance * @returns {Array} */ toUnsignedByteArray() { return this.toByteArray().map(unsignByte); } /** - * Convert a byte array to an Address6 object. - * - * To convert from a Node.js `Buffer`, spread it: `Address6.fromByteArray([...buf])`. + * Convert a byte array to an Address6 object + * @memberof Address6 + * @static * @returns {Address6} */ static fromByteArray(bytes) { return this.fromUnsignedByteArray(bytes.map(unsignByte)); } /** - * Convert an unsigned byte array to an Address6 object. - * - * To convert from a Node.js `Buffer`, spread it: `Address6.fromUnsignedByteArray([...buf])`. + * Convert an unsigned byte array to an Address6 object + * @memberof Address6 + * @static * @returns {Address6} */ static fromUnsignedByteArray(bytes) { @@ -50383,6 +50241,8 @@ var require_ipv6 = __commonJS({ } /** * Returns true if the address is in the canonical form, false otherwise + * @memberof Address6 + * @instance * @returns {boolean} */ isCanonical() { @@ -50390,6 +50250,8 @@ var require_ipv6 = __commonJS({ } /** * Returns true if the address is a link local address, false otherwise + * @memberof Address6 + * @instance * @returns {boolean} */ isLinkLocal() { @@ -50400,81 +50262,53 @@ var require_ipv6 = __commonJS({ } /** * Returns true if the address is a multicast address, false otherwise + * @memberof Address6 + * @instance * @returns {boolean} */ isMulticast() { - const type = this.getType(); - return type === "Multicast" || type.startsWith("Multicast "); + return this.getType() === "Multicast"; } /** - * Returns true if the address was written in v4-in-v6 dotted-quad notation - * (e.g. `::ffff:127.0.0.1`), false otherwise. This is a notation-level flag - * and does not reflect whether the address bits lie in the IPv4-mapped - * (`::ffff:0:0/96`) subnet — for that, see {@link isMapped4}. + * Returns true if the address is a v4-in-v6 address, false otherwise + * @memberof Address6 + * @instance * @returns {boolean} */ is4() { return this.v4; } - /** - * Returns true if the address is an IPv4-mapped IPv6 address in - * `::ffff:0:0/96` ([RFC 4291 §2.5.5.2](https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.2)), - * false otherwise. Unlike {@link is4}, this checks the underlying address - * bits rather than the textual notation, so `::ffff:127.0.0.1` and - * `::ffff:7f00:1` both return true. - * @returns {boolean} - */ - isMapped4() { - return this.isInSubnet(IPV4_MAPPED_SUBNET); - } /** * Returns true if the address is a Teredo address, false otherwise + * @memberof Address6 + * @instance * @returns {boolean} */ isTeredo() { - return this.isInSubnet(TEREDO_SUBNET); + return this.isInSubnet(new _Address6("2001::/32")); } /** * Returns true if the address is a 6to4 address, false otherwise + * @memberof Address6 + * @instance * @returns {boolean} */ is6to4() { - return this.isInSubnet(SIX_TO_FOUR_SUBNET); + return this.isInSubnet(new _Address6("2002::/16")); } /** * Returns true if the address is a loopback address, false otherwise + * @memberof Address6 + * @instance * @returns {boolean} */ isLoopback() { return this.getType() === "Loopback"; } - /** - * Returns true if the address is a Unique Local Address in `fc00::/7` ([RFC 4193](https://datatracker.ietf.org/doc/html/rfc4193)). ULAs are the IPv6 equivalent of IPv4 [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private addresses. - * @returns {boolean} - */ - isULA() { - return this.isInSubnet(ULA_SUBNET); - } - /** - * Returns true if the address is the unspecified address `::`. - * @returns {boolean} - */ - isUnspecified() { - return this.getType() === "Unspecified"; - } - /** - * Returns true if the address is in the documentation prefix `2001:db8::/32` ([RFC 3849](https://datatracker.ietf.org/doc/html/rfc3849)). - * @returns {boolean} - */ - isDocumentation() { - return this.isInSubnet(DOCUMENTATION_SUBNET); - } // #endregion // #region HTML /** - * Returns the address as an HTTP URL with the host bracketed, e.g. - * `http://[2001:db8::1]/`. If `optionalPort` is provided it is appended, - * e.g. `http://[2001:db8::1]:8080/`. + * @returns {String} the address in link form with a default port of 80 */ href(optionalPort) { if (optionalPort === void 0) { @@ -50485,12 +50319,7 @@ var require_ipv6 = __commonJS({ return `http://[${this.correctForm()}]${optionalPort}/`; } /** - * Returns an HTML `` element whose `href` encodes the address in a URL - * hash fragment (default prefix `/#address=`). Useful for linking between - * pages of an address-inspector UI. - * @param options.className - CSS class for the rendered `` element - * @param options.prefix - hash prefix prepended to the address (default `/#address=`) - * @param options.v4 - when true, render the address in v4-in-v6 form + * @returns {String} a link suitable for conveying the address via a URL hash */ link(options) { if (!options) { @@ -50510,13 +50339,10 @@ var require_ipv6 = __commonJS({ formFunction = this.to4in6; } const form = formFunction.call(this); - const safeHref = helpers.escapeHtml(`${options.prefix}${form}`); - const safeForm = helpers.escapeHtml(form); if (options.className) { - const safeClass = helpers.escapeHtml(options.className); - return `${safeForm}`; + return `${form}`; } - return `${safeForm}`; + return `${form}`; } /** * Groups an address @@ -50524,12 +50350,12 @@ var require_ipv6 = __commonJS({ */ group() { if (this.elidedGroups === 0) { - return helpers.simpleGroup(this.addressMinusSuffix).join(":"); + return helpers.simpleGroup(this.address).join(":"); } assert4(typeof this.elidedGroups === "number"); assert4(typeof this.elisionBegin === "number"); const output = []; - const [left, right] = this.addressMinusSuffix.split("::"); + const [left, right] = this.address.split("::"); if (left.length) { output.push(...helpers.simpleGroup(left)); } else { @@ -50557,6 +50383,8 @@ var require_ipv6 = __commonJS({ /** * Generate a regular expression string that can be used to find or validate * all variations of this address + * @memberof Address6 + * @instance * @param {boolean} substringSearch * @returns {string} */ @@ -50595,6 +50423,8 @@ var require_ipv6 = __commonJS({ /** * Generate a regular expression that can be used to find or validate all * variations of this address. + * @memberof Address6 + * @instance * @param {boolean} substringSearch * @returns {RegExp} */ @@ -50603,15 +50433,6 @@ var require_ipv6 = __commonJS({ } }; exports2.Address6 = Address6; - var TYPE_SUBNETS = Object.keys(constants6.TYPES).map((subnet) => [ - new Address6(subnet), - constants6.TYPES[subnet] - ]); - var TEREDO_SUBNET = new Address6("2001::/32"); - var SIX_TO_FOUR_SUBNET = new Address6("2002::/16"); - var ULA_SUBNET = new Address6("fc00::/7"); - var DOCUMENTATION_SUBNET = new Address6("2001:db8::/32"); - var IPV4_MAPPED_SUBNET = new Address6("::ffff:0:0/96"); } }); @@ -50824,7 +50645,7 @@ var require_receivebuffer = __commonJS({ var require_socksclient = __commonJS({ "node_modules/socks/build/client/socksclient.js"(exports2) { "use strict"; - var __awaiter7 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -50893,13 +50714,13 @@ var require_socksclient = __commonJS({ } const client = new _SocksClient(options); client.connect(options.existing_socket); - client.once("established", (info2) => { + client.once("established", (info5) => { client.removeAllListeners(); if (typeof callback === "function") { - callback(null, info2); - resolve(info2); + callback(null, info5); + resolve(info5); } else { - resolve(info2); + resolve(info5); } }); client.once("error", (err) => { @@ -50923,7 +50744,7 @@ var require_socksclient = __commonJS({ * @returns { Promise } */ static createConnectionChain(options, callback) { - return new Promise((resolve, reject) => __awaiter7(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { try { (0, helpers_1.validateSocksClientChainOptions)(options); } catch (err) { @@ -51059,13 +50880,13 @@ var require_socksclient = __commonJS({ this.socket.setNoDelay(!!this.options.set_tcp_nodelay); } } - this.prependOnceListener("established", (info2) => { + this.prependOnceListener("established", (info5) => { setImmediate(() => { if (this.receiveBuffer.length > 0) { const excessData = this.receiveBuffer.get(this.receiveBuffer.length); - info2.socket.emit("data", excessData); + info5.socket.emit("data", excessData); } - info2.socket.resume(); + info5.socket.resume(); }); }); } @@ -51301,24 +51122,24 @@ var require_socksclient = __commonJS({ this.setState(constants_1.SocksClientState.SentAuthentication); } sendSocks5CustomAuthentication() { - return __awaiter7(this, void 0, void 0, function* () { + return __awaiter2(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 __awaiter7(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield this.options.proxy.custom_auth_response_handler(data3); }); } handleSocks5AuthenticationNoAuthHandshakeResponse(data3) { - return __awaiter7(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return data3[1] === 0; }); } handleSocks5AuthenticationUserPassHandshakeResponse(data3) { - return __awaiter7(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return data3[1] === 0; }); } @@ -51327,7 +51148,7 @@ var require_socksclient = __commonJS({ * @param data */ handleInitialSocks5AuthenticationHandshakeResponse() { - return __awaiter7(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { this.setState(constants_1.SocksClientState.ReceivedAuthenticationResponse); let authResult = false; if (this.socks5ChosenAuthType === constants_1.Socks5Auth.NoAuth) { @@ -51586,17 +51407,17 @@ function omit3(obj, ...keys) { } return ret; } -var import_socks, import_debug8, dns, net4, tls3, import_url3, debug5, setServernameFromNonIpHost2, SocksProxyAgent; +var import_socks, import_debug4, dns, net4, tls3, import_url3, debug6, setServernameFromNonIpHost2, SocksProxyAgent; var init_dist4 = __esm({ "node_modules/proxy-agent/node_modules/socks-proxy-agent/dist/index.js"() { import_socks = __toESM(require_build(), 1); init_dist(); - import_debug8 = __toESM(require_src(), 1); + import_debug4 = __toESM(require_src(), 1); dns = __toESM(require("dns"), 1); net4 = __toESM(require("net"), 1); tls3 = __toESM(require("tls"), 1); import_url3 = require("url"); - debug5 = (0, import_debug8.default)("socks-proxy-agent"); + debug6 = (0, import_debug4.default)("socks-proxy-agent"); setServernameFromNonIpHost2 = (options) => { if (options.servername === void 0 && options.host && !net4.isIP(options.host)) { return { @@ -51606,7 +51427,7 @@ var init_dist4 = __esm({ } return options; }; - SocksProxyAgent = class extends Agent4 { + SocksProxyAgent = class extends Agent2 { constructor(uri, opts) { super(opts); const url = typeof uri === "string" ? new import_url3.URL(uri) : uri; @@ -51656,21 +51477,21 @@ var init_dist4 = __esm({ if (tlsSocket) tlsSocket.destroy(); }; - debug5("Creating socks proxy connection: %o", socksOpts); + debug6("Creating socks proxy connection: %o", socksOpts); const { socket } = await import_socks.SocksClient.createConnection(socksOpts); - debug5("Successfully created socks proxy connection"); + debug6("Successfully created socks proxy connection"); if (timeout !== null) { socket.setTimeout(timeout); socket.on("timeout", () => cleanup()); } if (opts.secureEndpoint) { - debug5("Upgrading socket connection to TLS"); + debug6("Upgrading socket connection to TLS"); const tlsSocket = tls3.connect({ ...omit3(setServernameFromNonIpHost2(opts), "host", "path", "port"), socket }); - tlsSocket.once("error", (error3) => { - debug5("Socket TLS error", error3.message); + tlsSocket.once("error", (error2) => { + debug6("Socket TLS error", error2.message); cleanup(tlsSocket); }); return tlsSocket; @@ -51704,15 +51525,15 @@ var init_helpers2 = __esm({ }); // node_modules/pac-proxy-agent/node_modules/agent-base/dist/index.js -var net5, http3, import_https2, INTERNAL2, Agent6; +var net5, http2, import_https2, INTERNAL2, Agent4; var init_dist5 = __esm({ "node_modules/pac-proxy-agent/node_modules/agent-base/dist/index.js"() { net5 = __toESM(require("net"), 1); - http3 = __toESM(require("http"), 1); + http2 = __toESM(require("http"), 1); import_https2 = require("https"); init_helpers2(); INTERNAL2 = /* @__PURE__ */ Symbol("AgentBaseInternalState"); - Agent6 = class extends http3.Agent { + Agent4 = class extends http2.Agent { constructor(opts) { super(opts); this[INTERNAL2] = {}; @@ -51912,15 +51733,15 @@ var init_notmodified = __esm({ }); // node_modules/get-uri/dist/data.js -var import_debug9, import_stream, import_crypto, debug6, DataReadable, data2; +var import_debug5, import_stream, import_crypto, debug7, DataReadable, data2; var init_data = __esm({ "node_modules/get-uri/dist/data.js"() { - import_debug9 = __toESM(require_src(), 1); + import_debug5 = __toESM(require_src(), 1); import_stream = require("stream"); import_crypto = require("crypto"); init_node(); init_notmodified(); - debug6 = (0, import_debug9.default)("get-uri:data"); + debug7 = (0, import_debug5.default)("get-uri:data"); DataReadable = class extends import_stream.Readable { constructor(hash, buf) { super(); @@ -51933,12 +51754,12 @@ var init_data = __esm({ const shasum = (0, import_crypto.createHash)("sha1"); shasum.update(uri); const hash = shasum.digest("hex"); - debug6('generated SHA1 hash for "data:" URI: %o', hash); + debug7('generated SHA1 hash for "data:" URI: %o', hash); if (cache5?.hash === hash) { - debug6("got matching cache SHA1 hash: %o", hash); + debug7("got matching cache SHA1 hash: %o", hash); throw new NotModifiedError(); } else { - debug6('creating Readable stream from "data:" URI buffer'); + debug7('creating Readable stream from "data:" URI buffer'); const { buffer } = dataUriToBuffer(uri); return new DataReadable(hash, Buffer.from(buffer)); } @@ -51963,15 +51784,15 @@ var init_notfound = __esm({ function isNotModified(prev, curr) { return +prev.mtime === +curr.mtime; } -var import_debug10, import_fs2, import_url4, debug7, file; +var import_debug6, import_fs, import_url4, debug8, file; var init_file = __esm({ "node_modules/get-uri/dist/file.js"() { - import_debug10 = __toESM(require_src(), 1); - import_fs2 = require("fs"); + import_debug6 = __toESM(require_src(), 1); + import_fs = require("fs"); init_notfound(); init_notmodified(); import_url4 = require("url"); - debug7 = (0, import_debug10.default)("get-uri:file"); + debug8 = (0, import_debug6.default)("get-uri:file"); file = async ({ href: uri }, opts = {}) => { const { cache: cache5, @@ -51981,19 +51802,19 @@ var init_file = __esm({ } = opts; try { const filepath = (0, import_url4.fileURLToPath)(uri); - 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)) { + 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)) { await fdHandle.close(); throw new NotModifiedError(); } - const rs = (0, import_fs2.createReadStream)(filepath, { + const rs = (0, import_fs.createReadStream)(filepath, { autoClose: true, ...opts, fd: fdHandle }); - rs.stat = stat2; + rs.stat = stat; return rs; } catch (err) { if (err.code === "ENOENT") { @@ -52075,7 +51896,6 @@ var require_FtpContext = __commonJS({ exports2.FTPError = FTPError; function doNothing() { } - var maxControlResponseLength = 2 ** 16; var FTPContext = class { /** * Instantiate an FTP context. @@ -52293,10 +52113,6 @@ Closing reason: ${this._closingError.stack}`; */ _onControlSocketData(chunk) { this.log(`< ${chunk}`); - if (this._partialResponse.length + chunk.length > maxControlResponseLength) { - this.closeWithError(new Error("FTP control response exceeded maximum allowed size")); - return; - } const completeResponse = this._partialResponse + chunk; const parsed = (0, parseControlResponse_1.parseControlResponse)(completeResponse); this._partialResponse = parsed.rest; @@ -52322,9 +52138,9 @@ Closing reason: ${this._closingError.stack}`; * @protected */ _setupDefaultErrorHandlers(socket, identifier) { - socket.once("error", (error3) => { - error3.message += ` (${identifier})`; - this.closeWithError(error3); + socket.once("error", (error2) => { + error2.message += ` (${identifier})`; + this.closeWithError(error2); }); socket.once("close", (hadError) => { if (hadError) { @@ -52418,8 +52234,8 @@ var require_netUtils = __commonJS({ tlsSocket.removeAllListeners("error"); resolve(tlsSocket); } - }).once("error", (error3) => { - reject(error3); + }).once("error", (error2) => { + reject(error2); }); }); } @@ -52629,36 +52445,36 @@ var require_parseListMLSD = __commonJS({ exports2.transformList = transformList; exports2.parseMLSxDate = parseMLSxDate; var FileInfo_1 = require_FileInfo(); - function parseSize(value, info2) { - info2.size = parseInt(value, 10); + function parseSize(value, info5) { + info5.size = parseInt(value, 10); } var factHandlersByName = { "size": parseSize, // File size "sizd": parseSize, // Directory size - "unique": (value, info2) => { - info2.uniqueID = value; + "unique": (value, info5) => { + info5.uniqueID = value; }, - "modify": (value, info2) => { - info2.modifiedAt = parseMLSxDate(value); - info2.rawModifiedAt = info2.modifiedAt.toISOString(); + "modify": (value, info5) => { + info5.modifiedAt = parseMLSxDate(value); + info5.rawModifiedAt = info5.modifiedAt.toISOString(); }, - "type": (value, info2) => { + "type": (value, info5) => { if (value.startsWith("OS.unix=slink")) { - info2.type = FileInfo_1.FileType.SymbolicLink; - info2.link = value.substr(value.indexOf(":") + 1); + info5.type = FileInfo_1.FileType.SymbolicLink; + info5.link = value.substr(value.indexOf(":") + 1); return 1; } switch (value) { case "file": - info2.type = FileInfo_1.FileType.File; + info5.type = FileInfo_1.FileType.File; break; case "dir": - info2.type = FileInfo_1.FileType.Directory; + info5.type = FileInfo_1.FileType.Directory; break; case "OS.unix=symlink": - info2.type = FileInfo_1.FileType.SymbolicLink; + info5.type = FileInfo_1.FileType.SymbolicLink; break; case "cdir": // Current directory being listed @@ -52666,34 +52482,34 @@ var require_parseListMLSD = __commonJS({ return 2; // Don't include these entries in the listing default: - info2.type = FileInfo_1.FileType.Unknown; + info5.type = FileInfo_1.FileType.Unknown; } return 1; }, - "unix.mode": (value, info2) => { + "unix.mode": (value, info5) => { const digits = value.substr(-3); - info2.permissions = { + info5.permissions = { user: parseInt(digits[0], 10), group: parseInt(digits[1], 10), world: parseInt(digits[2], 10) }; }, - "unix.ownername": (value, info2) => { - info2.user = value; + "unix.ownername": (value, info5) => { + info5.user = value; }, - "unix.owner": (value, info2) => { - if (info2.user === void 0) - info2.user = value; + "unix.owner": (value, info5) => { + if (info5.user === void 0) + info5.user = value; }, get "unix.uid"() { return this["unix.owner"]; }, - "unix.groupname": (value, info2) => { - info2.group = value; + "unix.groupname": (value, info5) => { + info5.group = value; }, - "unix.group": (value, info2) => { - if (info2.group === void 0) - info2.group = value; + "unix.group": (value, info5) => { + if (info5.group === void 0) + info5.group = value; }, get "unix.gid"() { return this["unix.group"]; @@ -52723,7 +52539,7 @@ var require_parseListMLSD = __commonJS({ if (name === "" || name === "." || name === "..") { return void 0; } - const info2 = new FileInfo_1.FileInfo(name); + const info5 = new FileInfo_1.FileInfo(name); const facts = packedFacts.split(";"); for (const fact of facts) { const [factName, factValue] = splitStringOnce(fact, "="); @@ -52734,12 +52550,12 @@ var require_parseListMLSD = __commonJS({ if (!factHandler) { continue; } - const result = factHandler(factValue, info2); + const result = factHandler(factValue, info5); if (result === 2) { return void 0; } } - return info2; + return info5; } function transformList(files) { const nonLinksByID = /* @__PURE__ */ new Map(); @@ -52856,7 +52672,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((info2) => info2 !== void 0); + const files = lines.map(parser.parseLine).filter((info5) => info5 !== void 0); return parser.transformList(files); } } @@ -53250,7 +53066,7 @@ var require_Client = __commonJS({ }; var LIST_COMMANDS_DEFAULT = () => ["LIST -a", "LIST"]; var LIST_COMMANDS_MLSD = () => ["MLSD", "LIST -a", "LIST"]; - var Client3 = class { + var Client2 = class { /** * Instantiate an FTP client. * @@ -53938,7 +53754,7 @@ var require_Client = __commonJS({ return this.downloadToDir(localDirPath); } }; - exports2.Client = Client3; + exports2.Client = Client2; async function ensureLocalDirectory(path3) { try { await fsStat(path3); @@ -54002,16 +53818,16 @@ var require_dist = __commonJS({ }); // node_modules/get-uri/dist/ftp.js -var import_basic_ftp, import_stream2, import_path, import_debug11, debug8, ftp; +var import_basic_ftp, import_stream2, import_path, import_debug7, debug9, ftp; var init_ftp = __esm({ "node_modules/get-uri/dist/ftp.js"() { import_basic_ftp = __toESM(require_dist(), 1); import_stream2 = require("stream"); import_path = require("path"); - import_debug11 = __toESM(require_src(), 1); + import_debug7 = __toESM(require_src(), 1); init_notfound(); init_notmodified(); - debug8 = (0, import_debug11.default)("get-uri:ftp"); + debug9 = (0, import_debug7.default)("get-uri:ftp"); ftp = async (url, opts = {}) => { const { cache: cache5 } = opts; const filepath = decodeURIComponent(url.pathname); @@ -54057,7 +53873,7 @@ var init_ftp = __esm({ const stream = new import_stream2.PassThrough(); const rs = stream; client.downloadTo(stream, filepath).then((result) => { - debug8(result.message); + debug9(result.message); client.close(); }); rs.lastModified = lastModified; @@ -54097,7 +53913,7 @@ function isFresh(cache5) { let expires = parseInt(cache5.headers.expires || "", 10); const cacheControl = cache5.headers["cache-control"]; if (cacheControl) { - debug9("Cache-Control: %o", cacheControl); + debug10("Cache-Control: %o", cacheControl); const parts = cacheControl.split(/,\s*?\b/); for (let i5 = 0; i5 < parts.length; i5++) { const part = parts[i5]; @@ -54108,24 +53924,24 @@ function isFresh(cache5) { expires = (cache5.date || 0) + parseInt(subparts[1], 10) * 1e3; fresh = Date.now() < expires; if (fresh) { - debug9('cache is "fresh" due to previous %o Cache-Control param', part); + debug10('cache is "fresh" due to previous %o Cache-Control param', part); } return fresh; case "must-revalidate": break; case "no-cache": case "no-store": - debug9('cache is "stale" due to explicit %o Cache-Control param', name); + debug10('cache is "stale" due to explicit %o Cache-Control param', name); return false; default: break; } } } else if (expires) { - debug9("Expires: %o", expires); + debug10("Expires: %o", expires); fresh = Date.now() < expires; if (fresh) { - debug9('cache is "fresh" due to previous Expires response header'); + debug10('cache is "fresh" due to previous Expires response header'); } return fresh; } @@ -54147,37 +53963,37 @@ function getCache(url, cache5) { } return null; } -var import_http2, import_https3, import_events2, import_debug12, debug9, http4; +var import_http2, import_https3, import_events2, import_debug8, debug10, http3; var init_http = __esm({ "node_modules/get-uri/dist/http.js"() { import_http2 = __toESM(require("http"), 1); import_https3 = __toESM(require("https"), 1); import_events2 = require("events"); - import_debug12 = __toESM(require_src(), 1); + import_debug8 = __toESM(require_src(), 1); init_http_error(); init_notfound(); init_notmodified(); - debug9 = (0, import_debug12.default)("get-uri:http"); - http4 = async (url, opts = {}) => { - debug9("GET %o", url.href); + debug10 = (0, import_debug8.default)("get-uri:http"); + http3 = async (url, opts = {}) => { + debug10("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) { - debug9("cached redirect"); + debug10("cached redirect"); throw new Error("TODO: implement cached redirects!"); } throw new NotModifiedError(); } const maxRedirects = typeof opts.maxRedirects === "number" ? opts.maxRedirects : 5; - debug9("allowing %o max redirects", maxRedirects); + debug10("allowing %o max redirects", maxRedirects); let mod; if (opts.http) { mod = opts.http; - debug9("using secure `https` core module"); + debug10("using secure `https` core module"); } else { mod = import_http2.default; - debug9("using `http` core module"); + debug10("using `http` core module"); } const options = { ...opts }; if (cache5) { @@ -54190,12 +54006,12 @@ var init_http = __esm({ const lastModified = cache5.headers["last-modified"]; if (lastModified) { headers["If-Modified-Since"] = lastModified; - debug9('added "If-Modified-Since" request header: %o', lastModified); + debug10('added "If-Modified-Since" request header: %o', lastModified); } const etag = cache5.headers.etag; if (etag) { headers["If-None-Match"] = etag; - debug9('added "If-None-Match" request header: %o', etag); + debug10('added "If-None-Match" request header: %o', etag); } } const req = mod.get(url, options); @@ -54203,7 +54019,7 @@ var init_http = __esm({ const code = res.statusCode || 0; res.date = Date.now(); res.parsed = url; - debug9("got %o response status code", code); + debug10("got %o response status code", code); const type = code / 100 | 0; const location = res.headers.location; if (type === 3 && location) { @@ -54211,17 +54027,17 @@ var init_http = __esm({ opts.redirects = []; const redirects = opts.redirects; if (redirects.length < maxRedirects) { - debug9('got a "redirect" status code with Location: %o', location); + debug10('got a "redirect" status code with Location: %o', location); res.resume(); redirects.push(res); const newUri = new URL(location, url.href); - debug9("resolved redirect URL: %o", newUri.href); + debug10("resolved redirect URL: %o", newUri.href); const left = maxRedirects - redirects.length; - debug9("%o more redirects allowed after this one", left); + debug10("%o more redirects allowed after this one", left); if (newUri.protocol !== url.protocol) { opts.http = newUri.protocol === "https:" ? import_https3.default : void 0; } - return http4(newUri, opts); + return http3(newUri, opts); } } if (type !== 2) { @@ -54242,13 +54058,13 @@ var init_http = __esm({ }); // node_modules/get-uri/dist/https.js -var import_https4, https3; +var import_https4, https2; var init_https = __esm({ "node_modules/get-uri/dist/https.js"() { import_https4 = __toESM(require("https"), 1); init_http(); - https3 = (url, opts) => { - return http4(url, { ...opts, http: import_https4.default }); + https2 = (url, opts) => { + return http3(url, { ...opts, http: import_https4.default }); }; } }); @@ -54258,7 +54074,7 @@ function isValidProtocol(p2) { return VALID_PROTOCOLS.has(p2); } async function getUri(uri, opts) { - debug10("getUri(%o)", uri); + debug11("getUri(%o)", uri); if (!uri) { throw new TypeError('Must pass in a URI to "getUri()"'); } @@ -54270,22 +54086,22 @@ async function getUri(uri, opts) { const getter = protocols[protocol]; return getter(url, opts); } -var import_debug13, debug10, protocols, VALID_PROTOCOLS; +var import_debug9, debug11, protocols, VALID_PROTOCOLS; var init_dist6 = __esm({ "node_modules/get-uri/dist/index.js"() { - import_debug13 = __toESM(require_src(), 1); + import_debug9 = __toESM(require_src(), 1); init_data(); init_file(); init_ftp(); init_http(); init_https(); - debug10 = (0, import_debug13.default)("get-uri"); + debug11 = (0, import_debug9.default)("get-uri"); protocols = { data: data2, file, ftp, - http: http4, - https: https3 + http: http3, + https: https2 }; VALID_PROTOCOLS = new Set(Object.keys(protocols)); } @@ -55257,7 +55073,7 @@ var require_keyword = __commonJS({ }); // node_modules/esutils/lib/utils.js -var require_utils3 = __commonJS({ +var require_utils4 = __commonJS({ "node_modules/esutils/lib/utils.js"(exports2) { (function() { "use strict"; @@ -55413,7 +55229,7 @@ var require_util10 = __commonJS({ return url; } exports2.urlGenerate = urlGenerate; - function normalize2(aPath) { + function normalize(aPath) { var path3 = aPath; var url = urlParse(aPath); if (url) { @@ -55450,8 +55266,8 @@ var require_util10 = __commonJS({ } return path3; } - exports2.normalize = normalize2; - function join7(aRoot, aPath) { + exports2.normalize = normalize; + function join2(aRoot, aPath) { if (aRoot === "") { aRoot = "."; } @@ -55476,14 +55292,14 @@ var require_util10 = __commonJS({ aRootUrl.host = aPath; return urlGenerate(aRootUrl); } - var joined = aPath.charAt(0) === "/" ? aPath : normalize2(aRoot.replace(/\/+$/, "") + "/" + aPath); + var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath); if (aRootUrl) { aRootUrl.path = joined; return urlGenerate(aRootUrl); } return joined; } - exports2.join = join7; + exports2.join = join2; exports2.isAbsolute = function(aPath) { return aPath.charAt(0) === "/" || urlRegexp.test(aPath); }; @@ -55656,9 +55472,9 @@ var require_util10 = __commonJS({ parsed.path = parsed.path.substring(0, index + 1); } } - sourceURL = join7(urlGenerate(parsed), sourceURL); + sourceURL = join2(urlGenerate(parsed), sourceURL); } - return normalize2(sourceURL); + return normalize(sourceURL); } exports2.computeSourceURL = computeSourceURL; } @@ -56025,22 +55841,22 @@ var require_source_map_generator = __commonJS({ }, this); }; SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() { - var map3 = { + var map2 = { version: this._version, sources: this._sources.toArray(), names: this._names.toArray(), mappings: this._serializeMappings() }; if (this._file != null) { - map3.file = this._file; + map2.file = this._file; } if (this._sourceRoot != null) { - map3.sourceRoot = this._sourceRoot; + map2.sourceRoot = this._sourceRoot; } if (this._sourcesContents) { - map3.sourcesContent = this._generateSourcesContent(map3.sources, map3.sourceRoot); + map2.sourcesContent = this._generateSourcesContent(map2.sources, map2.sourceRoot); } - return map3; + return map2; }; SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() { return JSON.stringify(this.toJSON()); @@ -56933,7 +56749,7 @@ var require_source_node = __commonJS({ line: 1, column: 0 }; - var map3 = new SourceMapGenerator(aArgs); + var map2 = new SourceMapGenerator(aArgs); var sourceMappingActive = false; var lastOriginalSource = null; var lastOriginalLine = null; @@ -56943,7 +56759,7 @@ var require_source_node = __commonJS({ generated.code += chunk; if (original.source !== null && original.line !== null && original.column !== null) { if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) { - map3.addMapping({ + map2.addMapping({ source: original.source, original: { line: original.line, @@ -56962,7 +56778,7 @@ var require_source_node = __commonJS({ lastOriginalName = original.name; sourceMappingActive = true; } else if (sourceMappingActive) { - map3.addMapping({ + map2.addMapping({ generated: { line: generated.line, column: generated.column @@ -56979,7 +56795,7 @@ var require_source_node = __commonJS({ lastOriginalSource = null; sourceMappingActive = false; } else if (sourceMappingActive) { - map3.addMapping({ + map2.addMapping({ source: original.source, original: { line: original.line, @@ -56998,9 +56814,9 @@ var require_source_node = __commonJS({ } }); this.walkSourceContents(function(sourceFile, sourceContent) { - map3.setSourceContent(sourceFile, sourceContent); + map2.setSourceContent(sourceFile, sourceContent); }); - return { code: generated.code, map: map3 }; + return { code: generated.code, map: map2 }; }; exports2.SourceNode = SourceNode; } @@ -57091,7 +56907,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_utils3(); + esutils = require_utils4(); Syntax = estraverse.Syntax; function isExpression(node) { return CodeGenerator.Expression.hasOwnProperty(node.type); @@ -57213,7 +57029,7 @@ var require_escodegen = __commonJS({ var len = str.length; return len && esutils.code.isLineTerminator(str.charCodeAt(len - 1)); } - function merge2(target, override) { + function merge(target, override) { var key; for (key in override) { if (override.hasOwnProperty(key)) { @@ -57458,7 +57274,7 @@ var require_escodegen = __commonJS({ function noEmptySpace() { return space ? space : " "; } - function join7(left, right) { + function join2(left, right) { var leftSource, rightSource, leftCharCode, rightCharCode; leftSource = toSourceNodeWhenNeeded(left).toString(); if (leftSource.length === 0) { @@ -57789,8 +57605,8 @@ var require_escodegen = __commonJS({ } else { result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT)); } - result = join7(result, operator); - result = [join7( + result = join2(result, operator); + result = [join2( result, that.generateExpression(stmt.right, Precedence.Assignment, E_TTT) ), ")"]; @@ -57933,11 +57749,11 @@ var require_escodegen = __commonJS({ var result, fragment; result = ["class"]; if (stmt.id) { - result = join7(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT)); + result = join2(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT)); } if (stmt.superClass) { - fragment = join7("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT)); - result = join7(result, fragment); + fragment = join2("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT)); + result = join2(result, fragment); } result.push(space); result.push(this.generateStatement(stmt.body, S_TFFT)); @@ -57950,9 +57766,9 @@ var require_escodegen = __commonJS({ return escapeDirective(stmt.directive) + this.semicolon(flags); }, DoWhileStatement: function(stmt, flags) { - var result = join7("do", this.maybeBlock(stmt.body, S_TFFF)); + var result = join2("do", this.maybeBlock(stmt.body, S_TFFF)); result = this.maybeBlockSuffix(stmt.body, result); - return join7(result, [ + return join2(result, [ "while" + space + "(", this.generateExpression(stmt.test, Precedence.Sequence, E_TTT), ")" + this.semicolon(flags) @@ -57988,11 +57804,11 @@ var require_escodegen = __commonJS({ ExportDefaultDeclaration: function(stmt, flags) { var result = ["export"], bodyFlags; bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF; - result = join7(result, "default"); + result = join2(result, "default"); if (isStatement(stmt.declaration)) { - result = join7(result, this.generateStatement(stmt.declaration, bodyFlags)); + result = join2(result, this.generateStatement(stmt.declaration, bodyFlags)); } else { - result = join7(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags)); + result = join2(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags)); } return result; }, @@ -58000,15 +57816,15 @@ var require_escodegen = __commonJS({ var result = ["export"], bodyFlags, that = this; bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF; if (stmt.declaration) { - return join7(result, this.generateStatement(stmt.declaration, bodyFlags)); + return join2(result, this.generateStatement(stmt.declaration, bodyFlags)); } if (stmt.specifiers) { if (stmt.specifiers.length === 0) { - result = join7(result, "{" + space + "}"); + result = join2(result, "{" + space + "}"); } else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) { - result = join7(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT)); + result = join2(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT)); } else { - result = join7(result, "{"); + result = join2(result, "{"); withIndent(function(indent2) { var i5, iz; result.push(newline); @@ -58026,7 +57842,7 @@ var require_escodegen = __commonJS({ result.push(base + "}"); } if (stmt.source) { - result = join7(result, [ + result = join2(result, [ "from" + space, // ModuleSpecifier this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), @@ -58114,7 +57930,7 @@ var require_escodegen = __commonJS({ ]; cursor2 = 0; if (stmt.specifiers[cursor2].type === Syntax.ImportDefaultSpecifier) { - result = join7(result, [ + result = join2(result, [ this.generateExpression(stmt.specifiers[cursor2], Precedence.Sequence, E_TTT) ]); ++cursor2; @@ -58124,7 +57940,7 @@ var require_escodegen = __commonJS({ result.push(","); } if (stmt.specifiers[cursor2].type === Syntax.ImportNamespaceSpecifier) { - result = join7(result, [ + result = join2(result, [ space, this.generateExpression(stmt.specifiers[cursor2], Precedence.Sequence, E_TTT) ]); @@ -58153,7 +57969,7 @@ var require_escodegen = __commonJS({ } } } - result = join7(result, [ + result = join2(result, [ "from" + space, // ModuleSpecifier this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), @@ -58207,7 +58023,7 @@ var require_escodegen = __commonJS({ return result; }, ThrowStatement: function(stmt, flags) { - return [join7( + return [join2( "throw", this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT) ), this.semicolon(flags)]; @@ -58218,7 +58034,7 @@ var require_escodegen = __commonJS({ result = this.maybeBlockSuffix(stmt.block, result); if (stmt.handlers) { for (i5 = 0, iz = stmt.handlers.length; i5 < iz; ++i5) { - result = join7(result, this.generateStatement(stmt.handlers[i5], S_TFFF)); + result = join2(result, this.generateStatement(stmt.handlers[i5], S_TFFF)); if (stmt.finalizer || i5 + 1 !== iz) { result = this.maybeBlockSuffix(stmt.handlers[i5].body, result); } @@ -58226,7 +58042,7 @@ var require_escodegen = __commonJS({ } else { guardedHandlers = stmt.guardedHandlers || []; for (i5 = 0, iz = guardedHandlers.length; i5 < iz; ++i5) { - result = join7(result, this.generateStatement(guardedHandlers[i5], S_TFFF)); + result = join2(result, this.generateStatement(guardedHandlers[i5], S_TFFF)); if (stmt.finalizer || i5 + 1 !== iz) { result = this.maybeBlockSuffix(guardedHandlers[i5].body, result); } @@ -58234,13 +58050,13 @@ var require_escodegen = __commonJS({ if (stmt.handler) { if (Array.isArray(stmt.handler)) { for (i5 = 0, iz = stmt.handler.length; i5 < iz; ++i5) { - result = join7(result, this.generateStatement(stmt.handler[i5], S_TFFF)); + result = join2(result, this.generateStatement(stmt.handler[i5], S_TFFF)); if (stmt.finalizer || i5 + 1 !== iz) { result = this.maybeBlockSuffix(stmt.handler[i5].body, result); } } } else { - result = join7(result, this.generateStatement(stmt.handler, S_TFFF)); + result = join2(result, this.generateStatement(stmt.handler, S_TFFF)); if (stmt.finalizer) { result = this.maybeBlockSuffix(stmt.handler.body, result); } @@ -58248,7 +58064,7 @@ var require_escodegen = __commonJS({ } } if (stmt.finalizer) { - result = join7(result, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]); + result = join2(result, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]); } return result; }, @@ -58282,7 +58098,7 @@ var require_escodegen = __commonJS({ withIndent(function() { if (stmt.test) { result = [ - join7("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)), + join2("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)), ":" ]; } else { @@ -58330,9 +58146,9 @@ var require_escodegen = __commonJS({ result.push(this.maybeBlock(stmt.consequent, S_TFFF)); result = this.maybeBlockSuffix(stmt.consequent, result); if (stmt.alternate.type === Syntax.IfStatement) { - result = join7(result, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]); + result = join2(result, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]); } else { - result = join7(result, join7("else", this.maybeBlock(stmt.alternate, bodyFlags))); + result = join2(result, join2("else", this.maybeBlock(stmt.alternate, bodyFlags))); } } else { result.push(this.maybeBlock(stmt.consequent, bodyFlags)); @@ -58433,7 +58249,7 @@ var require_escodegen = __commonJS({ }, ReturnStatement: function(stmt, flags) { if (stmt.argument) { - return [join7( + return [join2( "return", this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT) ), this.semicolon(flags)]; @@ -58465,7 +58281,7 @@ var require_escodegen = __commonJS({ return result; } }; - merge2(CodeGenerator.prototype, CodeGenerator.Statement); + merge(CodeGenerator.prototype, CodeGenerator.Statement); CodeGenerator.Expression = { SequenceExpression: function(expr, precedence, flags) { var result, i5, iz; @@ -58522,14 +58338,14 @@ var require_escodegen = __commonJS({ if (leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) { result = [fragment, noEmptySpace(), expr.operator]; } else { - result = join7(fragment, expr.operator); + result = join2(fragment, expr.operator); } fragment = this.generateExpression(expr.right, rightPrecedence, flags); if (expr.operator === "/" && fragment.toString().charAt(0) === "/" || expr.operator.slice(-1) === "<" && fragment.toString().slice(0, 3) === "!--") { result.push(noEmptySpace()); result.push(fragment); } else { - result = join7(result, fragment); + result = join2(result, fragment); } if (expr.operator === "in" && !(flags & F_ALLOW_IN)) { return ["(", result, ")"]; @@ -58569,7 +58385,7 @@ var require_escodegen = __commonJS({ var result, length, i5, iz, itemFlags; length = expr["arguments"].length; itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF; - result = join7( + result = join2( "new", this.generateExpression(expr.callee, Precedence.New, itemFlags) ); @@ -58619,11 +58435,11 @@ var require_escodegen = __commonJS({ var result, fragment, rightCharCode, leftSource, leftCharCode; fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT); if (space === "") { - result = join7(expr.operator, fragment); + result = join2(expr.operator, fragment); } else { result = [expr.operator]; if (expr.operator.length > 2) { - result = join7(result, fragment); + result = join2(result, fragment); } else { leftSource = toSourceNodeWhenNeeded(result).toString(); leftCharCode = leftSource.charCodeAt(leftSource.length - 1); @@ -58646,7 +58462,7 @@ var require_escodegen = __commonJS({ result = "yield"; } if (expr.argument) { - result = join7( + result = join2( result, this.generateExpression(expr.argument, Precedence.Yield, E_TTT) ); @@ -58654,7 +58470,7 @@ var require_escodegen = __commonJS({ return parenthesize(result, Precedence.Yield, precedence); }, AwaitExpression: function(expr, precedence, flags) { - var result = join7( + var result = join2( expr.all ? "await*" : "await", this.generateExpression(expr.argument, Precedence.Await, E_TTT) ); @@ -58737,11 +58553,11 @@ var require_escodegen = __commonJS({ var result, fragment; result = ["class"]; if (expr.id) { - result = join7(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT)); + result = join2(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT)); } if (expr.superClass) { - fragment = join7("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT)); - result = join7(result, fragment); + fragment = join2("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT)); + result = join2(result, fragment); } result.push(space); result.push(this.generateStatement(expr.body, S_TFFT)); @@ -58756,7 +58572,7 @@ var require_escodegen = __commonJS({ } if (expr.kind === "get" || expr.kind === "set") { fragment = [ - join7(expr.kind, this.generatePropertyKey(expr.key, expr.computed)), + join2(expr.kind, this.generatePropertyKey(expr.key, expr.computed)), this.generateFunctionBody(expr.value) ]; } else { @@ -58766,7 +58582,7 @@ var require_escodegen = __commonJS({ this.generateFunctionBody(expr.value) ]; } - return join7(result, fragment); + return join2(result, fragment); }, Property: function(expr, precedence, flags) { if (expr.kind === "get" || expr.kind === "set") { @@ -58961,7 +58777,7 @@ var require_escodegen = __commonJS({ for (i5 = 0, iz = expr.blocks.length; i5 < iz; ++i5) { fragment = that.generateExpression(expr.blocks[i5], Precedence.Sequence, E_TTT); if (i5 > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) { - result = join7(result, fragment); + result = join2(result, fragment); } else { result.push(fragment); } @@ -58969,13 +58785,13 @@ var require_escodegen = __commonJS({ }); } if (expr.filter) { - result = join7(result, "if" + space); + result = join2(result, "if" + space); fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT); - result = join7(result, ["(", fragment, ")"]); + result = join2(result, ["(", fragment, ")"]); } if (!extra.moz.comprehensionExpressionStartsWithAssignment) { fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT); - result = join7(result, fragment); + result = join2(result, fragment); } result.push(expr.type === Syntax.GeneratorExpression ? ")" : "]"); return result; @@ -58991,8 +58807,8 @@ var require_escodegen = __commonJS({ } else { fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT); } - fragment = join7(fragment, expr.of ? "of" : "in"); - fragment = join7(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT)); + fragment = join2(fragment, expr.of ? "of" : "in"); + fragment = join2(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT)); return ["for" + space + "(", fragment, ")"]; }, SpreadElement: function(expr, precedence, flags) { @@ -59040,7 +58856,7 @@ var require_escodegen = __commonJS({ ], Precedence.Call, precedence); } }; - merge2(CodeGenerator.prototype, CodeGenerator.Expression); + merge(CodeGenerator.prototype, CodeGenerator.Expression); CodeGenerator.prototype.generateExpression = function(expr, precedence, flags) { var result, type; type = expr.type || Syntax.Property; @@ -63757,45 +63573,45 @@ var require_esprima = __commonJS({ this.errors = []; this.tolerant = false; } - ErrorHandler2.prototype.recordError = function(error3) { - this.errors.push(error3); + ErrorHandler2.prototype.recordError = function(error2) { + this.errors.push(error2); }; - ErrorHandler2.prototype.tolerate = function(error3) { + ErrorHandler2.prototype.tolerate = function(error2) { if (this.tolerant) { - this.recordError(error3); + this.recordError(error2); } else { - throw error3; + throw error2; } }; ErrorHandler2.prototype.constructError = function(msg, column) { - var error3 = new Error(msg); + var error2 = new Error(msg); try { - throw error3; + throw error2; } catch (base) { if (Object.create && Object.defineProperty) { - error3 = Object.create(base); - Object.defineProperty(error3, "column", { value: column }); + error2 = Object.create(base); + Object.defineProperty(error2, "column", { value: column }); } } - return error3; + return error2; }; ErrorHandler2.prototype.createError = function(index, line, col, description) { var msg = "Line " + line + ": " + description; - var error3 = this.constructError(msg, col); - error3.index = index; - error3.lineNumber = line; - error3.description = description; - return error3; + var error2 = this.constructError(msg, col); + error2.index = index; + error2.lineNumber = line; + error2.description = description; + return error2; }; ErrorHandler2.prototype.throwError = function(index, line, col, description) { throw this.createError(index, line, col, description); }; ErrorHandler2.prototype.tolerateError = function(index, line, col, description) { - var error3 = this.createError(index, line, col, description); + var error2 = this.createError(index, line, col, description); if (this.tolerant) { - this.recordError(error3); + this.recordError(error2); } else { - throw error3; + throw error2; } }; return ErrorHandler2; @@ -65610,19 +65426,19 @@ var require_types = __commonJS({ })() ); exports2.Def = Def; - var Field2 = ( + var Field = ( /** @class */ (function() { - function Field3(name, type, defaultFn, hidden) { + function Field2(name, type, defaultFn, hidden) { this.name = name; this.type = type; this.defaultFn = defaultFn; this.hidden = !!hidden; } - Field3.prototype.toString = function() { + Field2.prototype.toString = function() { return JSON.stringify(this.name) + ": " + this.type; }; - Field3.prototype.getValue = function(obj) { + Field2.prototype.getValue = function(obj) { var value = obj[this.name]; if (typeof value !== "undefined") { return value; @@ -65632,7 +65448,7 @@ var require_types = __commonJS({ } return value; }; - return Field3; + return Field2; })() ); function shallowStringify(value) { @@ -65672,7 +65488,7 @@ var require_types = __commonJS({ } if (isObject.check(value)) { return new ObjectType(Object.keys(value).map(function(name2) { - return new Field2(name2, Type.from(value[name2], name2)); + return new Field(name2, Type.from(value[name2], name2)); })); } if (typeof value === "function") { @@ -65713,7 +65529,7 @@ var require_types = __commonJS({ return type; } var isString = defBuiltInType("string", "truthy"); - var isFunction2 = defBuiltInType("function", function() { + var isFunction = defBuiltInType("function", function() { }); var isArray = defBuiltInType("array", []); var isObject = defBuiltInType("object", {}); @@ -65725,7 +65541,7 @@ var require_types = __commonJS({ var isUndefined = defBuiltInType("undefined", void 0); var builtInTypes = { string: isString, - function: isFunction2, + function: isFunction, array: isArray, object: isObject, RegExp: isRegExp, @@ -65875,7 +65691,7 @@ var require_types = __commonJS({ console.error("Ignoring attempt to redefine field " + JSON.stringify(name) + " of finalized type " + JSON.stringify(this.typeName)); return this; } - this.ownFields[name] = new Field2(name, Type.from(type), defaultFn, hidden); + this.ownFields[name] = new Field(name, Type.from(type), defaultFn, hidden); return this; }; DefImpl2.prototype.finalize = function() { @@ -65953,7 +65769,7 @@ var require_types = __commonJS({ if (isUndefined.check(func)) { delete nodePrototype[name]; } else { - isFunction2.assert(func); + isFunction.assert(func); Object.defineProperty(nodePrototype, name, { enumerable: true, configurable: true, @@ -66164,7 +65980,7 @@ var require_path = __commonJS({ } } }; - Pp.map = function map3(callback, context) { + Pp.map = function map2(callback, context) { var result = []; this.each(function(childPath) { result.push(callback.call(this, childPath)); @@ -67023,7 +66839,7 @@ var require_path_visitor = __commonJS({ var NodePath = fork.use(node_path_1.default); var isArray = types3.builtInTypes.array; var isObject = types3.builtInTypes.object; - var isFunction2 = types3.builtInTypes.function; + var isFunction = types3.builtInTypes.function; var undefined2; var PathVisitor = function PathVisitor2() { if (!(this instanceof PathVisitor2)) { @@ -67050,7 +66866,7 @@ var require_path_visitor = __commonJS({ for (var i5 = 0; i5 < typeNameCount; ++i5) { var typeName = typeNameKeys[i5]; methodName = "visit" + supertypeTable[typeName]; - if (isFunction2.check(visitor[methodName])) { + if (isFunction.check(visitor[methodName])) { methodNameTable[typeName] = methodName; } } @@ -67073,8 +66889,8 @@ var require_path_visitor = __commonJS({ Vp.constructor = Visitor; extend(Vp, methods); extend(Visitor, PathVisitor); - isFunction2.assert(Visitor.fromMethodsObject); - isFunction2.assert(Visitor.visit); + isFunction.assert(Visitor.fromMethodsObject); + isFunction.assert(Visitor.visit); return new Visitor(); }; function extend(target, source) { @@ -67574,7 +67390,7 @@ var require_shared = __commonJS({ }); // node_modules/ast-types/def/core.js -var require_core = __commonJS({ +var require_core2 = __commonJS({ "node_modules/ast-types/def/core.js"(exports2, module2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -67709,7 +67525,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_core()); + var core_1 = tslib_1.__importDefault(require_core2()); var types_1 = tslib_1.__importDefault(require_types()); var shared_1 = tslib_1.__importDefault(require_shared()); function default_1(fork) { @@ -68373,7 +68189,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_core()); + var core_1 = tslib_1.__importDefault(require_core2()); function default_1(fork) { fork.use(core_1.default); var types3 = fork.use(types_1.default); @@ -68405,14 +68221,14 @@ var require_namedTypes = __commonJS({ }); // node_modules/ast-types/main.js -var require_main3 = __commonJS({ +var require_main = __commonJS({ "node_modules/ast-types/main.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); 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_core()); + var core_1 = tslib_1.__importDefault(require_core2()); var es6_1 = tslib_1.__importDefault(require_es6()); var es7_1 = tslib_1.__importDefault(require_es7()); var es2020_1 = tslib_1.__importDefault(require_es2020()); @@ -68573,7 +68389,7 @@ function checkNames({ callee }, names) { function checkName(name, names) { for (let i5 = 0; i5 < names.length; i5++) { const n3 = names[i5]; - if (import_util3.types.isRegExp(n3)) { + if (import_util.types.isRegExp(n3)) { if (n3.test(name)) { return true; } @@ -68583,13 +68399,13 @@ function checkName(name, names) { } return false; } -var import_util3, import_escodegen, import_esprima, import_ast_types; +var import_util, import_escodegen, import_esprima, import_ast_types; var init_degenerator = __esm({ "node_modules/degenerator/dist/degenerator.js"() { - import_util3 = require("util"); + import_util = require("util"); import_escodegen = __toESM(require_escodegen(), 1); import_esprima = __toESM(require_esprima(), 1); - import_ast_types = __toESM(require_main3(), 1); + import_ast_types = __toESM(require_main(), 1); } }); @@ -68694,7 +68510,7 @@ function hostToQuickJSHandle(vm, val) { return vm.newBigInt(val); } else if (typeof val === "boolean") { return val ? vm.true : vm.false; - } else if (import_util4.types.isPromise(val)) { + } else if (import_util2.types.isPromise(val)) { const promise = vm.newPromise(); val.then((r5) => { promise.resolve(hostToQuickJSHandle(vm, r5)); @@ -68704,15 +68520,15 @@ function hostToQuickJSHandle(vm, val) { vm.executePendingJobs(); }); return promise.handle; - } else if (import_util4.types.isNativeError(val)) { + } else if (import_util2.types.isNativeError(val)) { return vm.newError(val); } throw new Error(`Unsupported value: ${val}`); } -var import_util4, SANDBOX_FUNCTION_PREFIX; +var import_util2, SANDBOX_FUNCTION_PREFIX; var init_compile = __esm({ "node_modules/degenerator/dist/compile.js"() { - import_util4 = require("util"); + import_util2 = require("util"); init_degenerator(); SANDBOX_FUNCTION_PREFIX = "__degeneratorSandboxFunction:"; } @@ -68776,7 +68592,7 @@ function isGMT(v) { return v === "GMT"; } var import_dns; -var init_util2 = __esm({ +var init_util = __esm({ "node_modules/pac-resolver/dist/util.js"() { import_dns = require("dns"); } @@ -68796,7 +68612,7 @@ async function dnsResolve(host) { } var init_dnsResolve = __esm({ "node_modules/pac-resolver/dist/dnsResolve.js"() { - init_util2(); + init_util(); } }); @@ -68919,7 +68735,7 @@ var require_netmask4 = __commonJS({ if (typeof maskStr === "string" && maskStr.indexOf(".") > -1) { try { this.maskLong = ip2long(maskStr); - } catch (error3) { + } catch (error2) { throw new Error("Invalid mask: " + maskStr); } this.bitmask = NaN; @@ -68940,7 +68756,7 @@ var require_netmask4 = __commonJS({ } try { this.netLong = (ip2long(net11) & this.maskLong) >>> 0; - } catch (error3) { + } catch (error2) { throw new Error("Invalid net address: " + net11); } if (!(this.bitmask <= 32)) { @@ -69117,7 +68933,7 @@ var require_netmask6 = __commonJS({ } try { this.netBigint = ip6bigint(net11) & this.maskBigint; - } catch (error3) { + } catch (error2) { throw new Error("Invalid IPv6 net address: " + net11); } this.size = Number(1n << BigInt(128 - this.bitmask)); @@ -69169,14 +68985,8 @@ var require_netmask = __commonJS({ "node_modules/netmask/dist/netmask.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.long2ip = exports2.ip2long = exports2.Netmask = void 0; + 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) { @@ -69197,13 +69007,6 @@ 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") { @@ -69252,7 +69055,7 @@ var import_netmask; var init_isInNet = __esm({ "node_modules/pac-resolver/dist/isInNet.js"() { import_netmask = __toESM(require_netmask(), 1); - init_util2(); + init_util(); } }); @@ -69278,7 +69081,7 @@ async function isResolvable(host) { } var init_isResolvable = __esm({ "node_modules/pac-resolver/dist/isResolvable.js"() { - init_util2(); + init_util(); } }); @@ -69310,13 +69113,13 @@ function normalizeFamily(family) { } return family ? family.toLowerCase() : "ipv4"; } -var import_os3, ip; +var import_os, ip; var init_ip = __esm({ "node_modules/pac-resolver/dist/ip.js"() { - import_os3 = __toESM(require("os"), 1); + import_os = __toESM(require("os"), 1); ip = { address() { - const interfaces = import_os3.default.networkInterfaces(); + const interfaces = import_os.default.networkInterfaces(); const family = normalizeFamily(); const all = Object.values(interfaces).map((addrs = []) => { const addresses = addrs.filter((details) => { @@ -69473,7 +69276,7 @@ function isWeekday(v) { var weekdays; var init_weekdayRange = __esm({ "node_modules/pac-resolver/dist/weekdayRange.js"() { - init_util2(); + init_util(); weekdays = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]; } }); @@ -69682,7 +69485,7 @@ function parseDylink(module2) { return null; const bytes = new Uint8Array(sections[0]); const offset = { value: 0 }; - const info2 = { + const info5 = { memorySize: 0, memoryAlignment: 0, tableSize: 0, @@ -69694,22 +69497,22 @@ function parseDylink(module2) { const subsectionSize = readULEB128(bytes, offset); const subsectionEnd = offset.value + subsectionSize; if (subsectionType === 1) { - info2.memorySize = readULEB128(bytes, offset); - info2.memoryAlignment = readULEB128(bytes, offset); - info2.tableSize = readULEB128(bytes, offset); - info2.tableAlignment = readULEB128(bytes, offset); + info5.memorySize = readULEB128(bytes, offset); + info5.memoryAlignment = readULEB128(bytes, offset); + info5.tableSize = readULEB128(bytes, offset); + info5.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; - info2.needed.push(name); + info5.needed.push(name); } } offset.value = subsectionEnd; } - return info2; + return info5; } async function loadExtension(descriptor, mainExports, wasiBuiltins, wasiUserOverrides, memoryProxy, allocBase) { let module2; @@ -69891,7 +69694,7 @@ async function restoreExtensions(descriptors, extensionMeta, mainExports, wasiBu return loaded; } var decoder; -var init_extensions2 = __esm({ +var init_extensions = __esm({ "node_modules/quickjs-wasi/dist/extensions.js"() { decoder = new TextDecoder(); } @@ -69910,10 +69713,10 @@ var import_meta, __addDisposableResource2, __disposeResources2, EvalFlags, Compi var init_dist9 = __esm({ "node_modules/quickjs-wasi/dist/index.js"() { init_wasi_shim(); - init_extensions2(); + init_extensions(); init_version(); import_meta = {}; - __addDisposableResource2 = function(env2, value, async) { + __addDisposableResource2 = function(env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); var dispose, inner; @@ -69934,23 +69737,23 @@ var init_dist9 = __esm({ return Promise.reject(e5); } }; - env2.stack.push({ value, dispose, async }); + env.stack.push({ value, dispose, async }); } else if (async) { - env2.stack.push({ async: true }); + env.stack.push({ async: true }); } return value; }; __disposeResources2 = /* @__PURE__ */ (function(SuppressedError2) { - return function(env2) { + return function(env) { function fail(e5) { - env2.error = env2.hasError ? new SuppressedError2(e5, env2.error, "An error was suppressed during disposal.") : e5; - env2.hasError = true; + env.error = env.hasError ? new SuppressedError2(e5, env.error, "An error was suppressed during disposal.") : e5; + env.hasError = true; } var r5, s = 0; function next() { - while (r5 = env2.stack.pop()) { + while (r5 = env.stack.pop()) { try { - if (!r5.async && s === 1) return s = 0, env2.stack.push(r5), Promise.resolve().then(next); + if (!r5.async && s === 1) return s = 0, env.stack.push(r5), Promise.resolve().then(next); if (r5.dispose) { var result = r5.dispose.call(r5.value); if (r5.async) return s |= 2, Promise.resolve(result).then(next, function(e5) { @@ -69962,14 +69765,14 @@ var init_dist9 = __esm({ fail(e5); } } - if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve(); - if (env2.hasError) throw env2.error; + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; } return next(); }; - })(typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { + })(typeof SuppressedError === "function" ? SuppressedError : function(error2, suppressed, message) { var e5 = new Error(message); - return e5.name = "SuppressedError", e5.error = error3, e5.suppressed = suppressed, e5; + return e5.name = "SuppressedError", e5.error = error2, e5.suppressed = suppressed, e5; }); EvalFlags = { /** Global script mode (default). */ @@ -70340,8 +70143,8 @@ var init_dist9 = __esm({ } else if (wasmInput) { return WebAssembly.compile(wasmInput); } else { - const { readFile: readFile4 } = await import("node:fs/promises"); - const buf = await readFile4(new URL("../quickjs.wasm", import_meta.url)); + const { readFile } = await import("node:fs/promises"); + const buf = await readFile(new URL("../quickjs.wasm", import_meta.url)); return WebAssembly.compile(buf); } } @@ -71785,17 +71588,17 @@ function omit4(obj, ...keys) { } return ret; } -var import_socks2, import_debug14, dns2, net7, tls4, import_url5, debug11, setServernameFromNonIpHost3, SocksProxyAgent2; +var import_socks2, import_debug10, dns2, net7, tls4, import_url5, debug12, 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); init_dist5(); - import_debug14 = __toESM(require_src(), 1); + import_debug10 = __toESM(require_src(), 1); dns2 = __toESM(require("dns"), 1); net7 = __toESM(require("net"), 1); tls4 = __toESM(require("tls"), 1); import_url5 = require("url"); - debug11 = (0, import_debug14.default)("socks-proxy-agent"); + debug12 = (0, import_debug10.default)("socks-proxy-agent"); setServernameFromNonIpHost3 = (options) => { if (options.servername === void 0 && options.host && !net7.isIP(options.host)) { return { @@ -71805,7 +71608,7 @@ var init_dist10 = __esm({ } return options; }; - SocksProxyAgent2 = class extends Agent6 { + SocksProxyAgent2 = class extends Agent4 { constructor(uri, opts) { super(opts); const url = typeof uri === "string" ? new import_url5.URL(uri) : uri; @@ -71855,21 +71658,21 @@ var init_dist10 = __esm({ if (tlsSocket) tlsSocket.destroy(); }; - debug11("Creating socks proxy connection: %o", socksOpts); + debug12("Creating socks proxy connection: %o", socksOpts); const { socket } = await import_socks2.SocksClient.createConnection(socksOpts); - debug11("Successfully created socks proxy connection"); + debug12("Successfully created socks proxy connection"); if (timeout !== null) { socket.setTimeout(timeout); socket.on("timeout", () => cleanup()); } if (opts.secureEndpoint) { - debug11("Upgrading socket connection to TLS"); + debug12("Upgrading socket connection to TLS"); const tlsSocket = tls4.connect({ ...omit4(setServernameFromNonIpHost3(opts), "host", "path", "port"), socket }); - tlsSocket.once("error", (error3) => { - debug11("Socket TLS error", error3.message); + tlsSocket.once("error", (error2) => { + debug12("Socket TLS error", error2.message); cleanup(tlsSocket); }); return tlsSocket; @@ -71906,12 +71709,12 @@ function parseProxyResponse2(socket) { } function onend() { cleanup(); - debug12("onend"); + debug13("onend"); reject(new Error("Proxy connection ended before receiving CONNECT response")); } function onerror(err) { cleanup(); - debug12("onerror %o", err); + debug13("onerror %o", err); reject(err); } function ondata(b6) { @@ -71920,7 +71723,7 @@ function parseProxyResponse2(socket) { const buffered = Buffer.concat(buffers, buffersLength); const endOfHeaders = buffered.indexOf("\r\n\r\n"); if (endOfHeaders === -1) { - debug12("have not received end of HTTP headers yet..."); + debug13("have not received end of HTTP headers yet..."); read(); return; } @@ -71953,7 +71756,7 @@ function parseProxyResponse2(socket) { headers[key] = value; } } - debug12("got proxy server response: %o %o", firstLine, headers); + debug13("got proxy server response: %o %o", firstLine, headers); cleanup(); resolve({ connect: { @@ -71969,11 +71772,11 @@ function parseProxyResponse2(socket) { read(); }); } -var import_debug15, debug12; +var import_debug11, debug13; 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); - debug12 = (0, import_debug15.default)("https-proxy-agent:parse-proxy-response"); + import_debug11 = __toESM(require_src(), 1); + debug13 = (0, import_debug11.default)("https-proxy-agent:parse-proxy-response"); } }); @@ -71995,17 +71798,17 @@ function omit5(obj, ...keys) { } return ret; } -var net8, tls5, import_assert2, import_debug16, import_url6, debug13, setServernameFromNonIpHost4, HttpsProxyAgent2; +var net8, tls5, import_assert2, import_debug12, import_url6, debug14, setServernameFromNonIpHost4, HttpsProxyAgent2; var init_dist11 = __esm({ "node_modules/pac-proxy-agent/node_modules/https-proxy-agent/dist/index.js"() { net8 = __toESM(require("net"), 1); tls5 = __toESM(require("tls"), 1); import_assert2 = __toESM(require("assert"), 1); - import_debug16 = __toESM(require_src(), 1); + import_debug12 = __toESM(require_src(), 1); init_dist5(); import_url6 = require("url"); init_parse_proxy_response2(); - debug13 = (0, import_debug16.default)("https-proxy-agent"); + debug14 = (0, import_debug12.default)("https-proxy-agent"); setServernameFromNonIpHost4 = (options) => { if (options.servername === void 0 && options.host && !net8.isIP(options.host)) { return { @@ -72015,13 +71818,13 @@ var init_dist11 = __esm({ } return options; }; - HttpsProxyAgent2 = class extends Agent6 { + HttpsProxyAgent2 = class extends Agent4 { 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 ?? {}; - debug13("Creating new HttpsProxyAgent instance: %o", this.proxy.href); + debug14("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 = { @@ -72043,10 +71846,10 @@ var init_dist11 = __esm({ } let socket; if (proxy.protocol === "https:") { - debug13("Creating `tls.Socket`: %o", this.connectOpts); + debug14("Creating `tls.Socket`: %o", this.connectOpts); socket = tls5.connect(setServernameFromNonIpHost4(this.connectOpts)); } else { - debug13("Creating `net.Socket`: %o", this.connectOpts); + debug14("Creating `net.Socket`: %o", this.connectOpts); socket = net8.connect(this.connectOpts); } const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; @@ -72074,7 +71877,7 @@ var init_dist11 = __esm({ if (connect13.statusCode === 200) { req.once("socket", resume2); if (opts.secureEndpoint) { - debug13("Upgrading socket connection to TLS"); + debug14("Upgrading socket connection to TLS"); return tls5.connect({ ...omit5(setServernameFromNonIpHost4(opts), "host", "path", "port"), socket @@ -72086,7 +71889,7 @@ var init_dist11 = __esm({ const fakeSocket = new net8.Socket({ writable: false }); fakeSocket.readable = true; req.once("socket", (s) => { - debug13("Replaying proxy buffer for failed request"); + debug14("Replaying proxy buffer for failed request"); (0, import_assert2.default)(s.listenerCount("data") > 0); s.push(buffered); s.push(null); @@ -72113,22 +71916,22 @@ function omit6(obj, ...keys) { } return ret; } -var net9, tls6, import_debug17, import_events3, import_url7, debug14, HttpProxyAgent2; +var net9, tls6, import_debug13, import_events3, import_url7, debug15, HttpProxyAgent2; var init_dist12 = __esm({ "node_modules/pac-proxy-agent/node_modules/http-proxy-agent/dist/index.js"() { net9 = __toESM(require("net"), 1); tls6 = __toESM(require("tls"), 1); - import_debug17 = __toESM(require_src(), 1); + import_debug13 = __toESM(require_src(), 1); import_events3 = require("events"); init_dist5(); import_url7 = require("url"); - debug14 = (0, import_debug17.default)("http-proxy-agent"); - HttpProxyAgent2 = class extends Agent6 { + debug15 = (0, import_debug13.default)("http-proxy-agent"); + HttpProxyAgent2 = class extends Agent4 { constructor(proxy, opts) { super(opts); this.proxy = typeof proxy === "string" ? new import_url7.URL(proxy) : proxy; this.proxyHeaders = opts?.headers ?? {}; - debug14("Creating new HttpProxyAgent instance: %o", this.proxy.href); + debug15("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 = { @@ -72174,21 +71977,21 @@ var init_dist12 = __esm({ } let first; let endOfHeaders; - debug14("Regenerating stored HTTP header string for request"); + debug15("Regenerating stored HTTP header string for request"); req._implicitHeader(); if (req.outputData && req.outputData.length > 0) { - debug14("Patching connection write() output buffer with updated header"); + debug15("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); - debug14("Output buffer: %o", req.outputData[0].data); + debug15("Output buffer: %o", req.outputData[0].data); } let socket; if (this.proxy.protocol === "https:") { - debug14("Creating `tls.Socket`: %o", this.connectOpts); + debug15("Creating `tls.Socket`: %o", this.connectOpts); socket = tls6.connect(this.connectOpts); } else { - debug14("Creating `net.Socket`: %o", this.connectOpts); + debug15("Creating `net.Socket`: %o", this.connectOpts); socket = net9.connect(this.connectOpts); } await (0, import_events3.once)(socket, "connect"); @@ -72204,20 +72007,20 @@ var dist_exports7 = {}; __export(dist_exports7, { PacProxyAgent: () => PacProxyAgent }); -var net10, tls7, crypto3, import_events4, import_debug18, import_url8, debug15, setServernameFromNonIpHost5, PacProxyAgent; +var net10, tls7, crypto2, import_events4, import_debug14, import_url8, debug16, setServernameFromNonIpHost5, PacProxyAgent; var init_dist13 = __esm({ "node_modules/pac-proxy-agent/dist/index.js"() { net10 = __toESM(require("net"), 1); tls7 = __toESM(require("tls"), 1); - crypto3 = __toESM(require("crypto"), 1); + crypto2 = __toESM(require("crypto"), 1); import_events4 = require("events"); - import_debug18 = __toESM(require_src(), 1); + import_debug14 = __toESM(require_src(), 1); import_url8 = require("url"); init_dist5(); init_dist6(); init_dist8(); init_dist9(); - debug15 = (0, import_debug18.default)("pac-proxy-agent"); + debug16 = (0, import_debug14.default)("pac-proxy-agent"); setServernameFromNonIpHost5 = (options) => { if (options.servername === void 0 && options.host && !net10.isIP(options.host)) { return { @@ -72227,7 +72030,7 @@ var init_dist13 = __esm({ } return options; }; - PacProxyAgent = class extends Agent6 { + PacProxyAgent = class extends Agent4 { constructor(uri, opts) { super(opts); this.clearResolverPromise = () => { @@ -72235,7 +72038,7 @@ var init_dist13 = __esm({ }; const uriStr = typeof uri === "string" ? uri : uri.href; this.uri = new import_url8.URL(uriStr.replace(/^pac\+/i, "")); - debug15("Creating PacProxyAgent with URI %o", this.uri.href); + debug16("Creating PacProxyAgent with URI %o", this.uri.href); this.opts = { ...opts }; this.cache = void 0; this.resolver = void 0; @@ -72262,9 +72065,9 @@ var init_dist13 = __esm({ QuickJS.create(), this.loadPacFile() ]); - const hash = crypto3.createHash("sha1").update(code).digest("hex"); + const hash = crypto2.createHash("sha1").update(code).digest("hex"); if (this.resolver && this.resolverHash === hash) { - debug15("Same sha1 hash for code - contents have not changed, reusing previous proxy resolver"); + debug16("Same sha1 hash for code - contents have not changed, reusing previous proxy resolver"); qjs.dispose(); return this.resolver; } @@ -72272,13 +72075,13 @@ var init_dist13 = __esm({ this.qjs.dispose(); } this.qjs = qjs; - debug15("Creating new proxy resolver instance"); + debug16("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") { - debug15("Got ENOTMODIFIED response, reusing previous proxy resolver"); + debug16("Got ENOTMODIFIED response, reusing previous proxy resolver"); return this.resolver; } throw err; @@ -72290,12 +72093,12 @@ var init_dist13 = __esm({ * @api private */ async loadPacFile() { - debug15("Loading PAC file: %o", this.uri); + debug16("Loading PAC file: %o", this.uri); const rs = await getUri(this.uri, { ...this.opts, cache: this.cache }); - debug15("Got `Readable` instance for URI"); + debug16("Got `Readable` instance for URI"); this.cache = rs; const buf = await toBuffer(rs); - debug15("Read %o byte PAC file from URI", buf.length); + debug16("Read %o byte PAC file from URI", buf.length); return buf.toString("utf8"); } /** @@ -72309,7 +72112,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 }); - debug15("url: %s", url); + debug16("url: %s", url); let result = await resolver(url); if (!result) { result = "DIRECT"; @@ -72322,7 +72125,7 @@ var init_dist13 = __esm({ let agent = null; let socket = null; const [type, target] = proxy.split(/\s+/); - debug15("Attempting to use proxy: %o", proxy); + debug16("Attempting to use proxy: %o", proxy); if (type === "DIRECT") { if (secureEndpoint) { socket = tls7.connect(setServernameFromNonIpHost5(opts)); @@ -72361,7 +72164,7 @@ var init_dist13 = __esm({ } throw new Error(`Could not determine proxy type for: ${proxy}`); } catch (err) { - debug15("Got error for proxy %o: %o", proxy, err); + debug16("Got error for proxy %o: %o", proxy, err); req.emit("proxy", { proxy, error: err }); } } @@ -72384,1380 +72187,21 @@ __export(index_exports, { run: () => run }); module.exports = __toCommonJS(index_exports); - -// 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); - }); -} +var core4 = __toESM(require_core()); // src/assumeRole.ts var import_node_assert = __toESM(require("node:assert")); -var import_node_fs2 = __toESM(require("node:fs")); -var import_node_path8 = __toESM(require("node:path")); -var import_client_sts2 = __toESM(require_dist_cjs19()); +var import_node_fs = __toESM(require("node:fs")); +var import_node_path = __toESM(require("node:path")); +var core2 = __toESM(require_core()); +var import_client_sts2 = __toESM(require_dist_cjs56()); // src/helpers.ts -var import_client_sts = __toESM(require_dist_cjs19()); +var core = __toESM(require_core()); +var import_client_sts = __toESM(require_dist_cjs56()); 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", @@ -73793,55 +72237,55 @@ function translateEnvVariables() { } function exportCredentials(creds, outputCredentials, outputEnvCredentials) { if (creds?.AccessKeyId) { - setSecret(creds.AccessKeyId); + core.setSecret(creds.AccessKeyId); } if (creds?.SecretAccessKey) { - setSecret(creds.SecretAccessKey); + core.setSecret(creds.SecretAccessKey); } if (creds?.SessionToken) { - setSecret(creds.SessionToken); + core.setSecret(creds.SessionToken); } if (outputEnvCredentials) { if (creds?.AccessKeyId) { - exportVariable("AWS_ACCESS_KEY_ID", creds.AccessKeyId); + core.exportVariable("AWS_ACCESS_KEY_ID", creds.AccessKeyId); } if (creds?.SecretAccessKey) { - exportVariable("AWS_SECRET_ACCESS_KEY", creds.SecretAccessKey); + core.exportVariable("AWS_SECRET_ACCESS_KEY", creds.SecretAccessKey); } if (creds?.SessionToken) { - exportVariable("AWS_SESSION_TOKEN", creds.SessionToken); + core.exportVariable("AWS_SESSION_TOKEN", creds.SessionToken); } else if (process.env.AWS_SESSION_TOKEN) { - exportVariable("AWS_SESSION_TOKEN", ""); + core.exportVariable("AWS_SESSION_TOKEN", ""); } } if (outputCredentials) { if (creds?.AccessKeyId) { - setOutput("aws-access-key-id", creds.AccessKeyId); + core.setOutput("aws-access-key-id", creds.AccessKeyId); } if (creds?.SecretAccessKey) { - setOutput("aws-secret-access-key", creds.SecretAccessKey); + core.setOutput("aws-secret-access-key", creds.SecretAccessKey); } if (creds?.SessionToken) { - setOutput("aws-session-token", creds.SessionToken); + core.setOutput("aws-session-token", creds.SessionToken); } if (creds?.Expiration) { - setOutput("aws-expiration", creds.Expiration); + core.setOutput("aws-expiration", creds.Expiration); } } } function unsetCredentials(outputEnvCredentials) { if (outputEnvCredentials) { - exportVariable("AWS_ACCESS_KEY_ID", ""); - exportVariable("AWS_SECRET_ACCESS_KEY", ""); - exportVariable("AWS_SESSION_TOKEN", ""); - exportVariable("AWS_REGION", ""); - exportVariable("AWS_DEFAULT_REGION", ""); + 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", ""); } } function exportRegion(region, outputEnvCredentials) { if (outputEnvCredentials) { - exportVariable("AWS_DEFAULT_REGION", region); - exportVariable("AWS_REGION", region); + core.exportVariable("AWS_DEFAULT_REGION", region); + core.exportVariable("AWS_REGION", region); } } async function getCallerIdentity(client) { @@ -73863,11 +72307,11 @@ async function exportAccountId(credentialsClient, maskAccountId) { const accountId = identity.Account; const arn = identity.Arn; if (maskAccountId) { - setSecret(accountId); - setSecret(arn); + core.setSecret(accountId); + core.setSecret(arn); } - setOutput("aws-account-id", accountId); - setOutput("authenticated-arn", arn); + core.setOutput("aws-account-id", accountId); + core.setOutput("authenticated-arn", arn); return accountId; } function sanitizeGitHubVariables(name) { @@ -73878,49 +72322,48 @@ function sanitizeGitHubVariables(name) { async function defaultSleep(ms) { return new Promise((resolve) => setTimeout(resolve, ms)); } -var sleep2 = defaultSleep; +var sleep = defaultSleep; function verifyKeys(creds) { if (!creds) { return false; } if (creds.AccessKeyId) { if (SPECIAL_CHARS_REGEX.test(creds.AccessKeyId)) { - debug("AccessKeyId contains special characters."); + core.debug("AccessKeyId contains special characters."); return false; } } if (creds.SecretAccessKey) { if (SPECIAL_CHARS_REGEX.test(creds.SecretAccessKey)) { - debug("SecretAccessKey contains special characters."); + core.debug("SecretAccessKey contains special characters."); return false; } } return true; } -async function retryAndBackoff(fn, isRetryable, maxRetries = 12, retries = 0, base = 50, label) { +async function retryAndBackoff(fn, isRetryable, maxRetries = 12, retries = 0, base = 50) { try { return await fn(); } catch (err) { if (!isRetryable) { - debug(`retryAndBackoff: error is not retryable: ${errorMessage(err)}`); + core.debug(`retryAndBackoff: error is not retryable: ${errorMessage(err)}`); throw err; } const delay = Math.random() * (2 ** retries * base); const nextRetry = retries + 1; - const opName = label ? ` ${label}` : ""; - info( - `Retry${opName}: attempt ${nextRetry} of ${maxRetries} failed: ${errorMessage(err)}. Retrying after ${Math.floor(delay)}ms.` + core.debug( + `retryAndBackoff: attempt ${nextRetry} of ${maxRetries} failed: ${errorMessage(err)}. Retrying after ${Math.floor(delay)}ms.` ); - await sleep2(delay); + await sleep(delay); if (nextRetry >= maxRetries) { - info(`Retry${opName}: reached max retries (${maxRetries}); giving up.`); + core.debug("retryAndBackoff: reached max retries; giving up."); throw err; } - return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base, label); + return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base); } } -function errorMessage(error3) { - return error3 instanceof Error ? error3.message : String(error3); +function errorMessage(error2) { + return error2 instanceof Error ? error2.message : String(error2); } function isDefined(i5) { return i5 !== void 0 && i5 !== null; @@ -73942,7 +72385,7 @@ function getBooleanInput(name, options) { const falseValue = ["false", "False", "FALSE"]; const optionsWithoutDefault = { ...options }; delete optionsWithoutDefault.default; - const val = getInput(name, optionsWithoutDefault); + const val = core.getInput(name, optionsWithoutDefault); if (trueValue.includes(val)) return true; if (falseValue.includes(val)) return false; if (val === "") return options?.default ?? false; @@ -73956,7 +72399,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\`` async function assumeRoleWithOIDC(params, client, webIdentityToken) { delete params.Tags; delete params.TransitiveTagKeys; - info("Assuming role with OIDC"); + core2.info("Assuming role with OIDC"); try { const creds = await client.send( new import_client_sts2.AssumeRoleWithWebIdentityCommand({ @@ -73965,21 +72408,21 @@ async function assumeRoleWithOIDC(params, client, webIdentityToken) { }) ); return creds; - } catch (error3) { - throw new Error(`Could not assume role with OIDC: ${errorMessage(error3)}`); + } catch (error2) { + throw new Error(`Could not assume role with OIDC: ${errorMessage(error2)}`); } } async function assumeRoleWithWebIdentityTokenFile(params, client, webIdentityTokenFile, workspace) { - debug( + core2.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); - if (!import_node_fs2.default.existsSync(webIdentityTokenFilePath)) { + const webIdentityTokenFilePath = import_node_path.default.isAbsolute(webIdentityTokenFile) ? webIdentityTokenFile : import_node_path.default.join(workspace, webIdentityTokenFile); + if (!import_node_fs.default.existsSync(webIdentityTokenFilePath)) { throw new Error(`Web identity token file does not exist: ${webIdentityTokenFilePath}`); } - info("Assuming role with web identity token file"); + core2.info("Assuming role with web identity token file"); try { - const webIdentityToken = import_node_fs2.default.readFileSync(webIdentityTokenFilePath, "utf8"); + const webIdentityToken = import_node_fs.default.readFileSync(webIdentityTokenFilePath, "utf8"); delete params.Tags; const creds = await client.send( new import_client_sts2.AssumeRoleWithWebIdentityCommand({ @@ -73988,93 +72431,19 @@ async function assumeRoleWithWebIdentityTokenFile(params, client, webIdentityTok }) ); return creds; - } catch (error3) { - throw new Error(`Could not assume role with web identity token file: ${errorMessage(error3)}`); + } catch (error2) { + throw new Error(`Could not assume role with web identity token file: ${errorMessage(error2)}`); } } async function assumeRoleWithCredentials(params, client) { - info("Assuming role with user credentials"); + core2.info("Assuming role with user credentials"); try { const creds = await client.send(new import_client_sts2.AssumeRoleCommand({ ...params })); return creds; - } catch (error3) { - throw new Error(`Could not assume role with user credentials: ${errorMessage(error3)}`); + } catch (error2) { + throw new Error(`Could not assume role with user credentials: ${errorMessage(error2)}`); } } -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, @@ -74088,38 +72457,31 @@ async function assumeRole(params) { webIdentityTokenFile, webIdentityToken, inlineSessionPolicy, - managedSessionPolicies, - customTags + managedSessionPolicies } = { ...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 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 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 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) { - debug("Role session tagging has been skipped."); + core2.debug("Role session tagging has been skipped."); } else { - debug(`${tags.length} role session tags are being used:`); + core2.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; @@ -74162,12 +72524,13 @@ async function assumeRole(params) { } // src/CredentialsClient.ts -var import_client_sts3 = __toESM(require_dist_cjs19()); -var import_node_http_handler5 = __toESM(require_dist_cjs9()); +var import_core12 = __toESM(require_core()); +var import_client_sts3 = __toESM(require_dist_cjs56()); +var import_node_http_handler5 = __toESM(require_dist_cjs13()); // node_modules/proxy-agent/dist/index.js -var http5 = __toESM(require("http"), 1); -var https4 = __toESM(require("https"), 1); +var http4 = __toESM(require("http"), 1); +var https3 = __toESM(require("https"), 1); var import_url9 = require("url"); // node_modules/proxy-agent/node_modules/lru-cache/index.mjs @@ -75168,10 +73531,10 @@ var lru_cache_default = LRUCache; // node_modules/proxy-agent/dist/index.js init_dist(); -var import_debug19 = __toESM(require_src(), 1); +var import_debug15 = __toESM(require_src(), 1); // node_modules/proxy-from-env/index.js -var DEFAULT_PORTS2 = { +var DEFAULT_PORTS = { ftp: 21, gopher: 70, http: 80, @@ -75179,7 +73542,7 @@ var DEFAULT_PORTS2 = { ws: 80, wss: 443 }; -function parseUrl2(urlString) { +function parseUrl6(urlString) { try { return new URL(urlString); } catch { @@ -75187,7 +73550,7 @@ function parseUrl2(urlString) { } } function getProxyForUrl(url) { - var parsedUrl = (typeof url === "string" ? parseUrl2(url) : url) || {}; + var parsedUrl = (typeof url === "string" ? parseUrl6(url) : url) || {}; var proto = parsedUrl.protocol; var hostname = parsedUrl.host; var port = parsedUrl.port; @@ -75196,7 +73559,7 @@ function getProxyForUrl(url) { } proto = proto.split(":", 1)[0]; hostname = hostname.replace(/:\d*$/, ""); - port = parseInt(port) || DEFAULT_PORTS2[proto] || 0; + port = parseInt(port) || DEFAULT_PORTS[proto] || 0; if (!shouldProxy(hostname, port)) { return ""; } @@ -75238,7 +73601,7 @@ function getEnv(key) { } // node_modules/proxy-agent/dist/index.js -var debug16 = (0, import_debug19.default)("proxy-agent"); +var debug17 = (0, import_debug15.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, @@ -75262,17 +73625,17 @@ var proxies = { function isValidProtocol2(v) { return Object.keys(proxies).includes(v); } -var ProxyAgent2 = class extends Agent4 { +var ProxyAgent = class extends Agent2 { constructor(opts) { super(opts); this.cache = new lru_cache_default({ max: 20, dispose: (agent) => agent.destroy() }); - debug16("Creating new ProxyAgent instance: %o", opts); + debug17("Creating new ProxyAgent instance: %o", opts); this.connectOpts = opts; - this.httpAgent = opts?.httpAgent || new http5.Agent(opts); - this.httpsAgent = opts?.httpsAgent || new https4.Agent(opts); + this.httpAgent = opts?.httpAgent || new http4.Agent(opts); + this.httpsAgent = opts?.httpsAgent || new https3.Agent(opts); this.getProxyForUrl = opts?.getProxyForUrl || getProxyForUrl; } async connect(req, opts) { @@ -75283,11 +73646,11 @@ var ProxyAgent2 = class extends Agent4 { const url = new import_url9.URL(req.path, `${protocol}//${host}`).href; const proxy = await this.getProxyForUrl(url, req); if (!proxy) { - debug16("Proxy not enabled for URL: %o", url); + debug17("Proxy not enabled for URL: %o", url); return secureEndpoint ? this.httpsAgent : this.httpAgent; } - debug16("Request URL: %o", url); - debug16("Proxy URL: %o", proxy); + debug17("Request URL: %o", url); + debug17("Proxy URL: %o", proxy); const cacheKey = `${protocol}+${proxy}`; let agent = this.cache.get(cacheKey); if (!agent) { @@ -75300,7 +73663,7 @@ var ProxyAgent2 = class extends Agent4 { agent = new ctor(proxy, this.connectOpts); this.cache.set(cacheKey, agent); } else { - debug16("Cache hit for proxy URL: %o", proxy); + debug17("Cache hit for proxy URL: %o", proxy); } return agent; } @@ -75313,7 +73676,7 @@ var ProxyAgent2 = class extends Agent4 { }; // src/ProxyResolver.ts -var DEFAULT_PORTS3 = { +var DEFAULT_PORTS2 = { http: 80, https: 443 }; @@ -75335,7 +73698,7 @@ var ProxyResolver = class { const proto = parsedUrl.protocol.split(":", 1)[0]; if (!proto) return ""; const hostname = parsedUrl.host; - const port = parseInt(parsedUrl.port || "") || DEFAULT_PORTS3[proto] || 0; + const port = parseInt(parsedUrl.port || "") || DEFAULT_PORTS2[proto] || 0; if (options?.noProxy && !this.shouldProxy(hostname, port, options.noProxy)) return ""; if (proto === "http" && options?.httpProxy) return options.httpProxy; if (proto === "https" && options?.httpsProxy) return options.httpsProxy; @@ -75363,16 +73726,14 @@ var ProxyResolver = class { }; // src/CredentialsClient.ts -if (!process.env.AWS_EXECUTION_ENV) { - process.env.AWS_EXECUTION_ENV = "GitHubActions"; -} +var USER_AGENT = "configure-aws-credentials-for-github-actions"; var CredentialsClient = class { constructor(props) { if (props.region !== void 0) { this.region = props.region; } if (props.proxyServer) { - info("Configuring proxy handler for STS client"); + (0, import_core12.info)("Configuring proxy handler for STS client"); const proxyOptions = { httpProxy: props.proxyServer, httpsProxy: props.proxyServer @@ -75381,25 +73742,20 @@ var CredentialsClient = class { proxyOptions.noProxy = props.noProxy; } const getProxyForUrl2 = new ProxyResolver(proxyOptions).getProxyForUrl; - const handler = new ProxyAgent2({ getProxyForUrl: getProxyForUrl2 }); + const handler = new ProxyAgent({ 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) { - 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 } - }); + const config = { customUserAgent: USER_AGENT }; + 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); } return this._stsClient; } @@ -75410,15 +73766,15 @@ var CredentialsClient = class { if (!credentials.accessKeyId) { throw new Error("Access key ID empty after loading credentials"); } - } catch (error3) { - throw new Error(`Credentials could not be loaded, please check your action inputs: ${errorMessage(error3)}`); + } catch (error2) { + throw new Error(`Credentials could not be loaded, please check your action inputs: ${errorMessage(error2)}`); } if (expectedAccountIds && expectedAccountIds.length > 0 && expectedAccountIds[0] !== "") { let callerIdentity; try { callerIdentity = await getCallerIdentity(this.stsClient); - } catch (error3) { - throw new Error(`Could not validate account ID of credentials: ${errorMessage(error3)}`); + } catch (error2) { + throw new Error(`Could not validate account ID of credentials: ${errorMessage(error2)}`); } if (!callerIdentity.Account || !expectedAccountIds.includes(callerIdentity.Account)) { throw new Error( @@ -75444,10 +73800,11 @@ var CredentialsClient = class { }; // src/profileManager.ts -var fs4 = __toESM(require("node:fs")); -var os6 = __toESM(require("node:os")); +var fs2 = __toESM(require("node:fs")); +var os2 = __toESM(require("node:os")); var path2 = __toESM(require("node:path")); -function parseIni2(iniData) { +var core3 = __toESM(require_core()); +function parseIni(iniData) { const result = {}; let currentSection; for (const line of iniData.split(/\r?\n/)) { @@ -75494,8 +73851,8 @@ function stringifyIni(data3) { `; } function getProfileFilePaths() { - const credentialsPath = process.env.AWS_SHARED_CREDENTIALS_FILE || path2.join(os6.homedir(), ".aws", "credentials"); - const configPath = process.env.AWS_CONFIG_FILE || path2.join(os6.homedir(), ".aws", "config"); + const credentialsPath = process.env.AWS_SHARED_CREDENTIALS_FILE || path2.join(os2.homedir(), ".aws", "credentials"); + const configPath = process.env.AWS_CONFIG_FILE || path2.join(os2.homedir(), ".aws", "config"); return { credentials: credentialsPath, config: configPath @@ -75503,9 +73860,9 @@ function getProfileFilePaths() { } function ensureAwsDirectoryExists(filePath) { const dir = path2.dirname(filePath); - if (!fs4.existsSync(dir)) { - debug(`Creating directory: ${dir}`); - fs4.mkdirSync(dir, { recursive: true, mode: 448 }); + if (!fs2.existsSync(dir)) { + core3.debug(`Creating directory: ${dir}`); + fs2.mkdirSync(dir, { recursive: true, mode: 448 }); } } function validateProfileName(profileName) { @@ -75524,10 +73881,10 @@ function validateProfileName(profileName) { } function mergeProfileSection(filePath, sectionName, data3, overwriteAwsProfile) { let existingContent = {}; - if (fs4.existsSync(filePath)) { - debug(`Reading existing file: ${filePath}`); - const fileContent = fs4.readFileSync(filePath, "utf-8"); - existingContent = parseIni2(fileContent); + if (fs2.existsSync(filePath)) { + core3.debug(`Reading existing file: ${filePath}`); + const fileContent = fs2.readFileSync(filePath, "utf-8"); + existingContent = parseIni(fileContent); } if (existingContent[sectionName] && !overwriteAwsProfile) { throw new Error( @@ -75536,8 +73893,8 @@ function mergeProfileSection(filePath, sectionName, data3, overwriteAwsProfile) } existingContent[sectionName] = data3; const content = stringifyIni(existingContent); - debug(`Writing profile to ${filePath}`); - fs4.writeFileSync(filePath, content, { mode: 384 }); + core3.debug(`Writing profile to ${filePath}`); + fs2.writeFileSync(filePath, content, { mode: 384 }); } function writeProfileFiles(profileName, credentials, region, overwriteAwsProfile) { try { @@ -75560,14 +73917,14 @@ function writeProfileFiles(profileName, credentials, region, overwriteAwsProfile const configData = { region }; - info(`Writing credentials to profile: ${profileName}`); + core3.info(`Writing credentials to profile: ${profileName}`); mergeProfileSection(paths.credentials, credsSectionName, credentialsData, overwriteAwsProfile); - info(`Writing config to profile: ${profileName}`); + core3.info(`Writing config to profile: ${profileName}`); mergeProfileSection(paths.config, configSectionName, configData, overwriteAwsProfile); - info(`\u2713 Successfully configured AWS profile: ${profileName}`); - } catch (error3) { + core3.info(`\u2713 Successfully configured AWS profile: ${profileName}`); + } catch (error2) { throw new Error( - `Failed to write AWS profile '${profileName}': ${error3 instanceof Error ? error3.message : String(error3)}` + `Failed to write AWS profile '${profileName}': ${error2 instanceof Error ? error2.message : String(error2)}` ); } } @@ -75576,30 +73933,28 @@ 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 = 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 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 SessionToken = sessionTokenInput === "" ? void 0 : sessionTokenInput; - const region = getInput("aws-region", { required: true }); - const awsProfile = getInput("aws-profile", { required: false }); + const region = core4.getInput("aws-region", { required: true }); + const awsProfile = core4.getInput("aws-profile", { required: false }); const overwriteAwsProfile = getBooleanInput("overwrite-aws-profile", { required: false }); - const roleToAssume = getInput("role-to-assume", { required: false }); - const audience = getInput("audience", { required: false }); + const roleToAssume = core4.getInput("role-to-assume", { required: false }); + const audience = core4.getInput("audience", { required: false }); const maskAccountId = getBooleanInput("mask-aws-account-id", { required: false }); - 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 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 roleSkipSessionTagging = getBooleanInput("role-skip-session-tagging", { required: false }); - 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) => { + 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) => { return { arn: p2 }; }); const roleChaining = getBooleanInput("role-chaining", { required: false }); @@ -75608,18 +73963,17 @@ 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 = 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 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 forceSkipOidc = getBooleanInput("force-skip-oidc", { required: false }); - 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; + const noProxy = core4.getInput("no-proxy", { required: false }); + const globalTimeout = Number.parseInt(core4.getInput("action-timeout-s", { required: false })) || 0; let timeoutId; if (globalTimeout > 0) { - info(`Setting a global timeout of ${globalTimeout} seconds for the action`); + core4.info(`Setting a global timeout of ${globalTimeout} seconds for the action`); timeoutId = setTimeout(() => { - setFailed(`Action timed out after ${globalTimeout} seconds`); + core4.setFailed(`Action timed out after ${globalTimeout} seconds`); process.exit(1); }, globalTimeout * 1e3); } @@ -75634,11 +73988,10 @@ 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) { - info( + core4.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." ); } @@ -75650,16 +74003,6 @@ 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, @@ -75667,26 +74010,29 @@ 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) { - notice("Pre-existing credentials are valid. No need to generate new ones."); + core4.notice("Pre-existing credentials are valid. No need to generate new ones."); if (timeoutId) clearTimeout(timeoutId); return; } - notice("No valid credentials exist. Running as normal."); + core4.notice("No valid credentials exist. Running as normal."); } if (useGitHubOIDCProvider()) { try { - webIdentityToken = await withRetry(async () => { - return getIDToken(audience); - }, "getIDToken"); - } catch (error3) { - throw new Error(`getIDToken call failed: ${errorMessage(error3)}`); + webIdentityToken = await retryAndBackoff( + async () => { + return core4.getIDToken(audience); + }, + !disableRetry, + maxRetries + ); + } catch (error2) { + throw new Error(`getIDToken call failed: ${errorMessage(error2)}`); } } else if (AccessKeyId) { if (!SecretAccessKey) { @@ -75697,61 +74043,48 @@ async function run() { writeProfileFiles(awsProfile, { AccessKeyId, SecretAccessKey, SessionToken }, region, overwriteAwsProfile); } } else if (!webIdentityTokenFile && !roleChaining) { - await withRetry( - () => credentialsClient.validateCredentials(void 0, roleChaining, expectedAccountIds), - "validateCredentials" - ); - sourceAccountId = await withRetry(() => exportAccountId(credentialsClient, maskAccountId), "exportAccountId"); + await credentialsClient.validateCredentials(void 0, roleChaining, expectedAccountIds); + sourceAccountId = await exportAccountId(credentialsClient, maskAccountId); } if (AccessKeyId || roleChaining) { - 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." - ); + await credentialsClient.validateCredentials(AccessKeyId, roleChaining, expectedAccountIds); + sourceAccountId = await exportAccountId(credentialsClient, maskAccountId); } if (roleToAssume) { let roleCredentials; do { - roleCredentials = await withRetry(async () => { - return assumeRole({ - credentialsClient, - sourceAccountId, - roleToAssume, - roleExternalId, - roleDuration, - roleSessionName, - roleSkipSessionTagging, - transitiveTagKeys, - webIdentityTokenFile, - webIdentityToken, - inlineSessionPolicy, - managedSessionPolicies, - customTags - }); - }, "AssumeRole"); + roleCredentials = await retryAndBackoff( + async () => { + return assumeRole({ + credentialsClient, + sourceAccountId, + roleToAssume, + roleExternalId, + roleDuration, + roleSessionName, + roleSkipSessionTagging, + transitiveTagKeys, + webIdentityTokenFile, + webIdentityToken, + inlineSessionPolicy, + managedSessionPolicies + }); + }, + !disableRetry, + maxRetries + ); } while (specialCharacterWorkaround && !verifyKeys(roleCredentials.Credentials)); - info(`Authenticated as assumedRoleId ${roleCredentials.AssumedRoleUser?.AssumedRoleId}`); + core4.info(`Authenticated as assumedRoleId ${roleCredentials.AssumedRoleUser?.AssumedRoleId}`); exportCredentials(roleCredentials.Credentials, outputCredentials, outputEnvCredentials); - if ((!process.env.GITHUB_ACTIONS || AccessKeyId) && !awsProfile && outputEnvCredentials) { - await withRetry( - () => credentialsClient.validateCredentials( - roleCredentials.Credentials?.AccessKeyId, - roleChaining, - expectedAccountIds - ), - "validateCredentials" + if ((!process.env.GITHUB_ACTIONS || AccessKeyId) && !awsProfile) { + await credentialsClient.validateCredentials( + roleCredentials.Credentials?.AccessKeyId, + roleChaining, + expectedAccountIds ); } if (outputEnvCredentials) { - await withRetry(() => exportAccountId(credentialsClient, maskAccountId), "exportAccountId"); + await exportAccountId(credentialsClient, maskAccountId); } if (awsProfile) { if (!roleCredentials.Credentials) { @@ -75759,43 +74092,40 @@ async function run() { } if (AccessKeyId || !process.env.GITHUB_ACTIONS) { writeProfileFiles(awsProfile, roleCredentials.Credentials, region, true); - await withRetry( - () => credentialsClient.validateCredentials( - roleCredentials.Credentials?.AccessKeyId, - roleChaining, - expectedAccountIds - ), - "validateCredentials" + await credentialsClient.validateCredentials( + roleCredentials.Credentials.AccessKeyId, + roleChaining, + expectedAccountIds ); } else { writeProfileFiles(awsProfile, roleCredentials.Credentials, region, overwriteAwsProfile); } if (outputEnvCredentials) { - exportVariable("AWS_PROFILE", awsProfile); + core4.exportVariable("AWS_PROFILE", awsProfile); } } } else { - info("Proceeding with IAM user credentials"); + core4.info("Proceeding with IAM user credentials"); if (awsProfile) { if (outputEnvCredentials) { - exportVariable("AWS_PROFILE", awsProfile); + core4.exportVariable("AWS_PROFILE", awsProfile); } } } if (timeoutId) clearTimeout(timeoutId); - } catch (error3) { - setFailed(errorMessage(error3)); + } catch (error2) { + core4.setFailed(errorMessage(error2)); const showStackTrace = process.env.SHOW_STACK_TRACE; if (showStackTrace === "true") { - throw error3; + throw error2; } } } if (require.main === module) { (async () => { await run(); - })().catch((error3) => { - setFailed(errorMessage(error3)); + })().catch((error2) => { + core4.setFailed(errorMessage(error2)); }); } // Annotate the CommonJS export names for ESM import in node: diff --git a/package-lock.json b/package-lock.json index 6ebe393..0dfed2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,17 +9,17 @@ "version": "6.1.1", "license": "MIT", "dependencies": { - "@actions/core": "^3.0.1", - "@aws-sdk/client-sts": "^3.1049.0", - "@smithy/node-http-handler": "^4.7.3", + "@actions/core": "^2.0.2", + "@aws-sdk/client-sts": "^3.1038.0", + "@smithy/node-http-handler": "^4.6.1", "proxy-agent": "^8.0.1" }, "devDependencies": { - "@aws-sdk/credential-provider-env": "^3.972.38", - "@biomejs/biome": "2.4.15", - "@smithy/property-provider": "^4.3.3", - "@types/node": "^25.9.0", - "@vitest/coverage-v8": "^4.1.6", + "@aws-sdk/credential-provider-env": "^3.972.32", + "@biomejs/biome": "2.4.13", + "@smithy/property-provider": "^4.2.14", + "@types/node": "^25.6.0", + "@vitest/coverage-v8": "^3.2.4", "aws-sdk-client-mock": "^4.1.0", "esbuild": "^0.28.0", "generate-license-file": "^4.1.1", @@ -28,35 +28,35 @@ "memfs": "^4.57.2", "standard-version": "^9.5.0", "typescript": "^6.0.3", - "vitest": "^4.1.5" + "vitest": "^3.2.4" }, "engines": { "node": ">= 16.3.0" } }, "node_modules/@actions/core": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.1.tgz", - "integrity": "sha512-a6d/Nwahm9fliVGRhdhofo40HjHQasUPusmc7vBfyky+7Z+P2A1J68zyFVaNcEclc/Se+eO595oAr5nwEIoIUA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.2.tgz", + "integrity": "sha512-Ast1V7yHbGAhplAsuVlnb/5J8Mtr/Zl6byPPL+Qjq3lmfIgWF1ak1iYfF/079cRERiuTALTXkSuEUdZeDCfGtA==", "license": "MIT", "dependencies": { - "@actions/exec": "^3.0.0", - "@actions/http-client": "^4.0.0" + "@actions/exec": "^2.0.0", + "@actions/http-client": "^3.0.1" } }, "node_modules/@actions/exec": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz", - "integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz", + "integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==", "license": "MIT", "dependencies": { - "@actions/io": "^3.0.2" + "@actions/io": "^2.0.0" } }, "node_modules/@actions/http-client": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.1.tgz", - "integrity": "sha512-+Nvd1ImaOZBSoPbsUtEhv+1z99H12xzncCkz0a3RuehINE81FZSe2QTj3uvAPTcJX/SCzUQHQ0D1GrPMbrPitg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz", + "integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==", "license": "MIT", "dependencies": { "tunnel": "^0.0.6", @@ -64,23 +64,23 @@ } }, "node_modules/@actions/io": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz", - "integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz", + "integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==", "license": "MIT" }, - "node_modules/@aws-crypto/crc32": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz", - "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==", + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { - "node": ">=16.0.0" + "node": ">=6.0.0" } }, "node_modules/@aws-crypto/sha256-browser": { @@ -98,6 +98,44 @@ "tslib": "^2.6.2" } }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-crypto/sha256-js": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", @@ -132,22 +170,89 @@ "tslib": "^2.6.2" } }, + "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-sdk/client-sts": { - "version": "3.1049.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.1049.0.tgz", - "integrity": "sha512-Dq8WJk3oPNQvK7gOYDFnOl6jXh2TiwggATqzs3bbboOu5hleZ50Nt9Zm38jA0zWnWm2nJ5p/qdKJzXeGecHRvA==", + "version": "3.1038.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.1038.0.tgz", + "integrity": "sha512-lboBAXDIr+ot5a357mQgaAwgMMYZW7EwO216LTASUHV3UN4YgqskrEcwsDV9765KH9wUDGxFt8rClS4ixaOgiA==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@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/core": "^3.974.6", + "@aws-sdk/credential-provider-node": "^3.972.37", + "@aws-sdk/middleware-host-header": "^3.972.10", + "@aws-sdk/middleware-logger": "^3.972.10", + "@aws-sdk/middleware-recursion-detection": "^3.972.11", + "@aws-sdk/middleware-user-agent": "^3.972.36", + "@aws-sdk/region-config-resolver": "^3.972.13", + "@aws-sdk/signature-v4-multi-region": "^3.996.23", "@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", + "@aws-sdk/util-endpoints": "^3.996.8", + "@aws-sdk/util-user-agent-browser": "^3.972.10", + "@aws-sdk/util-user-agent-node": "^3.973.22", + "@smithy/config-resolver": "^4.4.17", + "@smithy/core": "^3.23.17", + "@smithy/fetch-http-handler": "^5.3.17", + "@smithy/hash-node": "^4.2.14", + "@smithy/invalid-dependency": "^4.2.14", + "@smithy/middleware-content-length": "^4.2.14", + "@smithy/middleware-endpoint": "^4.4.32", + "@smithy/middleware-retry": "^4.5.6", + "@smithy/middleware-serde": "^4.2.20", + "@smithy/middleware-stack": "^4.2.14", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/node-http-handler": "^4.6.1", + "@smithy/protocol-http": "^5.3.14", + "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-body-length-browser": "^4.2.2", + "@smithy/util-body-length-node": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.49", + "@smithy/util-defaults-mode-node": "^4.2.54", + "@smithy/util-endpoints": "^3.4.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-retry": "^4.3.5", + "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" }, "engines": { @@ -155,18 +260,24 @@ } }, "node_modules/@aws-sdk/core": { - "version": "3.974.12", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.974.12.tgz", - "integrity": "sha512-qrqgioqYFjwR6LatVNS1L2Vk++EwRIxqSQXPKNv5Ofux2D8UNgqMQ1znnMyEImXquVPTtbf71fc128pvmU6y9A==", + "version": "3.974.6", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.974.6.tgz", + "integrity": "sha512-8Vu7zGxu+39ChR/s5J7nXBw3a2kMHAi0OfKT8ohgTVjX0qYed/8mIfdBb638oBmKrWCwwKjYAM5J/4gMJ8nAJA==", "license": "Apache-2.0", "dependencies": { "@aws-sdk/types": "^3.973.8", - "@aws-sdk/xml-builder": "^3.972.24", - "@aws/lambda-invoke-store": "^0.2.2", - "@smithy/core": "^3.24.2", - "@smithy/signature-v4": "^5.4.2", + "@aws-sdk/xml-builder": "^3.972.20", + "@smithy/core": "^3.23.17", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/property-provider": "^4.2.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/signature-v4": "^5.3.14", + "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", - "bowser": "^2.11.0", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-retry": "^4.3.5", + "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" }, "engines": { @@ -174,14 +285,14 @@ } }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.972.38", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.38.tgz", - "integrity": "sha512-m3WjZEgPtioMhPmwqUt+DhlTJ2i9ufR6DhfkyXojb9puEvfR+ur2U5shavu5/Cc9WHHsDCvALi6UFHgcqjhQ5w==", + "version": "3.972.32", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.32.tgz", + "integrity": "sha512-7vA4GHg8NSmQxquJHSBcSM3RgB4ZaaRi6u4+zGFKOmOH6aqlgr2Sda46clkZDYzlirgfY96w15Zj0jh6PT48ng==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.12", + "@aws-sdk/core": "^3.974.6", "@aws-sdk/types": "^3.973.8", - "@smithy/core": "^3.24.2", + "@smithy/property-provider": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, @@ -190,17 +301,20 @@ } }, "node_modules/@aws-sdk/credential-provider-http": { - "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==", + "version": "3.972.34", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.34.tgz", + "integrity": "sha512-vBrhWujFCLp1u8ptJRWYlipMutzPptb8pDQ00rKVH9q67T7rGd3VTWIj63aKrlLuY6qSsw1Rt5F/D/7wnNgryA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.12", + "@aws-sdk/core": "^3.974.6", "@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/fetch-http-handler": "^5.3.17", + "@smithy/node-http-handler": "^4.6.1", + "@smithy/property-provider": "^4.2.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", + "@smithy/util-stream": "^4.5.25", "tslib": "^2.6.2" }, "engines": { @@ -208,22 +322,23 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.972.42", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.42.tgz", - "integrity": "sha512-Mu5ESvFXeinafVM8jTIvRqcvK2Ehj4kz3auT39yUcHwu1Vfxo6xRlmUafdKLW4tusjAJukQwK09sCSMgOm7OKg==", + "version": "3.972.36", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.36.tgz", + "integrity": "sha512-FBHyCmV8EB0gUvh1d+CZm87zt2PrdC7OyWexLRoH3I5zWSOUGa+9t58Y5jbxRfwUp3AWpHAFvKY6YzgR845sVA==", "license": "Apache-2.0", "dependencies": { - "@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/core": "^3.974.6", + "@aws-sdk/credential-provider-env": "^3.972.32", + "@aws-sdk/credential-provider-http": "^3.972.34", + "@aws-sdk/credential-provider-login": "^3.972.36", + "@aws-sdk/credential-provider-process": "^3.972.32", + "@aws-sdk/credential-provider-sso": "^3.972.36", + "@aws-sdk/credential-provider-web-identity": "^3.972.36", + "@aws-sdk/nested-clients": "^3.997.4", "@aws-sdk/types": "^3.973.8", - "@smithy/core": "^3.24.2", - "@smithy/credential-provider-imds": "^4.3.2", + "@smithy/credential-provider-imds": "^4.2.14", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, @@ -232,15 +347,17 @@ } }, "node_modules/@aws-sdk/credential-provider-login": { - "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==", + "version": "3.972.36", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.36.tgz", + "integrity": "sha512-IFap01lJKxQc0C/OHmZwZQr/cKq0DhrcmKedRrdnnl42D+P0SImnnnWQjv07uIPqpEdtqmkPXb9TiPYTU+prxQ==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.12", - "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/core": "^3.974.6", + "@aws-sdk/nested-clients": "^3.997.4", "@aws-sdk/types": "^3.973.8", - "@smithy/core": "^3.24.2", + "@smithy/property-provider": "^4.2.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, @@ -249,20 +366,21 @@ } }, "node_modules/@aws-sdk/credential-provider-node": { - "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==", + "version": "3.972.37", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.37.tgz", + "integrity": "sha512-/WFixFAAiw8WpmjZcI0l4t3DerXLmVinOIfuotmRZnu2qmsFPoqqmstASz0z8bi1pGdFXzeLzf6bwucM3mZcUQ==", "license": "Apache-2.0", "dependencies": { - "@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/credential-provider-env": "^3.972.32", + "@aws-sdk/credential-provider-http": "^3.972.34", + "@aws-sdk/credential-provider-ini": "^3.972.36", + "@aws-sdk/credential-provider-process": "^3.972.32", + "@aws-sdk/credential-provider-sso": "^3.972.36", + "@aws-sdk/credential-provider-web-identity": "^3.972.36", "@aws-sdk/types": "^3.973.8", - "@smithy/core": "^3.24.2", - "@smithy/credential-provider-imds": "^4.3.2", + "@smithy/credential-provider-imds": "^4.2.14", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, @@ -271,14 +389,15 @@ } }, "node_modules/@aws-sdk/credential-provider-process": { - "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==", + "version": "3.972.32", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.32.tgz", + "integrity": "sha512-uZp4tlGbpczV8QxmtIwOpSkcyGtBRR8/T4BAumRKfAt1nwCig3FSCZvrKl6ARDIDVRYn5p2oRcAsfFR01EgMGA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.12", + "@aws-sdk/core": "^3.974.6", "@aws-sdk/types": "^3.973.8", - "@smithy/core": "^3.24.2", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, @@ -287,16 +406,17 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "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==", + "version": "3.972.36", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.36.tgz", + "integrity": "sha512-DsLr0UHMyKzRJKe2bjlwU8q1cfoXg8TIJKV/xwvnalAemiZLOZunFzj/whGnFDZIBVLdnbLiwv5SvRf1+CSwkg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.12", - "@aws-sdk/nested-clients": "^3.997.10", - "@aws-sdk/token-providers": "3.1049.0", + "@aws-sdk/core": "^3.974.6", + "@aws-sdk/nested-clients": "^3.997.4", + "@aws-sdk/token-providers": "3.1038.0", "@aws-sdk/types": "^3.973.8", - "@smithy/core": "^3.24.2", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, @@ -305,15 +425,16 @@ } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "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==", + "version": "3.972.36", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.36.tgz", + "integrity": "sha512-uzrURO7frJhHQVVNR5zBJcCYeMYflmXcWBK1+MiBym2Dfjh6nXATrMixrmGZi+97Q7ETZ+y/4lUwAy0Nfnznjw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.12", - "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/core": "^3.974.6", + "@aws-sdk/nested-clients": "^3.997.4", "@aws-sdk/types": "^3.973.8", - "@smithy/core": "^3.24.2", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, @@ -321,20 +442,154 @@ "node": ">=20.0.0" } }, + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.972.10.tgz", + "integrity": "sha512-IJSsIMeVQ8MMCPbuh1AbltkFhLBLXn7aejzfX5YKT/VLDHn++Dcz8886tXckE+wQssyPUhaXrJhdakO2VilRhg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.972.10.tgz", + "integrity": "sha512-OOuGvvz1Dm20SjZo5oEBePFqxt5nf8AwkNDSyUHvD9/bfNASmstcYxFAHUowy4n6Io7mWUZ04JURZwSBvyQanQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.972.11", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.972.11.tgz", + "integrity": "sha512-+zz6f79Kj9V5qFK2P+D8Ehjnw4AhphAlCAsPjUqEcInA9umtSSKMrHbSagEeOIsDNuvVrH98bjRHcyQukTrhaQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@aws/lambda-invoke-store": "^0.2.2", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-sdk-s3": { + "version": "3.972.35", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.972.35.tgz", + "integrity": "sha512-lLppaNTAz+wNgLdi4FtHzrlwrGF0ODTnBWHBaFg85SKs0eJ+M+tP5ifrA8f/0lNd+Ak3MC1NGC6RavV3ny4HTg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.6", + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/util-arn-parser": "^3.972.3", + "@smithy/core": "^3.23.17", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/signature-v4": "^5.3.14", + "@smithy/smithy-client": "^4.12.13", + "@smithy/types": "^4.14.1", + "@smithy/util-config-provider": "^4.2.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-stream": "^4.5.25", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.972.36", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.972.36.tgz", + "integrity": "sha512-O2beToxguBvrZFFZ+fFgPbbae8MvyIBjQ6lImee4APHEXXNAD5ZJ2ayLF1mb7rsKw86TM81y5czg82bZncjSjg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.974.6", + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/util-endpoints": "^3.996.8", + "@smithy/core": "^3.23.17", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-retry": "^4.3.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@aws-sdk/nested-clients": { - "version": "3.997.10", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.10.tgz", - "integrity": "sha512-FtQ/Bt327peZJuyo4WZSOLVUTw9ujRxntepiC7L65FxA2P82Xlq0g14T22BuqBUeMjDoxa9nvwiMHjLIfP3eUg==", + "version": "3.997.4", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.4.tgz", + "integrity": "sha512-4Sf+WY1lMJzXlw5MiyCMe/UzdILCwvuaHThbqMXS6dfh9gZy3No360I42RXquOI/ULUOhWy2HCyU0Fp20fQGPQ==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "^3.974.12", - "@aws-sdk/signature-v4-multi-region": "^3.996.27", + "@aws-sdk/core": "^3.974.6", + "@aws-sdk/middleware-host-header": "^3.972.10", + "@aws-sdk/middleware-logger": "^3.972.10", + "@aws-sdk/middleware-recursion-detection": "^3.972.11", + "@aws-sdk/middleware-user-agent": "^3.972.36", + "@aws-sdk/region-config-resolver": "^3.972.13", + "@aws-sdk/signature-v4-multi-region": "^3.996.23", "@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", + "@aws-sdk/util-endpoints": "^3.996.8", + "@aws-sdk/util-user-agent-browser": "^3.972.10", + "@aws-sdk/util-user-agent-node": "^3.973.22", + "@smithy/config-resolver": "^4.4.17", + "@smithy/core": "^3.23.17", + "@smithy/fetch-http-handler": "^5.3.17", + "@smithy/hash-node": "^4.2.14", + "@smithy/invalid-dependency": "^4.2.14", + "@smithy/middleware-content-length": "^4.2.14", + "@smithy/middleware-endpoint": "^4.4.32", + "@smithy/middleware-retry": "^4.5.6", + "@smithy/middleware-serde": "^4.2.20", + "@smithy/middleware-stack": "^4.2.14", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/node-http-handler": "^4.6.1", + "@smithy/protocol-http": "^5.3.14", + "@smithy/smithy-client": "^4.12.13", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-body-length-browser": "^4.2.2", + "@smithy/util-body-length-node": "^4.2.3", + "@smithy/util-defaults-mode-browser": "^4.3.49", + "@smithy/util-defaults-mode-node": "^4.2.54", + "@smithy/util-endpoints": "^3.4.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-retry": "^4.3.5", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.972.13", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.972.13.tgz", + "integrity": "sha512-CvJ2ZIjK/jVD/lbOpowBVElJyC1YxLTIJ13yM0AEo0t2v7swOzGjSA6lJGH+DwZXQhcjUjoYwc8bVYCX5MDr1A==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/config-resolver": "^4.4.17", + "@smithy/node-config-provider": "^4.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, @@ -343,14 +598,15 @@ } }, "node_modules/@aws-sdk/signature-v4-multi-region": { - "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==", + "version": "3.996.23", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.23.tgz", + "integrity": "sha512-wBbys3Y53Ikly556vyADurKpYQHXS7Jjaskbz+Ga9PZCz7PB/9f3VdKbDlz7dqIzn+xwz7L/a6TR4iXcOi8IRw==", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/middleware-sdk-s3": "^3.972.35", "@aws-sdk/types": "^3.973.8", - "@smithy/core": "^3.24.2", - "@smithy/signature-v4": "^5.4.2", + "@smithy/protocol-http": "^5.3.14", + "@smithy/signature-v4": "^5.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, @@ -359,15 +615,16 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.1049.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1049.0.tgz", - "integrity": "sha512-r7+d0lQMTHKypkmaF5jRTBYLYHCUHzt3gaVoN9SidLhQeWhCmHk3AKrboDTpPF5b7Pt7vKu3+oeMjznM2Eu1ow==", + "version": "3.1038.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1038.0.tgz", + "integrity": "sha512-Qniru+9oGGb/HNK/gGZWbV3jsD0k71ngE7qMQ/x6gYNYLd2EOwHCS6E2E6jfkaqO4i0d+nNKmfRy8bNcshKdGQ==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.12", - "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/core": "^3.974.6", + "@aws-sdk/nested-clients": "^3.997.4", "@aws-sdk/types": "^3.973.8", - "@smithy/core": "^3.24.2", + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, @@ -388,6 +645,34 @@ "node": ">=20.0.0" } }, + "node_modules/@aws-sdk/util-arn-parser": { + "version": "3.972.3", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.972.3.tgz", + "integrity": "sha512-HzSD8PMFrvgi2Kserxuff5VitNq2sgf3w9qxmskKDiDTThWfVteJxuCS9JXiPIPtmCrp+7N9asfIaVhBFORllA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.996.8", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.996.8.tgz", + "integrity": "sha512-oOZHcRDihk5iEe5V25NVWg45b3qEA8OpHWVdU/XQh8Zj4heVPAJqWvMphQnU7LkufmUo10EpvFPZuQMiFLJK3g==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-endpoints": "^3.4.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@aws-sdk/util-locate-window": { "version": "3.965.5", "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.965.5.tgz", @@ -400,15 +685,52 @@ "node": ">=20.0.0" } }, + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.972.10.tgz", + "integrity": "sha512-FAzqXvfEssGdSIz8ejatan0bOdx1qefBWKF/gWmVBXIP1HkS7v/wjjaqrAGGKvyihrXTXW00/2/1nTJtxpXz7g==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.8", + "@smithy/types": "^4.14.1", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.973.22", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.973.22.tgz", + "integrity": "sha512-YTYqTmOUrwbm1h99Ee4y/mVYpFRl0oSO/amtP5cc1BZZWdaAVWs9zj3TkyRHWvR9aI/ZS8m3mS6awXtYUlWyaw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/middleware-user-agent": "^3.972.36", + "@aws-sdk/types": "^3.973.8", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-config-provider": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, "node_modules/@aws-sdk/xml-builder": { - "version": "3.972.24", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.24.tgz", - "integrity": "sha512-V8z5YcDPfsvzrBlj0xR1vhRtocblhYbqdreCJB/voGd4Sr5zjNAeWxexbnqVtskTJe0vFb5KMqbSL++ePl+zRw==", + "version": "3.972.21", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.21.tgz", + "integrity": "sha512-qxNiHUtlrsjTeSlrPWiFkWps7uD6YB4eKzg7eLAFH8jbiHTlt0ePNlo2Xu+WlftP38JIcMaIX4jTUjOlE2ySWw==", "license": "Apache-2.0", "dependencies": { "@nodable/entities": "2.1.0", "@smithy/types": "^4.14.1", - "fast-xml-parser": "5.7.3", + "fast-xml-parser": "5.7.2", "tslib": "^2.6.2" }, "engines": { @@ -425,13 +747,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", - "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.28.5", + "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -457,9 +779,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", - "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, "license": "MIT", "engines": { @@ -467,13 +789,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.29.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.3.tgz", - "integrity": "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", + "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.29.0" + "@babel/types": "^7.28.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -483,14 +805,14 @@ } }, "node_modules/@babel/types": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", - "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", + "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.28.5" + "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -507,9 +829,9 @@ } }, "node_modules/@biomejs/biome": { - "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==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.13.tgz", + "integrity": "sha512-gLXOwkOBBg0tr7bDsqlkIh4uFeKuMjxvqsrb1Tukww1iDmHcfr4Uu8MoQxp0Rcte+69+osRNWXwHsu/zxT6XqA==", "dev": true, "license": "MIT OR Apache-2.0", "bin": { @@ -523,20 +845,20 @@ "url": "https://opencollective.com/biome" }, "optionalDependencies": { - "@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" + "@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" } }, "node_modules/@biomejs/cli-darwin-arm64": { - "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==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.13.tgz", + "integrity": "sha512-2KImO1jhNFBa2oWConyr0x6flxbQpGKv6902uGXpYM62Xyem8U80j441SyUJ8KyngsmKbQjeIv1q2CQfDkNnYg==", "cpu": [ "arm64" ], @@ -551,9 +873,9 @@ } }, "node_modules/@biomejs/cli-darwin-x64": { - "version": "2.4.15", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.15.tgz", - "integrity": "sha512-/5KHXYMfSJs1fNXiX30xFtI8JcCFV6zaVVLxOa0M2sfqBKHkpQhRTv94yxQWxeTY2lzo2OuTlNvPC+hDQt2wcQ==", + "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==", "cpu": [ "x64" ], @@ -568,9 +890,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64": { - "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==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.13.tgz", + "integrity": "sha512-NzkUDSqfvMBrPplKgVr3aXLHZ2NEELvvF4vZxXulEylKWIGqlvNEcwUcj9OLrn75TD3lJ/GIqCVlBwd1MZCuYQ==", "cpu": [ "arm64" ], @@ -585,9 +907,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64-musl": { - "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==", + "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==", "cpu": [ "arm64" ], @@ -602,9 +924,9 @@ } }, "node_modules/@biomejs/cli-linux-x64": { - "version": "2.4.15", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.15.tgz", - "integrity": "sha512-0jj7THz12GbUOLmMibktK6DZjqz2zV64KFxyBtcFTKPiiOIY0a7vns1elpO1dERvxpsZ5ik0oFfz0oGwFde1+g==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.13.tgz", + "integrity": "sha512-Az3ZZedYRBo9EQzNnD9SxFcR1G5QsGo6VEc2hIyVPZ1rdKwee/7E9oeBBZFpE8Z44ekxsDQBqbiWGW5ShOhUSQ==", "cpu": [ "x64" ], @@ -619,9 +941,9 @@ } }, "node_modules/@biomejs/cli-linux-x64-musl": { - "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==", + "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==", "cpu": [ "x64" ], @@ -636,9 +958,9 @@ } }, "node_modules/@biomejs/cli-win32-arm64": { - "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==", + "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==", "cpu": [ "arm64" ], @@ -653,9 +975,9 @@ } }, "node_modules/@biomejs/cli-win32-x64": { - "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==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.13.tgz", + "integrity": "sha512-tTcMkXyBrmHi9BfrD2VNHs/5rYIUKETqsBlYOvSAABwBkJhSDVb5e7wPukftsQbO3WzQkXe6kaztC6WtUOXSoQ==", "cpu": [ "x64" ], @@ -679,40 +1001,6 @@ "commander": "~14.0.0" } }, - "node_modules/@emnapi/core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", - "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.1", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", - "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/wasi-threads": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", - "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@esbuild/aix-ppc64": { "version": "0.28.0", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", @@ -1156,11 +1444,14 @@ } }, "node_modules/@gar/promise-retry": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@gar/promise-retry/-/promise-retry-1.0.3.tgz", - "integrity": "sha512-GmzA9ckNokPypTg10pgpeHNQe7ph+iIKKmhKu3Ob9ANkswreCx7R3cKmY781K8QK3AqVL3xVh9A42JvIAbkkSA==", + "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==", "dev": true, "license": "MIT", + "dependencies": { + "retry": "^0.13.1" + }, "engines": { "node": "^20.17.0 || >=22.9.0" } @@ -1176,13 +1467,21 @@ } }, "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==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, - "license": "BlueOak-1.0.0", + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, "engines": { - "node": ">=18" + "node": ">=12" } }, "node_modules/@isaacs/fs-minipass": { @@ -1205,6 +1504,27 @@ "dev": true, "license": "ISC" }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -1216,16 +1536,16 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1251,9 +1571,9 @@ } }, "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==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.0.0.tgz", + "integrity": "sha512-NDigYR3PHqCnQLXYyoLbnEdzMMvzeiCWo1KOut7Q0CoIqg9tUAPKJ1iq/2nFhc5kZtexzutNY0LFjdwWL3Dw3Q==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1475,6 +1795,23 @@ "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", @@ -1561,20 +1898,19 @@ } }, "node_modules/@jsonjoy.com/json-pack": { - "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==", + "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==", "dev": true, "license": "Apache-2.0", "dependencies": { "@jsonjoy.com/base64": "^1.1.2", - "@jsonjoy.com/buffers": "^1.2.0", + "@jsonjoy.com/buffers": "^1.0.0", "@jsonjoy.com/codegen": "^1.0.0", - "@jsonjoy.com/json-pointer": "^1.0.2", + "@jsonjoy.com/json-pointer": "^1.0.1", "@jsonjoy.com/util": "^1.9.0", "hyperdyperid": "^1.2.0", - "thingies": "^2.5.0", - "tree-dump": "^1.1.0" + "thingies": "^2.5.0" }, "engines": { "node": ">=10.0" @@ -1587,32 +1923,14 @@ "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.2", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pointer/-/json-pointer-1.0.2.tgz", - "integrity": "sha512-Fsn6wM2zlDzY1U+v4Nc8bo3bVqgfNTGcn6dMgs6FjrEnt4ZCe60o6ByKRjOGlI2gow0aE/Q41QOigdTqkyK5fg==", + "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==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@jsonjoy.com/codegen": "^1.0.0", - "@jsonjoy.com/util": "^1.9.0" + "@jsonjoy.com/util": "^1.3.0" }, "engines": { "node": ">=10.0" @@ -1646,42 +1964,6 @@ "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", - "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@tybys/wasm-util": "^0.10.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "peerDependencies": { - "@emnapi/core": "^1.7.1", - "@emnapi/runtime": "^1.7.1" - } - }, "node_modules/@nodable/entities": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.0.tgz", @@ -1711,14 +1993,23 @@ "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.5.0", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.5.0.tgz", - "integrity": "sha512-qS+TtKWC58sjBjD+szLrhEj2TCLnwzUA9vlMyCnU9ztw01ZjQSu25iQPxeBa0sk9sS9/Hzs/xJMWl7J/vRCjGQ==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.4.0.tgz", + "integrity": "sha512-4Bm8hNixJG/sii1PMnag0V9i/sGOX9VRzFrUiZMSBJpGlLR38f+Btl85d07G9GL56xO0l0OZjvrGNYsDYp0xKA==", "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", @@ -1760,6 +2051,68 @@ "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", @@ -1793,6 +2146,52 @@ "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", @@ -1826,6 +2225,29 @@ "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/glob": { "version": "13.0.6", "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", @@ -1844,6 +2266,49 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@npmcli/map-workspaces/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/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==", + "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/map-workspaces/node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@npmcli/metavuln-calculator": { "version": "9.0.3", "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-9.0.3.tgz", @@ -1861,6 +2326,16 @@ "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", @@ -1900,6 +2375,29 @@ "node": "^20.17.0 || >=22.9.0" } }, + "node_modules/@npmcli/package-json/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/package-json/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/package-json/node_modules/glob": { "version": "13.0.6", "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", @@ -1918,6 +2416,83 @@ "url": "https://github.com/sponsors/isaacs" } }, + "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==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@npmcli/package-json/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/package-json/node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "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" + } + }, "node_modules/@npmcli/promise-spawn": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-9.0.1.tgz", @@ -1931,6 +2506,32 @@ "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", @@ -1971,20 +2572,35 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/@oxc-project/types": { - "version": "0.129.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.129.0.tgz", - "integrity": "sha512-3oz8m3FGdr2nDXVqmFUw7jolKliC4MoyXYIG2c7gpjBnzUWQpUGIYcXYKxTdTi+N2jusvt610ckTMkxdwHkYEg==", + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/Boshen" + "optional": true, + "engines": { + "node": ">=14" } }, - "node_modules/@rolldown/binding-android-arm64": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0.tgz", - "integrity": "sha512-TWMZnRLMe63C2Lhyicviu7ZHaU4kxa6PS3rofvc9GmcvptzNN11BcfQ4Sl7MwTOsisQoa2keB/EBdNCAnUo8vA==", + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", + "integrity": "sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz", + "integrity": "sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==", "cpu": [ "arm64" ], @@ -1993,15 +2609,12 @@ "optional": true, "os": [ "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0.tgz", - "integrity": "sha512-6XcD+8k0gPVItNagEw78/qqcBDwKcwDYS8V2hRmVsfUSIrd8cWe/CBvRDI5toqFyPfj+FJr6t8U6Xj2P2prEew==", + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz", + "integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==", "cpu": [ "arm64" ], @@ -2010,15 +2623,12 @@ "optional": true, "os": [ "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0.tgz", - "integrity": "sha512-iN/tWVXRQDWvmZlKdceP1Dwug9GDpEymhb9p4xnEe6zvCg5lFmzVljl+1qR1NVx3yfGpr2Na+CuLmv5IU8uzfQ==", + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz", + "integrity": "sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==", "cpu": [ "x64" ], @@ -2027,15 +2637,26 @@ "optional": true, "os": [ "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0.tgz", - "integrity": "sha512-jjQMDvvwSOuhOwMszD/klSOjyWMM3zI64hWTj9KT5x4MxRbZAf+7vLQ6qouRhtsLVFHr3f0ILaJAfgENPiQdAQ==", + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz", + "integrity": "sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz", + "integrity": "sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==", "cpu": [ "x64" ], @@ -2044,15 +2665,12 @@ "optional": true, "os": [ "freebsd" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0.tgz", - "integrity": "sha512-d//Dtg2x6/m3mbV64yUGNnDGNZaDGRpDLLNGerHQUVObuNaIQaaDp25yUiqGXtHEXX+NP2d0wAlmKgpYgIAJ2A==", + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz", + "integrity": "sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==", "cpu": [ "arm" ], @@ -2061,15 +2679,26 @@ "optional": true, "os": [ "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0.tgz", - "integrity": "sha512-n7Ofp0mx+aB2cC+Sdy5YtMnXtY9lchnHbY+3Yt0uq9JsWQExf4f5Whu0tK0R8Jdc9S6RchTHjIFY7uc92puOVQ==", + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz", + "integrity": "sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz", + "integrity": "sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==", "cpu": [ "arm64" ], @@ -2078,15 +2707,12 @@ "optional": true, "os": [ "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0.tgz", - "integrity": "sha512-EIVjy2cgd7uuMMo94FVkBp7F6DhcZAUwNURkSG3RwUmvAXR6s0ISxM81U+IydcZByPG0pZIHsf1b6kTxoFDgJA==", + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz", + "integrity": "sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==", "cpu": [ "arm64" ], @@ -2095,15 +2721,40 @@ "optional": true, "os": [ "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0.tgz", - "integrity": "sha512-JEwwOPcwTLAcpDQlqSmjEmfs63xJnSiUNIGvLcDLUHCWK4XowpS/7c7tUsUH6uT/ct6bMUTdXKfI8967FYj6mg==", + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz", + "integrity": "sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz", + "integrity": "sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz", + "integrity": "sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==", "cpu": [ "ppc64" ], @@ -2112,15 +2763,54 @@ "optional": true, "os": [ "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0.tgz", - "integrity": "sha512-0wjCFhLrihtAubnT9iA0N++0pSV0z5Hg7tNGdNJ4RFaINceHadoF+kiFGyY1qSSNVIAZtLotG8Ju1bgDPkjnFA==", + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz", + "integrity": "sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz", + "integrity": "sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz", + "integrity": "sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz", + "integrity": "sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==", "cpu": [ "s390x" ], @@ -2129,15 +2819,12 @@ "optional": true, "os": [ "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0.tgz", - "integrity": "sha512-Dfn7iak9BcMMePxcoJfpSbWqnEyrp/dRF63/8qW/eHBdOZov6x5aShLLEYGYdIeSJ6vMLK/XCVB+lGIxm41bQA==", + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz", + "integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==", "cpu": [ "x64" ], @@ -2146,15 +2833,12 @@ "optional": true, "os": [ "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0.tgz", - "integrity": "sha512-5/utzzDmD/pD/bmuaUcbTf/sZYy0aztwIVlfpoW1fTjCZ0BaPOMVWGZL1zvgxyi7ZIVYWlxKONHmSbHuiOh8Jw==", + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz", + "integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==", "cpu": [ "x64" ], @@ -2163,15 +2847,26 @@ "optional": true, "os": [ "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0.tgz", - "integrity": "sha512-ouJs8VcUomfLfpbUECqFMRqdV4x6aeAK3MA4m6vTrJJjKyWTV5KnxZx7Jd9G+GlDaQQxubcba00x16OyJ1meig==", + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz", + "integrity": "sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz", + "integrity": "sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==", "cpu": [ "arm64" ], @@ -2180,34 +2875,12 @@ "optional": true, "os": [ "openharmony" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0.tgz", - "integrity": "sha512-E+oHKGiDA+lsKMmFtffDDw91EryDT7uJocrIuCHqhm6bCTM6xFK+3gaCkYOHfPwQr0cCNarSM2xaELoQDz9jJg==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "1.10.0", - "@emnapi/runtime": "1.10.0", - "@napi-rs/wasm-runtime": "^1.1.4" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0.tgz", - "integrity": "sha512-yYK02n8Rngo+gbm1y6G0+7jk1sJ/2Wt7K0me0Y7k/ErBpyf+LJ2gFpqWVTcRV1rUepBlQRmpgWkTQCiiwrK0Ow==", + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz", + "integrity": "sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==", "cpu": [ "arm64" ], @@ -2216,15 +2889,26 @@ "optional": true, "os": [ "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0.tgz", - "integrity": "sha512-14bpChMahXRRXiTwahSl+zzHPW6qQTXtkMuJBFlbo+pqSAews2d4BdCSHfrJ/MBsCZtpmTafsY+1QhBzitcmdg==", + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz", + "integrity": "sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz", + "integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==", "cpu": [ "x64" ], @@ -2233,17 +2917,21 @@ "optional": true, "os": [ "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + ] }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0.tgz", - "integrity": "sha512-aKs/3GSWyV0mrhNmt/96/Z3yczC3yvrzYATCiCXQebBsGyYzjNdUphRVLeJQ67ySKVXRfMxt2lm12pmXvbPFQQ==", + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz", + "integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] }, "node_modules/@sigstore/bundle": { "version": "4.0.0", @@ -2259,9 +2947,9 @@ } }, "node_modules/@sigstore/core": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-3.2.0.tgz", - "integrity": "sha512-kxHrDQ9YgfrWUSXU0cjsQGv8JykOFZQ9ErNKbFPWzk3Hgpwu8x2hHrQ9IdA8yl+j9RTLTC3sAF3Tdq1IQCP4oA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-3.1.0.tgz", + "integrity": "sha512-o5cw1QYhNQ9IroioJxpzexmPjfCe7gzafd2RY3qnMpxr4ZEja+Jad/U8sgFpaue6bOaF+z7RVkyKVV44FN+N8A==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2269,9 +2957,9 @@ } }, "node_modules/@sigstore/protobuf-specs": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.5.1.tgz", - "integrity": "sha512-/ScWUhhoFasJsSRGTVBwId1loQjjnjAfE4djL6ZhrXRpNCmPTnUKF5Jokd58ILseOMjzET3UrMOtJPS9sYeI0g==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.5.0.tgz", + "integrity": "sha512-MM8XIwUjN2bwvCg1QvrMtbBmpcSHrkhFSCu1D11NyPvDQ25HEc4oG5/OcQfd/Tlf/OxmKWERDj0zGE23jQaMwA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2279,27 +2967,27 @@ } }, "node_modules/@sigstore/sign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-4.1.1.tgz", - "integrity": "sha512-Hf4xglukg0XXQ2RiD5vSoLjdPe8OBUPA8XeVjUObheuDcWdYWrnH/BNmxZCzkAy68MzmNCxXLeurJvs6hcP2OQ==", + "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==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@gar/promise-retry": "^1.0.2", "@sigstore/bundle": "^4.0.0", - "@sigstore/core": "^3.2.0", + "@sigstore/core": "^3.1.0", "@sigstore/protobuf-specs": "^0.5.0", - "make-fetch-happen": "^15.0.4", - "proc-log": "^6.1.0" + "make-fetch-happen": "^15.0.3", + "proc-log": "^6.1.0", + "promise-retry": "^2.0.1" }, "engines": { "node": "^20.17.0 || >=22.9.0" } }, "node_modules/@sigstore/tuf": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-4.0.2.tgz", - "integrity": "sha512-TCAzTy0xzdP79EnxSjq9KQ3eaR7+FmudLC6eRKknVKZbV7ZNlGLClAAQb/HMNJ5n2OBNk2GT1tEmU0xuPr+SLQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-4.0.1.tgz", + "integrity": "sha512-OPZBg8y5Vc9yZjmWCHrlWPMBqW5yd8+wFNl+thMdtcWz3vjVSoJQutF8YkrzI0SLGnkuFof4HSsWUhXrf219Lw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2366,14 +3054,45 @@ "node": ">=4" } }, - "node_modules/@smithy/core": { - "version": "3.24.3", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.24.3.tgz", - "integrity": "sha512-Ep/7tPamGY8mgESE3LyLKtxJyy6U52WWAqr/3wial47Sj4u3PiIF73AOGI27UyLy9duTkhZbgzodOfLV4TduZg==", + "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/config-resolver": { + "version": "4.4.17", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.4.17.tgz", + "integrity": "sha512-TzDZcAnhTyAHbXVxWZo7/tEcrIeFq20IBk8So3OLOetWpR8EwY/yEqBMBFaJMeyEiREDq4NfEl+qO3OAUD+vbQ==", "license": "Apache-2.0", "dependencies": { - "@aws-crypto/crc32": "5.2.0", - "@smithy/types": "^4.14.2", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-config-provider": "^4.2.2", + "@smithy/util-endpoints": "^3.4.2", + "@smithy/util-middleware": "^4.2.14", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/core": { + "version": "3.23.17", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.23.17.tgz", + "integrity": "sha512-x7BlLbUFL8NWCGjMF9C+1N5cVCxcPa7g6Tv9B4A2luWx3be3oU8hQ96wIwxe/s7OhIzvoJH73HAUSg5JXVlEtQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-body-length-browser": "^4.2.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-stream": "^4.5.25", + "@smithy/util-utf8": "^4.2.2", + "@smithy/uuid": "^1.1.2", "tslib": "^2.6.2" }, "engines": { @@ -2381,13 +3100,15 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "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==", + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.14.tgz", + "integrity": "sha512-Au28zBN48ZAoXdooGUHemuVBrkE+Ie6RPmGNIAJsFqj33Vhb6xAgRifUydZ2aY+M+KaMAETAlKk5NC5h1G7wpg==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.3", - "@smithy/types": "^4.14.2", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/property-provider": "^4.2.14", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", "tslib": "^2.6.2" }, "engines": { @@ -2395,13 +3116,43 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "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==", + "version": "5.3.17", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.17.tgz", + "integrity": "sha512-bXOvQzaSm6MnmLaWA1elgfQcAtN4UP3vXqV97bHuoOrHQOJiLT3ds6o9eo5bqd0TJfRFpzdGnDQdW3FACiAVdw==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.3", - "@smithy/types": "^4.14.2", + "@smithy/protocol-http": "^5.3.14", + "@smithy/querystring-builder": "^4.2.14", + "@smithy/types": "^4.14.1", + "@smithy/util-base64": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/hash-node": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.14.tgz", + "integrity": "sha512-8ZBDY2DD4wr+GGjTpPtiglEsqr0lUP+KHqgZcWczFf6qeZ/YRjMIOoQWVQlmwu7EtxKTd8YXD8lblmYcpBIA1g==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "@smithy/util-buffer-from": "^4.2.2", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/invalid-dependency": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.14.tgz", + "integrity": "sha512-c21qJiTSb25xvvOp+H2TNZzPCngrvl5vIPqPB8zQ/DmJF4QWXO19x1dWfMJZ6wZuuWUPPm0gV8C0cU3+ifcWuw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -2409,25 +3160,123 @@ } }, "node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.2.tgz", + "integrity": "sha512-n6rQ4N8Jj4YTQO3YFrlgZuwKodf4zUFs7EJIWH86pSCWBaAtAGBFfCM7Wx6D2bBJ2xqFNxGBSrUWswT3M0VJow==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-content-length": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.14.tgz", + "integrity": "sha512-xhHq7fX4/3lv5NHxLUk3OeEvl0xZ+Ek3qIbWaCL4f9JwgDZEclPBElljaZCAItdGPQl/kSM4LPMOpy1MYgprpw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-endpoint": { + "version": "4.4.32", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.4.32.tgz", + "integrity": "sha512-ZZkgyjnJppiZbIm6Qbx92pbXYi1uzenIvGhBSCDlc7NwuAkiqSgS75j1czAD25ZLs2FjMjYy1q7gyRVWG6JA0Q==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.23.17", + "@smithy/middleware-serde": "^4.2.20", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/shared-ini-file-loader": "^4.4.9", + "@smithy/types": "^4.14.1", + "@smithy/url-parser": "^4.2.14", + "@smithy/util-middleware": "^4.2.14", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-retry": { + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.5.6.tgz", + "integrity": "sha512-5zhmo2AkstmM/RMKYP0NHfmuYWBR+/umlmSuALgajLxf0X0rLE6d17MfzTxpzkILWVhwvCJkCyPH0AfMlbaucQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.23.17", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/service-error-classification": "^4.3.1", + "@smithy/smithy-client": "^4.12.13", + "@smithy/types": "^4.14.1", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-retry": "^4.3.5", + "@smithy/uuid": "^1.1.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-serde": { + "version": "4.2.20", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.20.tgz", + "integrity": "sha512-Lx9JMO9vArPtiChE3wbEZ5akMIDQpWQtlu90lhACQmNOXcGXRbaDywMHDzuDZ2OkZzP+9wQfZi3YJT9F67zTQQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.23.17", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-stack": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.14.tgz", + "integrity": "sha512-2dvkUKLuFdKsCRmOE4Mn63co0Djtsm+JMh0bYZQupN1pJwMeE8FmQmRLLzzEMN0dnNi7CDCYYH8F0EVwWiPBeA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/node-config-provider": { + "version": "4.3.14", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.14.tgz", + "integrity": "sha512-S+gFjyo/weSVL0P1b9Ts8C/CwIfNCgUPikk3sl6QVsfE/uUuO+QsF+NsE/JkpvWqqyz1wg7HFdiaZuj5CoBMRg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/property-provider": "^4.2.14", + "@smithy/shared-ini-file-loader": "^4.4.9", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@smithy/node-http-handler": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.7.3.tgz", - "integrity": "sha512-/jPhevcTFPMVl6KNjbaI47iOg1zxC7IsnX4PQDGVZKMFceOXtB8IEYaB7a9VvkP/3oC60WzTeKocvSI7vLT0vA==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.6.1.tgz", + "integrity": "sha512-iB+orM4x3xrr57X3YaXazfKnntl0LHlZB1kcXSGzMV1Tt0+YwEjGlbjk/44qEGtBzXAz6yFDzkYTKSV6Pj2HUg==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.3", - "@smithy/types": "^4.14.2", + "@smithy/protocol-http": "^5.3.14", + "@smithy/querystring-builder": "^4.2.14", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -2435,13 +3284,77 @@ } }, "node_modules/@smithy/property-provider": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.3.3.tgz", - "integrity": "sha512-nmeVi9Ww/RMyttqj1Dh0PA+iVieKm4dxDlnT6tNP118O/5U/Qqb9b3DV5A3RX+slR/m4/MABSZ2zNfSkpVV8dw==", - "dev": true, + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.14.tgz", + "integrity": "sha512-WuM31CgfsnQ/10i7NYr0PyxqknD72Y5uMfUMVSniPjbEPceiTErb4eIqJQ+pdxNEAUEWrewrGjIRjVbVHsxZiQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.3", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/protocol-http": { + "version": "5.3.14", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.14.tgz", + "integrity": "sha512-dN5F8kHx8RNU0r+pCwNmFZyz6ChjMkzShy/zup6MtkRmmix4vZzJdW+di7x//b1LiynIev88FM18ie+wwPcQtQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/querystring-builder": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.14.tgz", + "integrity": "sha512-XYA5Z0IqTeF+5XDdh4BBmSA0HvbgVZIyv4cmOoUheDNR57K1HgBp9ukUMx3Cr3XpDHHpLBnexPE3LAtDsZkj2A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "@smithy/util-uri-escape": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/querystring-parser": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.14.tgz", + "integrity": "sha512-hr+YyqBD23GVvRxGGrcc/oOeNlK3PzT5Fu4dzrDXxzS1LpFiuL2PQQqKPs87M79aW7ziMs+nvB3qdw77SqE7Lw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/service-error-classification": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.3.1.tgz", + "integrity": "sha512-aUQuDGh760ts/8MU+APjIZhlLPKhIIfqyzZaJikLEIMrdxFvxuLYD0WxWzaYWpmLbQlXDe9p7EWM3HsBe0K6Gw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.4.9.tgz", + "integrity": "sha512-495/V2I15SHgedSJoDPD23JuSfKAp726ZI1V0wtjB07Wh7q/0tri/0e0DLefZCHgxZonrGKt/OCTpAtP1wE1kQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -2449,13 +3362,36 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.4.3.tgz", - "integrity": "sha512-53+75QuPl6DL+ct6vVEB51FDO5oulXr20TPV46VvJZg76lIlXNWfxi8j+G2V/t0I2qxCBOa3vX/8bmjrpFVo9g==", + "version": "5.3.14", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.14.tgz", + "integrity": "sha512-1D9Y/nmlVjCeSivCbhZ7hgEpmHyY1h0GvpSZt3l0xcD9JjmjVC1CHOozS6+Gh+/ldMH8JuJ6cujObQqfayAVFA==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.3", - "@smithy/types": "^4.14.2", + "@smithy/is-array-buffer": "^4.2.2", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-hex-encoding": "^4.2.2", + "@smithy/util-middleware": "^4.2.14", + "@smithy/util-uri-escape": "^4.2.2", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/smithy-client": { + "version": "4.12.13", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.12.13.tgz", + "integrity": "sha512-y/Pcj1V9+qG98gyu1gvftHB7rDpdh+7kIBIggs55yGm3JdtBV8GT8IFF3a1qxZ79QnaJHX9GXzvBG6tAd+czJA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.23.17", + "@smithy/middleware-endpoint": "^4.4.32", + "@smithy/middleware-stack": "^4.2.14", + "@smithy/protocol-http": "^5.3.14", + "@smithy/types": "^4.14.1", + "@smithy/util-stream": "^4.5.25", "tslib": "^2.6.2" }, "engines": { @@ -2463,9 +3399,61 @@ } }, "node_modules/@smithy/types": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.14.2.tgz", - "integrity": "sha512-P+otAxbV4CqBybp7EkcJCrig63yE2E7PuNVOmilVMRcx/O+QDzGULTrKsq4DV13gSfak9ObPrWaHl/9bL5YcWw==", + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.14.1.tgz", + "integrity": "sha512-59b5HtSVrVR/eYNei3BUj3DCPKD/G7EtDDe7OEJE7i7FtQFugYo6MxbotS8mVJkLNVf8gYaAlEBwwtJ9HzhWSg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/url-parser": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.14.tgz", + "integrity": "sha512-p06BiBigJ8bTA3MgnOfCtDUWnAMY0YfedO/GRpmc7p+wg3KW8vbXy1xwSu5ASy0wV7rRYtlfZOIKH4XqfhjSQQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/querystring-parser": "^4.2.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-base64": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.2.tgz", + "integrity": "sha512-XRH6b0H/5A3SgblmMa5ErXQ2XKhfbQB+Fm/oyLZ2O2kCUrwgg55bU0RekmzAhuwOjA9qdN5VU2BprOvGGUkOOQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^4.2.2", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-body-length-browser": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.2.tgz", + "integrity": "sha512-JKCrLNOup3OOgmzeaKQwi4ZCTWlYR5H4Gm1r2uTMVBXoemo1UEghk5vtMi1xSu2ymgKVGW631e2fp9/R610ZjQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-body-length-node": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.2.3.tgz", + "integrity": "sha512-ZkJGvqBzMHVHE7r/hcuCxlTY8pQr1kMtdsVPs7ex4mMU+EAbcXppfo5NmyxMYi2XU49eqaz56j2gsk4dHHPG/g==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -2475,37 +3463,171 @@ } }, "node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.2.tgz", + "integrity": "sha512-FDXD7cvUoFWwN6vtQfEta540Y/YBe5JneK3SoZg9bThSoOAC/eGeYEua6RkBgKjGa/sz6Y+DuBZj3+YEY21y4Q==", "license": "Apache-2.0", "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", + "@smithy/is-array-buffer": "^4.2.2", "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-config-provider": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.2.2.tgz", + "integrity": "sha512-dWU03V3XUprJwaUIFVv4iOnS1FC9HnMHDfUrlNDSh4315v0cWyaIErP8KiqGVbf5z+JupoVpNM7ZB3jFiTejvQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "4.3.49", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.49.tgz", + "integrity": "sha512-a5bNrdiONYB/qE2BuKegvUMd/+ZDwdg4vsNuuSzYE8qs2EYAdK9CynL+Rzn29PbPiUqoz/cbpRbcLzD5lEevHw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/property-provider": "^4.2.14", + "@smithy/smithy-client": "^4.12.13", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-node": { + "version": "4.2.54", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.54.tgz", + "integrity": "sha512-g1cvrJvOnzeJgEdf7AE4luI7gp6L8weE0y9a9wQUSGtjb8QRHDbCJYuE4Sy0SD9N8RrnNPFsPltAz/OSoBR9Zw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/config-resolver": "^4.4.17", + "@smithy/credential-provider-imds": "^4.2.14", + "@smithy/node-config-provider": "^4.3.14", + "@smithy/property-provider": "^4.2.14", + "@smithy/smithy-client": "^4.12.13", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-endpoints": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.4.2.tgz", + "integrity": "sha512-a55Tr+3OKld4TTtnT+RhKOQHyPxm3j/xL4OR83WBUhLJaKDS9dnJ7arRMOp3t31dcLhApwG9bgvrRXBHlLdIkg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.3.14", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-hex-encoding": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.2.tgz", + "integrity": "sha512-Qcz3W5vuHK4sLQdyT93k/rfrUwdJ8/HZ+nMUOyGdpeGA1Wxt65zYwi3oEl9kOM+RswvYq90fzkNDahPS8K0OIg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-middleware": { + "version": "4.2.14", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.14.tgz", + "integrity": "sha512-1Su2vj9RYNDEv/V+2E+jXkkwGsgR7dc4sfHn9Z7ruzQHJIEni9zzw5CauvRXlFJfmgcqYP8fWa0dkh2Q2YaQyw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-retry": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.3.5.tgz", + "integrity": "sha512-h1IJsbgMDA+jaTjrco/JsyfWOgHRJBv8myB1y4AEI2fjIzD6ktZ7pFAyTw+gwN9GKIAygvC6db0mq0j8N2rFOg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/service-error-classification": "^4.3.1", + "@smithy/types": "^4.14.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-stream": { + "version": "4.5.25", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.25.tgz", + "integrity": "sha512-/PFpG4k8Ze8Ei+mMKj3oiPICYekthuzePZMgZbCqMiXIHHf4n2aZ4Ps0aSRShycFTGuj/J6XldmC0x0DwednIA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/fetch-http-handler": "^5.3.17", + "@smithy/node-http-handler": "^4.6.1", + "@smithy/types": "^4.14.1", + "@smithy/util-base64": "^4.3.2", + "@smithy/util-buffer-from": "^4.2.2", + "@smithy/util-hex-encoding": "^4.2.2", + "@smithy/util-utf8": "^4.2.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-uri-escape": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.2.tgz", + "integrity": "sha512-2kAStBlvq+lTXHyAZYfJRb/DfS3rsinLiwb+69SstC9Vb0s9vNWkRwpnj918Pfi85mzi42sOqdV72OLxWAISnw==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.2.tgz", + "integrity": "sha512-75MeYpjdWRe8M5E3AW0O4Cx3UadweS+cwdXjwYGBW5h/gxxnbeZ877sLPX/ZJA9GVTlL/qG0dXP29JWFCD1Ayw==", "license": "Apache-2.0", "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", + "@smithy/util-buffer-from": "^4.2.2", "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, - "node_modules/@standard-schema/spec": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", - "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", - "dev": true, - "license": "MIT" + "node_modules/@smithy/uuid": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@smithy/uuid/-/uuid-1.1.2.tgz", + "integrity": "sha512-O/IEdcCUKkubz60tFbGA7ceITTAJsty+lBjNoorP4Z6XRqaFb/OjQjZODophEcuq68nKm6/0r+6/lLQ+XVpk8g==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } }, "node_modules/@tufjs/canonical-json": { "version": "2.0.0", @@ -2531,32 +3653,59 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/@tybys/wasm-util": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", - "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", + "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", - "optional": true, "dependencies": { - "tslib": "^2.4.0" + "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/@types/chai": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", - "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", "dev": true, "license": "MIT", "dependencies": { - "@types/deep-eql": "*", - "assertion-error": "^2.0.1" + "@types/deep-eql": "*" } }, "node_modules/@types/debug": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz", - "integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2599,13 +3748,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "25.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.0.tgz", - "integrity": "sha512-AOQwYUNolgy3VosiRqXrACUXTN8nJUtPl7FJXMqZVyxiiCLhQuG3jXKvCS1ALr+Y2OmZhzzLVlYPEqJaiqkaJQ==", + "version": "25.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz", + "integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": ">=7.24.0 <7.24.7" + "undici-types": "~7.19.0" } }, "node_modules/@types/normalize-package-data": { @@ -2626,9 +3775,9 @@ } }, "node_modules/@types/sinonjs__fake-timers": { - "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==", + "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==", "dev": true, "license": "MIT" }, @@ -2640,29 +3789,32 @@ "license": "MIT" }, "node_modules/@vitest/coverage-v8": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.6.tgz", - "integrity": "sha512-36l628fQ/9a/8ihy97eOtEnvWQEdqULQOJtcaxtoNq0G1w3Mxd4szSahOaMM9/NGyZ+hyKcMtIW/WIxq0XQViQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.2.4.tgz", + "integrity": "sha512-EyF9SXU6kS5Ku/U82E259WSnvg6c8KTjppUncuNdm5QHpe17mwREHnjDzozC8x9MZ0xfBUFSaLkRv4TMA75ALQ==", "dev": true, "license": "MIT", "dependencies": { + "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^1.0.2", - "@vitest/utils": "4.1.6", - "ast-v8-to-istanbul": "^1.0.0", + "ast-v8-to-istanbul": "^0.3.3", + "debug": "^4.4.1", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", - "istanbul-reports": "^3.2.0", - "magicast": "^0.5.2", - "obug": "^2.1.1", - "std-env": "^4.0.0-rc.1", - "tinyrainbow": "^3.1.0" + "istanbul-lib-source-maps": "^5.0.6", + "istanbul-reports": "^3.1.7", + "magic-string": "^0.30.17", + "magicast": "^0.3.5", + "std-env": "^3.9.0", + "test-exclude": "^7.0.1", + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "4.1.6", - "vitest": "4.1.6" + "@vitest/browser": "3.2.4", + "vitest": "3.2.4" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -2671,40 +3823,39 @@ } }, "node_modules/@vitest/expect": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.6.tgz", - "integrity": "sha512-7EHDquPthALSV0jhhjgEW8FXaviMx7rSqu8W6oqCoAuOhKov814P99QDV1pxMA3QPv21YudvJngIhjrNI4opLg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", "dev": true, "license": "MIT", "dependencies": { - "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.6", - "@vitest/utils": "4.1.6", - "chai": "^6.2.2", - "tinyrainbow": "^3.1.0" + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/mocker": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.6.tgz", - "integrity": "sha512-MCFc63czMjEInOlcY2cpQCvCN+KgbAn+60xu9cMgP4sKaLC5JNAKw7JH8QdAnoAC88hW1IiSNZ+GgVXlN1UcMQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", + "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.1.6", + "@vitest/spy": "3.2.4", "estree-walker": "^3.0.3", - "magic-string": "^0.30.21" + "magic-string": "^0.30.17" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { "msw": "^2.4.9", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" }, "peerDependenciesMeta": { "msw": { @@ -2716,42 +3867,42 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.6.tgz", - "integrity": "sha512-h5SxD/IzNhZYnrSZRsUZQIC+vD0GY8cUvq0iwsmkFKixRCKLLWqCXa/FIQ4S1R+sI+PGoojkHsdNrbZiM9Qpgw==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", "dev": true, "license": "MIT", "dependencies": { - "tinyrainbow": "^3.1.0" + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/runner": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.6.tgz", - "integrity": "sha512-nOPCmn2+yD0ZNmKdsXGv/UxMMWbMuKeD6GyYncNwdkYDxpQvrPSKYj2rWuDjC2Y4b6w6hjip5dBKFzEUuZe3vA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", + "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.1.6", - "pathe": "^2.0.3" + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/snapshot": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.6.tgz", - "integrity": "sha512-YhsdE6xAVfTDmzjxL2ZDUvjj+ZsgyOKe+TdQzqkD72wIOmHka8NuGQ6NpTNZv9D2Z63fbwWKJPeVpEw4EQgYxw==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", + "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.6", - "@vitest/utils": "4.1.6", - "magic-string": "^0.30.21", + "@vitest/pretty-format": "3.2.4", + "magic-string": "^0.30.17", "pathe": "^2.0.3" }, "funding": { @@ -2759,25 +3910,28 @@ } }, "node_modules/@vitest/spy": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.6.tgz", - "integrity": "sha512-JFKxMx6udhwKh/Ldo270e17QX710vgunMkuPAvXjHSvC6oqLWAHhVhjg/I71q0u0CBSErIODV1Kjv0FQNSWjdg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", "dev": true, "license": "MIT", + "dependencies": { + "tinyspy": "^4.0.3" + }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.6.tgz", - "integrity": "sha512-FxIY+U81R3LGKCxaHHFRQ5+g6/iRgGLmeHWdp2Amj4ljQRrEIWHmZyDfDYBRZlpyqA7qKxtS9DD1dhk8RnRIVQ==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", + "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.6", - "convert-source-map": "^2.0.0", - "tinyrainbow": "^3.1.0" + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" }, "funding": { "url": "https://opencollective.com/vitest" @@ -2821,29 +3975,29 @@ } }, "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==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "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==", + "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": "^2.0.1" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=4" } }, "node_modules/argparse": { @@ -2860,16 +4014,6 @@ "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", @@ -2893,15 +4037,15 @@ } }, "node_modules/ast-v8-to-istanbul": { - "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==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-0.3.4.tgz", + "integrity": "sha512-cxrAnZNLBnQwBPByK4CeDaw5sWZtMilJE/Q3iDA0aamgaIVNDF9T6K2/8DfYDZEejZ2jNnDrG9m8MY72HFd0KA==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.31", + "@jridgewell/trace-mapping": "^0.3.29", "estree-walker": "^3.0.3", - "js-tokens": "^10.0.0" + "js-tokens": "^9.0.1" } }, "node_modules/aws-sdk-client-mock": { @@ -2917,14 +4061,11 @@ } }, "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==", + "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", - "engines": { - "node": "18 || 20 || >=22" - } + "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", @@ -2948,9 +4089,9 @@ "license": "MIT" }, "node_modules/basic-ftp": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.3.1.tgz", - "integrity": "sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.3.0.tgz", + "integrity": "sha512-5K9eNNn7ywHPsYnFwjKgYH8Hf8B5emh7JKcPaVjjrMJFQQwGpwowEnZNEtHs7DfR7hCZsmaK3VA4HUK0YarT+w==", "license": "MIT", "engines": { "node": ">=10.0.0" @@ -2992,16 +4133,14 @@ "license": "MIT" }, "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==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, "node_modules/buffer": { @@ -3036,10 +4175,20 @@ "dev": true, "license": "MIT" }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/cacache": { - "version": "20.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-20.0.4.tgz", - "integrity": "sha512-M3Lab8NPYlZU2exsL3bMVvMrMqgwCnMWfdZbK28bn3pK6APT/Te/I8hjRPNu1uwORY9a1eEQoifXbKPQMfMTOA==", + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-20.0.3.tgz", + "integrity": "sha512-3pUp4e8hv07k1QlijZu6Kn7c9+ZpWWk4j3F8N3xPuCExULobqJydKYOTj1FTq58srkJsXvO7LbGAH4C0ZU3WGw==", "dev": true, "license": "ISC", "dependencies": { @@ -3052,12 +4201,36 @@ "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "p-map": "^7.0.2", - "ssri": "^13.0.0" + "ssri": "^13.0.0", + "unique-filename": "^5.0.0" }, "engines": { "node": "^20.17.0 || >=22.9.0" } }, + "node_modules/cacache/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/cacache/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/cacache/node_modules/glob": { "version": "13.0.6", "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", @@ -3076,6 +4249,49 @@ "url": "https://github.com/sponsors/isaacs" } }, + "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==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/cacache/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/cacache/node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -3115,30 +4331,58 @@ } }, "node_modules/chai": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", - "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.1.tgz", + "integrity": "sha512-5nFxhUrX0PqtyogoYOA8IPswy5sZFTOsBFl/9bNsmDLgsxYTzSZQJDPppDnZPTQbzSEm0hqGjWPzRemQCYbD6A==", "dev": true, "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, "engines": { "node": ">=18" } }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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": "^4.1.0", - "supports-color": "^7.1.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">=10" + "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" }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "engines": { + "node": ">=4" } }, "node_modules/character-entities": { @@ -3174,6 +4418,16 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, "node_modules/chownr": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", @@ -3222,6 +4476,59 @@ "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", @@ -3237,6 +4544,37 @@ "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", @@ -3258,22 +4596,19 @@ } }, "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==", + "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.4" - }, - "engines": { - "node": ">=7.0.0" + "color-name": "1.1.3" } }, "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==", + "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" }, @@ -3542,6 +4877,191 @@ "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", @@ -3587,6 +5107,191 @@ "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", @@ -3610,12 +5315,190 @@ "node": ">=10" } }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "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" + "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/core-util-is": { "version": "1.0.3", @@ -3651,6 +5534,25 @@ } } }, + "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==", + "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/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -3666,29 +5568,6 @@ "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" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -3799,6 +5678,16 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -3859,16 +5748,6 @@ "node": ">=8" } }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -3930,24 +5809,6 @@ "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", @@ -3975,19 +5836,6 @@ "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", @@ -4027,10 +5875,17 @@ "node": ">=4" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "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==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "license": "MIT" }, @@ -4048,6 +5903,29 @@ "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", @@ -4071,30 +5949,27 @@ "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.4", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", - "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "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", - "integrity": "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", "dev": true, "license": "MIT" }, @@ -4223,9 +6098,9 @@ } }, "node_modules/expect-type": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", - "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", + "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4240,9 +6115,9 @@ "license": "Apache-2.0" }, "node_modules/fast-xml-builder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.2.0.tgz", - "integrity": "sha512-00aAWieqff+ZJhsXA4g1g7M8k+7AYoMUUHF+/zFb5U6Uv/P0Vl4QZo84/IcufzYalLuEj9928bXN9PbbFzMF0Q==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.5.tgz", + "integrity": "sha512-4TJn/8FKLeslLAH3dnohXqE3QSoxkhvaMzepOIZytwJXZO69Bfz0HBdDHzOTOon6G59Zrk6VQ2bEiv1t61rfkA==", "funding": [ { "type": "github", @@ -4251,14 +6126,13 @@ ], "license": "MIT", "dependencies": { - "path-expression-matcher": "^1.5.0", - "xml-naming": "^0.1.0" + "path-expression-matcher": "^1.1.3" } }, "node_modules/fast-xml-parser": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.7.3.tgz", - "integrity": "sha512-C0AaNuC+mscy6vrAQKAc/rMq+zAPHodfHGZu4sGVehvAQt/JLG1O5zEcYcXSY5zSqr4YVgxsB+pHXTq0i7eDlg==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.7.2.tgz", + "integrity": "sha512-P7oW7tLbYnhOLQk/Gv7cZgzgMPP/XN03K02/Jy6Y/NHzyIAIpxuZIM/YqAkfiXFPxA2CTm7NtCijK9EDu09u2w==", "funding": [ { "type": "github", @@ -4268,7 +6142,7 @@ "license": "MIT", "dependencies": { "@nodable/entities": "^2.1.0", - "fast-xml-builder": "^1.1.7", + "fast-xml-builder": "^1.1.5", "path-expression-matcher": "^1.5.0", "strnum": "^2.2.3" }, @@ -4276,24 +6150,6 @@ "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", @@ -4405,6 +6261,123 @@ "generate-license-file": "bin/generate-license-file" } }, + "node_modules/generate-license-file/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/generate-license-file/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/generate-license-file/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/generate-license-file/node_modules/glob": { + "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": { + "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": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/generate-license-file/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/generate-license-file/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/generate-license-file/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/generate-license-file/node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -4447,32 +6420,6 @@ "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", @@ -4517,13 +6464,6 @@ "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", @@ -4542,7 +6482,6 @@ "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": { @@ -4559,6 +6498,191 @@ "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", @@ -4577,7 +6701,6 @@ "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": { @@ -4591,6 +6714,191 @@ "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", @@ -4619,26 +6927,22 @@ "license": "ISC" }, "node_modules/glob": { - "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", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, - "license": "BlueOak-1.0.0", + "license": "ISC", "dependencies": { - "foreground-child": "^3.3.1", - "jackspeak": "^4.1.1", - "minimatch": "^10.1.1", + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": "20 || >=22" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -4660,6 +6964,32 @@ "tslib": "2" } }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "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", @@ -4710,9 +7040,9 @@ } }, "node_modules/hasown": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", - "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4723,16 +7053,16 @@ } }, "node_modules/hosted-git-info": { - "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==", + "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": "^11.1.0" + "lru-cache": "^6.0.0" }, "engines": { - "node": "^20.17.0 || >=22.9.0" + "node": ">=10" } }, "node_modules/html-escaper": { @@ -4849,6 +7179,45 @@ "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", @@ -4866,6 +7235,16 @@ "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", @@ -4884,19 +7263,19 @@ "license": "ISC" }, "node_modules/ini": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-6.0.0.tgz", - "integrity": "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ==", + "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": "^20.17.0 || >=22.9.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/ip-address": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz", - "integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz", + "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==", "license": "MIT", "engines": { "node": ">= 12" @@ -4936,13 +7315,13 @@ "license": "MIT" }, "node_modules/is-core-module": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", - "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.3" + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -5047,14 +7426,11 @@ "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==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=20" - } + "license": "ISC" }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", @@ -5081,10 +7457,25 @@ "node": ">=10" } }, + "node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/istanbul-reports": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", - "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -5096,25 +7487,25 @@ } }, "node_modules/jackspeak": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz", - "integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "@isaacs/cliui": "^9.0.0" - }, - "engines": { - "node": "20 || >=22" + "@isaacs/cliui": "^8.0.2" }, "funding": { "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" } }, "node_modules/js-tokens": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz", - "integrity": "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", "dev": true, "license": "MIT" }, @@ -5139,14 +7530,11 @@ "license": "MIT" }, "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==", + "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", - "engines": { - "node": "^20.17.0 || >=22.9.0" - } + "license": "MIT" }, "node_modules/json-schema": { "version": "0.4.0", @@ -5251,9 +7639,9 @@ "license": "MIT" }, "node_modules/katex": { - "version": "0.16.45", - "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.45.tgz", - "integrity": "sha512-pQpZbdBu7wCTmQUh7ufPmLr0pFoObnGUoL/yhtwJDgmmQpbkg/0HSVti25Fu4rmd1oCR6NGWe9vqTWuWv3GcNA==", + "version": "0.16.38", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.38.tgz", + "integrity": "sha512-cjHooZUmIAUmDsHBN+1n8LaZdpmbj03LtYeYPyuYB7OuloiaeaV6N4LcfjcnHVzGWjVQmKrxxTrpDcmSzEZQwQ==", "dev": true, "funding": [ "https://opencollective.com/katex", @@ -5287,267 +7675,6 @@ "node": ">=0.10.0" } }, - "node_modules/lightningcss": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", - "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.32.0", - "lightningcss-darwin-arm64": "1.32.0", - "lightningcss-darwin-x64": "1.32.0", - "lightningcss-freebsd-x64": "1.32.0", - "lightningcss-linux-arm-gnueabihf": "1.32.0", - "lightningcss-linux-arm64-gnu": "1.32.0", - "lightningcss-linux-arm64-musl": "1.32.0", - "lightningcss-linux-x64-gnu": "1.32.0", - "lightningcss-linux-x64-musl": "1.32.0", - "lightningcss-win32-arm64-msvc": "1.32.0", - "lightningcss-win32-x64-msvc": "1.32.0" - } - }, - "node_modules/lightningcss-android-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", - "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", - "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", - "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", - "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", - "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", - "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", - "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", - "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", - "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", - "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", - "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -5581,20 +7708,6 @@ "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", @@ -5652,36 +7765,99 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lru-cache": { - "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==", + "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": "BlueOak-1.0.0", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": "20 || >=22" + "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/loupe": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.0.tgz", + "integrity": "sha512-2NCfZcT5VGVNX9mSZIxLRkEAegDGBpuQZBy13desuHeVORmBDyAET4TkJr4SjqQy3A8JDofMN6LpkK8Xcm/dlw==", + "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==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/magicast": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.2.tgz", - "integrity": "sha512-E3ZJh4J3S9KfwdjZhe2afj6R9lGIN5Pher1pF39UGrXRqq/VDaGVIGN13BjHd2u8B61hArAGOnso7nBOouW3TQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.29.0", - "@babel/types": "^7.29.0", - "source-map-js": "^1.2.1" + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", + "source-map-js": "^1.2.0" } }, "node_modules/make-dir": { @@ -5701,15 +7877,14 @@ } }, "node_modules/make-fetch-happen": { - "version": "15.0.5", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-15.0.5.tgz", - "integrity": "sha512-uCbIa8jWWmQZt4dSnEStkVC6gdakiinAm4PiGsywIkguF0eWMdcjDz0ECYhUolFU3pFLOev9VNPCEygydXnddg==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-15.0.4.tgz", + "integrity": "sha512-vM2sG+wbVeVGYcCm16mM3d5fuem9oC28n436HjsGO3LcxoTI8LNVa4rwZDn3f76+cWyT4GGJDxjTYU1I2nr6zw==", "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", @@ -5806,6 +7981,62 @@ "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", @@ -5843,172 +8074,6 @@ "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", @@ -6566,19 +8631,16 @@ } }, "node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, - "license": "BlueOak-1.0.0", + "license": "ISC", "dependencies": { - "brace-expansion": "^5.0.5" + "brace-expansion": "^1.1.7" }, "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "*" } }, "node_modules/minimist": { @@ -6606,6 +8668,16 @@ "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", @@ -6648,11 +8720,11 @@ } }, "node_modules/minipass-flush": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.7.tgz", - "integrity": "sha512-TbqTz9cUwWyHS2Dy89P3ocAGUGxKjjLuR9z8w4WUTGAVgEj17/4nhgo2Du56i0Fm3Pm30g4iA8Lcqctc76jCzA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "dev": true, - "license": "BlueOak-1.0.0", + "license": "ISC", "dependencies": { "minipass": "^3.0.0" }, @@ -6673,13 +8745,6 @@ "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", @@ -6706,13 +8771,6 @@ "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", @@ -6756,9 +8814,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.12", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", - "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "dev": true, "funding": [ { @@ -6792,31 +8850,32 @@ "license": "MIT" }, "node_modules/netmask": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.1.tgz", - "integrity": "sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.0.tgz", + "integrity": "sha512-z9sZrk6wyf8/NDKKqe+Tyl58XtgkYrV4kgt1O8xrzYvpl1LvPacPo0imMLHfpStk3kgCIq1ksJ2bmJn9hue2lQ==", "license": "MIT", "engines": { "node": ">= 0.4.0" } }, "node_modules/nise": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/nise/-/nise-6.1.5.tgz", - "integrity": "sha512-SnRDPDBjxZZoU2n0+gzzLtSvo1OZo7j6jnbXsoh3AFxEGhaFU7ZF0TmefuKERq79wxR2U+MPn7ArW+Tl+clC3A==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-6.1.1.tgz", + "integrity": "sha512-aMSAzLVY7LyeM60gvBS423nBmIPP+Wy7St7hsb+8/fc1HmeoHJfLO8CKse4u3BtOZvQLJghYPI2i/1WZrEj5/g==", "dev": true, "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^15.1.1", + "@sinonjs/fake-timers": "^13.0.1", + "@sinonjs/text-encoding": "^0.7.3", "just-extend": "^6.2.0", - "path-to-regexp": "^8.3.0" + "path-to-regexp": "^8.1.0" } }, "node_modules/nise/node_modules/@sinonjs/fake-timers": { - "version": "15.4.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.4.0.tgz", - "integrity": "sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==", + "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==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -6824,21 +8883,21 @@ } }, "node_modules/node-gyp": { - "version": "12.3.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-12.3.0.tgz", - "integrity": "sha512-QNcUWM+HgJplcPzBvFBZ9VXacyGZ4+VTOb80PwWR+TlVzoHbRKULNEzpRsnaoxG3Wzr7Qh7BYxGDU3CbKib2Yg==", + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-12.2.0.tgz", + "integrity": "sha512-q23WdzrQv48KozXlr0U1v9dwO/k59NHeSzn6loGcasyf0UnSrtzs8kRxM+mfwJSf0DkX0s43hcqgnSO4/VNthQ==", "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": { @@ -6848,6 +8907,32 @@ "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", @@ -6880,39 +8965,6 @@ "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", @@ -6965,6 +9017,29 @@ "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", @@ -7015,17 +9090,6 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/obug": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", - "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", - "dev": true, - "funding": [ - "https://github.com/sponsors/sxzz", - "https://opencollective.com/debug" - ], - "license": "MIT" - }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -7066,6 +9130,82 @@ "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", @@ -7272,6 +9412,16 @@ "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", @@ -7293,31 +9443,19 @@ } }, "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==", + "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": { - "@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" + "json-parse-better-errors": "^1.0.1" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "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", @@ -7361,26 +9499,33 @@ "license": "MIT" }, "node_modules/path-scurry": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", - "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": "18 || 20 || >=22" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/path-to-regexp": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz", - "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==", + "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==", "dev": true, "license": "MIT", "funding": { @@ -7388,29 +9533,6 @@ "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", @@ -7418,6 +9540,16 @@ "dev": true, "license": "MIT" }, + "node_modules/pathval": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -7449,9 +9581,9 @@ } }, "node_modules/postcss": { - "version": "8.5.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz", - "integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==", + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.12.tgz", + "integrity": "sha512-W62t/Se6rA0Az3DfCL0AqJwXuKwBeYg6nOaIgzP+xZ7N5BFCI7DYi1qs6ygUYT6rvfi6t9k65UMLJC+PHZpDAA==", "dev": true, "funding": [ { @@ -7538,6 +9670,30 @@ "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", @@ -7794,6 +9950,29 @@ "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", @@ -7844,14 +10023,13 @@ } }, "node_modules/resolve": { - "version": "1.22.12", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz", - "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==", + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", - "is-core-module": "^2.16.1", + "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -7896,38 +10074,59 @@ "dev": true, "license": "ISC" }, - "node_modules/rolldown": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0.tgz", - "integrity": "sha512-yD986aXDESFGS95spT1LAv0jssywP4npMEjmMHyN2/5+eE8qQJUype2AaKkRiLgBgyD0LFlubwAht7VmY8rGoA==", + "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/rollup": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz", + "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.129.0", - "@rolldown/pluginutils": "1.0.0" + "@types/estree": "1.0.8" }, "bin": { - "rolldown": "bin/cli.mjs" + "rollup": "dist/bin/rollup" }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=18.0.0", + "npm": ">=8.0.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.0.0", - "@rolldown/binding-darwin-arm64": "1.0.0", - "@rolldown/binding-darwin-x64": "1.0.0", - "@rolldown/binding-freebsd-x64": "1.0.0", - "@rolldown/binding-linux-arm-gnueabihf": "1.0.0", - "@rolldown/binding-linux-arm64-gnu": "1.0.0", - "@rolldown/binding-linux-arm64-musl": "1.0.0", - "@rolldown/binding-linux-ppc64-gnu": "1.0.0", - "@rolldown/binding-linux-s390x-gnu": "1.0.0", - "@rolldown/binding-linux-x64-gnu": "1.0.0", - "@rolldown/binding-linux-x64-musl": "1.0.0", - "@rolldown/binding-openharmony-arm64": "1.0.0", - "@rolldown/binding-wasm32-wasi": "1.0.0", - "@rolldown/binding-win32-arm64-msvc": "1.0.0", - "@rolldown/binding-win32-x64-msvc": "1.0.0" + "@rollup/rollup-android-arm-eabi": "4.59.0", + "@rollup/rollup-android-arm64": "4.59.0", + "@rollup/rollup-darwin-arm64": "4.59.0", + "@rollup/rollup-darwin-x64": "4.59.0", + "@rollup/rollup-freebsd-arm64": "4.59.0", + "@rollup/rollup-freebsd-x64": "4.59.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.59.0", + "@rollup/rollup-linux-arm-musleabihf": "4.59.0", + "@rollup/rollup-linux-arm64-gnu": "4.59.0", + "@rollup/rollup-linux-arm64-musl": "4.59.0", + "@rollup/rollup-linux-loong64-gnu": "4.59.0", + "@rollup/rollup-linux-loong64-musl": "4.59.0", + "@rollup/rollup-linux-ppc64-gnu": "4.59.0", + "@rollup/rollup-linux-ppc64-musl": "4.59.0", + "@rollup/rollup-linux-riscv64-gnu": "4.59.0", + "@rollup/rollup-linux-riscv64-musl": "4.59.0", + "@rollup/rollup-linux-s390x-gnu": "4.59.0", + "@rollup/rollup-linux-x64-gnu": "4.59.0", + "@rollup/rollup-linux-x64-musl": "4.59.0", + "@rollup/rollup-openbsd-x64": "4.59.0", + "@rollup/rollup-openharmony-arm64": "4.59.0", + "@rollup/rollup-win32-arm64-msvc": "4.59.0", + "@rollup/rollup-win32-ia32-msvc": "4.59.0", + "@rollup/rollup-win32-x64-gnu": "4.59.0", + "@rollup/rollup-win32-x64-msvc": "4.59.0", + "fsevents": "~2.3.2" } }, "node_modules/run-con": { @@ -7946,16 +10145,6 @@ "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", @@ -7986,9 +10175,9 @@ "optional": true }, "node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -8102,12 +10291,12 @@ } }, "node_modules/socks": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.8.tgz", - "integrity": "sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", "license": "MIT", "dependencies": { - "ip-address": "^10.1.1", + "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" }, "engines": { @@ -8161,7 +10350,14 @@ "spdx-license-ids": "^3.0.0" } }, - "node_modules/spdx-correct/node_modules/spdx-expression-parse": { + "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": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", @@ -8172,28 +10368,10 @@ "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.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==", + "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==", "dev": true, "license": "CC0-1.0" }, @@ -8269,78 +10447,10 @@ "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", - "integrity": "sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", "dev": true, "license": "MIT" }, @@ -8355,49 +10465,67 @@ } }, "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==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "license": "MIT", "dependencies": { - "get-east-asian-width": "^1.3.0", - "strip-ansi": "^7.1.0" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=20" + "node": ">=12" }, "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==", + "node_modules/string-width-cjs": { + "name": "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": { - "ansi-regex": "^6.2.2" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=12" + "node": ">=8" + } + }, + "node_modules/string-width-cjs/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/string-width-cjs/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/string-width-cjs/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" }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "engines": { + "node": ">=8" } }, "node_modules/stringify-package": { @@ -8409,6 +10537,23 @@ "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -8421,6 +10566,16 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs/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/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -8457,10 +10612,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/strnum": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.3.0.tgz", - "integrity": "sha512-ums3KNd42PGyx5xaoVTO1mjU1bH3NpY4vsrVlnv9PNGqQj8wd7rJ6nEypLrJ7z5vxK5RP0yMLo6J/Gsm62DI5Q==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.3.tgz", + "integrity": "sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==", "funding": [ { "type": "github", @@ -8496,9 +10664,9 @@ } }, "node_modules/tar": { - "version": "7.5.14", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.14.tgz", - "integrity": "sha512-/7sHKgQO3JLP9ESlwTYUUftHUadOURUqq23xs1vjcnp8Vss6k0wCfzulyEtk5g91pjvnuriimGlyG7k6msrzRw==", + "version": "7.5.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.11.tgz", + "integrity": "sha512-ChjMH33/KetonMTAtpYdgUFr0tbz69Fp2v7zWxQfYZX4g5ZN2nOBXm1R2xyA+lMIKrLKIoKAwFj93jE/avX9cQ==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -8512,6 +10680,57 @@ "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/test-exclude": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^10.4.1", + "minimatch": "^9.0.4" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -8523,9 +10742,9 @@ } }, "node_modules/thingies": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/thingies/-/thingies-2.6.0.tgz", - "integrity": "sha512-rMHRjmlFLM1R96UYPvpmnc3LYtdFrT33JIB7L9hetGue1qAPfn1N2LJeEjxUSidu1Iku+haLZXDuEXUHNGO/lg==", + "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==", "dev": true, "license": "MIT", "engines": { @@ -8564,24 +10783,21 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.1.2.tgz", - "integrity": "sha512-dAqSqE/RabpBKI8+h26GfLq6Vb3JVXs30XYQjdMjaj/c2tS8IYYMbIzP599KtRj7c57/wYApb3QjgRgXmrCukA==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } + "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.16", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", - "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", "dependencies": { "fdir": "^6.5.0", - "picomatch": "^4.0.4" + "picomatch": "^4.0.3" }, "engines": { "node": ">=12.0.0" @@ -8590,10 +10806,48 @@ "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/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, "node_modules/tinyrainbow": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", - "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", "dev": true, "license": "MIT", "engines": { @@ -8733,21 +10987,47 @@ } }, "node_modules/undici": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.25.0.tgz", - "integrity": "sha512-ZgpWDC5gmNiuY9CnLVXEH8rl50xhRCuLNA97fAUnKi8RRuV4E6KG31pDTsLVUKnohJE0I3XDrTeEydAXRw47xg==", + "version": "6.24.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.0.tgz", + "integrity": "sha512-lVLNosgqo5EkGqh5XUDhGfsMSoO8K0BAN0TyJLvwNRSl4xWGZlCVYsAIpa/OpA3TvmnM01GWcoKmc3ZWo5wKKA==", "license": "MIT", "engines": { "node": ">=18.17" } }, "node_modules/undici-types": { - "version": "7.24.6", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", - "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", + "version": "7.19.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", + "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", "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", @@ -8766,17 +11046,6 @@ "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", @@ -8788,17 +11057,18 @@ } }, "node_modules/vite": { - "version": "8.0.12", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.12.tgz", - "integrity": "sha512-w2dDofOWv2QB09ZITZBsvKTVAlYvPR4IAmrY/v0ir9KvLs0xybR7i48wxhM1/oyBWO34wPns+bPGw5ZrZqDpZg==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.2.tgz", + "integrity": "sha512-Bby3NOsna2jsjfLVOHKes8sGwgl4TT0E6vvpYgnAYDIF/tie7MRaFthmKuHx1NSXjiTueXH3do80FMQgvEktRg==", "dev": true, "license": "MIT", "dependencies": { - "lightningcss": "^1.32.0", - "picomatch": "^4.0.4", - "postcss": "^8.5.14", - "rolldown": "1.0.0", - "tinyglobby": "^0.2.16" + "esbuild": "^0.27.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" }, "bin": { "vite": "bin/vite.js" @@ -8814,10 +11084,9 @@ }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", - "@vitejs/devtools": "^0.1.18", - "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", + "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", @@ -8830,18 +11099,15 @@ "@types/node": { "optional": true }, - "@vitejs/devtools": { - "optional": true - }, - "esbuild": { - "optional": true - }, "jiti": { "optional": true }, "less": { "optional": true }, + "lightningcss": { + "optional": true + }, "sass": { "optional": true }, @@ -8865,80 +11131,591 @@ } } }, - "node_modules/vitest": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.6.tgz", - "integrity": "sha512-6lvjbS3p9b4CrdCmguzbh2/4uoXhGE2q71R4OX5sqF9R1bo9Xd6fGrMAfvp5wnCzlBnFVdCOp6onuTQVbo8iUQ==", + "node_modules/vite-node": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.1.6", - "@vitest/mocker": "4.1.6", - "@vitest/pretty-format": "4.1.6", - "@vitest/runner": "4.1.6", - "@vitest/snapshot": "4.1.6", - "@vitest/spy": "4.1.6", - "@vitest/utils": "4.1.6", - "es-module-lexer": "^2.0.0", - "expect-type": "^1.3.0", - "magic-string": "^0.30.21", - "obug": "^2.1.1", + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", "pathe": "^2.0.3", - "picomatch": "^4.0.3", - "std-env": "^4.0.0-rc.1", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite/node_modules/@esbuild/aix-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", + "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", + "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", + "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", + "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", + "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", + "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", + "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", + "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", + "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", + "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", + "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", + "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", + "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", + "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", + "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", + "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", + "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", + "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", + "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", + "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", + "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", + "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", + "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", + "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", + "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", + "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", + "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.7", + "@esbuild/android-arm": "0.27.7", + "@esbuild/android-arm64": "0.27.7", + "@esbuild/android-x64": "0.27.7", + "@esbuild/darwin-arm64": "0.27.7", + "@esbuild/darwin-x64": "0.27.7", + "@esbuild/freebsd-arm64": "0.27.7", + "@esbuild/freebsd-x64": "0.27.7", + "@esbuild/linux-arm": "0.27.7", + "@esbuild/linux-arm64": "0.27.7", + "@esbuild/linux-ia32": "0.27.7", + "@esbuild/linux-loong64": "0.27.7", + "@esbuild/linux-mips64el": "0.27.7", + "@esbuild/linux-ppc64": "0.27.7", + "@esbuild/linux-riscv64": "0.27.7", + "@esbuild/linux-s390x": "0.27.7", + "@esbuild/linux-x64": "0.27.7", + "@esbuild/netbsd-arm64": "0.27.7", + "@esbuild/netbsd-x64": "0.27.7", + "@esbuild/openbsd-arm64": "0.27.7", + "@esbuild/openbsd-x64": "0.27.7", + "@esbuild/openharmony-arm64": "0.27.7", + "@esbuild/sunos-x64": "0.27.7", + "@esbuild/win32-arm64": "0.27.7", + "@esbuild/win32-ia32": "0.27.7", + "@esbuild/win32-x64": "0.27.7" + } + }, + "node_modules/vite/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/vitest": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", + "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.4", + "@vitest/mocker": "3.2.4", + "@vitest/pretty-format": "^3.2.4", + "@vitest/runner": "3.2.4", + "@vitest/snapshot": "3.2.4", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", "tinybench": "^2.9.0", - "tinyexec": "^1.0.2", - "tinyglobby": "^0.2.15", - "tinyrainbow": "^3.1.0", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", "why-is-node-running": "^2.3.0" }, "bin": { "vitest": "vitest.mjs" }, "engines": { - "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { "@edge-runtime/vm": "*", - "@opentelemetry/api": "^1.9.0", - "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.6", - "@vitest/browser-preview": "4.1.6", - "@vitest/browser-webdriverio": "4.1.6", - "@vitest/coverage-istanbul": "4.1.6", - "@vitest/coverage-v8": "4.1.6", - "@vitest/ui": "4.1.6", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.4", + "@vitest/ui": "3.2.4", "happy-dom": "*", - "jsdom": "*", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + "jsdom": "*" }, "peerDependenciesMeta": { "@edge-runtime/vm": { "optional": true }, - "@opentelemetry/api": { + "@types/debug": { "optional": true }, "@types/node": { "optional": true }, - "@vitest/browser-playwright": { - "optional": true - }, - "@vitest/browser-preview": { - "optional": true - }, - "@vitest/browser-webdriverio": { - "optional": true - }, - "@vitest/coverage-istanbul": { - "optional": true - }, - "@vitest/coverage-v8": { + "@vitest/browser": { "optional": true }, "@vitest/ui": { @@ -8949,9 +11726,6 @@ }, "jsdom": { "optional": true - }, - "vite": { - "optional": false } } }, @@ -8976,19 +11750,19 @@ } }, "node_modules/which": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/which/-/which-6.0.1.tgz", - "integrity": "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg==", + "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": "^4.0.0" + "isexe": "^2.0.0" }, "bin": { - "node-which": "bin/which.js" + "node-which": "bin/node-which" }, "engines": { - "node": "^20.17.0 || >=22.9.0" + "node": ">= 8" } }, "node_modules/why-is-node-running": { @@ -9016,6 +11790,25 @@ "license": "MIT" }, "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "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==", @@ -9033,7 +11826,60 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/string-width": { + "node_modules/wrap-ansi-cjs/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/wrap-ansi-cjs/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/wrap-ansi-cjs/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/wrap-ansi-cjs/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/wrap-ansi-cjs/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/wrap-ansi-cjs/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==", @@ -9048,6 +11894,32 @@ "node": ">=8" } }, + "node_modules/wrap-ansi-cjs/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/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/write-file-atomic": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-7.0.1.tgz", @@ -9061,21 +11933,6 @@ "node": "^20.17.0 || >=22.9.0" } }, - "node_modules/xml-naming": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/xml-naming/-/xml-naming-0.1.0.tgz", - "integrity": "sha512-k8KO9hrMyNk6tUWqUfkTEZbezRRpONVOzUTnc97VnCvyj6Tf9lyUR9EDAIeiVLv56jsMcoXEwjW8Kv5yPY52lw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - } - ], - "license": "MIT", - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -9097,14 +11954,11 @@ } }, "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==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } + "license": "ISC" }, "node_modules/yargs": { "version": "16.2.0", @@ -9135,6 +11989,23 @@ "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", @@ -9150,6 +12021,19 @@ "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", diff --git a/package.json b/package.json index 044fba5..9b28860 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "version": "6.1.1", "scripts": { "build": "tsc", - "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'", + "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'", "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", @@ -17,11 +17,11 @@ "organization": true }, "devDependencies": { - "@aws-sdk/credential-provider-env": "^3.972.38", - "@biomejs/biome": "2.4.15", - "@smithy/property-provider": "^4.3.3", - "@types/node": "^25.9.0", - "@vitest/coverage-v8": "^4.1.6", + "@aws-sdk/credential-provider-env": "^3.972.32", + "@biomejs/biome": "2.4.13", + "@smithy/property-provider": "^4.2.14", + "@types/node": "^25.6.0", + "@vitest/coverage-v8": "^3.2.4", "aws-sdk-client-mock": "^4.1.0", "esbuild": "^0.28.0", "generate-license-file": "^4.1.1", @@ -30,12 +30,12 @@ "memfs": "^4.57.2", "standard-version": "^9.5.0", "typescript": "^6.0.3", - "vitest": "^4.1.5" + "vitest": "^3.2.4" }, "dependencies": { - "@actions/core": "^3.0.1", - "@aws-sdk/client-sts": "^3.1049.0", - "@smithy/node-http-handler": "^4.7.3", + "@actions/core": "^2.0.2", + "@aws-sdk/client-sts": "^3.1038.0", + "@smithy/node-http-handler": "^4.6.1", "proxy-agent": "^8.0.1" }, "keywords": [ diff --git a/src/CredentialsClient.ts b/src/CredentialsClient.ts index cfbf204..2d78b49 100644 --- a/src/CredentialsClient.ts +++ b/src/CredentialsClient.ts @@ -3,18 +3,15 @@ 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 { buildCustomUserAgent, errorMessage, getCallerIdentity } from './helpers'; +import { errorMessage, getCallerIdentity } from './helpers'; import { ProxyResolver } from './ProxyResolver'; -if (!process.env.AWS_EXECUTION_ENV) { - process.env.AWS_EXECUTION_ENV = 'GitHubActions'; -} +const USER_AGENT = 'configure-aws-credentials-for-github-actions'; export interface CredentialsClientProps { region?: string; proxyServer?: string; noProxy?: string; - stsEndpoint?: string; roleChaining: boolean; } @@ -22,7 +19,6 @@ export class CredentialsClient { public region?: string; private _stsClient?: STSClient; private readonly requestHandler?: NodeHttpHandler; - private readonly stsEndpoint?: string; private roleChaining?: boolean; constructor(props: CredentialsClientProps) { @@ -45,20 +41,19 @@ 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) { - this._stsClient = new STSClient({ - customUserAgent: buildCustomUserAgent(), - ...(this.region !== undefined && { region: this.region }), - ...(this.stsEndpoint !== undefined && { endpoint: this.stsEndpoint }), - ...(this.requestHandler !== undefined && { requestHandler: this.requestHandler }), - }); + 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); } return this._stsClient; } diff --git a/src/assumeRole.ts b/src/assumeRole.ts index 700532b..879d81c 100644 --- a/src/assumeRole.ts +++ b/src/assumeRole.ts @@ -78,98 +78,6 @@ 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) { @@ -186,7 +94,6 @@ export async function assumeRole(params: assumeRoleParams) { webIdentityToken, inlineSessionPolicy, managedSessionPolicies, - customTags, } = { ...params }; // Load GitHub environment variables @@ -195,37 +102,26 @@ export async function assumeRole(params: assumeRoleParams) { throw new Error('Missing required environment variables. Are you running in GitHub Actions?'); } - // 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) }); - } + // 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), + }); } - - 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 7fa5298..82e25d5 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,32 +1,11 @@ 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 = [ @@ -210,7 +189,6 @@ export async function retryAndBackoff( maxRetries = 12, retries = 0, base = 50, - label?: string, ): Promise { try { return await fn(); @@ -222,21 +200,20 @@ 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.info( - `Retry${opName}: attempt ${nextRetry} of ${maxRetries} failed: ${errorMessage(err)}. ` + + core.debug( + `retryAndBackoff: attempt ${nextRetry} of ${maxRetries} failed: ${errorMessage(err)}. ` + `Retrying after ${Math.floor(delay)}ms.`, ); await sleep(delay); if (nextRetry >= maxRetries) { - core.info(`Retry${opName}: reached max retries (${maxRetries}); giving up.`); + core.debug('retryAndBackoff: reached max retries; giving up.'); throw err; } - return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base, label); + return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base); } } diff --git a/src/index.ts b/src/index.ts index 2153a32..5ea2a32 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,7 +19,6 @@ 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 { @@ -44,7 +43,6 @@ 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 }; @@ -65,7 +63,6 @@ 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; @@ -91,9 +88,6 @@ 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; @@ -130,33 +124,15 @@ 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; - stsEndpoint?: string; - roleChaining: boolean; - } = { + const clientProps: { region: string; proxyServer?: string; noProxy?: 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; @@ -176,9 +152,13 @@ export async function run() { // Else, export credentials provided as input if (useGitHubOIDCProvider()) { try { - webIdentityToken = await withRetry(async () => { - return core.getIDToken(audience); - }, 'getIDToken'); + webIdentityToken = await retryAndBackoff( + async () => { + return core.getIDToken(audience); + }, + !disableRetry, + maxRetries, + ); } catch (error) { throw new Error(`getIDToken call failed: ${errorMessage(error)}`); } @@ -199,77 +179,59 @@ export async function run() { } } else if (!webIdentityTokenFile && !roleChaining) { // Proceed only if credentials can be picked up - await withRetry( - () => credentialsClient.validateCredentials(undefined, roleChaining, expectedAccountIds), - 'validateCredentials', - ); - sourceAccountId = await withRetry(() => exportAccountId(credentialsClient, maskAccountId), 'exportAccountId'); + await credentialsClient.validateCredentials(undefined, roleChaining, expectedAccountIds); + sourceAccountId = await exportAccountId(credentialsClient, maskAccountId); } 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. - // 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'); - } + await credentialsClient.validateCredentials(AccessKeyId, roleChaining, expectedAccountIds); + sourceAccountId = await exportAccountId(credentialsClient, maskAccountId); } - 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 withRetry(async () => { - return assumeRole({ - credentialsClient, - sourceAccountId, - roleToAssume, - roleExternalId, - roleDuration, - roleSessionName, - roleSkipSessionTagging, - transitiveTagKeys, - webIdentityTokenFile, - webIdentityToken, - inlineSessionPolicy, - managedSessionPolicies, - customTags, - }); - }, 'AssumeRole'); + roleCredentials = await retryAndBackoff( + async () => { + return assumeRole({ + credentialsClient, + sourceAccountId, + roleToAssume, + roleExternalId, + roleDuration, + roleSessionName, + roleSkipSessionTagging, + transitiveTagKeys, + webIdentityTokenFile, + webIdentityToken, + inlineSessionPolicy, + managedSessionPolicies, + }); + }, + !disableRetry, + maxRetries, + ); } while (specialCharacterWorkaround && !verifyKeys(roleCredentials.Credentials)); core.info(`Authenticated as assumedRoleId ${roleCredentials.AssumedRoleUser?.AssumedRoleId}`); exportCredentials(roleCredentials.Credentials, outputCredentials, outputEnvCredentials); - // 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', + // 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, ); } if (outputEnvCredentials) { - await withRetry(() => exportAccountId(credentialsClient, maskAccountId), 'exportAccountId'); + await exportAccountId(credentialsClient, maskAccountId); } // Write profile files if profile mode is enabled @@ -282,14 +244,10 @@ 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 withRetry( - () => - credentialsClient.validateCredentials( - roleCredentials.Credentials?.AccessKeyId, - roleChaining, - expectedAccountIds, - ), - 'validateCredentials', + await credentialsClient.validateCredentials( + roleCredentials.Credentials.AccessKeyId, + roleChaining, + expectedAccountIds, ); } else { writeProfileFiles(awsProfile, roleCredentials.Credentials, region, overwriteAwsProfile); diff --git a/test/cleanup.test.ts b/test/cleanup.test.ts index f7bd649..74da1e7 100644 --- a/test/cleanup.test.ts +++ b/test/cleanup.test.ts @@ -5,15 +5,20 @@ 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(() => { - vi.resetAllMocks(); + // Reset mock state + vi.restoreAllMocks(); mockedSTSClient.reset(); - vi.mocked(core.getInput).mockReturnValue(''); + // 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) => {}); process.env = { ...mocks.envs, AWS_ACCESS_KEY_ID: 'CLEANUPTEST', @@ -34,7 +39,7 @@ describe('Configure AWS Credentials cleanup', {}, () => { expect(core.exportVariable).toHaveBeenCalledWith('AWS_REGION', ''); }); it('also clears AWS_PROFILE when aws-profile was set', {}, () => { - vi.mocked(core.getInput).mockImplementation((name: string) => { + vi.spyOn(core, 'getInput').mockImplementation((name: string) => { if (name === 'aws-profile') return 'my-profile'; if (name === 'output-env-credentials') return 'true'; return ''; @@ -45,7 +50,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.mocked(core.getInput).mockImplementation((name: string) => { + vi.spyOn(core, 'getInput').mockImplementation((name: string) => { if (name === 'aws-profile') return 'my-profile'; return ''; }); @@ -54,14 +59,14 @@ describe('Configure AWS Credentials cleanup', {}, () => { expect(core.exportVariable).toHaveBeenCalledTimes(0); }); it('handles errors', {}, () => { - vi.mocked(core.exportVariable).mockImplementationOnce(() => { + vi.spyOn(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.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.NO_ENV_CREDS_INPUTS)); + vi.spyOn(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 cd4c29e..98f8b71 100644 --- a/test/helpers.test.ts +++ b/test/helpers.test.ts @@ -2,11 +2,10 @@ import * as core from '@actions/core'; import { beforeEach, describe, expect, it, vi } from 'vitest'; import * as helpers from '../src/helpers'; -vi.mock('@actions/core'); - describe('Configure AWS Credentials helpers', {}, () => { beforeEach(() => { - vi.resetAllMocks(); + vi.restoreAllMocks(); + vi.spyOn(core, 'debug').mockImplementation(() => {}); }); it('removes brackets from GitHub Actor', {}, () => { const actor = 'actor[bot]'; @@ -24,30 +23,10 @@ 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(() => {}); + vi.spyOn(core, 'exportVariable').mockImplementation(() => {}); helpers.exportCredentials( { AccessKeyId: 'test', SecretAccessKey: 'test', SessionToken: 'test', Expiration: new Date(8640000000000000) }, true, @@ -68,6 +47,9 @@ describe('Configure AWS Credentials helpers', {}, () => { process.env = env; }); it(`won't output credentials to env if told not to`, {}, () => { + vi.spyOn(core, 'setOutput').mockImplementation(() => {}); + vi.spyOn(core, 'setSecret').mockImplementation(() => {}); + vi.spyOn(core, 'exportVariable').mockImplementation(() => {}); helpers.exportCredentials( { AccessKeyId: 'test', SecretAccessKey: 'test', SessionToken: 'test', Expiration: new Date(8640000000000000) }, true, @@ -95,20 +77,22 @@ describe('Configure AWS Credentials helpers', {}, () => { }); it('handles getBooleanInput correctly', {}, () => { - vi.mocked(core.getInput).mockReturnValue('true'); + vi.spyOn(core, 'getInput').mockReturnValue('true'); expect(helpers.getBooleanInput('test')).toBe(true); - - vi.mocked(core.getInput).mockReturnValue('false'); + + vi.spyOn(core, 'getInput').mockReturnValue('false'); expect(helpers.getBooleanInput('test')).toBe(false); - - vi.mocked(core.getInput).mockReturnValue(''); + + vi.spyOn(core, 'getInput').mockReturnValue(''); expect(helpers.getBooleanInput('test', { default: true })).toBe(true); - - vi.mocked(core.getInput).mockReturnValue('invalid'); + + vi.spyOn(core, 'getInput').mockReturnValue('invalid'); expect(() => helpers.getBooleanInput('test')).toThrow(); }); it('clears session token when not provided', {}, () => { + vi.spyOn(core, 'setSecret').mockImplementation(() => {}); + vi.spyOn(core, 'exportVariable').mockImplementation(() => {}); process.env.AWS_SESSION_TOKEN = 'old-token'; helpers.exportCredentials({ AccessKeyId: 'test', SecretAccessKey: 'test' }, false, true); expect(core.exportVariable).toHaveBeenCalledWith('AWS_SESSION_TOKEN', ''); diff --git a/test/index.test.ts b/test/index.test.ts index 3970951..19f8b93 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -7,40 +7,37 @@ import { } 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'; +import { 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(() => { - vi.resetAllMocks(); + // Reset mock state + vi.restoreAllMocks(); mockedSTSClient.reset(); - 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()); + // 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) => {}); // 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.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); mockedSTSClient.on(GetCallerIdentityCommand).resolvesOnce({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; }); @@ -92,7 +89,7 @@ describe('Configure AWS Credentials', {}, () => { describe('IAM User Authentication', {}, () => { beforeEach(() => { - vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); + vi.spyOn(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({ @@ -119,7 +116,7 @@ describe('Configure AWS Credentials', {}, () => { describe('AssumeRole with IAM LTC', {}, () => { beforeEach(() => { - vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS)); + vi.spyOn(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 @@ -151,34 +148,12 @@ 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.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.WEBIDENTITY_TOKEN_FILE_INPUTS)); + vi.spyOn(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 }); + vi.mock('node:fs'); vol.reset(); fs.mkdirSync('/home/github', { recursive: true }); fs.writeFileSync('/home/github/file.txt', 'test-token'); @@ -211,7 +186,7 @@ describe('Configure AWS Credentials', {}, () => { process.env = { ...mocks.envs }; }); it('exports environment variables from env variables', async () => { - vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.EXISTING_ROLE_INPUTS)); + vi.spyOn(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'; @@ -234,7 +209,7 @@ describe('Configure AWS Credentials', {}, () => { expect(core.setFailed).not.toHaveBeenCalled(); }); it('exports environment variables from inputs', {}, async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.EXISTING_ROLE_INPUTS, 'aws-access-key-id': 'MYAWSACCESSKEYID', @@ -268,297 +243,16 @@ 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.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', - }); + vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); 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.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); + vi.spyOn(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({ @@ -569,49 +263,27 @@ describe('Configure AWS Credentials', {}, () => { expect(core.setFailed).not.toHaveBeenCalled(); }); it('fails with an invalid region', {}, async () => { - vi.mocked(core.getInput).mockImplementation(mocks.getInput({ 'aws-region': '$|<1B1D1 701L37' })); + vi.spyOn(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.mocked(core.getInput).mockImplementation( + vi.spyOn(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.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'retry-max-attempts': '-1', 'special-characters-workaround': 'false', }), ); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); mockedSTSClient.on(GetCallerIdentityCommand).resolvesOnce({ ...mocks.outputs.GET_CALLER_IDENTITY }); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; mockedSTSClient @@ -623,35 +295,27 @@ describe('Configure AWS Credentials', {}, () => { expect(core.setFailed).toHaveBeenCalled(); }); it('fails if doing OIDC without the ACTIONS_ID_TOKEN_REQUEST_TOKEN', {}, async () => { - 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'), - ); + vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); 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.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.USE_EXISTING_CREDENTIALS_INPUTS)); + vi.spyOn(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.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.USE_EXISTING_CREDENTIALS_INPUTS)); + vi.spyOn(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.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.NO_ENV_CREDS_INPUTS)); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.NO_ENV_CREDS_INPUTS)); + vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; await run(); expect(core.setSecret).toHaveBeenCalledTimes(3); @@ -660,8 +324,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.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.STEP_BUT_NO_ENV_INPUTS)); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.STEP_BUT_NO_ENV_INPUTS)); + vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN = 'fake-token'; await run(); expect(core.setSecret).toHaveBeenCalledTimes(3); @@ -678,13 +342,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('skips OIDC when force-skip-oidc is true with IAM credentials', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_ASSUMEROLE_INPUTS, 'force-skip-oidc': 'true', }), ); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(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 @@ -699,16 +363,17 @@ describe('Configure AWS Credentials', {}, () => { }); it('skips OIDC when force-skip-oidc is true with web identity token file', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.WEBIDENTITY_TOKEN_FILE_INPUTS, 'force-skip-oidc': 'true', }), ); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(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'; + vi.mock('node:fs'); vol.reset(); fs.mkdirSync('/home/github', { recursive: true }); fs.writeFileSync('/home/github/file.txt', 'test-token'); @@ -720,7 +385,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('fails when force-skip-oidc is true but no alternative credentials provided', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ 'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE', 'aws-region': 'fake-region-1', @@ -736,13 +401,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('allows force-skip-oidc without role-to-assume', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'force-skip-oidc': 'true', }), ); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(core, 'getIDToken').mockResolvedValue('testoidctoken'); mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); // biome-ignore lint/suspicious/noExplicitAny: any required to mock private method @@ -759,13 +424,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('uses OIDC when force-skip-oidc is false (default behavior)', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'force-skip-oidc': 'false', }), ); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(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'; @@ -777,8 +442,8 @@ describe('Configure AWS Credentials', {}, () => { }); it('uses OIDC when force-skip-oidc is not set (default behavior)', async () => { - vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + vi.spyOn(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'; @@ -790,7 +455,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('works with role chaining when force-skip-oidc is true', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.EXISTING_ROLE_INPUTS, 'force-skip-oidc': 'true', @@ -798,7 +463,7 @@ describe('Configure AWS Credentials', {}, () => { 'aws-secret-access-key': 'MYAWSSECRETACCESSKEY', }), ); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(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 @@ -820,7 +485,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('succeeds when account ID matches allowed list', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '111111111111', @@ -838,7 +503,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('succeeds with multiple allowed account IDs when account matches', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '999999999999,111111111111,222222222222', @@ -855,7 +520,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('fails when account ID does not match allowed list', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '999999999999', @@ -874,7 +539,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('fails when account ID does not match any in multiple allowed accounts', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '999999999999,888888888888', @@ -894,7 +559,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('works with assume role when account ID matches', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_ASSUMEROLE_INPUTS, 'allowed-account-ids': '111111111111', @@ -913,13 +578,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('works with OIDC when account ID matches', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'allowed-account-ids': '111111111111', }), ); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(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'; @@ -930,7 +595,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('handles GetCallerIdentity API failure gracefully', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '111111111111', @@ -947,7 +612,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('ignores validation when allowed-account-ids is empty', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': '', @@ -965,7 +630,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('handles whitespace in allowed-account-ids input', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'allowed-account-ids': ' 111111111111 , 222222222222 ', @@ -984,7 +649,7 @@ describe('Configure AWS Credentials', {}, () => { describe('Global Timeout Configuration', {}, () => { beforeEach(() => { - vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_USER_INPUTS)); + vi.spyOn(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({ @@ -995,8 +660,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.mocked(core.info); - vi.mocked(core.getInput).mockImplementation( + const infoSpy = vi.spyOn(core, 'info'); + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'action-timeout-s': '30', @@ -1013,8 +678,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.mocked(core.info); - vi.mocked(core.getInput).mockImplementation( + const infoSpy = vi.spyOn(core, 'info'); + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'action-timeout-s': '0', @@ -1030,7 +695,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.mocked(core.info); + const infoSpy = vi.spyOn(core, 'info'); await run(); @@ -1042,7 +707,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.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'action-timeout-s': '5', @@ -1053,7 +718,7 @@ describe('Configure AWS Credentials', {}, () => { // Get the timeout callback function const timeoutCallback = setTimeoutSpy.mock.calls[0][0] as () => void; - + // Execute the timeout callback timeoutCallback(); @@ -1062,66 +727,18 @@ 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.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + vi.spyOn(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.mocked(core.info); - vi.mocked(core.getInput).mockImplementation( + const infoSpy = vi.spyOn(core, 'info'); + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'http-proxy': 'http://proxy.example.com:8080', @@ -1135,7 +752,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('configures proxy from HTTP_PROXY environment variable', async () => { - const infoSpy = vi.mocked(core.info); + const infoSpy = vi.spyOn(core, 'info'); process.env.HTTP_PROXY = 'http://proxy.example.com:8080'; await run(); @@ -1145,7 +762,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('configures proxy from HTTPS_PROXY environment variable', async () => { - const infoSpy = vi.mocked(core.info); + const infoSpy = vi.spyOn(core, 'info'); process.env.HTTPS_PROXY = 'https://proxy.example.com:8080'; await run(); @@ -1155,9 +772,9 @@ describe('Configure AWS Credentials', {}, () => { }); it('prioritizes http-proxy input over environment variables', async () => { - const infoSpy = vi.mocked(core.info); + const infoSpy = vi.spyOn(core, 'info'); process.env.HTTP_PROXY = 'http://env-proxy.example.com:8080'; - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'http-proxy': 'http://input-proxy.example.com:8080', @@ -1171,9 +788,9 @@ describe('Configure AWS Credentials', {}, () => { }); it('properly configures proxy agent in STS client', async () => { - const infoSpy = vi.mocked(core.info); + const infoSpy = vi.spyOn(core, 'info'); - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'http-proxy': 'http://proxy.example.com:8080', @@ -1187,7 +804,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('configures no-proxy setting', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'http-proxy': 'http://proxy.example.com:8080', @@ -1211,17 +828,18 @@ describe('Configure AWS Credentials', {}, () => { beforeEach(() => { vi.clearAllMocks(); mockedSTSClient.reset(); + vi.mock('node:fs'); vol.reset(); }); it('writes profile files with OIDC authentication', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'aws-profile': 'dev', }), ); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(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'; @@ -1244,7 +862,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('writes profile files with IAM user credentials', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_USER_INPUTS, 'aws-profile': 'production', @@ -1274,7 +892,7 @@ describe('Configure AWS Credentials', {}, () => { }); it('writes profile files with IAM user role assumption', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.IAM_ASSUMEROLE_INPUTS, 'aws-profile': 'assumed-role', @@ -1311,14 +929,14 @@ describe('Configure AWS Credentials', {}, () => { }); it('respects output-env-credentials=true with profiles', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'aws-profile': 'dev', 'output-env-credentials': 'true', }), ); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(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'; @@ -1341,8 +959,8 @@ describe('Configure AWS Credentials', {}, () => { }); it('maintains backward compatibility when aws-profile is not specified', async () => { - vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(core, 'getInput').mockImplementation(mocks.getInput(mocks.GH_OIDC_INPUTS)); + vi.spyOn(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'; @@ -1366,13 +984,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('handles default profile correctly', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'aws-profile': 'default', }), ); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(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'; @@ -1387,13 +1005,13 @@ describe('Configure AWS Credentials', {}, () => { }); it('rejects invalid profile names with whitespace', async () => { - vi.mocked(core.getInput).mockImplementation( + vi.spyOn(core, 'getInput').mockImplementation( mocks.getInput({ ...mocks.GH_OIDC_INPUTS, 'aws-profile': 'invalid profile', }), ); - vi.mocked(core.getIDToken).mockResolvedValue('testoidctoken'); + vi.spyOn(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'; @@ -1403,159 +1021,4 @@ 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 cfc4125..1caa1fe 100644 --- a/test/mockinputs.test.ts +++ b/test/mockinputs.test.ts @@ -6,46 +6,6 @@ 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', @@ -83,14 +43,6 @@ 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 = { @@ -101,15 +53,6 @@ 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 5702684..8c935e6 100644 --- a/test/profileManager.test.ts +++ b/test/profileManager.test.ts @@ -11,13 +11,13 @@ import { writeProfileFiles, } from '../src/profileManager'; -vi.mock('@actions/core'); -vi.mock('node:fs'); - describe('Profile Manager', {}, () => { beforeEach(() => { - vi.resetAllMocks(); + vi.restoreAllMocks(); + vi.mock('node:fs'); vol.reset(); + vi.spyOn(core, 'debug').mockImplementation(() => {}); + vi.spyOn(core, 'info').mockImplementation(() => {}); }); describe('parseIni', {}, () => { @@ -95,10 +95,7 @@ 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); }); @@ -199,15 +196,10 @@ 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); @@ -222,26 +214,16 @@ 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); @@ -257,28 +239,18 @@ 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); @@ -293,27 +265,17 @@ 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); @@ -328,15 +290,10 @@ 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); @@ -350,31 +307,17 @@ 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); @@ -525,7 +468,7 @@ describe('Profile Manager', {}, () => { SecretAccessKey: 'secret', }, 'us-east-1', - false, + false ), ).toThrow('whitespace'); }); @@ -543,7 +486,7 @@ describe('Profile Manager', {}, () => { SecretAccessKey: 'secret', }, 'us-east-1', - false, + false ); expect(fs.existsSync('/custom/credentials')).toBe(true); @@ -558,7 +501,7 @@ describe('Profile Manager', {}, () => { SecretAccessKey: 'secret', }, 'us-east-1', - false, + false ); expect(core.info).toHaveBeenCalledWith('Writing credentials to profile: dev'); @@ -574,7 +517,12 @@ 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); @@ -592,9 +540,17 @@ 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); @@ -610,9 +566,17 @@ 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); @@ -632,7 +596,12 @@ 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; @@ -666,7 +635,12 @@ 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) @@ -683,7 +657,7 @@ describe('Profile Manager', {}, () => { SessionToken: 'FwoGZXIvYXdzEBYaDEXAMPLE', }, 'us-east-1', - false, + false ); const credsPath = getProfileFilePaths().credentials; @@ -698,20 +672,28 @@ 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', + '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', ); - 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; @@ -722,16 +704,20 @@ 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', ); }); });