diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index b151a2c..d50077a 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,5 +1,5 @@
{
".release-please-manifest.json": "4.0.2",
"package.json": "6.0.0",
- ".": "6.1.1"
+ ".": "6.2.0"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 56f334e..3a7c538 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,34 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+## [6.2.0](https://github.com/aws-actions/configure-aws-credentials/compare/v6.1.3...v6.2.0) (2026-06-01)
+
+### Features
+
+* add additional session tags by default ([#1775](https://github.com/aws-actions/configure-aws-credentials/issues/1775)) ([e0ba768](https://github.com/aws-actions/configure-aws-credentials/commit/e0ba7685077379a14a82d01fefd511490344ebfc))
+* add more retry logic and better logging ([#1764](https://github.com/aws-actions/configure-aws-credentials/issues/1764)) ([540d0c1](https://github.com/aws-actions/configure-aws-credentials/commit/540d0c13aedb8d55501d220bd2f0b3cdedfe84e8))
+* add regex validation to role-session-name ([#1765](https://github.com/aws-actions/configure-aws-credentials/issues/1765)) ([e354499](https://github.com/aws-actions/configure-aws-credentials/commit/e35449909c6ede5083a48ba4b8bbfaaa1cf09ba1))
+* Allow custom session tags to be passed when assuming a role ([#1759](https://github.com/aws-actions/configure-aws-credentials/issues/1759)) ([61f50f6](https://github.com/aws-actions/configure-aws-credentials/commit/61f50f630f383628add73c1eab3f1935ba07da2b))
+* expose run id in STS client user-agent ([#1774](https://github.com/aws-actions/configure-aws-credentials/issues/1774)) ([29d1be3](https://github.com/aws-actions/configure-aws-credentials/commit/29d1be30273e7ef371d59fccf6ec54572c64ec89))
+* support custom STS endpoints ([#1762](https://github.com/aws-actions/configure-aws-credentials/issues/1762)) ([8d52d05](https://github.com/aws-actions/configure-aws-credentials/commit/8d52d05d7a4521fa52b39de50cb6114b12e5c332))
+
+### Bug Fixes
+
+* skip credential check on output-env-credentials: false ([#1778](https://github.com/aws-actions/configure-aws-credentials/issues/1778)) ([58e7c47](https://github.com/aws-actions/configure-aws-credentials/commit/58e7c47adf77846879008deadfeeef8a6969fe6c))
+* assumeRole failing from session tag size too large ([#1808](https://github.com/aws-actions/configure-aws-credentials/issues/1808)) ([d6f5dc3](https://github.com/aws-actions/configure-aws-credentials/commit/d6f5dc331b44474b19a52caaf85fa4d637b13c8e))
+
+## [6.1.3](https://github.com/aws-actions/configure-aws-credentials/compare/v6.1.2...v6.1.3) (2026-05-28)
+
+### Bug Fixes
+
+* fix: allow kubelet token symlink in [#1805](https://github.com/aws-actions/configure-aws-credentials/issues/1805)
+
+## [6.1.2](https://github.com/aws-actions/configure-aws-credentials/compare/v6.1.1...v6.1.2) (2026-05-26)
+
+### Bug Fixes
+
+* additional filesystem checks ([#1799](https://github.com/aws-actions/configure-aws-credentials/issues/1799)) ([c39f282](https://github.com/aws-actions/configure-aws-credentials/commit/c39f282697aca8a78c522ecf1f7da9899a31432c))
+
## [6.1.1](https://github.com/aws-actions/configure-aws-credentials/compare/v6.1.0...v6.1.1) (2026-05-05)
diff --git a/README.md b/README.md
index 4443d6f..09f4b69 100644
--- a/README.md
+++ b/README.md
@@ -1,77 +1,76 @@
# Configure AWS Credentials
-Authenticate to AWS in GitHub Actions! Works especially well with
+Authenticate to AWS in GitHub Actions (and others)! Works especially well with
[AWS Secrets Manager][secretsmanager].
-[secretsmanager]:
- https://github.com/aws-actions/aws-secretsmanager-get-secrets
+[secretsmanager]: https://github.com/aws-actions/aws-secretsmanager-get-secrets
## Quick Start (OIDC, recommended)
1. Create an IAM Identity Provider in your AWS account for GitHub OIDC. (See
[OIDC configuration](#oidc-configuration-details) below for details.)
-2. Create an IAM Role in your AWS account with a trust policy that allows
- GitHub Actions to assume it. (Expand the sections below)
- GitHub OIDC Trust Policy
+2. Create an IAM Role in your AWS account with a trust policy that allows GitHub
+ Actions to assume it. (Expand the sections below)
+ GitHub OIDC Trust Policy
- ```json
- {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "Federated": "arn:aws:iam:::oidc-provider/token.actions.githubusercontent.com"
- },
- "Action": "sts:AssumeRoleWithWebIdentity",
- "Condition": {
- "StringEquals": {
- "token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
- "token.actions.githubusercontent.com:sub": "repo:/:ref:refs/heads/"
- }
- }
- }
- ]
- }
- ```
+ ```json
+ {
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Principal": {
+ "Federated": "arn:aws:iam:::oidc-provider/token.actions.githubusercontent.com"
+ },
+ "Action": "sts:AssumeRoleWithWebIdentity",
+ "Condition": {
+ "StringEquals": {
+ "token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
+ "token.actions.githubusercontent.com:sub": "repo:/:ref:refs/heads/"
+ }
+ }
+ }
+ ]
+ }
+ ```
-
+
- Note: if you are running in a GitHub environment based workflow, the value
- for the Sub claim will be different, in the form of
- `repo:/:environment:`.
- Adjust the trust policy accordingly if you are using environment-based
- workflows.
+ 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
@@ -87,8 +86,8 @@ Authenticate to AWS in GitHub Actions! Works especially well with
of the credentials used in workflows.
- Periodically rotate any long-lived credentials that you use.
- Store sensitive information in a secure way, such as using
- [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) or
- [GitHub Secrets][gh-secrets].
+ [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) or [GitHub
+ Secrets][gh-secrets].
- Be especially careful about running Actions in non-ephemeral environments, or
[triggering workflows on `pull_request_target`](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target)
events.
@@ -111,11 +110,12 @@ by specifying different inputs.
5. Use credentials stored in the Action environment to fetch temporary
credentials via STS AssumeRole.
-Because we use the AWS JavaScript SDK, we always will use the
-[credential resolution flow for Node.js][cred-resolution].
+Because we use the AWS JavaScript SDK, we always will use the [credential
+resolution flow for Node.js][cred-resolution].
[cred-resolution]:
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html
+
Depending on your inputs, the action might override parts of this flow.
@@ -137,8 +137,8 @@ enabling this option._
Additionally, **`aws-region`** is always required.
-_Note: If you use GitHub Enterprise Server, you may need to adjust examples
-here to match your environment._
+_Note: If you use GitHub Enterprise Server, you may need to adjust examples here
+to match your environment._
## Additional Options
@@ -150,36 +150,39 @@ 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 |
+| custom-tags | Additional tags to apply to the assumed role session. Must be a JSON object provided as a string. Custom tags are not usable with OIDC or web identity token authentication. | 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 |
+| no-proxy | Hosts to skip for the proxy configuration. | No |
+| sts-endpoint | 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. | No |
@@ -216,8 +219,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 +235,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 +246,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 +257,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 +291,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,11 +325,12 @@ HTTP_PROXY="http://companydomain.com:3128"
#### Special characters in AWS_SECRET_ACCESS_KEY
Some edge cases are unable to properly parse an `AWS_SECRET_ACCESS_KEY` if it
-contains special characters. For more information, please see the
-[AWS CLI documentation][aws-cli-troubleshooting].
+contains special characters. For more information, please see the [AWS CLI
+documentation][aws-cli-troubleshooting].
[aws-cli-troubleshooting]:
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-troubleshooting.html#tshoot-signature-does-not-match
+
If you set the `special-characters-workaround` option, this action will
continually retry fetching credentials until we get one that does not have
special characters. This option overrides the `disable-retry` and
@@ -343,15 +347,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`:
+**Default tags** are always emitted when session tags are used.
| Key | Value |
| ---------- | ----------------- |
@@ -363,38 +365,45 @@ overridden via `custom-tags`:
| 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.
+**Droppable tags** are automatically added to the set of default session tags.
+If the session tags exceed the [packed size limit][packed-size-limit], these
+tags will be dropped, and the AssumeRole call will be retried. If it still
+fails, the action will error out. (It is difficult to predict the packed size
+before making the call, as session tags and session policies are compressed into
+a binary format as part of the call.)
-| 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 |
+[packed-size-limit]:
+ https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_know
-Tags whose source environment variable is unset are omitted (e.g., `BaseRef`
-and `HeadRef` are only set on `pull_request` events).
+| Key | Value |
+| --------------- | ----------------------- |
+| EventName | GITHUB_EVENT_NAME |
+| BaseRef | GITHUB_BASE_REF |
+| HeadRef | GITHUB_HEAD_REF |
+| RunId | GITHUB_RUN_ID |
+| Job | GITHUB_JOB |
+| TriggeringActor | GITHUB_TRIGGERING_ACTOR |
+
+Tags whose source environment variable is unset are omitted (e.g., `BaseRef` and
+`HeadRef` are only set on `pull_request` events).
_Note: all tag values must conform to
-[the tag requirements](https://docs.aws.amazon.com/STS/latest/APIReference/API_Tag.html).
+[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 (`_`)._
-The action will use session tagging by default unless you are using OIDC.
+[sts-tag-requirements]:
+ https://docs.aws.amazon.com/STS/latest/APIReference/API_Tag.html
+
+The action will use session tagging by default unless you are using OIDC or a
+Web Identify Token File.
To [forward session tags to subsequent sessions in a role
-chain][session-tag-chaining], you can use
+chain][session-tag-chaining], you can use the `transitive-tag-keys` input to
+specify the keys of the tags to be passed.
-[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.
+[session-tag-chaining]:
+ https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
_Note that all subsequent roles in the chain must have
`role-skip-session-tagging` set to `true`_
@@ -412,9 +421,10 @@ with:
### 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).
+JSON object. Custom tags cannot override existing tags. Note that AWS allows a
+maximum of 50 tags (so you can supply a maximum of 43 custom tags), although it
+is likely that you will exceed the [packed size limit][packed-size-limit]
+before you exceed the maximum number of tags.
```yaml
uses: aws-actions/configure-aws-credentials@v6
@@ -566,41 +576,42 @@ aws iam create-open-id-connect-provider \
### Claims and scoping permissions
-To align with the Amazon IAM best practice of
-[granting least privilege][least-privilege],
+To align with the Amazon IAM best practice of [granting least
+privilege][least-privilege], the assume role policy document should contain a
+[`Condition`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html)
+that restricts which workflows can assume the role. Without any condition, any
+GitHub user or repository could potentially assume the role.
+
+GitHub provides a number of additional claims in the OIDC token that you can use
+in your IAM policies to scope down permissions. Early versions of this action
+only supported the `sub` and `aud` claims, but AWS IAM and GitHub have since
+added support for `sub` claim customization and a variety of additional
+claims ([1][gh-blog-oidc], [2][sub-claim-custom]).
+
+> **Warning:** Avoid `ForAllValues:` in `Allow` statements. These operators
+> return true when the claim is absent or misspelled, which can lead to
+> unintended access. Instead, use `StringEquals` or `StringLike` operators to
+> check for specific claim values.
[least-privilege]:
https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege
-the assume role policy document should contain a
-[`Condition`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html)
-that specifies a subject (`sub`) allowed to assume the role.
-[GitHub also recommends](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#defining-trust-conditions-on-cloud-roles-using-oidc-claims)
-filtering for the correct audience (`aud`). See
-[AWS IAM documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#condition-keys-wif)
-on which claims you can filter for in your trust policies.
+[gh-blog-oidc]:
+ https://aws.amazon.com/about-aws/whats-new/2026/01/aws-sts-supports-validation-identity-provider-claims/
+[sub-claim-custom]:
+ https://docs.github.com/en/rest/actions/oidc?apiVersion=2026-03-10
-Without a subject (`sub`) condition, any GitHub user or repository could
-potentially assume the role. The subject can be scoped to a GitHub organization
-and repository as shown in the CloudFormation template. However, scoping it down
-to your org and repo may cause the role assumption to fail in some cases. See
-[Example subject claims](https://docs.github.com/en/actions/reference/security/oidc#example-subject-claims)
-for specific details on what the subject value will be depending on your
-workflow. You can also
-[customize your subject claim](https://docs.github.com/en/actions/reference/security/oidc#customizing-the-token-claims)
-if you want full control over the information you can filter for in your trust
-policy. If you aren't sure what your subject (`sub`) key is, you can add the
+#### Inspecting the token
+
+If you aren't sure what claim values your workflow is producing, the
[`actions-oidc-debugger`](https://github.com/github/actions-oidc-debugger)
-action to your workflow to see the value of the subject (`sub`) key, as well as
-other claims.
+action will print the decoded JWT payload. Run it in a private repository
+only — the token itself is short-lived but the claim values may be sensitive.
-Additional claim conditions can be added for higher specificity as explained in
-the
-[GitHub documentation][gh-oidc-hardening].
+See the GitHub [security-hardening guide][gh-oidc-hardening] for further
+discussion of trust conditions and threat modeling.
[gh-oidc-hardening]:
https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect
-Due to implementation details, not every OIDC claim is presently supported by
-IAM.
### Further information about OIDC
@@ -612,6 +623,57 @@ 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/)
+## Getting Credentials in AWS Self-Hosted Runners
+
+If you are running GitHub Actions in a self-hosted runner using an AWS Service
+(such as Codebuild or EKS) and you have properly configured the service,
+credentials should be available by default; the AWS CLI will fetch credentials
+using the AWS_CONTAINER_CREDENTIALS_FULL_URI or
+AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variables. However, you may
+still want to use this action if you need to export those credentials for use
+with other tools in your workflow. You may also want to use this action in
+scenarios where you need to use that 'default' role to assume another role.
+
+To export credentials, simply run the action with `role-to-assume` set to the
+default role of the container.
+
+To assume another role from the container's default role, use the
+`role-chaining: true` flag, so that the action fetches the default credentials
+from the environment before assuming the other role.
+
+If you are using EKS Pod Identities and encountering an error related to the
+packed size of session tags, you must either run the action with
+`role-skip-session-tagging: true` to disable the tags set by the action, or
+[disable EKS session tagging][eks-disable-session-tagging] in the EKS settings
+to disable the tags that are automatically set by the EKS Pod Identity Service.
+Check the values of the action's session tags and the session tags that are
+added by EKS so you can keep the set of tags which is more useful to you.
+
+[eks-disable-session-tagging]:
+ https://docs.aws.amazon.com/eks/latest/userguide/pod-id-abac.html#pod-id-abac-tags
+
+## 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
@@ -709,6 +771,13 @@ This example shows that you can reference the fetched credentials as outputs if
the `aws-session-token` input in a situation where session tokens are fetched
and passed to this action.
+If you only want the credentials available as _step outputs_ and not exported to
+the environment (for example, on a self-hosted runner where you do not want the
+assumed-role credentials to shadow an existing EC2 instance profile), pair
+`output-credentials: true` with `output-env-credentials: false`. In that mode,
+the action does not run its post-credential SDK-pickup validation step, since
+the credentials were never written to the environment.
+
### Configure multiple AWS profiles in a single workflow
```yaml
@@ -741,8 +810,8 @@ and passed to this action.
This example shows how to configure multiple named AWS profiles in a single
workflow. When using the `aws-profile` input, credentials are written to
`~/.aws/credentials` and `~/.aws/config` files, allowing you to reference
-different profiles using the `--profile` flag with AWS CLI, SDKs, CDK, and
-other tools.
+different profiles using the `--profile` flag with AWS CLI, SDKs, CDK, and other
+tools.
Each profile is independent and can authenticate to different AWS accounts or
use different roles. This is particularly useful for multi-account deployments
@@ -755,6 +824,7 @@ Starting with version 5.0.0, this action uses semantic-style release tags and
[immutable-releases]:
https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/immutable-releases
+
A floating version tag (vN) is also provided for convenience: this tag will move
to the latest major version (vN -> vN.2.1, vM -> vM.0.0, etc.).
diff --git a/THIRD-PARTY b/THIRD-PARTY
index 503c641..59cc215 100644
--- a/THIRD-PARTY
+++ b/THIRD-PARTY
@@ -431,11 +431,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----------
-The following npm package may be included in this product:
+The following npm packages may be included in this product:
+ - @aws-crypto/crc32@5.2.0
- @aws-crypto/util@5.2.0
-This package contains the following license:
+These packages each contain the following license:
Apache License
Version 2.0, January 2004
@@ -641,20 +642,11 @@ Apache License
-----------
-The following npm packages may be included in this product:
+The following npm package may be included in this product:
- - @aws-sdk/client-sts@3.1044.0
- - @aws-sdk/util-user-agent-browser@3.972.10
- - @aws-sdk/util-user-agent-node@3.973.24
- - @smithy/middleware-retry@4.5.7
- - @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
+ - @aws-sdk/client-sts@3.1061.0
-These packages each contain the following license:
+This package contains the following license:
Apache License
Version 2.0, January 2004
@@ -862,17 +854,9 @@ Apache License
The following npm packages may be included in this product:
- - @aws-sdk/middleware-host-header@3.972.10
- - @aws-sdk/middleware-recursion-detection@3.972.11
- - @aws-sdk/middleware-sdk-s3@3.972.37
- - @aws-sdk/middleware-user-agent@3.972.38
- - @aws-sdk/signature-v4-multi-region@3.996.25
- - @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
+ - @aws-sdk/signature-v4-multi-region@3.996.31
+ - @smithy/core@3.24.6
+ - @smithy/types@4.14.3
These packages each contain the following license:
@@ -1270,7 +1254,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The following npm package may be included in this product:
- - @aws-sdk/core@3.974.8
+ - @aws-sdk/core@3.974.17
This package contains the following license:
@@ -1690,40 +1674,20 @@ Apache License
The following npm packages may be included in this product:
- - @aws-sdk/credential-provider-env@3.972.34
- - @aws-sdk/credential-provider-ini@3.972.38
- - @aws-sdk/credential-provider-node@3.972.39
- - @aws-sdk/region-config-resolver@3.972.13
- - @aws-sdk/token-providers@3.1041.0
- - @aws-sdk/types@3.973.8
- - @aws-sdk/util-arn-parser@3.972.3
- - @aws-sdk/util-endpoints@3.996.8
+ - @aws-sdk/credential-provider-env@3.972.43
+ - @aws-sdk/credential-provider-ini@3.972.48
+ - @aws-sdk/credential-provider-node@3.972.50
+ - @aws-sdk/token-providers@3.1060.0
+ - @aws-sdk/types@3.973.10
- @aws-sdk/util-locate-window@3.965.5
- - @aws-sdk/xml-builder@3.972.22
- - @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
+ - @aws-sdk/xml-builder@3.972.27
+ - @smithy/credential-provider-imds@4.3.7
+ - @smithy/fetch-http-handler@5.4.6
- @smithy/is-array-buffer@2.2.0
- - @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/node-http-handler@4.7.6
+ - @smithy/signature-v4@5.4.6
- @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:
@@ -1933,9 +1897,9 @@ Apache License
The following npm packages may be included in this product:
- - @aws-sdk/credential-provider-process@3.972.34
- - @aws-sdk/credential-provider-sso@3.972.38
- - @aws-sdk/credential-provider-web-identity@3.972.38
+ - @aws-sdk/credential-provider-process@3.972.43
+ - @aws-sdk/credential-provider-sso@3.972.47
+ - @aws-sdk/credential-provider-web-identity@3.972.47
These packages each contain the following license:
@@ -2145,433 +2109,9 @@ Apache License
The following npm packages may be included in this product:
- - @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.8
-
-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.36
- - @aws-sdk/credential-provider-login@3.972.38
- - @aws-sdk/nested-clients@3.997.6
+ - @aws-sdk/credential-provider-http@3.972.45
+ - @aws-sdk/credential-provider-login@3.972.47
+ - @aws-sdk/nested-clients@3.997.15
These packages each contain the following license:
@@ -2795,8 +2335,9 @@ 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
+ - @nodable/entities@2.1.1
- quickjs-wasi@2.2.0
+ - xml-naming@0.1.0
These packages each contain the following license:
@@ -2836,7 +2377,7 @@ SOFTWARE.
The following npm package may be included in this product:
- - fast-xml-parser@5.7.2
+ - fast-xml-parser@5.7.3
This package contains the following license:
@@ -2866,7 +2407,7 @@ SOFTWARE.
The following npm package may be included in this product:
- - strnum@2.2.3
+ - strnum@2.3.0
This package contains the following license:
@@ -2926,7 +2467,7 @@ SOFTWARE.
The following npm package may be included in this product:
- - fast-xml-builder@1.1.9
+ - fast-xml-builder@1.2.0
This package contains the following license:
diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js
index 4256724..c5606af 100644
--- a/dist/cleanup/index.js
+++ b/dist/cleanup/index.js
@@ -5707,7 +5707,7 @@ var require_client_h1 = __commonJS({
kResume,
kHTTPContext
} = require_symbols();
- var constants3 = require_constants2();
+ var constants4 = require_constants2();
var EMPTY_BUF = Buffer.alloc(0);
var FastBuffer = Buffer[Symbol.species];
var addListener = util.addListener;
@@ -5779,7 +5779,7 @@ var require_client_h1 = __commonJS({
constructor(client, socket, { exports: exports3 }) {
assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0);
this.llhttp = exports3;
- this.ptr = this.llhttp.llhttp_alloc(constants3.TYPE.RESPONSE);
+ this.ptr = this.llhttp.llhttp_alloc(constants4.TYPE.RESPONSE);
this.client = client;
this.socket = socket;
this.timeout = null;
@@ -5874,19 +5874,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 === constants4.ERROR.PAUSED_UPGRADE) {
this.onUpgrade(data.slice(offset));
- } else if (ret === constants3.ERROR.PAUSED) {
+ } else if (ret === constants4.ERROR.PAUSED) {
this.paused = true;
socket.unshift(data.slice(offset));
- } else if (ret !== constants3.ERROR.OK) {
+ } else if (ret !== constants4.ERROR.OK) {
const ptr = llhttp.llhttp_get_error_reason(this.ptr);
let message = "";
if (ptr) {
const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0);
message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")";
}
- throw new HTTPParserError(message, constants3.ERROR[ret], data.slice(offset));
+ throw new HTTPParserError(message, constants4.ERROR[ret], data.slice(offset));
}
} catch (err) {
util.destroy(socket, err);
@@ -6061,7 +6061,7 @@ var require_client_h1 = __commonJS({
socket[kBlocking] = false;
client[kResume]();
}
- return pause ? constants3.ERROR.PAUSED : 0;
+ return pause ? constants4.ERROR.PAUSED : 0;
}
onBody(buf) {
const { client, socket, statusCode, maxResponseSize } = this;
@@ -6083,7 +6083,7 @@ var require_client_h1 = __commonJS({
}
this.bytesRead += buf.length;
if (request.onData(buf) === false) {
- return constants3.ERROR.PAUSED;
+ return constants4.ERROR.PAUSED;
}
}
onMessageComplete() {
@@ -6118,13 +6118,13 @@ var require_client_h1 = __commonJS({
if (socket[kWriting]) {
assert(client[kRunning] === 0);
util.destroy(socket, new InformationalError("reset"));
- return constants3.ERROR.PAUSED;
+ return constants4.ERROR.PAUSED;
} else if (!shouldKeepAlive) {
util.destroy(socket, new InformationalError("reset"));
- return constants3.ERROR.PAUSED;
+ return constants4.ERROR.PAUSED;
} else if (socket[kReset] && client[kRunning] === 0) {
util.destroy(socket, new InformationalError("reset"));
- return constants3.ERROR.PAUSED;
+ return constants4.ERROR.PAUSED;
} else if (client[kPipelining] == null || client[kPipelining] === 1) {
setImmediate(() => client[kResume]());
} else {
@@ -19128,6 +19128,7 @@ function error(message, properties = {}) {
}
// src/helpers.ts
+var fs3 = __toESM(require("node:fs"));
function errorMessage(error2) {
return error2 instanceof Error ? error2.message : String(error2);
}
@@ -19145,6 +19146,7 @@ function getBooleanInput(name, options) {
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``
);
}
+var O_NOFOLLOW = fs3.constants.O_NOFOLLOW ?? 0;
// src/cleanup/index.ts
function cleanup() {
diff --git a/dist/index.js b/dist/index.js
index 3f3bf5c..559d31b 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1040,7 +1040,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 parseURL(url) {
+ function parseURL2(url) {
if (typeof url === "string") {
url = new URL(url);
if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {
@@ -1072,14 +1072,14 @@ var require_util = __commonJS({
}
const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80;
let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`;
- let path3 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
+ let path4 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
if (origin[origin.length - 1] === "/") {
origin = origin.slice(0, origin.length - 1);
}
- if (path3 && path3[0] !== "/") {
- path3 = `/${path3}`;
+ if (path4 && path4[0] !== "/") {
+ path4 = `/${path4}`;
}
- return new URL(`${origin}${path3}`);
+ return new URL(`${origin}${path4}`);
}
if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {
throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`.");
@@ -1087,7 +1087,7 @@ var require_util = __commonJS({
return url;
}
function parseOrigin(url) {
- url = parseURL(url);
+ url = parseURL2(url);
if (url.pathname !== "/" || url.search || url.hash) {
throw new InvalidArgumentError("invalid url");
}
@@ -1422,7 +1422,7 @@ var require_util = __commonJS({
isUSVString,
isBlobLike,
parseOrigin,
- parseURL,
+ parseURL: parseURL2,
getServerName,
isStream,
isIterable,
@@ -1530,39 +1530,39 @@ var require_diagnostics = __commonJS({
});
diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => {
const {
- request: { method, path: path3, origin }
+ request: { method, path: path4, origin }
} = evt;
- debuglog("sending request to %s %s/%s", method, origin, path3);
+ debuglog("sending request to %s %s/%s", method, origin, path4);
});
diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => {
const {
- request: { method, path: path3, origin },
+ request: { method, path: path4, origin },
response: { statusCode }
} = evt;
debuglog(
"received response to %s %s/%s - HTTP %d",
method,
origin,
- path3,
+ path4,
statusCode
);
});
diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => {
const {
- request: { method, path: path3, origin }
+ request: { method, path: path4, origin }
} = evt;
- debuglog("trailers received from %s %s/%s", method, origin, path3);
+ debuglog("trailers received from %s %s/%s", method, origin, path4);
});
diagnosticsChannel.channel("undici:request:error").subscribe((evt) => {
const {
- request: { method, path: path3, origin },
+ request: { method, path: path4, origin },
error: error3
} = evt;
debuglog(
"request to %s %s/%s errored - %s",
method,
origin,
- path3,
+ path4,
error3.message
);
});
@@ -1611,9 +1611,9 @@ var require_diagnostics = __commonJS({
});
diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => {
const {
- request: { method, path: path3, origin }
+ request: { method, path: path4, origin }
} = evt;
- debuglog("sending request to %s %s/%s", method, origin, path3);
+ debuglog("sending request to %s %s/%s", method, origin, path4);
});
}
diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => {
@@ -1674,9 +1674,9 @@ var require_request = __commonJS({
var { headerNameLowerCasedRecord } = require_constants();
var invalidPathRegex = /[^\u0021-\u00ff]/;
var kHandler = /* @__PURE__ */ Symbol("handler");
- var Request2 = class {
+ var Request = class {
constructor(origin, {
- path: path3,
+ path: path4,
method,
body,
headers,
@@ -1691,11 +1691,11 @@ var require_request = __commonJS({
expectContinue,
servername
}, handler) {
- if (typeof path3 !== "string") {
+ if (typeof path4 !== "string") {
throw new InvalidArgumentError("path must be a string");
- } else if (path3[0] !== "/" && !(path3.startsWith("http://") || path3.startsWith("https://")) && method !== "CONNECT") {
+ } else if (path4[0] !== "/" && !(path4.startsWith("http://") || path4.startsWith("https://")) && method !== "CONNECT") {
throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
- } else if (invalidPathRegex.test(path3)) {
+ } else if (invalidPathRegex.test(path4)) {
throw new InvalidArgumentError("invalid request path");
}
if (typeof method !== "string") {
@@ -1761,7 +1761,7 @@ var require_request = __commonJS({
this.completed = false;
this.aborted = false;
this.upgrade = upgrade || null;
- this.path = query ? buildURL(path3, query) : path3;
+ this.path = query ? buildURL(path4, query) : path4;
this.origin = origin;
this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
this.blocking = blocking == null ? false : blocking;
@@ -1976,7 +1976,7 @@ var require_request = __commonJS({
request.headers.push(key, val);
}
}
- module2.exports = Request2;
+ module2.exports = Request;
}
});
@@ -5108,9 +5108,9 @@ var require_formdata_parser = __commonJS({
var filenameBuffer = Buffer.from("; filename");
var dd = Buffer.from("--");
var ddcrlf = Buffer.from("--\r\n");
- function isAsciiString(chars) {
- for (let i5 = 0; i5 < chars.length; ++i5) {
- if ((chars.charCodeAt(i5) & ~127) !== 0) {
+ function isAsciiString(chars2) {
+ for (let i5 = 0; i5 < chars2.length; ++i5) {
+ if ((chars2.charCodeAt(i5) & ~127) !== 0) {
return false;
}
}
@@ -5364,7 +5364,7 @@ var require_body = __commonJS({
var { Blob: Blob2 } = require("node:buffer");
var assert4 = require("node:assert");
var { isErrored, isDisturbed } = require("node:stream");
- var { isArrayBuffer } = require("node:util/types");
+ var { isArrayBuffer: isArrayBuffer2 } = require("node:util/types");
var { serializeAMimeType } = require_data_url();
var { multipartFormDataParser } = require_formdata_parser();
var random;
@@ -5418,7 +5418,7 @@ var require_body = __commonJS({
} else if (object instanceof URLSearchParams) {
source = object.toString();
type = "application/x-www-form-urlencoded;charset=UTF-8";
- } else if (isArrayBuffer(object)) {
+ } else if (isArrayBuffer2(object)) {
source = new Uint8Array(object.slice());
} else if (ArrayBuffer.isView(object)) {
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength));
@@ -5710,7 +5710,7 @@ var require_client_h1 = __commonJS({
kResume,
kHTTPContext
} = require_symbols();
- var constants3 = require_constants2();
+ var constants4 = require_constants2();
var EMPTY_BUF = Buffer.alloc(0);
var FastBuffer = Buffer[Symbol.species];
var addListener = util.addListener;
@@ -5782,7 +5782,7 @@ var require_client_h1 = __commonJS({
constructor(client, socket, { exports: exports3 }) {
assert4(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0);
this.llhttp = exports3;
- this.ptr = this.llhttp.llhttp_alloc(constants3.TYPE.RESPONSE);
+ this.ptr = this.llhttp.llhttp_alloc(constants4.TYPE.RESPONSE);
this.client = client;
this.socket = socket;
this.timeout = null;
@@ -5877,19 +5877,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 === constants4.ERROR.PAUSED_UPGRADE) {
this.onUpgrade(data3.slice(offset));
- } else if (ret === constants3.ERROR.PAUSED) {
+ } else if (ret === constants4.ERROR.PAUSED) {
this.paused = true;
socket.unshift(data3.slice(offset));
- } else if (ret !== constants3.ERROR.OK) {
+ } else if (ret !== constants4.ERROR.OK) {
const ptr = llhttp.llhttp_get_error_reason(this.ptr);
let message = "";
if (ptr) {
const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0);
message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")";
}
- throw new HTTPParserError(message, constants3.ERROR[ret], data3.slice(offset));
+ throw new HTTPParserError(message, constants4.ERROR[ret], data3.slice(offset));
}
} catch (err) {
util.destroy(socket, err);
@@ -6064,7 +6064,7 @@ var require_client_h1 = __commonJS({
socket[kBlocking] = false;
client[kResume]();
}
- return pause ? constants3.ERROR.PAUSED : 0;
+ return pause ? constants4.ERROR.PAUSED : 0;
}
onBody(buf) {
const { client, socket, statusCode, maxResponseSize } = this;
@@ -6086,7 +6086,7 @@ var require_client_h1 = __commonJS({
}
this.bytesRead += buf.length;
if (request.onData(buf) === false) {
- return constants3.ERROR.PAUSED;
+ return constants4.ERROR.PAUSED;
}
}
onMessageComplete() {
@@ -6121,13 +6121,13 @@ var require_client_h1 = __commonJS({
if (socket[kWriting]) {
assert4(client[kRunning] === 0);
util.destroy(socket, new InformationalError("reset"));
- return constants3.ERROR.PAUSED;
+ return constants4.ERROR.PAUSED;
} else if (!shouldKeepAlive) {
util.destroy(socket, new InformationalError("reset"));
- return constants3.ERROR.PAUSED;
+ return constants4.ERROR.PAUSED;
} else if (socket[kReset] && client[kRunning] === 0) {
util.destroy(socket, new InformationalError("reset"));
- return constants3.ERROR.PAUSED;
+ return constants4.ERROR.PAUSED;
} else if (client[kPipelining] == null || client[kPipelining] === 1) {
setImmediate(() => client[kResume]());
} else {
@@ -6287,7 +6287,7 @@ var require_client_h1 = __commonJS({
return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";
}
function writeH1(client, request) {
- const { method, path: path3, host, upgrade, blocking, reset } = request;
+ const { method, path: path4, host, upgrade, blocking, reset } = request;
let { body, headers, contentLength } = request;
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
if (util.isFormDataLike(body)) {
@@ -6353,7 +6353,7 @@ var require_client_h1 = __commonJS({
if (blocking) {
socket[kBlocking] = true;
}
- let header = `${method} ${path3} HTTP/1.1\r
+ let header = `${method} ${path4} HTTP/1.1\r
`;
if (typeof host === "string") {
header += `host: ${host}\r
@@ -6879,7 +6879,7 @@ var require_client_h2 = __commonJS({
}
function writeH2(client, request) {
const session = client[kHTTP2Session];
- const { method, path: path3, host, upgrade, expectContinue, signal, headers: reqHeaders } = request;
+ const { method, path: path4, host, upgrade, expectContinue, signal, headers: reqHeaders } = request;
let { body } = request;
if (upgrade) {
util.errorRequest(client, request, new Error("Upgrade not supported for H2"));
@@ -6946,7 +6946,7 @@ var require_client_h2 = __commonJS({
});
return true;
}
- headers[HTTP2_HEADER_PATH] = path3;
+ headers[HTTP2_HEADER_PATH] = path4;
headers[HTTP2_HEADER_SCHEME] = "https";
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
if (body && typeof body.read === "function") {
@@ -7299,9 +7299,9 @@ var require_redirect_handler = __commonJS({
return this.handler.onHeaders(statusCode, headers, resume3, statusText);
}
const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
- const path3 = search ? `${pathname}${search}` : pathname;
+ const path4 = search ? `${pathname}${search}` : pathname;
this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
- this.opts.path = path3;
+ this.opts.path = path4;
this.opts.origin = origin;
this.opts.maxRedirections = 0;
this.opts.query = null;
@@ -7408,7 +7408,7 @@ var require_client = __commonJS({
var http6 = require("node:http");
var util = require_util();
var { channels } = require_diagnostics();
- var Request2 = require_request();
+ var Request = require_request();
var DispatcherBase = require_dispatcher_base();
var {
InvalidArgumentError,
@@ -7467,7 +7467,7 @@ var require_client = __commonJS({
function getPipelining(client) {
return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1;
}
- var Client2 = class extends DispatcherBase {
+ var Client3 = class extends DispatcherBase {
/**
*
* @param {string|URL} url
@@ -7650,7 +7650,7 @@ var require_client = __commonJS({
}
[kDispatch](opts, handler) {
const origin = opts.origin || this[kUrl].origin;
- const request = new Request2(origin, opts, handler);
+ const request = new Request(origin, opts, handler);
this[kQueue].push(request);
if (this[kResuming]) {
} else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) {
@@ -7896,7 +7896,7 @@ var require_client = __commonJS({
}
}
}
- module2.exports = Client2;
+ module2.exports = Client3;
}
});
@@ -8155,7 +8155,7 @@ var require_pool = __commonJS({
kAddClient,
kGetDispatcher
} = require_pool_base();
- var Client2 = require_client();
+ var Client3 = require_client();
var {
InvalidArgumentError
} = require_errors();
@@ -8166,7 +8166,7 @@ var require_pool = __commonJS({
var kConnections = /* @__PURE__ */ Symbol("connections");
var kFactory = /* @__PURE__ */ Symbol("factory");
function defaultFactory(origin, opts) {
- return new Client2(origin, opts);
+ return new Client3(origin, opts);
}
var Pool = class extends PoolBase {
constructor(origin, {
@@ -8387,7 +8387,7 @@ var require_agent = __commonJS({
var { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols();
var DispatcherBase = require_dispatcher_base();
var Pool = require_pool();
- var Client2 = require_client();
+ var Client3 = require_client();
var util = require_util();
var createRedirectInterceptor = require_redirect_interceptor();
var kOnConnect = /* @__PURE__ */ Symbol("onConnect");
@@ -8398,7 +8398,7 @@ var require_agent = __commonJS({
var kFactory = /* @__PURE__ */ Symbol("factory");
var kOptions = /* @__PURE__ */ Symbol("options");
function defaultFactory(origin, opts) {
- return opts && opts.connections === 1 ? new Client2(origin, opts) : new Pool(origin, opts);
+ return opts && opts.connections === 1 ? new Client3(origin, opts) : new Pool(origin, opts);
}
var Agent9 = class extends DispatcherBase {
constructor({ factory = defaultFactory, maxRedirections = 0, connect: connect13, ...options } = {}) {
@@ -8487,7 +8487,7 @@ var require_proxy_agent = __commonJS({
var DispatcherBase = require_dispatcher_base();
var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors();
var buildConnector = require_connect();
- var Client2 = require_client();
+ var Client3 = require_client();
var kAgent = /* @__PURE__ */ Symbol("proxy agent");
var kClient = /* @__PURE__ */ Symbol("proxy client");
var kProxyHeaders = /* @__PURE__ */ Symbol("proxy headers");
@@ -8505,7 +8505,7 @@ var require_proxy_agent = __commonJS({
};
function defaultAgentFactory(origin, opts) {
if (opts.connections === 1) {
- return new Client2(origin, opts);
+ return new Client3(origin, opts);
}
return new Pool(origin, opts);
}
@@ -8520,7 +8520,7 @@ var require_proxy_agent = __commonJS({
if (factory) {
this.#client = factory(proxyUrl, { connect: connect13 });
} else {
- this.#client = new Client2(proxyUrl, { connect: connect13 });
+ this.#client = new Client3(proxyUrl, { connect: connect13 });
}
}
[kDispatch](opts, handler) {
@@ -8536,10 +8536,10 @@ var require_proxy_agent = __commonJS({
};
const {
origin,
- path: path3 = "/",
+ path: path4 = "/",
headers = {}
} = opts;
- opts.path = origin + path3;
+ opts.path = origin + path4;
if (!("host" in headers) && !("Host" in headers)) {
const { host } = new URL10(origin);
headers.host = host;
@@ -8707,7 +8707,7 @@ var require_env_http_proxy_agent = __commonJS({
var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols();
var ProxyAgent3 = require_proxy_agent();
var Agent9 = require_agent();
- var DEFAULT_PORTS3 = {
+ var DEFAULT_PORTS4 = {
"http:": 80,
"https:": 443
};
@@ -8767,7 +8767,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_PORTS3[protocol] || 0;
+ port = Number.parseInt(port, 10) || DEFAULT_PORTS4[protocol] || 0;
if (!this.#shouldProxy(hostname, port)) {
return this[kNoProxyAgent];
}
@@ -9173,7 +9173,7 @@ var require_readable = __commonJS({
"node_modules/undici/lib/api/readable.js"(exports2, module2) {
"use strict";
var assert4 = require("node:assert");
- var { Readable: Readable2 } = require("node:stream");
+ var { Readable: Readable7 } = require("node:stream");
var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors();
var util = require_util();
var { ReadableStreamFrom } = require_util();
@@ -9185,7 +9185,7 @@ var require_readable = __commonJS({
var kContentLength = /* @__PURE__ */ Symbol("kContentLength");
var noop = () => {
};
- var BodyReadable = class extends Readable2 {
+ var BodyReadable = class extends Readable7 {
constructor({
resume: resume3,
abort,
@@ -9527,7 +9527,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: Readable2 } = require_readable();
+ var { Readable: Readable7 } = require_readable();
var { InvalidArgumentError, RequestAbortedError } = require_errors();
var util = require_util();
var { getResolveErrorBodyCallback } = require_util3();
@@ -9622,7 +9622,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 Readable2({
+ const res = new Readable7({
resume: resume3,
abort,
contentType,
@@ -9764,7 +9764,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: PassThrough2 } = require("node:stream");
+ var { finished, PassThrough: PassThrough3 } = require("node:stream");
var { InvalidArgumentError, InvalidReturnValueError } = require_errors();
var util = require_util();
var { getResolveErrorBodyCallback } = require_util3();
@@ -9840,7 +9840,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 PassThrough2();
+ res = new PassThrough3();
this.callback = null;
this.runInAsyncScope(
getResolveErrorBodyCallback,
@@ -9937,9 +9937,9 @@ var require_api_pipeline = __commonJS({
"node_modules/undici/lib/api/api-pipeline.js"(exports2, module2) {
"use strict";
var {
- Readable: Readable2,
- Duplex,
- PassThrough: PassThrough2
+ Readable: Readable7,
+ Duplex: Duplex2,
+ PassThrough: PassThrough3
} = require("node:stream");
var {
InvalidArgumentError,
@@ -9951,7 +9951,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 Readable2 {
+ var PipelineRequest = class extends Readable7 {
constructor() {
super({ autoDestroy: true });
this[kResume] = null;
@@ -9968,7 +9968,7 @@ var require_api_pipeline = __commonJS({
callback(err);
}
};
- var PipelineResponse = class extends Readable2 {
+ var PipelineResponse = class extends Readable7 {
constructor(resume3) {
super({ autoDestroy: true });
this[kResume] = resume3;
@@ -10009,7 +10009,7 @@ var require_api_pipeline = __commonJS({
this.context = null;
this.onInfo = onInfo || null;
this.req = new PipelineRequest().on("error", util.nop);
- this.ret = new Duplex({
+ this.ret = new Duplex2({
readableObjectMode: opts.objectMode,
autoDestroy: true,
read: () => {
@@ -10125,7 +10125,7 @@ var require_api_pipeline = __commonJS({
this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler);
return pipelineHandler.ret;
} catch (err) {
- return new PassThrough2().destroy(err);
+ return new PassThrough3().destroy(err);
}
}
module2.exports = pipeline;
@@ -10460,20 +10460,20 @@ var require_mock_utils = __commonJS({
}
return true;
}
- function safeUrl(path3) {
- if (typeof path3 !== "string") {
- return path3;
+ function safeUrl(path4) {
+ if (typeof path4 !== "string") {
+ return path4;
}
- const pathSegments = path3.split("?");
+ const pathSegments = path4.split("?");
if (pathSegments.length !== 2) {
- return path3;
+ return path4;
}
const qp = new URLSearchParams(pathSegments.pop());
qp.sort();
return [...pathSegments, qp.toString()].join("?");
}
- function matchKey(mockDispatch2, { path: path3, method, body, headers }) {
- const pathMatch = matchValue(mockDispatch2.path, path3);
+ function matchKey(mockDispatch2, { path: path4, method, body, headers }) {
+ const pathMatch = matchValue(mockDispatch2.path, path4);
const methodMatch = matchValue(mockDispatch2.method, method);
const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
const headersMatch = matchHeaders(mockDispatch2, headers);
@@ -10495,7 +10495,7 @@ var require_mock_utils = __commonJS({
function getMockDispatch(mockDispatches, key) {
const basePath = key.query ? buildURL(key.path, key.query) : key.path;
const resolvedPath2 = typeof basePath === "string" ? safeUrl(basePath) : basePath;
- let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path3 }) => matchValue(safeUrl(path3), resolvedPath2));
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path4 }) => matchValue(safeUrl(path4), resolvedPath2));
if (matchedMockDispatches.length === 0) {
throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath2}'`);
}
@@ -10533,9 +10533,9 @@ var require_mock_utils = __commonJS({
}
}
function buildKey(opts) {
- const { path: path3, method, body, headers, query } = opts;
+ const { path: path4, method, body, headers, query } = opts;
return {
- path: path3,
+ path: path4,
method,
body,
headers,
@@ -10842,7 +10842,7 @@ var require_mock_client = __commonJS({
"node_modules/undici/lib/mock/mock-client.js"(exports2, module2) {
"use strict";
var { promisify } = require("node:util");
- var Client2 = require_client();
+ var Client3 = require_client();
var { buildMockDispatch } = require_mock_utils();
var {
kDispatches,
@@ -10856,7 +10856,7 @@ var require_mock_client = __commonJS({
var { MockInterceptor } = require_mock_interceptor();
var Symbols = require_symbols();
var { InvalidArgumentError } = require_errors();
- var MockClient = class extends Client2 {
+ var MockClient = class extends Client3 {
constructor(origin, opts) {
super(origin, opts);
if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") {
@@ -10998,10 +10998,10 @@ var require_pending_interceptors_formatter = __commonJS({
}
format(pendingInterceptors) {
const withPrettyHeaders = pendingInterceptors.map(
- ({ method, path: path3, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
+ ({ method, path: path4, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
Method: method,
Origin: origin,
- Path: path3,
+ Path: path4,
"Status code": statusCode,
Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
Invocations: timesInvoked,
@@ -11892,7 +11892,7 @@ var require_headers = __commonJS({
}
}
};
- var Headers3 = class _Headers {
+ var Headers2 = class _Headers {
#guard;
#headersList;
constructor(init = void 0) {
@@ -12042,13 +12042,13 @@ var require_headers = __commonJS({
o2.#headersList = list2;
}
};
- var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers3;
- Reflect.deleteProperty(Headers3, "getHeadersGuard");
- Reflect.deleteProperty(Headers3, "setHeadersGuard");
- Reflect.deleteProperty(Headers3, "getHeadersList");
- Reflect.deleteProperty(Headers3, "setHeadersList");
- iteratorMixin("Headers", Headers3, kHeadersSortedMap, 0, 1);
- Object.defineProperties(Headers3.prototype, {
+ var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers2;
+ Reflect.deleteProperty(Headers2, "getHeadersGuard");
+ Reflect.deleteProperty(Headers2, "setHeadersGuard");
+ Reflect.deleteProperty(Headers2, "getHeadersList");
+ Reflect.deleteProperty(Headers2, "setHeadersList");
+ iteratorMixin("Headers", Headers2, kHeadersSortedMap, 0, 1);
+ Object.defineProperties(Headers2.prototype, {
append: kEnumerableProperty,
delete: kEnumerableProperty,
get: kEnumerableProperty,
@@ -12066,7 +12066,7 @@ var require_headers = __commonJS({
webidl.converters.HeadersInit = function(V, prefix, argument) {
if (webidl.util.Type(V) === "Object") {
const iterator = Reflect.get(V, Symbol.iterator);
- if (!util.types.isProxy(V) && iterator === Headers3.prototype.entries) {
+ if (!util.types.isProxy(V) && iterator === Headers2.prototype.entries) {
try {
return getHeadersList(V).entriesList;
} catch {
@@ -12087,7 +12087,7 @@ var require_headers = __commonJS({
fill,
// for test.
compareHeaderName,
- Headers: Headers3,
+ Headers: Headers2,
HeadersList,
getHeadersGuard,
setHeadersGuard,
@@ -12101,7 +12101,7 @@ var require_headers = __commonJS({
var require_response = __commonJS({
"node_modules/undici/lib/web/fetch/response.js"(exports2, module2) {
"use strict";
- var { Headers: Headers3, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers();
+ var { Headers: Headers2, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers();
var { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require_body();
var util = require_util();
var nodeUtil = require("node:util");
@@ -12179,7 +12179,7 @@ var require_response = __commonJS({
}
init = webidl.converters.ResponseInit(init);
this[kState] = makeResponse({});
- this[kHeaders] = new Headers3(kConstruct);
+ this[kHeaders] = new Headers2(kConstruct);
setHeadersGuard(this[kHeaders], "response");
setHeadersList(this[kHeaders], this[kState].headersList);
let bodyWithType = null;
@@ -12423,7 +12423,7 @@ var require_response = __commonJS({
function fromInnerResponse(innerResponse, guard) {
const response = new Response(kConstruct);
response[kState] = innerResponse;
- response[kHeaders] = new Headers3(kConstruct);
+ response[kHeaders] = new Headers2(kConstruct);
setHeadersList(response[kHeaders], innerResponse.headersList);
setHeadersGuard(response[kHeaders], guard);
if (hasFinalizationRegistry && innerResponse.body?.stream) {
@@ -12543,7 +12543,7 @@ var require_request2 = __commonJS({
"node_modules/undici/lib/web/fetch/request.js"(exports2, module2) {
"use strict";
var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body();
- var { Headers: Headers3, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers();
+ var { Headers: Headers2, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers();
var { FinalizationRegistry: FinalizationRegistry2 } = require_dispatcher_weakref()();
var util = require_util();
var nodeUtil = require("node:util");
@@ -12599,7 +12599,7 @@ var require_request2 = __commonJS({
}
}
var patchMethodWarning = false;
- var Request2 = class _Request {
+ var Request = class _Request {
// https://fetch.spec.whatwg.org/#dom-request
constructor(input, init = {}) {
webidl.util.markAsUncloneable(this);
@@ -12811,7 +12811,7 @@ var require_request2 = __commonJS({
requestFinalizer.register(ac, { signal, abort }, abort);
}
}
- this[kHeaders] = new Headers3(kConstruct);
+ this[kHeaders] = new Headers2(kConstruct);
setHeadersList(this[kHeaders], request.headersList);
setHeadersGuard(this[kHeaders], "request");
if (mode === "no-cors") {
@@ -13046,7 +13046,7 @@ var require_request2 = __commonJS({
return `Request ${nodeUtil.formatWithOptions(options, properties)}`;
}
};
- mixinBody(Request2);
+ mixinBody(Request);
function makeRequest(init) {
return {
method: init.method ?? "GET",
@@ -13097,15 +13097,15 @@ var require_request2 = __commonJS({
return newRequest;
}
function fromInnerRequest(innerRequest, signal, guard) {
- const request = new Request2(kConstruct);
+ const request = new Request(kConstruct);
request[kState] = innerRequest;
request[kSignal] = signal;
- request[kHeaders] = new Headers3(kConstruct);
+ request[kHeaders] = new Headers2(kConstruct);
setHeadersList(request[kHeaders], innerRequest.headersList);
setHeadersGuard(request[kHeaders], guard);
return request;
}
- Object.defineProperties(Request2.prototype, {
+ Object.defineProperties(Request.prototype, {
method: kEnumerableProperty,
url: kEnumerableProperty,
headers: kEnumerableProperty,
@@ -13132,13 +13132,13 @@ var require_request2 = __commonJS({
}
});
webidl.converters.Request = webidl.interfaceConverter(
- Request2
+ Request
);
webidl.converters.RequestInfo = function(V, prefix, argument) {
if (typeof V === "string") {
return webidl.converters.USVString(V, prefix, argument);
}
- if (V instanceof Request2) {
+ if (V instanceof Request) {
return webidl.converters.Request(V, prefix, argument);
}
return webidl.converters.USVString(V, prefix, argument);
@@ -13229,7 +13229,7 @@ var require_request2 = __commonJS({
converter: webidl.converters.any
}
]);
- module2.exports = { Request: Request2, makeRequest, fromInnerRequest, cloneRequest };
+ module2.exports = { Request, makeRequest, fromInnerRequest, cloneRequest };
}
});
@@ -13245,7 +13245,7 @@ var require_fetch = __commonJS({
fromInnerResponse
} = require_response();
var { HeadersList } = require_headers();
- var { Request: Request2, cloneRequest } = require_request2();
+ var { Request, cloneRequest } = require_request2();
var zlib = require("node:zlib");
var {
bytesMatch,
@@ -13293,14 +13293,14 @@ var require_fetch = __commonJS({
subresourceSet
} = require_constants3();
var EE = require("node:events");
- var { Readable: Readable2, pipeline, finished } = require("node:stream");
+ var { Readable: Readable7, 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 defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici";
+ var defaultUserAgent2 = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici";
var resolveObjectURL;
var Fetch = class extends EE {
constructor(dispatcher) {
@@ -13335,12 +13335,12 @@ var require_fetch = __commonJS({
function handleFetchDone(response) {
finalizeAndReportTiming(response, "fetch");
}
- function fetch2(input, init = void 0) {
+ function fetch(input, init = void 0) {
webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch");
let p2 = createDeferredPromise();
let requestObject;
try {
- requestObject = new Request2(input, init);
+ requestObject = new Request(input, init);
} catch (e5) {
p2.reject(e5);
return p2.promise;
@@ -13904,7 +13904,7 @@ var require_fetch = __commonJS({
appendRequestOriginHeader(httpRequest);
appendFetchMetadata(httpRequest);
if (!httpRequest.headersList.contains("user-agent", true)) {
- httpRequest.headersList.append("user-agent", defaultUserAgent);
+ httpRequest.headersList.append("user-agent", defaultUserAgent2);
}
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 +14194,7 @@ var require_fetch = __commonJS({
headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i5]), rawHeaders[i5 + 1].toString("latin1"), true);
}
location = headersList.get("location", true);
- this.body = new Readable2({ read: resume3 });
+ this.body = new Readable7({ read: resume3 });
const decoders = [];
const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status);
if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) {
@@ -14292,7 +14292,7 @@ var require_fetch = __commonJS({
}
}
module2.exports = {
- fetch: fetch2,
+ fetch,
Fetch,
fetching,
finalizeAndReportTiming
@@ -15162,7 +15162,7 @@ var require_cache = __commonJS({
var { kEnumerableProperty, isDisturbed } = require_util();
var { webidl } = require_webidl();
var { Response, cloneResponse, fromInnerResponse } = require_response();
- var { Request: Request2, fromInnerRequest } = require_request2();
+ var { Request, fromInnerRequest } = require_request2();
var { kState } = require_symbols2();
var { fetching } = require_fetch();
var { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util2();
@@ -15236,7 +15236,7 @@ var require_cache = __commonJS({
}
const fetchControllers = [];
for (const request of requests) {
- const r5 = new Request2(request)[kState];
+ const r5 = new Request(request)[kState];
if (!urlIsHttpHttpsScheme(r5.url)) {
throw webidl.errors.exception({
header: prefix,
@@ -15320,10 +15320,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 Request2) {
+ if (request instanceof Request) {
innerRequest = request[kState];
} else {
- innerRequest = new Request2(request)[kState];
+ innerRequest = new Request(request)[kState];
}
if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") {
throw webidl.errors.exception({
@@ -15401,14 +15401,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 Request2) {
+ if (request instanceof Request) {
r5 = request[kState];
if (r5.method !== "GET" && !options.ignoreMethod) {
return false;
}
} else {
assert4(typeof request === "string");
- r5 = new Request2(request)[kState];
+ r5 = new Request(request)[kState];
}
const operations = [];
const operation2 = {
@@ -15447,13 +15447,13 @@ var require_cache = __commonJS({
options = webidl.converters.CacheQueryOptions(options, prefix, "options");
let r5 = null;
if (request !== void 0) {
- if (request instanceof Request2) {
+ if (request instanceof Request) {
r5 = request[kState];
if (r5.method !== "GET" && !options.ignoreMethod) {
return [];
}
} else if (typeof request === "string") {
- r5 = new Request2(request)[kState];
+ r5 = new Request(request)[kState];
}
}
const promise = createDeferredPromise();
@@ -15619,13 +15619,13 @@ var require_cache = __commonJS({
#internalMatchAll(request, options, maxResponses = Infinity) {
let r5 = null;
if (request !== void 0) {
- if (request instanceof Request2) {
+ if (request instanceof Request) {
r5 = request[kState];
if (r5.method !== "GET" && !options.ignoreMethod) {
return [];
}
} else if (typeof request === "string") {
- r5 = new Request2(request)[kState];
+ r5 = new Request(request)[kState];
}
}
const responses = [];
@@ -15882,9 +15882,9 @@ var require_util6 = __commonJS({
}
}
}
- function validateCookiePath(path3) {
- for (let i5 = 0; i5 < path3.length; ++i5) {
- const code = path3.charCodeAt(i5);
+ function validateCookiePath(path4) {
+ for (let i5 = 0; i5 < path4.length; ++i5) {
+ const code = path4.charCodeAt(i5);
if (code < 32 || // exclude CTLs (0-31)
code === 127 || // DEL
code === 59) {
@@ -16138,10 +16138,10 @@ var require_cookies = __commonJS({
var { parseSetCookie } = require_parse();
var { stringify } = require_util6();
var { webidl } = require_webidl();
- var { Headers: Headers3 } = require_headers();
+ var { Headers: Headers2 } = require_headers();
function getCookies(headers) {
webidl.argumentLengthCheck(arguments, 1, "getCookies");
- webidl.brandCheck(headers, Headers3, { strict: false });
+ webidl.brandCheck(headers, Headers2, { strict: false });
const cookie = headers.get("cookie");
const out = {};
if (!cookie) {
@@ -16154,7 +16154,7 @@ var require_cookies = __commonJS({
return out;
}
function deleteCookie(headers, name, attributes) {
- webidl.brandCheck(headers, Headers3, { strict: false });
+ webidl.brandCheck(headers, Headers2, { strict: false });
const prefix = "deleteCookie";
webidl.argumentLengthCheck(arguments, 2, prefix);
name = webidl.converters.DOMString(name, prefix, "name");
@@ -16168,7 +16168,7 @@ var require_cookies = __commonJS({
}
function getSetCookies(headers) {
webidl.argumentLengthCheck(arguments, 1, "getSetCookies");
- webidl.brandCheck(headers, Headers3, { strict: false });
+ webidl.brandCheck(headers, Headers2, { strict: false });
const cookies = headers.getSetCookie();
if (!cookies) {
return [];
@@ -16177,7 +16177,7 @@ var require_cookies = __commonJS({
}
function setCookie(headers, cookie) {
webidl.argumentLengthCheck(arguments, 2, "setCookie");
- webidl.brandCheck(headers, Headers3, { strict: false });
+ webidl.brandCheck(headers, Headers2, { strict: false });
cookie = webidl.converters.Cookie(cookie);
const str = stringify(cookie);
if (str) {
@@ -16867,7 +16867,7 @@ var require_connection = __commonJS({
var { CloseEvent } = require_events();
var { makeRequest } = require_request2();
var { fetching } = require_fetch();
- var { Headers: Headers3, getHeadersList } = require_headers();
+ var { Headers: Headers2, getHeadersList } = require_headers();
var { getDecodeSplit } = require_util2();
var { WebsocketFrameSend } = require_frame();
var crypto4;
@@ -16889,7 +16889,7 @@ var require_connection = __commonJS({
redirect: "error"
});
if (options.headers) {
- const headersList = getHeadersList(new Headers3(options.headers));
+ const headersList = getHeadersList(new Headers2(options.headers));
request.headersList = headersList;
}
const keyValue = crypto4.randomBytes(16).toString("base64");
@@ -17120,7 +17120,7 @@ var require_permessage_deflate = __commonJS({
var require_receiver = __commonJS({
"node_modules/undici/lib/web/websocket/receiver.js"(exports2, module2) {
"use strict";
- var { Writable } = require("node:stream");
+ var { Writable: Writable3 } = require("node:stream");
var assert4 = require("node:assert");
var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants5();
var { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols5();
@@ -17139,7 +17139,7 @@ var require_receiver = __commonJS({
var { closeWebSocketConnection } = require_connection();
var { PerMessageDeflate } = require_permessage_deflate();
var { MessageSizeExceededError } = require_errors();
- var ByteParser = class extends Writable {
+ var ByteParser = class extends Writable3 {
#buffers = [];
#fragmentsBytes = 0;
#byteOffset = 0;
@@ -17977,7 +17977,7 @@ var require_eventsource_stream = __commonJS({
var LF = 10;
var CR = 13;
var COLON = 58;
- var SPACE = 32;
+ var SPACE2 = 32;
var EventSourceStream = class extends Transform {
/**
* @type {eventSourceSettings}
@@ -18127,7 +18127,7 @@ var require_eventsource_stream = __commonJS({
if (colonPosition !== -1) {
field = line.subarray(0, colonPosition).toString("utf8");
let valueStart = colonPosition + 1;
- if (line[valueStart] === SPACE) {
+ if (line[valueStart] === SPACE2) {
++valueStart;
}
value = line.subarray(valueStart).toString("utf8");
@@ -18498,7 +18498,7 @@ var require_eventsource = __commonJS({
var require_undici = __commonJS({
"node_modules/undici/index.js"(exports2, module2) {
"use strict";
- var Client2 = require_client();
+ var Client3 = require_client();
var Dispatcher = require_dispatcher();
var Pool = require_pool();
var BalancedPool = require_balanced_pool();
@@ -18522,7 +18522,7 @@ var require_undici = __commonJS({
var createRedirectInterceptor = require_redirect_interceptor();
Object.assign(Dispatcher.prototype, api);
module2.exports.Dispatcher = Dispatcher;
- module2.exports.Client = Client2;
+ module2.exports.Client = Client3;
module2.exports.Pool = Pool;
module2.exports.BalancedPool = BalancedPool;
module2.exports.Agent = Agent9;
@@ -18561,11 +18561,11 @@ var require_undici = __commonJS({
if (typeof opts.path !== "string") {
throw new InvalidArgumentError("invalid opts.path");
}
- let path3 = opts.path;
+ let path4 = opts.path;
if (!opts.path.startsWith("/")) {
- path3 = `/${path3}`;
+ path4 = `/${path4}`;
}
- url = new URL(util.parseOrigin(url).origin + path3);
+ url = new URL(util.parseOrigin(url).origin + path4);
} else {
if (!opts) {
opts = typeof url === "object" ? url : {};
@@ -18587,7 +18587,7 @@ var require_undici = __commonJS({
module2.exports.setGlobalDispatcher = setGlobalDispatcher;
module2.exports.getGlobalDispatcher = getGlobalDispatcher;
var fetchImpl = require_fetch().fetch;
- module2.exports.fetch = async function fetch2(init, options = void 0) {
+ module2.exports.fetch = async function fetch(init, options = void 0) {
try {
return await fetchImpl(init, options);
} catch (err) {
@@ -18636,6 +18636,351 @@ 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
+ };
+ emitWarningIfUnsupportedVersion = (version) => {
+ if (version && !state.warningEmitted) {
+ if (process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED === "true") {
+ state.warningEmitted = true;
+ 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`);
+ }
+ }
+ };
+ }
+});
+
+// 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);
+ }
+ }
+ 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;
+ }
+ 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 = (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;
+ });
+ },
+ 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;
+ };
+ stepWeights = {
+ initialize: 5,
+ serialize: 4,
+ build: 3,
+ finalizeRequest: 2,
+ deserialize: 1
+ };
+ priorityWeights = {
+ high: 3,
+ normal: 2,
+ low: 1
+ };
+ }
+});
+
// node_modules/@smithy/types/dist-cjs/index.js
var require_dist_cjs = __commonJS({
"node_modules/@smithy/types/dist-cjs/index.js"(exports2) {
@@ -18651,19 +18996,19 @@ var require_dist_cjs = __commonJS({
HttpApiKeyAuthLocation2["QUERY"] = "query";
})(exports2.HttpApiKeyAuthLocation || (exports2.HttpApiKeyAuthLocation = {}));
exports2.EndpointURLScheme = void 0;
- (function(EndpointURLScheme) {
- EndpointURLScheme["HTTP"] = "http";
- EndpointURLScheme["HTTPS"] = "https";
+ (function(EndpointURLScheme2) {
+ EndpointURLScheme2["HTTP"] = "http";
+ EndpointURLScheme2["HTTPS"] = "https";
})(exports2.EndpointURLScheme || (exports2.EndpointURLScheme = {}));
exports2.AlgorithmId = void 0;
- (function(AlgorithmId) {
- AlgorithmId["MD5"] = "md5";
- AlgorithmId["CRC32"] = "crc32";
- AlgorithmId["CRC32C"] = "crc32c";
- AlgorithmId["SHA1"] = "sha1";
- AlgorithmId["SHA256"] = "sha256";
+ (function(AlgorithmId2) {
+ AlgorithmId2["MD5"] = "md5";
+ AlgorithmId2["CRC32"] = "crc32";
+ AlgorithmId2["CRC32C"] = "crc32c";
+ AlgorithmId2["SHA1"] = "sha1";
+ AlgorithmId2["SHA256"] = "sha256";
})(exports2.AlgorithmId || (exports2.AlgorithmId = {}));
- var getChecksumConfiguration = (runtimeConfig) => {
+ var getChecksumConfiguration2 = (runtimeConfig) => {
const checksumAlgorithms = [];
if (runtimeConfig.sha256 !== void 0) {
checksumAlgorithms.push({
@@ -18686,30 +19031,30 @@ var require_dist_cjs = __commonJS({
}
};
};
- var resolveChecksumRuntimeConfig = (clientConfig) => {
+ var resolveChecksumRuntimeConfig2 = (clientConfig) => {
const runtimeConfig = {};
clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();
});
return runtimeConfig;
};
- var getDefaultClientConfiguration = (runtimeConfig) => {
- return getChecksumConfiguration(runtimeConfig);
+ var getDefaultClientConfiguration2 = (runtimeConfig) => {
+ return getChecksumConfiguration2(runtimeConfig);
};
- var resolveDefaultRuntimeConfig5 = (config) => {
- return resolveChecksumRuntimeConfig(config);
+ var resolveDefaultRuntimeConfig2 = (config) => {
+ return resolveChecksumRuntimeConfig2(config);
};
exports2.FieldPosition = void 0;
- (function(FieldPosition) {
- FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER";
- FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER";
+ (function(FieldPosition2) {
+ FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER";
+ FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER";
})(exports2.FieldPosition || (exports2.FieldPosition = {}));
- var SMITHY_CONTEXT_KEY2 = "__smithy_context";
+ var SMITHY_CONTEXT_KEY3 = "__smithy_context";
exports2.IniSectionType = void 0;
- (function(IniSectionType) {
- IniSectionType["PROFILE"] = "profile";
- IniSectionType["SSO_SESSION"] = "sso-session";
- IniSectionType["SERVICES"] = "services";
+ (function(IniSectionType4) {
+ IniSectionType4["PROFILE"] = "profile";
+ IniSectionType4["SSO_SESSION"] = "sso-session";
+ IniSectionType4["SERVICES"] = "services";
})(exports2.IniSectionType || (exports2.IniSectionType = {}));
exports2.RequestHandlerProtocol = void 0;
(function(RequestHandlerProtocol) {
@@ -18717,84 +19062,35 @@ 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_KEY2;
- exports2.getDefaultClientConfiguration = getDefaultClientConfiguration;
- exports2.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig5;
+ exports2.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY3;
+ exports2.getDefaultClientConfiguration = getDefaultClientConfiguration2;
+ exports2.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig2;
}
});
-// 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();
- }
- };
+// node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js
+var import_types, getSmithyContext;
+var init_getSmithyContext = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js"() {
+ import_types = __toESM(require_dist_cjs());
+ getSmithyContext = (context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {});
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js
+function cloneQuery(query) {
+ return Object.keys(query).reduce((carry, paramName) => {
+ const param = query[paramName];
+ return {
+ ...carry,
+ [paramName]: Array.isArray(param) ? [...param] : param
};
- var 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 {
+ }, {});
+}
+var HttpRequest;
+var init_httpRequest = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js"() {
+ HttpRequest = class _HttpRequest {
method;
protocol;
hostname;
@@ -18840,16 +19136,14 @@ var require_dist_cjs2 = __commonJS({
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 {
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js
+var HttpResponse;
+var init_httpResponse = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js"() {
+ HttpResponse = class {
statusCode;
reason;
headers;
@@ -18867,524 +19161,43 @@ var require_dist_cjs2 = __commonJS({
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;
+// node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js
+var VALID_HOST_LABEL_REGEX, isValidHostLabel;
+var init_isValidHostLabel = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js"() {
+ VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
+ isValidHostLabel = (value, allowSubDomains = false) => {
+ if (!allowSubDomains) {
+ return VALID_HOST_LABEL_REGEX.test(value);
}
- 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 (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;
- }
- };
- 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/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/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);
- }
+ const labels = value.split(".");
+ for (const label of labels) {
+ if (!isValidHostLabel(label)) {
+ return false;
}
}
- for (const candidateAuthOption of candidateAuthOptions) {
- if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {
- preferredAuthOptions.push(candidateAuthOption);
- }
- }
- return preferredAuthOptions;
+ return true;
};
}
});
-// 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;
+// node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js
+function isValidHostname(hostname) {
+ const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
+ return hostPattern.test(hostname);
}
-var 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);
- };
+var init_isValidHostname = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js"() {
}
});
-// 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) => (error3) => {
- throw error3;
- };
- 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
+// node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js
var normalizeProvider;
var init_normalizeProvider = __esm({
- "node_modules/@smithy/core/dist-es/normalizeProvider.js"() {
+ "node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js"() {
normalizeProvider = (input) => {
if (typeof input === "function")
return input;
@@ -19394,2150 +19207,400 @@ var init_normalizeProvider = __esm({
}
});
-// 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;
+// node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js
+function parseQueryString(querystring) {
+ const query = {};
+ querystring = querystring.replace(/^\?/, "");
+ if (querystring) {
+ for (const pair of querystring.split("&")) {
+ let [key, value = null] = pair.split("=");
+ key = decodeURIComponent(key);
+ if (value) {
+ value = decodeURIComponent(value);
}
- if (config.client instanceof ClientCtor) {
- page = await makePagedClientRequest(CommandCtor, config.client, input, config.withCommand, ...additionalArguments);
+ if (!(key in query)) {
+ query[key] = value;
+ } else if (Array.isArray(query[key])) {
+ query[key].push(value);
} else {
- throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);
+ query[key] = [query[key], value];
}
- yield page;
- const prevToken = token;
- token = get(page, outputTokenName);
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
}
- return void 0;
- };
+ }
+ return query;
}
-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);
+var init_parseQueryString = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js"() {
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js
+var parseUrl;
+var init_parseUrl = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js"() {
+ init_parseQueryString();
+ parseUrl = (url) => {
+ if (typeof url === "string") {
+ return parseUrl(new URL(url));
+ }
+ const { hostname, pathname, port, protocol, search } = url;
+ let query;
+ if (search) {
+ query = parseQueryString(search);
+ }
+ return {
+ hostname,
+ port: port ? parseInt(port) : void 0,
+ protocol,
+ path: pathname,
+ query
+ };
};
- get = (fromObject, path3) => {
- let cursor2 = fromObject;
- const pathComponents = path3.split(".");
- for (const step of pathComponents) {
- if (!cursor2 || typeof cursor2 !== "object") {
- return void 0;
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js
+var toEndpointV1;
+var init_toEndpointV1 = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js"() {
+ init_parseUrl();
+ toEndpointV1 = (endpoint) => {
+ if (typeof endpoint === "object") {
+ if ("url" in endpoint) {
+ const v1Endpoint = parseUrl(endpoint.url);
+ if (endpoint.headers) {
+ v1Endpoint.headers = {};
+ for (const name in endpoint.headers) {
+ v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
+ }
+ }
+ return v1Endpoint;
}
- cursor2 = cursor2[step];
+ return endpoint;
}
- return cursor2;
+ return parseUrl(endpoint);
};
}
});
-// 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/transport/index.js
+var init_transport = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/transport/index.js"() {
+ init_getSmithyContext();
+ init_httpRequest();
+ init_httpResponse();
+ init_isValidHostLabel();
+ init_isValidHostname();
+ init_normalizeProvider();
+ init_parseQueryString();
+ init_parseUrl();
+ init_toEndpointV1();
}
});
-// node_modules/@smithy/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);
+// 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);
};
- 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/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/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/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);
+// 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;
+ };
};
- var toUint8Array2 = (data3) => {
- if (typeof data3 === "string") {
- return fromUtf88(data3);
- }
- 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/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");
+// 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));
};
- exports2.toBase64 = toBase649;
}
});
-// 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/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
+ };
+ (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())}`);
+ }
+ return result;
+ };
}
});
-// 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;
+// 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;
+ }
+ }
+ };
+ 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);
+ }
+});
+
+// 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/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);
} else {
- throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
+ abortSignal.onabort = 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;
+ });
+ return {
+ clearListener() {
+ if (typeof abortSignal.removeEventListener === "function") {
+ abortSignal.removeEventListener("abort", onAbort);
}
- } 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() {
},
- 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, 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);
- }
- }
- }
+ aborted: promise
};
- 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/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);
- }
- }
- 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;
- }
- 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 {
- request.on("socket", doWithSocket);
- }
+ createWaiter = async (options, input, acceptorChecks) => {
+ const params = {
+ ...waiterServiceDefaults,
+ ...options
};
- if (timeoutInMs < 2e3) {
- registerTimeout(0);
- return 0;
+ 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);
}
- 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);
+ if (options.abortController?.signal) {
+ const { aborted, clearListener } = abortTimeout(options.abortController.signal);
+ finalize.push(clearListener);
+ exitConditions.push(aborted);
}
- 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);
- });
+ return Promise.race(exitConditions).then((result) => {
+ for (const fn of finalize) {
+ fn();
}
- };
- if (deferTimeMs === 0) {
- registerListener();
- return 0;
- }
- return timing.setTimeout(registerListener, deferTimeMs);
+ return result;
+ });
};
- 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 {
+ }
+});
+
+// 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;
- 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: 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;
- connectionPools = /* @__PURE__ */ new Map();
+ middlewareStack = constructStack();
+ initConfig;
+ handlers;
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 { protocol, protocolSettings } = config;
+ if (protocolSettings) {
+ if (typeof protocol === "function") {
+ config.protocol = new protocol(protocolSettings);
}
}
- 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();
+ 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();
}
- 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);
+ const handlers = this.handlers;
+ if (handlers.has(command.constructor)) {
+ handler = handlers.get(command.constructor);
} else {
- resolve(options || {});
+ handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
+ handlers.set(command.constructor, handler);
}
- });
- }
- 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);
+ delete this.handlers;
+ handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
}
- if (keepAliveSupport.supported === void 0) {
- keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]"));
+ if (callback) {
+ handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => {
+ });
+ } else {
+ return handler(command).then((result) => result.output);
}
}
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 ?? {};
+ this.config?.requestHandler?.destroy?.();
+ delete this.handlers;
}
};
- 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"() {
}
});
@@ -21569,15 +19632,14 @@ var init_operation = __esm({
});
// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js
-var import_protocol_http2, import_util_middleware3, schemaDeserializationMiddleware, findHeader;
+var 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_transport();
init_operation();
schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {
const { response } = await next(args);
- const { operationSchema } = (0, import_util_middleware3.getSmithyContext)(context);
+ const { operationSchema } = getSmithyContext(context);
const [, ns, n3, t, i5, o2] = operationSchema ?? [];
try {
const parsed = await config.protocol.deserializeResponse(operation(ns, n3, t, i5, o2), {
@@ -21612,11 +19674,11 @@ var init_schemaDeserializationMiddleware = __esm({
}
}
try {
- if (import_protocol_http2.HttpResponse.isInstance(response)) {
- const { headers = {} } = response;
+ if (HttpResponse.isInstance(response)) {
+ const { headers = {}, statusCode } = response;
const headerEntries = Object.entries(headers);
error3.$metadata = {
- httpStatusCode: response.statusCode,
+ httpStatusCode: statusCode,
requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
@@ -21636,105 +19698,14 @@ var init_schemaDeserializationMiddleware = __esm({
}
});
-// 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;
- }
-});
-
-// 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 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_transport();
init_operation();
schemaSerializationMiddleware = (config) => (next, context) => async (args) => {
- const { operationSchema } = (0, import_util_middleware4.getSmithyContext)(context);
+ 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, {
@@ -22333,6 +20304,18 @@ var init_TypeRegistry = __esm({
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);
@@ -22437,6 +20420,877 @@ var init_schema = __esm({
}
});
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js
+function schemaLogFilter(schema, data3) {
+ if (data3 == null) {
+ return data3;
+ }
+ const ns = NormalizedSchema.of(schema);
+ if (ns.getMergedTraits().sensitive) {
+ return SENSITIVE_STRING;
+ }
+ if (ns.isListSchema()) {
+ const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive;
+ if (isSensitive) {
+ return SENSITIVE_STRING;
+ }
+ } else if (ns.isMapSchema()) {
+ const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive;
+ if (isSensitive) {
+ return SENSITIVE_STRING;
+ }
+ } else if (ns.isStructSchema() && typeof data3 === "object") {
+ const object = data3;
+ const newObject = {};
+ for (const [member2, memberNs] of ns.structIterator()) {
+ if (object[member2] != null) {
+ newObject[member2] = schemaLogFilter(memberNs, object[member2]);
+ }
+ }
+ return newObject;
+ }
+ return data3;
+}
+var SENSITIVE_STRING;
+var init_schemaLogFilter = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js"() {
+ init_schema();
+ SENSITIVE_STRING = "***SensitiveInformation***";
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js
+var import_types2, Command2, ClassBuilder;
+var init_command = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js"() {
+ import_types2 = __toESM(require_dist_cjs());
+ init_MiddlewareStack();
+ init_schemaLogFilter();
+ Command2 = class {
+ middlewareStack = constructStack();
+ schema;
+ static classBuilder() {
+ return new ClassBuilder();
+ }
+ resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) {
+ for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {
+ this.middlewareStack.use(mw);
+ }
+ const stack = clientStack.concat(this.middlewareStack);
+ const { logger: logger2 } = configuration;
+ const handlerExecutionContext = {
+ logger: logger2,
+ clientName,
+ commandName,
+ inputFilterSensitiveLog,
+ outputFilterSensitiveLog,
+ [import_types2.SMITHY_CONTEXT_KEY]: {
+ commandInstance: this,
+ ...smithyContext
+ },
+ ...additionalContext
+ };
+ const { requestHandler } = configuration;
+ let requestOptions = options ?? {};
+ if (smithyContext.eventStream) {
+ requestOptions = {
+ isEventStream: true,
+ ...requestOptions
+ };
+ }
+ return stack.resolve((request) => requestHandler.handle(request.request, requestOptions), handlerExecutionContext);
+ }
+ };
+ ClassBuilder = class {
+ _init = () => {
+ };
+ _ep = {};
+ _middlewareFn = () => [];
+ _commandName = "";
+ _clientName = "";
+ _additionalContext = {};
+ _smithyContext = {};
+ _inputFilterSensitiveLog = void 0;
+ _outputFilterSensitiveLog = void 0;
+ _serializer = null;
+ _deserializer = null;
+ _operationSchema;
+ init(cb) {
+ this._init = cb;
+ }
+ ep(endpointParameterInstructions) {
+ this._ep = endpointParameterInstructions;
+ return this;
+ }
+ m(middlewareSupplier) {
+ this._middlewareFn = middlewareSupplier;
+ return this;
+ }
+ s(service, operation2, smithyContext = {}) {
+ this._smithyContext = {
+ service,
+ operation: operation2,
+ ...smithyContext
+ };
+ return this;
+ }
+ c(additionalContext = {}) {
+ this._additionalContext = additionalContext;
+ return this;
+ }
+ n(clientName, commandName) {
+ this._clientName = clientName;
+ this._commandName = commandName;
+ return this;
+ }
+ f(inputFilter = (_) => _, outputFilter = (_) => _) {
+ this._inputFilterSensitiveLog = inputFilter;
+ this._outputFilterSensitiveLog = outputFilter;
+ return this;
+ }
+ ser(serializer) {
+ this._serializer = serializer;
+ return this;
+ }
+ de(deserializer) {
+ this._deserializer = deserializer;
+ return this;
+ }
+ sc(operation2) {
+ this._operationSchema = operation2;
+ this._smithyContext.operationSchema = operation2;
+ return this;
+ }
+ build() {
+ const closure = this;
+ let CommandRef;
+ return CommandRef = class extends Command2 {
+ input;
+ static getEndpointParameterInstructions() {
+ return closure._ep;
+ }
+ constructor(...[input]) {
+ super();
+ this.input = input ?? {};
+ closure._init(this);
+ this.schema = closure._operationSchema;
+ }
+ resolveMiddleware(stack, configuration, options) {
+ const op2 = closure._operationSchema;
+ const input = op2?.[4] ?? op2?.input;
+ const output = op2?.[5] ?? op2?.output;
+ return this.resolveMiddlewareWithContext(stack, configuration, options, {
+ CommandCtor: CommandRef,
+ middlewareFn: closure._middlewareFn,
+ clientName: closure._clientName,
+ commandName: closure._commandName,
+ inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, input) : (_) => _),
+ outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, output) : (_) => _),
+ smithyContext: closure._smithyContext,
+ additionalContext: closure._additionalContext
+ });
+ }
+ serialize = closure._serializer;
+ deserialize = closure._deserializer;
+ };
+ }
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js
+var SENSITIVE_STRING2;
+var init_constants = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js"() {
+ SENSITIVE_STRING2 = "***SensitiveInformation***";
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js
+var createAggregatedClient;
+var init_create_aggregated_client = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js"() {
+ createAggregatedClient = (commands5, Client3, options) => {
+ for (const [command, CommandCtor] of Object.entries(commands5)) {
+ const methodImpl = async function(args, optionsOrCb, cb) {
+ const command2 = new CommandCtor(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command2, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expected http options but got ${typeof optionsOrCb}`);
+ this.send(command2, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command2, optionsOrCb);
+ }
+ };
+ const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, "");
+ Client3.prototype[methodName] = methodImpl;
+ }
+ const { paginators = {}, waiters = {} } = options ?? {};
+ for (const [paginatorName, paginatorFn] of Object.entries(paginators)) {
+ if (Client3.prototype[paginatorName] === void 0) {
+ Client3.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) {
+ return paginatorFn({
+ ...paginationConfiguration,
+ client: this
+ }, commandInput, ...rest);
+ };
+ }
+ }
+ for (const [waiterName, waiterFn] of Object.entries(waiters)) {
+ if (Client3.prototype[waiterName] === void 0) {
+ Client3.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) {
+ let config = waiterConfiguration;
+ if (typeof waiterConfiguration === "number") {
+ config = {
+ maxWaitTime: waiterConfiguration
+ };
+ }
+ return waiterFn({
+ ...config,
+ client: this
+ }, commandInput, ...rest);
+ };
+ }
+ }
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js
+var ServiceException, decorateServiceException;
+var init_exceptions = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js"() {
+ ServiceException = class _ServiceException extends Error {
+ $fault;
+ $response;
+ $retryable;
+ $metadata;
+ constructor(options) {
+ super(options.message);
+ Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);
+ this.name = options.name;
+ this.$fault = options.$fault;
+ this.$metadata = options.$metadata;
+ }
+ static isInstance(value) {
+ if (!value)
+ return false;
+ const candidate = value;
+ return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server");
+ }
+ static [Symbol.hasInstance](instance) {
+ if (!instance)
+ return false;
+ const candidate = instance;
+ if (this === _ServiceException) {
+ return _ServiceException.isInstance(instance);
+ }
+ if (_ServiceException.isInstance(instance)) {
+ if (candidate.name && this.name) {
+ return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;
+ }
+ return this.prototype.isPrototypeOf(instance);
+ }
+ return false;
+ }
+ };
+ decorateServiceException = (exception, additions = {}) => {
+ Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k5, v]) => {
+ if (exception[k5] == void 0 || exception[k5] === "") {
+ exception[k5] = v;
+ }
+ });
+ const message = exception.message || exception.Message || "UnknownError";
+ exception.message = message;
+ delete exception.Message;
+ return exception;
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js
+var throwDefaultError, withBaseException, deserializeMetadata;
+var init_default_error_handler = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js"() {
+ init_exceptions();
+ throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {
+ const $metadata = deserializeMetadata(output);
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
+ const response = new exceptionCtor({
+ name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError",
+ $fault: "client",
+ $metadata
+ });
+ throw decorateServiceException(response, parsedBody);
+ };
+ withBaseException = (ExceptionCtor) => {
+ return ({ output, parsedBody, errorCode }) => {
+ throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });
+ };
+ };
+ deserializeMetadata = (output) => ({
+ httpStatusCode: output.statusCode,
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
+ extendedRequestId: output.headers["x-amz-id-2"],
+ cfId: output.headers["x-amz-cf-id"]
+ });
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js
+var loadConfigsForDefaultMode;
+var init_defaults_mode = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js"() {
+ loadConfigsForDefaultMode = (mode) => {
+ switch (mode) {
+ case "standard":
+ return {
+ retryMode: "standard",
+ connectionTimeout: 3100
+ };
+ case "in-region":
+ return {
+ retryMode: "standard",
+ connectionTimeout: 1100
+ };
+ case "cross-region":
+ return {
+ retryMode: "standard",
+ connectionTimeout: 3100
+ };
+ case "mobile":
+ return {
+ retryMode: "standard",
+ connectionTimeout: 3e4
+ };
+ default:
+ return {};
+ }
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js
+var warningEmitted, emitWarningIfUnsupportedVersion2;
+var init_emitWarningIfUnsupportedVersion2 = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js"() {
+ warningEmitted = false;
+ emitWarningIfUnsupportedVersion2 = (version) => {
+ if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) {
+ warningEmitted = true;
+ }
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js
+var import_types3, knownAlgorithms, getChecksumConfiguration, resolveChecksumRuntimeConfig;
+var init_checksum = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js"() {
+ import_types3 = __toESM(require_dist_cjs());
+ knownAlgorithms = Object.values(import_types3.AlgorithmId);
+ getChecksumConfiguration = (runtimeConfig) => {
+ const checksumAlgorithms = [];
+ for (const id in import_types3.AlgorithmId) {
+ const algorithmId = import_types3.AlgorithmId[id];
+ if (runtimeConfig[algorithmId] === void 0) {
+ continue;
+ }
+ checksumAlgorithms.push({
+ algorithmId: () => algorithmId,
+ checksumConstructor: () => runtimeConfig[algorithmId]
+ });
+ }
+ for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) {
+ checksumAlgorithms.push({
+ algorithmId: () => id,
+ checksumConstructor: () => ChecksumCtor
+ });
+ }
+ return {
+ addChecksumAlgorithm(algo) {
+ runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {};
+ const id = algo.algorithmId();
+ const ctor = algo.checksumConstructor();
+ if (knownAlgorithms.includes(id)) {
+ runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor;
+ } else {
+ runtimeConfig.checksumAlgorithms[id] = ctor;
+ }
+ checksumAlgorithms.push(algo);
+ },
+ checksumAlgorithms() {
+ return checksumAlgorithms;
+ }
+ };
+ };
+ resolveChecksumRuntimeConfig = (clientConfig) => {
+ const runtimeConfig = {};
+ clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
+ const id = checksumAlgorithm.algorithmId();
+ if (knownAlgorithms.includes(id)) {
+ runtimeConfig[id] = checksumAlgorithm.checksumConstructor();
+ }
+ });
+ return runtimeConfig;
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js
+var getRetryConfiguration, resolveRetryRuntimeConfig;
+var init_retry = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js"() {
+ getRetryConfiguration = (runtimeConfig) => {
+ return {
+ setRetryStrategy(retryStrategy) {
+ runtimeConfig.retryStrategy = retryStrategy;
+ },
+ retryStrategy() {
+ return runtimeConfig.retryStrategy;
+ }
+ };
+ };
+ resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {
+ const runtimeConfig = {};
+ runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();
+ return runtimeConfig;
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js
+var getDefaultExtensionConfiguration, getDefaultClientConfiguration, resolveDefaultRuntimeConfig;
+var init_defaultExtensionConfiguration = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js"() {
+ init_checksum();
+ init_retry();
+ getDefaultExtensionConfiguration = (runtimeConfig) => {
+ return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));
+ };
+ getDefaultClientConfiguration = getDefaultExtensionConfiguration;
+ resolveDefaultRuntimeConfig = (config) => {
+ return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js
+var getArrayIfSingleItem;
+var init_get_array_if_single_item = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js"() {
+ getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js
+var getValueFromTextNode;
+var init_get_value_from_text_node = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js"() {
+ getValueFromTextNode = (obj) => {
+ const textNodeName = "#text";
+ for (const key in obj) {
+ if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) {
+ obj[key] = obj[key][textNodeName];
+ } else if (typeof obj[key] === "object" && obj[key] !== null) {
+ obj[key] = getValueFromTextNode(obj[key]);
+ }
+ }
+ return obj;
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js
+var isSerializableHeaderValue;
+var init_is_serializable_header_value = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js"() {
+ isSerializableHeaderValue = (value) => {
+ return value != null;
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js
+var NoOpLogger;
+var init_NoOpLogger = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js"() {
+ NoOpLogger = class {
+ trace() {
+ }
+ debug() {
+ }
+ info() {
+ }
+ warn() {
+ }
+ error() {
+ }
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js
+function map2(arg0, arg1, arg2) {
+ let target;
+ let filter;
+ let instructions;
+ if (typeof arg1 === "undefined" && typeof arg2 === "undefined") {
+ target = {};
+ instructions = arg0;
+ } else {
+ target = arg0;
+ if (typeof arg1 === "function") {
+ filter = arg1;
+ instructions = arg2;
+ return mapWithFilter(target, filter, instructions);
+ } else {
+ instructions = arg1;
+ }
+ }
+ for (const key of Object.keys(instructions)) {
+ if (!Array.isArray(instructions[key])) {
+ target[key] = instructions[key];
+ continue;
+ }
+ applyInstruction(target, null, instructions, key);
+ }
+ return target;
+}
+var convertMap, take, mapWithFilter, applyInstruction, nonNullish, pass;
+var init_object_mapping = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js"() {
+ convertMap = (target) => {
+ const output = {};
+ for (const [k5, v] of Object.entries(target || {})) {
+ output[k5] = [, v];
+ }
+ return output;
+ };
+ take = (source, instructions) => {
+ const out = {};
+ for (const key in instructions) {
+ applyInstruction(out, source, instructions, key);
+ }
+ return out;
+ };
+ mapWithFilter = (target, filter, instructions) => {
+ return map2(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {
+ if (Array.isArray(value)) {
+ _instructions[key] = value;
+ } else {
+ if (typeof value === "function") {
+ _instructions[key] = [filter, value()];
+ } else {
+ _instructions[key] = [filter, value];
+ }
+ }
+ return _instructions;
+ }, {}));
+ };
+ applyInstruction = (target, source, instructions, targetKey) => {
+ if (source !== null) {
+ let instruction = instructions[targetKey];
+ if (typeof instruction === "function") {
+ instruction = [, instruction];
+ }
+ const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;
+ if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) {
+ target[targetKey] = valueFn(source[sourceKey]);
+ }
+ return;
+ }
+ let [filter, value] = instructions[targetKey];
+ if (typeof value === "function") {
+ let _value;
+ const defaultFilterPassed = filter === void 0 && (_value = value()) != null;
+ const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter;
+ if (defaultFilterPassed) {
+ target[targetKey] = _value;
+ } else if (customFilterPassed) {
+ target[targetKey] = value();
+ }
+ } else {
+ const defaultFilterPassed = filter === void 0 && value != null;
+ const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter;
+ if (defaultFilterPassed || customFilterPassed) {
+ target[targetKey] = value;
+ }
+ }
+ };
+ nonNullish = (_) => _ != null;
+ pass = (_) => _;
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js
+var serializeFloat, serializeDateTime;
+var init_ser_utils = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js"() {
+ serializeFloat = (value) => {
+ if (value !== value) {
+ return "NaN";
+ }
+ switch (value) {
+ case Infinity:
+ return "Infinity";
+ case -Infinity:
+ return "-Infinity";
+ default:
+ return value;
+ }
+ };
+ serializeDateTime = (date2) => date2.toISOString().replace(".000Z", "Z");
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js
+var _json;
+var init_serde_json = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js"() {
+ _json = (obj) => {
+ if (obj == null) {
+ return {};
+ }
+ if (Array.isArray(obj)) {
+ return obj.filter((_) => _ != null).map(_json);
+ }
+ if (typeof obj === "object") {
+ const target = {};
+ for (const key of Object.keys(obj)) {
+ if (obj[key] == null) {
+ continue;
+ }
+ target[key] = _json(obj[key]);
+ }
+ return target;
+ }
+ return obj;
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/client/index.js
+var client_exports = {};
+__export(client_exports, {
+ AlgorithmId: () => import_types3.AlgorithmId,
+ Client: () => Client,
+ Command: () => Command2,
+ NoOpLogger: () => NoOpLogger,
+ SENSITIVE_STRING: () => SENSITIVE_STRING2,
+ ServiceException: () => ServiceException,
+ WaiterState: () => WaiterState,
+ _json: () => _json,
+ checkExceptions: () => checkExceptions,
+ constructStack: () => constructStack,
+ convertMap: () => convertMap,
+ createAggregatedClient: () => createAggregatedClient,
+ createWaiter: () => createWaiter,
+ decorateServiceException: () => decorateServiceException,
+ emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion2,
+ getArrayIfSingleItem: () => getArrayIfSingleItem,
+ getChecksumConfiguration: () => getChecksumConfiguration,
+ getDefaultClientConfiguration: () => getDefaultClientConfiguration,
+ getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration,
+ getRetryConfiguration: () => getRetryConfiguration,
+ getSmithyContext: () => getSmithyContext,
+ getValueFromTextNode: () => getValueFromTextNode,
+ invalidFunction: () => invalidFunction,
+ invalidProvider: () => invalidProvider,
+ isSerializableHeaderValue: () => isSerializableHeaderValue,
+ loadConfigsForDefaultMode: () => loadConfigsForDefaultMode,
+ map: () => map2,
+ normalizeProvider: () => normalizeProvider,
+ resolveChecksumRuntimeConfig: () => resolveChecksumRuntimeConfig,
+ resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig,
+ resolveRetryRuntimeConfig: () => resolveRetryRuntimeConfig,
+ schemaLogFilter: () => schemaLogFilter,
+ serializeDateTime: () => serializeDateTime,
+ serializeFloat: () => serializeFloat,
+ take: () => take,
+ throwDefaultError: () => throwDefaultError,
+ waiterServiceDefaults: () => waiterServiceDefaults,
+ withBaseException: () => withBaseException
+});
+var init_client2 = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/client/index.js"() {
+ init_MiddlewareStack();
+ init_transport();
+ init_transport();
+ init_invalidFunction();
+ init_invalidProvider();
+ init_createWaiter();
+ init_waiter();
+ init_client();
+ init_command();
+ init_constants();
+ init_create_aggregated_client();
+ init_default_error_handler();
+ init_defaults_mode();
+ init_emitWarningIfUnsupportedVersion2();
+ init_exceptions();
+ init_defaultExtensionConfiguration();
+ init_checksum();
+ init_retry();
+ init_get_array_if_single_item();
+ init_get_value_from_text_node();
+ init_is_serializable_header_value();
+ init_NoOpLogger();
+ init_object_mapping();
+ init_schemaLogFilter();
+ init_ser_utils();
+ init_serde_json();
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js
+var isArrayBuffer;
+var init_is_array_buffer = __esm({
+ "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/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));
+ }
+ return Uint8ArrayBlobAdapter2.mutate(fromUtf83(source));
+ }
+ 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");
+ };
+ }
+});
+
+// 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();
+ }
+ 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]];
+ };
+}
+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"));
+ }
+});
+
// node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js
var copyDocumentWithTransform;
var init_copyDocumentWithTransform = __esm({
@@ -22873,6 +21727,3889 @@ var init_date_utils = __esm({
}
});
+// node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js
+var LazyJsonString;
+var init_lazy_json = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js"() {
+ LazyJsonString = function LazyJsonString2(val) {
+ const str = Object.assign(new String(val), {
+ deserializeJSON() {
+ return JSON.parse(String(val));
+ },
+ toString() {
+ return String(val);
+ },
+ toJSON() {
+ return String(val);
+ }
+ });
+ return str;
+ };
+ LazyJsonString.from = (object) => {
+ if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) {
+ return object;
+ } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
+ return LazyJsonString(String(object));
+ }
+ return LazyJsonString(JSON.stringify(object));
+ };
+ LazyJsonString.fromObject = LazyJsonString.from;
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js
+function quoteHeader(part) {
+ if (part.includes(",") || part.includes('"')) {
+ part = `"${part.replace(/"/g, '\\"')}"`;
+ }
+ return part;
+}
+var init_quote_header = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js"() {
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js
+function range(v, min, max) {
+ const _v = Number(v);
+ if (_v < min || _v > max) {
+ throw new Error(`Value ${_v} out of range [${min}, ${max}]`);
+ }
+}
+var ddd, mmm, time, date, year, RFC3339_WITH_OFFSET2, IMF_FIXDATE2, RFC_850_DATE2, ASC_TIME2, months, _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime;
+var init_schema_date_utils = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js"() {
+ ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
+ mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
+ time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
+ date = `(\\d?\\d)`;
+ year = `(\\d{4})`;
+ RFC3339_WITH_OFFSET2 = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
+ IMF_FIXDATE2 = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);
+ RFC_850_DATE2 = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`);
+ ASC_TIME2 = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`);
+ months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
+ _parseEpochTimestamp = (value) => {
+ if (value == null) {
+ return void 0;
+ }
+ let num = NaN;
+ if (typeof value === "number") {
+ num = value;
+ } else if (typeof value === "string") {
+ if (!/^-?\d*\.?\d+$/.test(value)) {
+ throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
+ }
+ num = Number.parseFloat(value);
+ } else if (typeof value === "object" && value.tag === 1) {
+ num = value.value;
+ }
+ if (isNaN(num) || Math.abs(num) === Infinity) {
+ throw new TypeError("Epoch timestamps must be valid finite numbers.");
+ }
+ return new Date(Math.round(num * 1e3));
+ };
+ _parseRfc3339DateTimeWithOffset = (value) => {
+ if (value == null) {
+ return void 0;
+ }
+ if (typeof value !== "string") {
+ throw new TypeError("RFC3339 timestamps must be strings");
+ }
+ const matches = RFC3339_WITH_OFFSET2.exec(value);
+ if (!matches) {
+ throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);
+ }
+ const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;
+ range(monthStr, 1, 12);
+ range(dayStr, 1, 31);
+ range(hours, 0, 23);
+ range(minutes, 0, 59);
+ range(seconds, 0, 60);
+ const date2 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0));
+ date2.setUTCFullYear(Number(yearStr));
+ if (offsetStr.toUpperCase() != "Z") {
+ const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0];
+ const scalar = sign === "-" ? 1 : -1;
+ date2.setTime(date2.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1e3 + Number(offsetM) * 60 * 1e3));
+ }
+ return date2;
+ };
+ _parseRfc7231DateTime = (value) => {
+ if (value == null) {
+ return void 0;
+ }
+ if (typeof value !== "string") {
+ throw new TypeError("RFC7231 timestamps must be strings.");
+ }
+ let day;
+ let month;
+ let year2;
+ let hour;
+ let minute;
+ let second;
+ let fraction;
+ let matches;
+ if (matches = IMF_FIXDATE2.exec(value)) {
+ [, day, month, year2, hour, minute, second, fraction] = matches;
+ } else if (matches = RFC_850_DATE2.exec(value)) {
+ [, day, month, year2, hour, minute, second, fraction] = matches;
+ year2 = (Number(year2) + 1900).toString();
+ } else if (matches = ASC_TIME2.exec(value)) {
+ [, month, day, hour, minute, second, fraction, year2] = matches;
+ }
+ if (year2 && second) {
+ const timestamp = Date.UTC(Number(year2), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0);
+ range(day, 1, 31);
+ range(hour, 0, 23);
+ range(minute, 0, 59);
+ range(second, 0, 60);
+ const date2 = new Date(timestamp);
+ date2.setUTCFullYear(Number(year2));
+ return date2;
+ }
+ throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/serde/split-every.js
+function splitEvery(value, delimiter, numDelimiters) {
+ if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {
+ throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery.");
+ }
+ const segments = value.split(delimiter);
+ if (numDelimiters === 1) {
+ return segments;
+ }
+ const compoundSegments = [];
+ let currentSegment = "";
+ for (let i5 = 0; i5 < segments.length; i5++) {
+ if (currentSegment === "") {
+ currentSegment = segments[i5];
+ } else {
+ currentSegment += delimiter + segments[i5];
+ }
+ if ((i5 + 1) % numDelimiters === 0) {
+ compoundSegments.push(currentSegment);
+ currentSegment = "";
+ }
+ }
+ if (currentSegment !== "") {
+ compoundSegments.push(currentSegment);
+ }
+ return compoundSegments;
+}
+var init_split_every = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/serde/split-every.js"() {
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/serde/split-header.js
+var splitHeader;
+var init_split_header = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() {
+ splitHeader = (value) => {
+ const z = value.length;
+ const values = [];
+ let withinQuotes = false;
+ let prevChar = void 0;
+ let anchor = 0;
+ for (let i5 = 0; i5 < z; ++i5) {
+ const char = value[i5];
+ switch (char) {
+ case `"`:
+ if (prevChar !== "\\") {
+ withinQuotes = !withinQuotes;
+ }
+ break;
+ case ",":
+ if (!withinQuotes) {
+ values.push(value.slice(anchor, i5));
+ anchor = i5 + 1;
+ }
+ break;
+ default:
+ }
+ prevChar = char;
+ }
+ values.push(value.slice(anchor));
+ return values.map((v) => {
+ v = v.trim();
+ const z2 = v.length;
+ if (z2 < 2) {
+ return v;
+ }
+ if (v[0] === `"` && v[z2 - 1] === `"`) {
+ v = v.slice(1, z2 - 1);
+ }
+ return v.replace(/\\"/g, '"');
+ });
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js
+function nv(input) {
+ return new NumericValue(String(input), "bigDecimal");
+}
+var format, NumericValue;
+var init_NumericValue = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js"() {
+ format = /^-?\d*(\.\d+)?$/;
+ NumericValue = class _NumericValue {
+ string;
+ type;
+ constructor(string, type) {
+ this.string = string;
+ this.type = type;
+ if (!format.test(string)) {
+ throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
+ }
+ }
+ toString() {
+ return this.string;
+ }
+ static [Symbol.hasInstance](object) {
+ if (!object || typeof object !== "object") {
+ return false;
+ }
+ const _nv = object;
+ return _NumericValue.prototype.isPrototypeOf(object) || _nv.type === "bigDecimal" && format.test(_nv.string);
+ }
+ };
+ }
+});
+
+// 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, findHeader2;
+var init_deserializerMiddleware = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js"() {
+ init_transport();
+ 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: 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/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_constants2 = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js"() {
+ CONFIG_PREFIX_SEPARATOR = ".";
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js
+var import_types4, getConfigData;
+var init_getConfigData = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js"() {
+ import_types4 = __toESM(require_dist_cjs());
+ init_constants2();
+ getConfigData = (data3) => Object.entries(data3).filter(([key]) => {
+ const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
+ if (indexOfSeparator === -1) {
+ return false;
+ }
+ return Object.values(import_types4.IniSectionType).includes(key.substring(0, indexOfSeparator));
+ }).reduce((acc, [key, value]) => {
+ const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
+ const updatedKey = key.substring(0, indexOfSeparator) === import_types4.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_types5, prefixKeyRegex, profileNameBlockList, parseIni;
+var init_parseIni = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js"() {
+ import_types5 = __toESM(require_dist_cjs());
+ init_constants2();
+ 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_types5.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 = (path4, options) => {
+ if (fileIntercept[path4] !== void 0) {
+ return fileIntercept[path4];
+ }
+ if (!filePromises[path4] || options?.ignoreCache) {
+ filePromises[path4] = (0, import_promises2.readFile)(path4, "utf8");
+ }
+ return filePromises[path4];
+ };
+ }
+});
+
+// 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_constants2();
+ 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_types6, getSsoSessionData;
+var init_getSsoSessionData = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js"() {
+ import_types6 = __toESM(require_dist_cjs());
+ init_loadSharedConfigFiles();
+ getSsoSessionData = (data3) => Object.entries(data3).filter(([key]) => key.startsWith(import_types6.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
+ }
+});
+
+// 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(path4, contents) {
+ fileIntercept[path4] = 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 constants4 = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
+ constants4.delete("CONFIG");
+ constants4.delete("CONFIG_PREFIX_SEPARATOR");
+ constants4.delete("ENV");
+ return [...constants4].join(", ");
+ } catch (e5) {
+ return functionString;
+ }
+}
+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_transport();
+ 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_constants3 = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js"() {
+ AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV";
+ AWS_REGION_ENV = "AWS_REGION";
+ 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_constants3();
+ init_defaultsModeConfig();
+ resolveDefaultsModeConfig = ({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => memoize(async () => {
+ const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
+ 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: path4 }) => {
+ const { request } = await import("node:http");
+ return new Promise((resolve, reject) => {
+ const req = request({
+ method: "GET",
+ hostname: hostname.replace(/^\[(.+)]$/, "$1"),
+ path: path4,
+ 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_constants2();
+ 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: path4 } = endpoint;
+ return `${protocol}//${hostname}${port ? ":" + port : ""}${path4}`;
+ }
+ }
+ return endpoint;
+ };
+ }
+ return configProvider;
+ };
+ }
+});
+
+// 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_transport();
+ }
+});
+
+// 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 serializerMiddlewareOption2, endpointMiddlewareOptions;
+var init_getEndpointPlugin = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/getEndpointPlugin.js"() {
+ init_endpointMiddleware();
+ serializerMiddlewareOption2 = {
+ name: "serializerMiddleware",
+ step: "serialize",
+ tags: ["SERIALIZER"],
+ override: true
+ };
+ endpointMiddlewareOptions = {
+ step: "serialize",
+ tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"],
+ name: "endpointV2Middleware",
+ override: true,
+ relation: "before",
+ toMiddleware: serializerMiddlewareOption2.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_transport();
+ 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 = (path4) => {
+ const parts = path4.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: '${path4}' 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: '${path4}'`);
+ }
+ 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, path4) => getAttrPathList(path4).reduce((acc, index) => {
+ if (typeof acc !== "object") {
+ throw new EndpointError(`Index '${index}' in '${path4}' 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/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_types12, DEFAULT_PORTS, parseURL;
+var init_parseURL = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/parseURL.js"() {
+ import_types12 = __toESM(require_dist_cjs());
+ init_isIpAddress();
+ DEFAULT_PORTS = {
+ [import_types12.EndpointURLScheme.HTTP]: 80,
+ [import_types12.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: path4 = "", query = {} } = value;
+ const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path4}`);
+ 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_types12.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_transport();
+ 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_transport();
+ init_BinaryDecisionDiagram();
+ init_EndpointCache();
+ init_decideEndpoint();
+ init_isIpAddress();
+ init_transport();
+ 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), deserializerMiddlewareOption2);
+ commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption3);
+ }
+ };
+}
+var deserializerMiddlewareOption2, serializerMiddlewareOption3;
+var init_serdePlugin = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serdePlugin.js"() {
+ init_deserializerMiddleware();
+ init_serializerMiddleware();
+ 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/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: () => deserializerMiddlewareOption2,
+ expectBoolean: () => expectBoolean,
+ expectByte: () => expectByte,
+ expectFloat32: () => expectFloat32,
+ expectInt: () => expectInt,
+ expectInt32: () => expectInt32,
+ expectLong: () => expectLong,
+ expectNonNull: () => expectNonNull,
+ expectNumber: () => expectNumber,
+ expectObject: () => expectObject,
+ expectShort: () => expectShort,
+ expectString: () => expectString,
+ expectUnion: () => expectUnion,
+ fromArrayBuffer: () => fromArrayBuffer,
+ fromBase64: () => fromBase64,
+ fromHex: () => fromHex,
+ fromString: () => fromString,
+ fromUtf8: () => fromUtf8,
+ generateIdempotencyToken: () => generateIdempotencyToken,
+ getAwsChunkedEncodingStream: () => getAwsChunkedEncodingStream2,
+ getSerdePlugin: () => getSerdePlugin,
+ handleFloat: () => handleFloat,
+ headStream: () => headStream2,
+ isArrayBuffer: () => isArrayBuffer,
+ isBlob: () => isBlob,
+ isReadableStream: () => isReadableStream,
+ limitedParseDouble: () => limitedParseDouble,
+ limitedParseFloat: () => limitedParseFloat,
+ limitedParseFloat32: () => limitedParseFloat32,
+ logger: () => logger,
+ nv: () => nv,
+ parseBoolean: () => parseBoolean,
+ parseEpochTimestamp: () => parseEpochTimestamp,
+ parseRfc3339DateTime: () => parseRfc3339DateTime,
+ parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset,
+ parseRfc7231DateTime: () => parseRfc7231DateTime,
+ quoteHeader: () => quoteHeader,
+ sdkStreamMixin: () => sdkStreamMixin2,
+ serializerMiddleware: () => serializerMiddleware,
+ serializerMiddlewareOption: () => serializerMiddlewareOption3,
+ splitEvery: () => splitEvery,
+ splitHeader: () => splitHeader,
+ splitStream: () => splitStream2,
+ strictParseByte: () => strictParseByte,
+ strictParseDouble: () => strictParseDouble,
+ strictParseFloat: () => strictParseFloat,
+ strictParseFloat32: () => strictParseFloat32,
+ strictParseInt: () => strictParseInt,
+ strictParseInt32: () => strictParseInt32,
+ strictParseLong: () => strictParseLong,
+ strictParseShort: () => strictParseShort,
+ toBase64: () => toBase64,
+ toHex: () => toHex,
+ toUint8Array: () => toUint8Array,
+ toUtf8: () => toUtf8,
+ v4: () => v4
+});
+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_lazy_json();
+ init_parse_utils();
+ init_quote_header();
+ init_schema_date_utils();
+ 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"() {
+ }
+});
+
+// node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js
+var SerdeContext;
+var init_SerdeContext = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js"() {
+ SerdeContext = class {
+ serdeContext;
+ setSerdeContext(serdeContext) {
+ this.serdeContext = serdeContext;
+ }
+ };
+ }
+});
+
// node_modules/tslib/tslib.es6.mjs
var tslib_es6_exports = {};
__export(tslib_es6_exports, {
@@ -23249,7 +25986,7 @@ 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) {
+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;
@@ -23270,22 +26007,22 @@ function __addDisposableResource(env, value, async) {
return Promise.reject(e5);
}
};
- env.stack.push({ value, dispose, async });
+ env2.stack.push({ value, dispose, async });
} else if (async) {
- env.stack.push({ async: true });
+ env2.stack.push({ async: true });
}
return value;
}
-function __disposeResources(env) {
+function __disposeResources(env2) {
function fail(e5) {
- env.error = env.hasError ? new _SuppressedError(e5, env.error, "An error was suppressed during disposal.") : e5;
- env.hasError = true;
+ 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 = env.stack.pop()) {
+ while (r5 = env2.stack.pop()) {
try {
- if (!r5.async && s === 1) return s = 0, env.stack.push(r5), Promise.resolve().then(next);
+ 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) {
@@ -23297,18 +26034,18 @@ function __disposeResources(env) {
fail(e5);
}
}
- if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
- if (env.hasError) throw env.error;
+ 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) {
+function __rewriteRelativeImportExtension(path4, preserveJsx) {
+ if (typeof path4 === "string" && /^\.\.?\//.test(path4)) {
+ return path4.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;
+ return path4;
}
var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
var init_tslib_es6 = __esm({
@@ -23398,379 +26135,1287 @@ var init_tslib_es6 = __esm({
}
});
-// node_modules/@smithy/uuid/dist-cjs/randomUUID.js
-var require_randomUUID = __commonJS({
- "node_modules/@smithy/uuid/dist-cjs/randomUUID.js"(exports2) {
+// 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.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);
+ 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/@smithy/uuid/dist-cjs/index.js
-var require_dist_cjs19 = __commonJS({
- "node_modules/@smithy/uuid/dist-cjs/index.js"(exports2) {
+// 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";
- var randomUUID2 = require_randomUUID();
- var decimalToHex = Array.from({ length: 256 }, (_, i5) => i5.toString(16).padStart(2, "0"));
- var v4 = () => {
- if (randomUUID2.randomUUID) {
- return randomUUID2.randomUUID();
+ Object.defineProperty(exports2, "__esModule", { value: true });
+ exports2.isEmptyData = void 0;
+ function isEmptyData(data3) {
+ if (typeof data3 === "string") {
+ return data3.length === 0;
}
- 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({
- "node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js"() {
- LazyJsonString = function LazyJsonString2(val) {
- const str = Object.assign(new String(val), {
- deserializeJSON() {
- return JSON.parse(String(val));
- },
- toString() {
- return String(val);
- },
- toJSON() {
- return String(val);
- }
- });
- return str;
- };
- LazyJsonString.from = (object) => {
- if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) {
- return object;
- } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
- return LazyJsonString(String(object));
- }
- return LazyJsonString(JSON.stringify(object));
- };
- LazyJsonString.fromObject = LazyJsonString.from;
- }
-});
-
-// node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js
-function quoteHeader(part) {
- if (part.includes(",") || part.includes('"')) {
- part = `"${part.replace(/"/g, '\\"')}"`;
- }
- return part;
-}
-var init_quote_header = __esm({
- "node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js"() {
- }
-});
-
-// node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js
-function range(v, min, max) {
- const _v = Number(v);
- if (_v < min || _v > max) {
- throw new Error(`Value ${_v} out of range [${min}, ${max}]`);
- }
-}
-var ddd, mmm, time, date, year, RFC3339_WITH_OFFSET2, IMF_FIXDATE2, RFC_850_DATE2, ASC_TIME2, months, _parseEpochTimestamp, _parseRfc3339DateTimeWithOffset, _parseRfc7231DateTime;
-var init_schema_date_utils = __esm({
- "node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js"() {
- ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
- mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
- time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
- date = `(\\d?\\d)`;
- year = `(\\d{4})`;
- RFC3339_WITH_OFFSET2 = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
- IMF_FIXDATE2 = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);
- RFC_850_DATE2 = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`);
- ASC_TIME2 = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`);
- months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
- _parseEpochTimestamp = (value) => {
- if (value == null) {
- return void 0;
- }
- let num = NaN;
- if (typeof value === "number") {
- num = value;
- } else if (typeof value === "string") {
- if (!/^-?\d*\.?\d+$/.test(value)) {
- throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
- }
- num = Number.parseFloat(value);
- } else if (typeof value === "object" && value.tag === 1) {
- num = value.value;
- }
- if (isNaN(num) || Math.abs(num) === Infinity) {
- throw new TypeError("Epoch timestamps must be valid finite numbers.");
- }
- return new Date(Math.round(num * 1e3));
- };
- _parseRfc3339DateTimeWithOffset = (value) => {
- if (value == null) {
- return void 0;
- }
- if (typeof value !== "string") {
- throw new TypeError("RFC3339 timestamps must be strings");
- }
- const matches = RFC3339_WITH_OFFSET2.exec(value);
- if (!matches) {
- throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);
- }
- const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;
- range(monthStr, 1, 12);
- range(dayStr, 1, 31);
- range(hours, 0, 23);
- range(minutes, 0, 59);
- range(seconds, 0, 60);
- const date2 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0));
- date2.setUTCFullYear(Number(yearStr));
- if (offsetStr.toUpperCase() != "Z") {
- const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0];
- const scalar = sign === "-" ? 1 : -1;
- date2.setTime(date2.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1e3 + Number(offsetM) * 60 * 1e3));
- }
- return date2;
- };
- _parseRfc7231DateTime = (value) => {
- if (value == null) {
- return void 0;
- }
- if (typeof value !== "string") {
- throw new TypeError("RFC7231 timestamps must be strings.");
- }
- let day;
- let month;
- let year2;
- let hour;
- let minute;
- let second;
- let fraction;
- let matches;
- if (matches = IMF_FIXDATE2.exec(value)) {
- [, day, month, year2, hour, minute, second, fraction] = matches;
- } else if (matches = RFC_850_DATE2.exec(value)) {
- [, day, month, year2, hour, minute, second, fraction] = matches;
- year2 = (Number(year2) + 1900).toString();
- } else if (matches = ASC_TIME2.exec(value)) {
- [, month, day, hour, minute, second, fraction, year2] = matches;
- }
- if (year2 && second) {
- const timestamp = Date.UTC(Number(year2), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0);
- range(day, 1, 31);
- range(hour, 0, 23);
- range(minute, 0, 59);
- range(second, 0, 60);
- const date2 = new Date(timestamp);
- date2.setUTCFullYear(Number(year2));
- return date2;
- }
- throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
- };
- }
-});
-
-// node_modules/@smithy/core/dist-es/submodules/serde/split-every.js
-function splitEvery(value, delimiter, numDelimiters) {
- if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {
- throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery.");
- }
- const segments = value.split(delimiter);
- if (numDelimiters === 1) {
- return segments;
- }
- const compoundSegments = [];
- let currentSegment = "";
- for (let i5 = 0; i5 < segments.length; i5++) {
- if (currentSegment === "") {
- currentSegment = segments[i5];
- } else {
- currentSegment += delimiter + segments[i5];
+ return data3.byteLength === 0;
}
- if ((i5 + 1) % numDelimiters === 0) {
- compoundSegments.push(currentSegment);
- currentSegment = "";
+ 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
+ ]);
}
- }
- if (currentSegment !== "") {
- compoundSegments.push(currentSegment);
- }
- return compoundSegments;
-}
-var init_split_every = __esm({
- "node_modules/@smithy/core/dist-es/submodules/serde/split-every.js"() {
+ exports2.numToUint8 = numToUint8;
}
});
-// node_modules/@smithy/core/dist-es/submodules/serde/split-header.js
-var splitHeader;
-var init_split_header = __esm({
- "node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() {
- splitHeader = (value) => {
- const z = value.length;
- const values = [];
- let withinQuotes = false;
- let prevChar = void 0;
- let anchor = 0;
- for (let i5 = 0; i5 < z; ++i5) {
- const char = value[i5];
- switch (char) {
- case `"`:
- if (prevChar !== "\\") {
- withinQuotes = !withinQuotes;
- }
- break;
- case ",":
- if (!withinQuotes) {
- values.push(value.slice(anchor, i5));
- anchor = i5 + 1;
- }
- break;
- default:
+// 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;
}
- prevChar = char;
+ return return_array;
}
- values.push(value.slice(anchor));
- return values.map((v) => {
- v = v.trim();
- const z2 = v.length;
- if (z2 < 2) {
- return v;
- }
- if (v[0] === `"` && v[z2 - 1] === `"`) {
- v = v.slice(1, z2 - 1);
- }
- return v.replace(/\\"/g, '"');
- });
- };
+ return Uint32Array.from(a_lookUpTable);
+ }
+ exports2.uint32ArrayFrom = uint32ArrayFrom;
}
});
-// node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js
-function nv(input) {
- return new NumericValue(String(input), "bigDecimal");
-}
-var format, NumericValue;
-var init_NumericValue = __esm({
- "node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js"() {
- format = /^-?\d*(\.\d+)?$/;
- NumericValue = class _NumericValue {
- string;
- type;
- constructor(string, type) {
- this.string = string;
- this.type = type;
- if (!format.test(string)) {
- throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
+// 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 this.string;
+ return String(this.valueOf());
}
- static [Symbol.hasInstance](object) {
- if (!object || typeof object !== "object") {
- return false;
+ };
+ }
+});
+
+// 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 _nv = object;
- return _NumericValue.prototype.isPrototypeOf(object) || _nv.type === "bigDecimal" && format.test(_nv.string);
+ 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/serde/index.js
-var serde_exports = {};
-__export(serde_exports, {
- LazyJsonString: () => LazyJsonString,
- NumericValue: () => NumericValue,
- _parseEpochTimestamp: () => _parseEpochTimestamp,
- _parseRfc3339DateTimeWithOffset: () => _parseRfc3339DateTimeWithOffset,
- _parseRfc7231DateTime: () => _parseRfc7231DateTime,
- copyDocumentWithTransform: () => copyDocumentWithTransform,
- dateToUtcString: () => dateToUtcString,
- expectBoolean: () => expectBoolean,
- expectByte: () => expectByte,
- expectFloat32: () => expectFloat32,
- expectInt: () => expectInt,
- expectInt32: () => expectInt32,
- expectLong: () => expectLong,
- expectNonNull: () => expectNonNull,
- expectNumber: () => expectNumber,
- expectObject: () => expectObject,
- expectShort: () => expectShort,
- expectString: () => expectString,
- expectUnion: () => expectUnion,
- generateIdempotencyToken: () => import_uuid.v4,
- handleFloat: () => handleFloat,
- limitedParseDouble: () => limitedParseDouble,
- limitedParseFloat: () => limitedParseFloat,
- limitedParseFloat32: () => limitedParseFloat32,
- logger: () => logger,
- nv: () => nv,
- parseBoolean: () => parseBoolean,
- parseEpochTimestamp: () => parseEpochTimestamp,
- parseRfc3339DateTime: () => parseRfc3339DateTime,
- parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset,
- parseRfc7231DateTime: () => parseRfc7231DateTime,
- quoteHeader: () => quoteHeader,
- splitEvery: () => splitEvery,
- splitHeader: () => splitHeader,
- strictParseByte: () => strictParseByte,
- strictParseDouble: () => strictParseDouble,
- strictParseFloat: () => strictParseFloat,
- strictParseFloat32: () => strictParseFloat32,
- strictParseInt: () => strictParseInt,
- strictParseInt32: () => strictParseInt32,
- strictParseLong: () => strictParseLong,
- strictParseShort: () => strictParseShort
-});
-var init_serde = __esm({
- "node_modules/@smithy/core/dist-es/submodules/serde/index.js"() {
- init_copyDocumentWithTransform();
- init_date_utils();
- init_generateIdempotencyToken();
- init_lazy_json();
- init_parse_utils();
- init_quote_header();
- init_schema_date_utils();
- init_split_every();
- init_split_header();
- init_NumericValue();
+// 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/protocols/SerdeContext.js
-var SerdeContext;
-var init_SerdeContext = __esm({
- "node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js"() {
- SerdeContext = class {
- serdeContext;
- setSerdeContext(serdeContext) {
- this.serdeContext = serdeContext;
+// 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 import_util_utf8, EventStreamSerde;
+var EventStreamSerde;
var init_EventStreamSerde = __esm({
"node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"() {
- import_util_utf8 = __toESM(require_dist_cjs9());
+ init_serde();
EventStreamSerde = class {
marshaller;
serializer;
@@ -23873,7 +27518,7 @@ var init_EventStreamSerde = __esm({
if (member2.isBlobSchema()) {
out[name] = body;
} else if (member2.isStringSchema()) {
- out[name] = (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)(body);
+ out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body);
} else if (member2.isStructSchema()) {
out[name] = await this.deserializer.read(member2, body);
}
@@ -24004,7 +27649,7 @@ var init_EventStreamSerde = __esm({
}
}
const messageSerialization = serializer.flush() ?? new Uint8Array();
- const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? import_util_utf8.fromUtf8)(messageSerialization) : messageSerialization;
+ const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization) : messageSerialization;
return {
body,
eventType,
@@ -24019,20 +27664,50 @@ var init_EventStreamSerde = __esm({
// node_modules/@smithy/core/dist-es/submodules/event-streams/index.js
var event_streams_exports = {};
__export(event_streams_exports, {
- EventStreamSerde: () => EventStreamSerde
+ 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
});
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 import_protocol_http3, HttpProtocol;
+var 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_transport();
init_SerdeContext();
HttpProtocol = class extends SerdeContext {
options;
@@ -24046,10 +27721,10 @@ var init_HttpProtocol = __esm({
}
}
getRequestType() {
- return import_protocol_http3.HttpRequest;
+ return HttpRequest;
}
getResponseType() {
- return import_protocol_http3.HttpResponse;
+ return HttpResponse;
}
setSerdeContext(serdeContext) {
this.serdeContext = serdeContext;
@@ -24176,16 +27851,15 @@ var init_HttpProtocol = __esm({
});
// node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js
-var import_protocol_http4, import_util_stream2, HttpBindingProtocol;
+var HttpBindingProtocol;
var init_HttpBindingProtocol = __esm({
"node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"() {
init_schema();
init_serde();
- import_protocol_http4 = __toESM(require_dist_cjs2());
- import_util_stream2 = __toESM(require_dist_cjs16());
+ init_transport();
+ init_HttpProtocol();
init_collect_stream_body();
init_extended_encode_uri_component();
- init_HttpProtocol();
HttpBindingProtocol = class extends HttpProtocol {
async serializeRequest(operationSchema, _input, context) {
const input = _input && typeof _input === "object" ? _input : {};
@@ -24198,7 +27872,7 @@ var init_HttpBindingProtocol = __esm({
const payloadMemberSchemas = [];
let hasNonHttpBindingMember = false;
let payload2;
- const request = new import_protocol_http4.HttpRequest({
+ const request = new HttpRequest({
protocol: "",
hostname: "",
port: void 0,
@@ -24214,11 +27888,11 @@ var init_HttpBindingProtocol = __esm({
const opTraits = translateTraits(operationSchema.traits);
if (opTraits.http) {
request.method = opTraits.http[0];
- const [path3, search] = opTraits.http[1].split("?");
+ const [path4, search] = opTraits.http[1].split("?");
if (request.path == "/") {
- request.path = path3;
+ request.path = path4;
} else {
- request.path += path3;
+ request.path += path4;
}
const traitSearchParams = new URLSearchParams(search ?? "");
for (const [key, value] of traitSearchParams) {
@@ -24398,7 +28072,7 @@ var init_HttpBindingProtocol = __esm({
responseSchema: ns
});
} else {
- dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);
+ dataObject[memberName] = sdkStreamMixin2(response.body);
}
} else if (response.body) {
const bytes = await collectBody(response.body, context);
@@ -24452,13 +28126,13 @@ var init_HttpBindingProtocol = __esm({
});
// node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js
-var import_protocol_http5, RpcProtocol;
+var RpcProtocol;
var init_RpcProtocol = __esm({
"node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js"() {
init_schema();
- import_protocol_http5 = __toESM(require_dist_cjs2());
- init_collect_stream_body();
+ init_transport();
init_HttpProtocol();
+ init_collect_stream_body();
RpcProtocol = class extends HttpProtocol {
async serializeRequest(operationSchema, _input, context) {
const serializer = this.serializer;
@@ -24469,7 +28143,7 @@ var init_RpcProtocol = __esm({
const schema = ns.getSchema();
let payload2;
const input = _input && typeof _input === "object" ? _input : {};
- const request = new import_protocol_http5.HttpRequest({
+ const request = new HttpRequest({
protocol: "",
hostname: "",
port: void 0,
@@ -24572,10 +28246,10 @@ var init_resolve_path = __esm({
function requestBuilder(input, context) {
return new RequestBuilder(input, context);
}
-var import_protocol_http6, RequestBuilder;
+var RequestBuilder;
var init_requestBuilder = __esm({
"node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"() {
- import_protocol_http6 = __toESM(require_dist_cjs2());
+ init_transport();
init_resolve_path();
RequestBuilder = class {
input;
@@ -24597,7 +28271,7 @@ var init_requestBuilder = __esm({
for (const resolvePath of this.resolvePathStack) {
resolvePath(this.path);
}
- return new import_protocol_http6.HttpRequest({
+ return new HttpRequest({
protocol,
hostname: this.hostname || hostname,
port,
@@ -24619,8 +28293,8 @@ var init_requestBuilder = __esm({
return this;
}
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
- this.resolvePathStack.push((path3) => {
- this.path = resolvedPath(path3, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
+ this.resolvePathStack.push((path4) => {
+ this.path = resolvedPath(path4, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
});
return this;
}
@@ -24661,13 +28335,11 @@ var init_determineTimestampFormat = __esm({
});
// node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js
-var import_util_base64, import_util_utf82, FromStringShapeDeserializer;
+var 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 {
@@ -24682,7 +28354,7 @@ var init_FromStringShapeDeserializer = __esm({
return splitHeader(data3).map((item) => this.read(ns.getValueSchema(), item));
}
if (ns.isBlobSchema()) {
- return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(data3);
+ return (this.serdeContext?.base64Decoder ?? fromBase64)(data3);
}
if (ns.isTimestampSchema()) {
const format2 = determineTimestampFormat(ns, this.settings);
@@ -24727,18 +28399,18 @@ var init_FromStringShapeDeserializer = __esm({
return data3;
}
base64ToUtf8(base64String) {
- return (this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8)((this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(base64String));
+ return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String));
}
};
}
});
// node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js
-var import_util_utf83, HttpInterceptingShapeDeserializer;
+var HttpInterceptingShapeDeserializer;
var init_HttpInterceptingShapeDeserializer = __esm({
"node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js"() {
init_schema();
- import_util_utf83 = __toESM(require_dist_cjs9());
+ init_serde();
init_SerdeContext();
init_FromStringShapeDeserializer();
HttpInterceptingShapeDeserializer = class extends SerdeContext {
@@ -24757,13 +28429,13 @@ var init_HttpInterceptingShapeDeserializer = __esm({
read(schema, data3) {
const ns = NormalizedSchema.of(schema);
const traits = ns.getMergedTraits();
- const toString = this.serdeContext?.utf8Encoder ?? import_util_utf83.toUtf8;
+ const toString = this.serdeContext?.utf8Encoder ?? toUtf8;
if (traits.httpHeader || traits.httpResponseCode) {
return this.stringDeserializer.read(ns, toString(data3));
}
if (traits.httpPayload) {
if (ns.isBlobSchema()) {
- const toBytes = this.serdeContext?.utf8Decoder ?? import_util_utf83.fromUtf8;
+ const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8;
if (typeof data3 === "string") {
return toBytes(data3);
}
@@ -24782,12 +28454,11 @@ var init_HttpInterceptingShapeDeserializer = __esm({
});
// node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js
-var import_util_base642, ToStringShapeSerializer;
+var 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 {
@@ -24827,7 +28498,7 @@ var init_ToStringShapeSerializer = __esm({
return;
}
if (ns.isBlobSchema() && "byteLength" in value) {
- this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(value);
+ this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value);
return;
}
if (ns.isListSchema() && Array.isArray(value)) {
@@ -24855,7 +28526,7 @@ var init_ToStringShapeSerializer = __esm({
intermediateValue = LazyJsonString.from(intermediateValue);
}
if (ns.getMergedTraits().httpHeader) {
- this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(intermediateValue.toString());
+ this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString());
return;
}
}
@@ -24863,7 +28534,7 @@ var init_ToStringShapeSerializer = __esm({
break;
default:
if (ns.isIdempotencyToken()) {
- this.stringBuffer = (0, import_uuid.v4)();
+ this.stringBuffer = generateIdempotencyToken();
} else {
this.stringBuffer = String(value);
}
@@ -24918,22 +28589,211 @@ var init_HttpInterceptingShapeSerializer = __esm({
}
});
+// node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Field.js
+var import_types22, Field;
+var init_Field = __esm({
+ "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Field.js"() {
+ import_types22 = __toESM(require_dist_cjs());
+ Field = class {
+ name;
+ kind;
+ values;
+ constructor({ name, kind = import_types22.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/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_transport();
+ 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/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({
@@ -24951,1230 +28811,26 @@ var init_protocols = __esm({
init_ToStringShapeSerializer();
init_determineTimestampFormat();
init_SerdeContext();
+ init_Field();
+ init_Fields();
+ init_transport();
+ init_transport();
+ init_transport();
+ init_httpExtensionConfiguration();
+ init_contentLengthMiddleware();
+ init_escape_uri();
+ init_escape_uri_path();
+ init_buildQueryString();
+ init_transport();
+ init_transport();
}
});
-// node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js
-var init_requestBuilder2 = __esm({
- "node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js"() {
- init_protocols();
- }
-});
-
-// node_modules/@smithy/core/dist-es/setFeature.js
-function 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;
-}
-var init_setFeature = __esm({
- "node_modules/@smithy/core/dist-es/setFeature.js"() {
- }
-});
-
-// node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js
-var DefaultIdentityProviderConfig;
-var init_DefaultIdentityProviderConfig = __esm({
- "node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"() {
- DefaultIdentityProviderConfig = class {
- authSchemes = /* @__PURE__ */ new Map();
- constructor(config) {
- for (const key in config) {
- const value = config[key];
- if (value !== void 0) {
- this.authSchemes.set(key, value);
- }
- }
- }
- getIdentityProvider(schemeId) {
- return this.authSchemes.get(schemeId);
- }
- };
- }
-});
-
-// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js
-var import_protocol_http7, import_types2, HttpApiKeyAuthSigner;
-var init_httpApiKeyAuth = __esm({
- "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() {
- import_protocol_http7 = __toESM(require_dist_cjs2());
- import_types2 = __toESM(require_dist_cjs());
- HttpApiKeyAuthSigner = class {
- async sign(httpRequest, identity, signingProperties) {
- if (!signingProperties) {
- throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");
- }
- if (!signingProperties.name) {
- throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");
- }
- if (!signingProperties.in) {
- throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");
- }
- if (!identity.apiKey) {
- throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");
- }
- 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_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 + "`");
- }
- return clonedRequest;
- }
- };
- }
-});
-
-// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js
-var import_protocol_http8, HttpBearerAuthSigner;
-var init_httpBearerAuth = __esm({
- "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() {
- import_protocol_http8 = __toESM(require_dist_cjs2());
- HttpBearerAuthSigner = class {
- async sign(httpRequest, identity, signingProperties) {
- 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");
- }
- clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`;
- return clonedRequest;
- }
- };
- }
-});
-
-// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js
-var NoAuthSigner;
-var init_noAuth = __esm({
- "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js"() {
- NoAuthSigner = class {
- async sign(httpRequest, identity, signingProperties) {
- return httpRequest;
- }
- };
- }
-});
-
-// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js
-var init_httpAuthSchemes = __esm({
- "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js"() {
- init_httpApiKeyAuth();
- init_httpBearerAuth();
- init_noAuth();
- }
-});
-
-// node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js
-var createIsIdentityExpiredFunction, EXPIRATION_MS, isIdentityExpired, doesIdentityRequireRefresh, memoizeIdentityProvider;
-var init_memoizeIdentityProvider = __esm({
- "node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js"() {
- createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired2(identity) {
- return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;
- };
- EXPIRATION_MS = 3e5;
- isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);
- doesIdentityRequireRefresh = (identity) => identity.expiration !== void 0;
- memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {
- if (provider === void 0) {
- return void 0;
- }
- const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider;
- let resolved;
- let pending;
- let hasResult;
- let isConstant = false;
- const coalesceProvider = async (options) => {
- if (!pending) {
- pending = normalizedProvider(options);
- }
- 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(options);
- }
- return resolved;
- };
- }
- return async (options) => {
- if (!hasResult || options?.forceRefresh) {
- resolved = await coalesceProvider(options);
- }
- if (isConstant) {
- return resolved;
- }
- if (!requiresRefresh(resolved)) {
- isConstant = true;
- return resolved;
- }
- if (isExpired(resolved)) {
- await coalesceProvider(options);
- return resolved;
- }
- return resolved;
- };
- };
- }
-});
-
-// node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js
-var init_util_identity_and_auth = __esm({
- "node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js"() {
- init_DefaultIdentityProviderConfig();
- init_httpAuthSchemes();
- init_memoizeIdentityProvider();
- }
-});
-
-// node_modules/@smithy/core/dist-es/index.js
-var dist_es_exports = {};
-__export(dist_es_exports, {
- DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig,
- EXPIRATION_MS: () => EXPIRATION_MS,
- HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner,
- HttpBearerAuthSigner: () => HttpBearerAuthSigner,
- NoAuthSigner: () => NoAuthSigner,
- createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction,
- createPaginator: () => createPaginator,
- doesIdentityRequireRefresh: () => doesIdentityRequireRefresh,
- getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin,
- getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin,
- getHttpSigningPlugin: () => getHttpSigningPlugin,
- getSmithyContext: () => getSmithyContext,
- httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions,
- httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware,
- httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions,
- httpSigningMiddleware: () => httpSigningMiddleware,
- httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions,
- isIdentityExpired: () => isIdentityExpired,
- memoizeIdentityProvider: () => memoizeIdentityProvider,
- normalizeProvider: () => normalizeProvider,
- requestBuilder: () => requestBuilder,
- setFeature: () => setFeature
-});
-var init_dist_es = __esm({
- "node_modules/@smithy/core/dist-es/index.js"() {
- init_getSmithyContext();
- init_middleware_http_auth_scheme();
- init_middleware_http_signing();
- init_normalizeProvider();
- init_createPaginator();
- init_requestBuilder2();
- init_setFeature();
- init_util_identity_and_auth();
- }
-});
-
-// 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;
- }
- }
- 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 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 (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(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 (error3) {
- console.error(`Failed to construct URL with ${expression}`, error3);
- throw error3;
- }
- }
- 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: 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));
- };
- 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/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) {
- return {
- ...outputs,
- ...regionData
- };
- }
- }
- }
- for (const partition2 of partitions2) {
- const { regionRegex, outputs } = partition2;
- if (new RegExp(regionRegex).test(value)) {
- return {
- ...outputs
- };
- }
- }
- 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.");
- }
- return {
- ...DEFAULT_PARTITION.outputs
- };
- };
- var setPartitionInfo = (partitionsInfo2, userAgentPrefix = "") => {
- selectedPartitionsInfo = partitionsInfo2;
- selectedUserAgentPrefix = userAgentPrefix;
- };
- var useDefaultPartitionInfo = () => {
- setPartitionInfo(partitionsInfo, "");
- };
- 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/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) {
- if (process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED === "true") {
- state.warningEmitted = true;
- 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`);
- }
- }
- };
- }
-});
-
-// 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 = [
+// 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",
@@ -26182,7 +28838,7 @@ var require_dist_cjs22 = __commonJS({
"RequestTimeTooSkewed",
"SignatureDoesNotMatch"
];
- var THROTTLING_ERROR_CODES = [
+ THROTTLING_ERROR_CODES = [
"BandwidthLimitExceeded",
"EC2ThrottledException",
"LimitExceededException",
@@ -26198,14 +28854,25 @@ var require_dist_cjs22 = __commonJS({
"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 = (error3) => error3?.$retryable !== void 0;
- var isClockSkewError = (error3) => CLOCK_SKEW_ERROR_CODES.includes(error3.name);
- var isClockSkewCorrectedError = (error3) => error3.$metadata?.clockSkewCorrected;
- var isBrowserNetworkError = (error3) => {
+ 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", "EAI_AGAIN"];
+ }
+});
+
+// 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",
@@ -26219,9 +28886,9 @@ var require_dist_cjs22 = __commonJS({
}
return errorMessages.has(error3.message);
};
- var isThrottlingError = (error3) => error3.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error3.name) || error3.$retryable?.throttling == true;
- var 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);
- var isServerError = (error3) => {
+ 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)) {
@@ -26231,33 +28898,207 @@ var require_dist_cjs22 = __commonJS({
}
return false;
};
- function isNodeJsHttp2TransientError(error3) {
- return error3.code === "ERR_HTTP2_STREAM_ERROR" && error3.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 {
+// 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 (!lastError.$metadata) {
+ lastError.$metadata = {};
+ }
+ lastError.$metadata.attempts = attempts + 1;
+ lastError.$metadata.totalRetryDelay = totalRetryDelay;
+ throw lastError;
+ }
+ attempts = retryToken.getRetryCount();
+ const delay = retryToken.getRetryDelay();
+ totalRetryDelay += (retryToken?.$retryLog?.acquisitionDelay ?? 0) + delay;
+ if (delay > 0) {
+ 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;
@@ -26293,7 +29134,7 @@ var require_dist_cjs23 = __commonJS({
let calculatedRate;
this.updateMeasuredRate();
const retryErrorInfo = response;
- const isThrottling = retryErrorInfo?.errorType === "THROTTLING" || serviceErrorClassification.isThrottlingError(retryErrorInfo?.error ?? 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;
@@ -26366,16 +29207,14 @@ var require_dist_cjs23 = __commonJS({
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 {
+ }
+});
+
+// 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;
@@ -26393,8 +29232,17 @@ var require_dist_cjs23 = __commonJS({
return _Retry.v2026 ? "THROTTLING" : "TRANSIENT";
}
};
- var DefaultRetryBackoffStrategy = class {
- x = Retry2.delay();
+ }
+});
+
+// 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;
@@ -26405,11 +29253,22 @@ var require_dist_cjs23 = __commonJS({
this.x = delay;
}
};
- var DefaultRetryToken = class {
+ }
+});
+
+// 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;
+ $retryLog = {
+ acquisitionDelay: 0
+ };
constructor(delay, count, cost, longPoll) {
this.delay = delay;
this.count = count;
@@ -26429,15 +29288,40 @@ var require_dist_cjs23 = __commonJS({
return this.longPoll;
}
};
- var refusal = {
+ }
+});
+
+// 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
};
- var StandardRetryStrategy = class {
- mode = exports2.RETRY_MODES.STANDARD;
- capacity = INITIAL_RETRY_TOKENS;
+ StandardRetryStrategy = class {
+ mode = RETRY_MODES.STANDARD;
retryBackoffStrategy;
+ capacity = INITIAL_RETRY_TOKENS;
maxAttemptsProvider;
baseDelay;
constructor(arg1) {
@@ -26451,11 +29335,11 @@ var require_dist_cjs23 = __commonJS({
this.retryBackoffStrategy = arg1.backoff;
}
this.maxAttemptsProvider ??= async () => DEFAULT_MAX_ATTEMPTS;
- this.baseDelay ??= Retry2.delay();
+ this.baseDelay ??= Retry.delay();
this.retryBackoffStrategy ??= new DefaultRetryBackoffStrategy();
}
async acquireInitialRetryToken(retryTokenScope) {
- return new DefaultRetryToken(Retry2.delay(), 0, void 0, Retry2.v2026 && retryTokenScope.includes(":longpoll"));
+ return new DefaultRetryToken(Retry.delay(), 0, void 0, Retry.v2026 && retryTokenScope.includes(":longpoll"));
}
async refreshRetryTokenForRetry(token, errorInfo) {
const maxAttempts = await this.getMaxAttempts();
@@ -26464,20 +29348,24 @@ var require_dist_cjs23 = __commonJS({
const isLongPoll = token.isLongPoll?.();
if (shouldRetry || isLongPoll) {
const errorType = errorInfo.errorType;
- this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? Retry2.throttlingDelay() : this.baseDelay);
+ 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: Retry2.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0
- });
+ const longPollBackoff = Retry.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0;
+ if (longPollBackoff > 0) {
+ await new Promise((r5) => setTimeout(r5, longPollBackoff));
+ }
} else {
const capacityCost = this.getCapacityCost(errorType);
this.capacity -= capacityCost;
- return new DefaultRetryToken(retryDelay, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false);
+ const nextToken = new DefaultRetryToken(0, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false);
+ await new Promise((r5) => setTimeout(r5, retryDelay));
+ nextToken.$retryLog.acquisitionDelay = retryDelay;
+ return nextToken;
}
}
throw new Error("No retry token available");
@@ -26507,14 +29395,24 @@ var require_dist_cjs23 = __commonJS({
return retryableStatus || attemptStatus || capacityStatus;
}
getCapacityCost(errorType) {
- return errorType === Retry2.modifiedCostType() ? Retry2.throttlingCost() : Retry2.cost();
+ return errorType === Retry.modifiedCostType() ? Retry.throttlingCost() : Retry.cost();
}
isRetryableError(errorType) {
return errorType === "THROTTLING" || errorType === "TRANSIENT";
}
};
- var AdaptiveRetryStrategy = class {
- mode = exports2.RETRY_MODES.ADAPTIVE;
+ }
+});
+
+// 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) {
@@ -26544,2278 +29442,43 @@ var require_dist_cjs23 = __commonJS({
return this.standardRetryStrategy.maxAttempts();
}
};
- var ConfiguredRetryStrategy = class extends StandardRetryStrategy {
+ }
+});
+
+// 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 = Retry2.delay()) {
+ 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;
- }
- };
- 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 core = (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 = core.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);
- }
- }
- }
- var USER_AGENT = "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;
- }
- return buffer;
- }
- var userAgentMiddleware = (options) => (next, context) => async (args) => {
- const { request } = args;
- if (!protocolHttp.HttpRequest.isInstance(request)) {
- return next(args);
- }
- const { headers } = request;
- const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
- const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
- await checkFeatures(context, options, args);
- const awsContext = context;
- 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) {
- defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));
- }
- const prefix = utilEndpoints.getUserAgentPrefix();
- const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);
- const normalUAValue = [
- ...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[USER_AGENT] = sdkUserAgentValue;
- } else {
- headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
- }
- return next({
- ...args,
- request
- });
- };
- 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);
- const prefix = name.substring(0, prefixSeparatorIndex);
- let uaName = name.substring(prefixSeparatorIndex + 1);
- if (prefix === "api") {
- uaName = uaName.toLowerCase();
- }
- return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
- switch (index) {
- case 0:
- return item;
- case 1:
- return `${acc}/${item}`;
- default:
- return `${acc}#${item}`;
- }
- }, "");
- };
- var getUserAgentMiddlewareOptions = {
- name: "getUserAgentMiddleware",
- step: "build",
- priority: "low",
- tags: ["SET_USER_AGENT", "USER_AGENT"],
- override: true
- };
- 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/@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);
- }
- };
- 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");
- }
- 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();
- }
- });
- };
- 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);
- }
- }
- };
- 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
- }
- };
- };
- 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/@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 (error3) {
- }
- }
- }
- 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/@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;
- }
- 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);
- }
- };
- 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/@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 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 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;
- },
- 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;
- }
- }
- const endpointUrl = profile[CONFIG_ENDPOINT_URL];
- if (endpointUrl)
- return endpointUrl;
- return void 0;
- },
- default: void 0
- });
- exports2.getEndpointUrlConfig = getEndpointUrlConfig;
- }
-});
-
-// 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 (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 (protocolHttp.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;
- }
- };
- 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 {
- 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 core = (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) {
- core.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
- });
- };
- };
- var endpointMiddlewareOptions = {
- step: "serialize",
- tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"],
- name: "endpointV2Middleware",
- override: true,
- relation: "before",
- toMiddleware: middlewareSerde.serializerMiddlewareOption.name
- };
- 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 () => {
- throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.");
- };
- }
- return input;
- };
- 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/@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);
- }
- 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 = (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;
- });
- },
- 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/@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 Command2 = 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 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;
+ this.retryBackoffStrategy.computeNextBackoffDelay = (completedAttempt) => {
+ const nextAttempt = completedAttempt + 1;
+ return this.computeNextBackoffDelay(nextAttempt);
};
}
};
- 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 {
- 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;
- }
- };
- };
- 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 {
- 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 = Command2;
- 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/@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;
- }
-});
-
-// 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 = (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}`);
- };
- var getDefaultRetryQuota = (initialRetryTokens, options) => {
+// 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 = utilRetry.NO_RETRY_INCREMENT;
- const retryCost = utilRetry.RETRY_COST;
- const timeoutRetryCost = utilRetry.TIMEOUT_RETRY_COST;
+ 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;
@@ -28837,24 +29500,56 @@ var require_dist_cjs35 = __commonJS({
releaseRetryTokens
});
};
- var defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(utilRetry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));
- var defaultRetryDecider = (error3) => {
+ }
+});
+
+// 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 serviceErrorClassification.isRetryableByTrait(error3) || serviceErrorClassification.isClockSkewError(error3) || serviceErrorClassification.isThrottlingError(error3) || serviceErrorClassification.isTransientError(error3);
+ return isRetryableByTrait(error3) || isClockSkewError(error3) || isThrottlingError(error3) || isTransientError(error3);
};
- var StandardRetryStrategy = class {
+ }
+});
+
+// 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 = utilRetry.RETRY_MODES.STANDARD;
+ 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(utilRetry.INITIAL_RETRY_TOKENS);
+ this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(INITIAL_RETRY_TOKENS);
}
shouldRetry(error3, attempts, maxAttempts) {
return attempts < maxAttempts && this.retryDecider(error3) && this.retryQuota.hasRetryTokens(error3);
@@ -28864,7 +29559,7 @@ var require_dist_cjs35 = __commonJS({
try {
maxAttempts = await this.maxAttemptsProvider();
} catch (error3) {
- maxAttempts = utilRetry.DEFAULT_MAX_ATTEMPTS;
+ maxAttempts = DEFAULT_MAX_ATTEMPTS;
}
return maxAttempts;
}
@@ -28874,13 +29569,13 @@ var require_dist_cjs35 = __commonJS({
let totalDelay = 0;
const maxAttempts = await this.getMaxAttempts();
const { request } = args;
- if (protocolHttp.HttpRequest.isInstance(request)) {
- request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4();
+ if (HttpRequest.isInstance(request)) {
+ request.headers[INVOCATION_ID_HEADER] = v4();
}
while (true) {
try {
- if (protocolHttp.HttpRequest.isInstance(request)) {
- request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
+ if (HttpRequest.isInstance(request)) {
+ request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
}
if (options?.beforeRequest) {
await options.beforeRequest();
@@ -28898,7 +29593,7 @@ var require_dist_cjs35 = __commonJS({
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 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;
@@ -28915,8 +29610,8 @@ var require_dist_cjs35 = __commonJS({
}
}
};
- var getDelayFromRetryAfterHeader = (response) => {
- if (!protocolHttp.HttpResponse.isInstance(response))
+ getDelayFromRetryAfterHeader = (response) => {
+ if (!HttpResponse.isInstance(response))
return;
const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
if (!retryAfterHeaderName)
@@ -28928,13 +29623,23 @@ var require_dist_cjs35 = __commonJS({
const retryAfterDate = new Date(retryAfter);
return retryAfterDate.getTime() - Date.now();
};
- var AdaptiveRetryStrategy = class extends StandardRetryStrategy {
+ }
+});
+
+// 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 utilRetry.DefaultRateLimiter();
- this.mode = utilRetry.RETRY_MODES.ADAPTIVE;
+ this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();
+ this.mode = RETRY_MODES.ADAPTIVE;
}
async retry(next, args) {
return super.retry(next, args, {
@@ -28947,11 +29652,23 @@ var require_dist_cjs35 = __commonJS({
});
}
};
- 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];
+ }
+});
+
+// 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();
+ init_retries_2026_config();
+ 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);
@@ -28970,206 +29687,2552 @@ var require_dist_cjs35 = __commonJS({
}
return maxAttempt;
},
- default: utilRetry.DEFAULT_MAX_ATTEMPTS
+ default: DEFAULT_MAX_ATTEMPTS
};
- var resolveRetryConfig5 = (input) => {
+ resolveRetryConfig = (input, defaults) => {
const { retryStrategy, retryMode } = input;
- const maxAttempts = utilMiddleware.normalizeProvider(input.maxAttempts ?? utilRetry.DEFAULT_MAX_ATTEMPTS);
+ const { defaultMaxAttempts = DEFAULT_MAX_ATTEMPTS, defaultBaseDelay = Retry.delay() } = defaults ?? {};
+ const maxAttemptsProvider = normalizeProvider(input.maxAttempts ?? defaultMaxAttempts);
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);
+ const getDefault = async () => {
+ const maxAttempts = await maxAttemptsProvider();
+ const adaptive = await normalizeProvider(retryMode)() === RETRY_MODES.ADAPTIVE;
+ if (adaptive) {
+ return new AdaptiveRetryStrategy(maxAttemptsProvider, {
+ maxAttempts,
+ baseDelay: defaultBaseDelay
+ });
+ }
+ return new StandardRetryStrategy({
+ maxAttempts,
+ baseDelay: defaultBaseDelay
+ });
+ };
return Object.assign(input, {
- maxAttempts,
+ maxAttempts: maxAttemptsProvider,
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],
+ 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: utilRetry.DEFAULT_RETRY_MODE
+ default: DEFAULT_RETRY_MODE
};
- var omitRetryHeadersMiddleware = () => (next) => async (args) => {
+ }
+});
+
+// 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 (protocolHttp.HttpRequest.isInstance(request)) {
- delete request.headers[utilRetry.INVOCATION_ID_HEADER];
- delete request.headers[utilRetry.REQUEST_HEADER];
+ if (HttpRequest.isInstance(request)) {
+ delete request.headers[INVOCATION_ID_HEADER];
+ delete request.headers[REQUEST_HEADER];
}
return next(args);
};
- var omitRetryHeadersMiddlewareOptions = {
+ omitRetryHeadersMiddlewareOptions = {
name: "omitRetryHeadersMiddleware",
tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"],
relation: "before",
toMiddleware: "awsAuthMiddleware",
override: true
};
- var getOmitRetryHeadersPlugin = (options) => ({
+ 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);
- }
+ }
+});
+
+// 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: {}
};
- 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 = (error3, logger2) => {
- const errorInfo = {
- error: error3,
- errorType: getRetryErrorType(error3)
- };
- const retryAfterHint = parseRetryAfterHeader(error3.$response, logger2);
- if (retryAfterHint) {
- errorInfo.retryAfterHint = retryAfterHint;
+ } 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 errorInfo;
+ return next(args);
};
- var getRetryErrorType = (error3) => {
- if (serviceErrorClassification.isThrottlingError(error3))
- return "THROTTLING";
- if (serviceErrorClassification.isTransientError(error3))
- return "TRANSIENT";
- if (serviceErrorClassification.isServerError(error3))
- return "SERVER_ERROR";
- return "CLIENT_ERROR";
- };
- var retryMiddlewareOptions = {
- name: "retryMiddleware",
- tags: ["RETRY"],
- step: "finalizeRequest",
- priority: "high",
+ hostHeaderMiddlewareOptions = {
+ name: "hostHeaderMiddleware",
+ step: "build",
+ priority: "low",
+ tags: ["HOST"],
override: true
};
- var getRetryPlugin5 = (options) => ({
+ getHostHeaderPlugin = (options) => ({
applyToStack: (clientStack) => {
- clientStack.add(retryMiddleware(options), retryMiddlewareOptions);
+ clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);
}
});
- 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/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/legacy-root-exports/middleware-http-auth-scheme/resolveAuthOptions.js
+var resolveAuthOptions;
+var init_resolveAuthOptions = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/resolveAuthOptions.js"() {
+ resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {
+ if (!authSchemePreference || authSchemePreference.length === 0) {
+ return candidateAuthOptions;
+ }
+ 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/legacy-root-exports/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/legacy-root-exports/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/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js
+var httpAuthSchemeEndpointRuleSetMiddlewareOptions, getHttpAuthSchemeEndpointRuleSetPlugin;
+var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/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/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js
+var httpAuthSchemeMiddlewareOptions, getHttpAuthSchemePlugin;
+var init_getHttpAuthSchemePlugin = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/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/legacy-root-exports/middleware-http-auth-scheme/index.js
+var init_middleware_http_auth_scheme = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/index.js"() {
+ init_httpAuthSchemeMiddleware();
+ init_getHttpAuthSchemeEndpointRuleSetPlugin();
+ init_getHttpAuthSchemePlugin();
+ }
+});
+
+// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js
+var defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware;
+var init_httpSigningMiddleware = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/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/legacy-root-exports/middleware-http-signing/getHttpSigningMiddleware.js
+var httpSigningMiddlewareOptions, getHttpSigningPlugin;
+var init_getHttpSigningMiddleware = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/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/legacy-root-exports/middleware-http-signing/index.js
+var init_middleware_http_signing = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/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/legacy-root-exports/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/legacy-root-exports/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, path4) => {
+ let cursor2 = fromObject;
+ const pathComponents = path4.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/setFeature.js
+function setFeature3(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;
+}
+var init_setFeature2 = __esm({
+ "node_modules/@smithy/core/dist-es/setFeature.js"() {
+ }
+});
+
+// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js
+var DefaultIdentityProviderConfig;
+var init_DefaultIdentityProviderConfig = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js"() {
+ DefaultIdentityProviderConfig = class {
+ authSchemes = /* @__PURE__ */ new Map();
+ constructor(config) {
+ for (const key in config) {
+ const value = config[key];
+ if (value !== void 0) {
+ this.authSchemes.set(key, value);
+ }
+ }
+ }
+ getIdentityProvider(schemeId) {
+ return this.authSchemes.get(schemeId);
+ }
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js
+var import_types23, HttpApiKeyAuthSigner;
+var init_httpApiKeyAuth = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() {
+ init_protocols();
+ import_types23 = __toESM(require_dist_cjs());
+ HttpApiKeyAuthSigner = class {
+ async sign(httpRequest, identity, signingProperties) {
+ if (!signingProperties) {
+ throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");
+ }
+ if (!signingProperties.name) {
+ throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");
+ }
+ if (!signingProperties.in) {
+ throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");
+ }
+ 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_types23.HttpApiKeyAuthLocation.QUERY) {
+ clonedRequest.query[signingProperties.name] = identity.apiKey;
+ } else if (signingProperties.in === import_types23.HttpApiKeyAuthLocation.HEADER) {
+ clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey;
+ } else {
+ throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`");
+ }
+ return clonedRequest;
+ }
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js
+var HttpBearerAuthSigner;
+var init_httpBearerAuth = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() {
+ init_protocols();
+ HttpBearerAuthSigner = class {
+ async sign(httpRequest, identity, signingProperties) {
+ const clonedRequest = HttpRequest.clone(httpRequest);
+ if (!identity.token) {
+ throw new Error("request could not be signed with `token` since the `token` is not defined");
+ }
+ clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`;
+ return clonedRequest;
+ }
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/noAuth.js
+var NoAuthSigner;
+var init_noAuth = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/noAuth.js"() {
+ NoAuthSigner = class {
+ async sign(httpRequest, identity, signingProperties) {
+ return httpRequest;
+ }
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/index.js
+var init_httpAuthSchemes = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/index.js"() {
+ init_httpApiKeyAuth();
+ init_httpBearerAuth();
+ init_noAuth();
+ }
+});
+
+// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/memoizeIdentityProvider.js
+var createIsIdentityExpiredFunction, EXPIRATION_MS, isIdentityExpired, doesIdentityRequireRefresh, memoizeIdentityProvider;
+var init_memoizeIdentityProvider = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/memoizeIdentityProvider.js"() {
+ createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired2(identity) {
+ return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;
+ };
+ EXPIRATION_MS = 3e5;
+ isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);
+ doesIdentityRequireRefresh = (identity) => identity.expiration !== void 0;
+ memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {
+ if (provider === void 0) {
+ return void 0;
+ }
+ const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider;
+ let resolved;
+ let pending;
+ let hasResult;
+ let isConstant = false;
+ const coalesceProvider = async (options) => {
+ if (!pending) {
+ pending = normalizedProvider(options);
+ }
+ 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(options);
+ }
+ return resolved;
+ };
+ }
+ return async (options) => {
+ if (!hasResult || options?.forceRefresh) {
+ resolved = await coalesceProvider(options);
+ }
+ if (isConstant) {
+ return resolved;
+ }
+ if (!requiresRefresh(resolved)) {
+ isConstant = true;
+ return resolved;
+ }
+ if (isExpired(resolved)) {
+ await coalesceProvider(options);
+ return resolved;
+ }
+ return resolved;
+ };
+ };
+ }
+});
+
+// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/index.js
+var init_util_identity_and_auth = __esm({
+ "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/index.js"() {
+ init_DefaultIdentityProviderConfig();
+ init_httpAuthSchemes();
+ init_memoizeIdentityProvider();
+ }
+});
+
+// node_modules/@smithy/core/dist-es/index.js
+var dist_es_exports = {};
+__export(dist_es_exports, {
+ DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig,
+ EXPIRATION_MS: () => EXPIRATION_MS,
+ HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner,
+ HttpBearerAuthSigner: () => HttpBearerAuthSigner,
+ NoAuthSigner: () => NoAuthSigner,
+ createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction,
+ createPaginator: () => createPaginator,
+ doesIdentityRequireRefresh: () => doesIdentityRequireRefresh,
+ getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin,
+ getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin,
+ getHttpSigningPlugin: () => getHttpSigningPlugin,
+ getSmithyContext: () => getSmithyContext,
+ httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions,
+ httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware,
+ httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions,
+ httpSigningMiddleware: () => httpSigningMiddleware,
+ httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions,
+ isIdentityExpired: () => isIdentityExpired,
+ memoizeIdentityProvider: () => memoizeIdentityProvider,
+ normalizeProvider: () => normalizeProvider2,
+ requestBuilder: () => requestBuilder,
+ setFeature: () => setFeature3
+});
+var init_dist_es = __esm({
+ "node_modules/@smithy/core/dist-es/index.js"() {
+ init_transport();
+ init_middleware_http_auth_scheme();
+ init_middleware_http_signing();
+ init_normalizeProvider2();
+ init_createPaginator();
+ init_protocols();
+ init_setFeature2();
+ 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.");
+ }
+ }
+ return appId;
+ }
+ });
+}
+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;
+ }
+});
+
+// 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) {
+ const { regions, outputs } = partition2;
+ for (const [region, regionData] of Object.entries(regions)) {
+ if (region === value) {
+ return {
+ ...outputs,
+ ...regionData
+ };
+ }
+ }
+ }
+ for (const partition2 of partitions) {
+ const { regionRegex, outputs } = partition2;
+ if (new RegExp(regionRegex).test(value)) {
+ return {
+ ...outputs
+ };
+ }
+ }
+ const DEFAULT_PARTITION = partitions.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.");
+ }
+ return {
+ ...DEFAULT_PARTITION.outputs
+ };
+ };
+ setPartitionInfo = (partitionsInfo2, userAgentPrefix = "") => {
+ selectedPartitionsInfo = partitionsInfo2;
+ selectedUserAgentPrefix = userAgentPrefix;
+ };
+ useDefaultPartitionInfo = () => {
+ setPartitionInfo(partitionsInfo, "");
+ };
+ getUserAgentPrefix = () => selectedUserAgentPrefix;
+ }
+});
+
+// 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");
+ }
+ 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;
+ }
+ }
+ }
+ 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");
+ 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;
+ }
+ 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) => {
+ const { request } = args;
+ if (!HttpRequest.isInstance(request)) {
+ return next(args);
+ }
+ const { headers } = request;
+ const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
+ const defaultUserAgent2 = (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))}`);
+ const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
+ const appId = await options.userAgentAppId();
+ if (appId) {
+ defaultUserAgent2.push(escapeUserAgent([`app`, `${appId}`]));
+ }
+ const prefix = getUserAgentPrefix();
+ const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent2, ...userAgent, ...customUserAgent]).join(SPACE);
+ const normalUAValue = [
+ ...defaultUserAgent2.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[USER_AGENT] = sdkUserAgentValue;
+ } else {
+ headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
+ }
+ return next({
+ ...args,
+ request
+ });
+ };
+ 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);
+ const prefix = name.substring(0, prefixSeparatorIndex);
+ let uaName = name.substring(prefixSeparatorIndex + 1);
+ if (prefix === "api") {
+ uaName = uaName.toLowerCase();
+ }
+ return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
+ switch (index) {
+ case 0:
+ return item;
+ case 1:
+ return `${acc}/${item}`;
+ default:
+ return `${acc}#${item}`;
+ }
+ }, "");
+ };
+ getUserAgentMiddlewareOptions = {
+ name: "getUserAgentMiddleware",
+ step: "build",
+ priority: "low",
+ tags: ["SET_USER_AGENT", "USER_AGENT"],
+ override: true
+ };
+ getUserAgentPlugin = (config) => ({
+ applyToStack: (clientStack) => {
+ clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
+ }
+ });
+ }
+});
+
+// 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]];
+ }
+ }
+ 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 = (dirname4) => {
+ const cwd = process.cwd();
+ if (!dirname4) {
+ return [cwd];
+ }
+ const normalizedPath = (0, import_node_path6.normalize)(dirname4);
+ 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 dirname4 = typeof __dirname !== "undefined" ? __dirname : void 0;
+ const nodeModulesParentDirs = getNodeModulesParentDirs(dirname4);
+ 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;
+ }
+ versionFromApp = version;
+ break;
+ } catch {
+ }
+ }
+ 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"];
+ }
+ 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);
+ }
+ 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;
+ }
+});
+
+// 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/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;
+ }
+ 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]);
+ }
+ const appId = await config?.userAgentAppId?.();
+ if (appId) {
+ sections.push([`app/${appId}`]);
+ }
+ return sections;
+ };
+ }
+});
+
+// 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";
+ 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;
+ }
+ }
+ 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;
+ };
+ }
+});
+
+// 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();
+ return {
+ partition: partition2,
+ service,
+ region,
+ accountId,
+ resourceId
+ };
+ };
+ }
+});
+
+// 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
+ };
+ 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.");
+ }
+ 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;
+ };
+ toEndpointV12 = (endpoint) => parseUrl(endpoint.url);
+ }
+});
+
+// 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.");
+ }
+ 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
+ };
+ }
+});
+
+// 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) => {
+ return {
+ setRegion(region) {
+ runtimeConfig.region = region;
+ },
+ region() {
+ return runtimeConfig.region;
+ }
+ };
+ };
+ resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {
+ return {
+ region: awsRegionExtensionConfiguration.region()
+ };
+ };
+ }
+});
+
+// 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
+});
+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/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js
-var import_protocol_http9, getDateHeader;
+var getDateHeader;
var init_getDateHeader = __esm({
"node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js"() {
- import_protocol_http9 = __toESM(require_dist_cjs2());
- getDateHeader = (response) => import_protocol_http9.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0;
+ init_protocols();
+ getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0;
}
});
@@ -29206,7 +32269,7 @@ var init_getUpdatedSystemClockOffset = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js
-var init_utils = __esm({
+var init_utils3 = __esm({
"node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js"() {
init_getDateHeader();
init_getSkewCorrectedDate();
@@ -29215,11 +32278,11 @@ var init_utils = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js
-var import_protocol_http10, throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer, AWSSDKSigV4Signer;
+var throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer, AWSSDKSigV4Signer;
var init_AwsSdkSigV4Signer = __esm({
"node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js"() {
- import_protocol_http10 = __toESM(require_dist_cjs2());
- init_utils();
+ init_protocols();
+ init_utils3();
throwSigningPropertyError = (name, property) => {
if (!property) {
throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
@@ -29245,7 +32308,7 @@ var init_AwsSdkSigV4Signer = __esm({
};
AwsSdkSigV4Signer = class {
async sign(httpRequest, identity, signingProperties) {
- if (!import_protocol_http10.HttpRequest.isInstance(httpRequest)) {
+ if (!HttpRequest.isInstance(httpRequest)) {
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
}
const validatedProps = await validateSigningProperties(signingProperties);
@@ -29294,15 +32357,15 @@ var init_AwsSdkSigV4Signer = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js
-var import_protocol_http11, AwsSdkSigV4ASigner;
+var AwsSdkSigV4ASigner;
var init_AwsSdkSigV4ASigner = __esm({
"node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js"() {
- import_protocol_http11 = __toESM(require_dist_cjs2());
- init_utils();
+ init_protocols();
+ init_utils3();
init_AwsSdkSigV4Signer();
AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer {
async sign(httpRequest, identity, signingProperties) {
- if (!import_protocol_http11.HttpRequest.isInstance(httpRequest)) {
+ if (!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);
@@ -29344,15 +32407,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: (env, options) => {
+ environmentVariableSelector: (env2, options) => {
if (options?.signingName) {
const bearerTokenKey = getBearerTokenEnvKey(options.signingName);
- if (bearerTokenKey in env)
+ if (bearerTokenKey in env2)
return ["httpBearerAuth"];
}
- if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env))
+ if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env2))
return void 0;
- return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
+ return getArrayForCommaSeparatedString(env2[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
},
configFileSelector: (profile) => {
if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))
@@ -29365,21 +32428,21 @@ var init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js
-var import_property_provider, resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS;
+var 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();
- import_property_provider = __toESM(require_dist_cjs28());
+ init_config2();
resolveAwsSdkSigV4AConfig = (config) => {
- config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet);
+ config.sigv4aSigningRegionSet = normalizeProvider2(config.sigv4aSigningRegionSet);
return config;
};
NODE_SIGV4A_CONFIG_OPTIONS = {
- environmentVariableSelector(env) {
- if (env.AWS_SIGV4A_SIGNING_REGION_SET) {
- return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
+ environmentVariableSelector(env2) {
+ if (env2.AWS_SIGV4A_SIGNING_REGION_SET) {
+ return env2.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
}
- throw new import_property_provider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
+ throw new ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
tryNextLink: true
});
},
@@ -29387,7 +32450,7 @@ var init_resolveAwsSdkSigV4AConfig = __esm({
if (profile.sigv4a_signing_region_set) {
return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim());
}
- throw new import_property_provider.ProviderError("sigv4a_signing_region_set not set in profile.", {
+ throw new ProviderError("sigv4a_signing_region_set not set in profile.", {
tryNextLink: true
});
},
@@ -29397,15 +32460,136 @@ var init_resolveAwsSdkSigV4AConfig = __esm({
});
// node_modules/@smithy/signature-v4/dist-cjs/index.js
-var require_dist_cjs36 = __commonJS({
+var require_dist_cjs5 = __commonJS({
"node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2) {
"use strict";
- 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 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 ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
var AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
@@ -29449,224 +32633,6 @@ var require_dist_cjs36 = __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 = {};
@@ -29674,13 +32640,13 @@ var require_dist_cjs36 = __commonJS({
if (key.toLowerCase() === SIGNATURE_HEADER) {
continue;
}
- const encodedKey = utilUriEscape.escapeUri(key);
+ const encodedKey = protocols2.escapeUri(key);
keys.push(encodedKey);
const value = query[key];
if (typeof value === "string") {
- serialized[encodedKey] = `${encodedKey}=${utilUriEscape.escapeUri(value)}`;
+ serialized[encodedKey] = `${encodedKey}=${protocols2.escapeUri(value)}`;
} else if (Array.isArray(value)) {
- serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${utilUriEscape.escapeUri(value2)}`]), []).sort().join("&");
+ serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${protocols2.escapeUri(value2)}`]), []).sort().join("&");
}
}
return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&");
@@ -29710,8 +32676,8 @@ var require_dist_cjs36 = __commonJS({
this.sha256 = sha256;
this.uriEscapePath = uriEscapePath;
this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true;
- this.regionProvider = utilMiddleware.normalizeProvider(region);
- this.credentialProvider = utilMiddleware.normalizeProvider(credentials);
+ this.regionProvider = client.normalizeProvider(region);
+ this.credentialProvider = client.normalizeProvider(credentials);
}
createCanonicalRequest(request, canonicalHeaders, payloadHash) {
const sortedHeaders = Object.keys(canonicalHeaders).sort();
@@ -29725,17 +32691,17 @@ ${payloadHash}`;
}
async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {
const hash = new this.sha256();
- hash.update(utilUtf8.toUint8Array(canonicalRequest));
+ hash.update(serde.toUint8Array(canonicalRequest));
const hashedRequest = await hash.digest();
return `${algorithmIdentifier}
${longDate}
${credentialScope}
-${utilHexEncoding.toHex(hashedRequest)}`;
+${serde.toHex(hashedRequest)}`;
}
- getCanonicalPath({ path: path3 }) {
+ getCanonicalPath({ path: path4 }) {
if (this.uriEscapePath) {
const normalizedPathSegments = [];
- for (const pathSegment of path3.split("/")) {
+ for (const pathSegment of path4.split("/")) {
if (pathSegment?.length === 0)
continue;
if (pathSegment === ".")
@@ -29746,11 +32712,11 @@ ${utilHexEncoding.toHex(hashedRequest)}`;
normalizedPathSegments.push(pathSegment);
}
}
- const normalizedPath = `${path3?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path3?.endsWith("/") ? "/" : ""}`;
- const doubleEncoded = utilUriEscape.escapeUri(normalizedPath);
+ const normalizedPath = `${path4?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path4?.endsWith("/") ? "/" : ""}`;
+ const doubleEncoded = protocols2.escapeUri(normalizedPath);
return doubleEncoded.replace(/%2F/g, "/");
}
- return path3;
+ return path4;
}
validateResolvedCredentials(credentials) {
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
@@ -29768,6 +32734,100 @@ ${utilHexEncoding.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 }) {
@@ -29821,7 +32881,7 @@ ${utilHexEncoding.toHex(hashedRequest)}`;
const hashedPayload = await getPayloadHash({ headers: {}, body: payload2 }, this.sha256);
const hash = new this.sha256();
hash.update(headers);
- const hashedHeaders = utilHexEncoding.toHex(await hash.digest());
+ const hashedHeaders = serde.toHex(await hash.digest());
const stringToSign = [
EVENT_ALGORITHM_IDENTIFIER,
longDate,
@@ -29858,8 +32918,8 @@ ${utilHexEncoding.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(utilUtf8.toUint8Array(stringToSign));
- return utilHexEncoding.toHex(await hash.digest());
+ hash.update(serde.toUint8Array(stringToSign));
+ return serde.toHex(await hash.digest());
}
async signRequest(requestToSign, { signingDate = /* @__PURE__ */ new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) {
const credentials = await this.credentialProvider();
@@ -29884,8 +32944,8 @@ ${utilHexEncoding.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(utilUtf8.toUint8Array(stringToSign));
- return utilHexEncoding.toHex(await hash.digest());
+ hash.update(serde.toUint8Array(stringToSign));
+ return serde.toHex(await hash.digest());
}
getSigningKey(credentials, region, shortDate, service) {
return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);
@@ -29947,7 +33007,7 @@ function normalizeCredentialProvider(config, { credentials, credentialDefaultPro
}
} else {
if (credentialDefaultProvider) {
- credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {
+ credentialsProvider = normalizeProvider2(credentialDefaultProvider(Object.assign({}, config, {
parentClientConfig: config
})));
} else {
@@ -29971,9 +33031,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_client();
+ init_client3();
init_dist_es();
- import_signature_v4 = __toESM(require_dist_cjs36());
+ import_signature_v4 = __toESM(require_dist_cjs5());
resolveAwsSdkSigV4Config = (config) => {
let inputCredentials = config.credentials;
let isUserSupplied = !!config.credentials;
@@ -30016,9 +33076,9 @@ var init_resolveAwsSdkSigV4Config = __esm({
const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config;
let signer;
if (config.signer) {
- signer = normalizeProvider(config.signer);
+ signer = normalizeProvider2(config.signer);
} else if (config.regionInfoProvider) {
- signer = () => normalizeProvider(config.region)().then(async (region) => [
+ signer = () => normalizeProvider2(config.region)().then(async (region) => [
await config.regionInfoProvider(region, {
useFipsEndpoint: await config.useFipsEndpoint(),
useDualstackEndpoint: await config.useDualstackEndpoint()
@@ -30044,7 +33104,7 @@ var init_resolveAwsSdkSigV4Config = __esm({
authScheme = Object.assign({}, {
name: "sigv4",
signingName: config.signingName || config.defaultSigningName,
- signingRegion: await normalizeProvider(config.region)(),
+ signingRegion: await normalizeProvider2(config.region)(),
properties: {}
}, authScheme);
const signingRegion = authScheme.signingRegion;
@@ -30106,47 +33166,2203 @@ var init_httpAuthSchemes2 = __esm({
}
});
-// 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) {
+// 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) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
- exports2.toStream = toStream;
- var node_stream_1 = require("node:stream");
- function toStream(bytes) {
- return node_stream_1.Readable.from(Buffer.from(bytes));
+ 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);
+ }
+});
+
+// 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 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) => {
+ 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`");
+ })()
+ };
+ };
+ 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.1061.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.17",
+ "@aws-sdk/credential-provider-node": "^3.972.50",
+ "@aws-sdk/signature-v4-multi-region": "^3.996.31",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/fetch-http-handler": "^5.4.6",
+ "@smithy/node-http-handler": "^4.7.6",
+ "@smithy/types": "^4.14.3",
+ tslib: "^2.6.2"
+ },
+ devDependencies: {
+ "@smithy/snapshot-testing": "^2.1.7",
+ "@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 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 = /* @__PURE__ */ new Set(["localhost", "127.0.0.1"]);
+ var GREENGRASS_PROTOCOLS = /* @__PURE__ */ new Set(["http:", "https:"]);
+ 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]) {
+ let parsed;
+ try {
+ parsed = new URL(process.env[ENV_CMDS_FULL_URI]);
+ } catch {
+ throw new config.CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger: logger2 });
+ }
+ if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {
+ throw new config.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
+ tryNextLink: false,
+ logger: logger2
+ });
+ }
+ if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {
+ throw new config.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
+ tryNextLink: false,
+ logger: logger2
+ });
+ }
+ return {
+ protocol: parsed.protocol,
+ hostname: parsed.hostname,
+ path: parsed.pathname + parsed.search,
+ 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 path4 = request.path;
+ if (queryString) {
+ path4 += `?${queryString}`;
+ }
+ if (request.fragment) {
+ path4 += `#${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: path4,
+ 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 path4 = request.path;
+ if (queryString) {
+ path4 += `?${queryString}`;
+ }
+ if (request.fragment) {
+ path4 += `#${request.fragment}`;
+ }
+ const clientHttp2Stream = session.request({
+ ...request.headers,
+ [http22.constants.HTTP2_HEADER_PATH]: path4,
+ [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/util-arn-parser/dist-cjs/index.js
-var require_dist_cjs37 = __commonJS({
- "node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js"(exports2) {
+// 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";
- 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 {
- partition,
- service,
- region,
- accountId,
- resource: resource.join(":")
+ 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();
};
};
- 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");
+ 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({ connectionTimeout: options.timeout ?? 1e3 });
+ const requestTimeout = options.timeout ?? 1e3;
+ const provider = (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, { requestTimeout });
+ 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);
+ return async () => {
+ try {
+ return await provider();
+ } finally {
+ requestHandler.destroy?.();
+ }
+ };
+ };
+ 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.15",
+ 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.17",
+ "@aws-sdk/signature-v4-multi-region": "^3.996.31",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/fetch-http-handler": "^5.4.6",
+ "@smithy/node-http-handler": "^4.7.6",
+ "@smithy/types": "^4.14.3",
+ 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"
+ }
}
- return `arn:${partition}:${service}:${region}:${accountId}:${resource}`;
};
- exports2.build = build;
- exports2.parse = parse;
- exports2.validate = validate;
}
});
@@ -30314,7 +35530,7 @@ function bytesToUtf8(bytes, at, to) {
if (textDecoder) {
return textDecoder.decode(bytes.subarray(at, to));
}
- return (0, import_util_utf84.toUtf8)(bytes.subarray(at, to));
+ return toUtf8(bytes.subarray(at, to));
}
function demote(bigInteger) {
const num = Number(bigInteger);
@@ -30485,7 +35701,7 @@ function decodeMap(at, to) {
const offset = _offset;
at += offset;
const base = at;
- const map2 = {};
+ const map3 = {};
for (let i5 = 0; i5 < mapDataLength; ++i5) {
if (at >= to) {
throw new Error("unexpected end of map payload.");
@@ -30498,22 +35714,22 @@ function decodeMap(at, to) {
at += _offset;
const value = decode(at, to);
at += _offset;
- map2[key] = value;
+ map3[key] = value;
}
_offset = offset + (at - base);
- return map2;
+ return map3;
}
function decodeMapIndefinite(at, to) {
at += 1;
const base = at;
- const map2 = {};
+ const map3 = {};
for (; at < to; ) {
if (at >= to) {
throw new Error("unexpected end of map payload.");
}
if (payload[at] === 255) {
_offset = at - base + 2;
- return map2;
+ return map3;
}
const major = (payload[at] & 224) >> 5;
if (major !== majorUtf8String) {
@@ -30523,7 +35739,7 @@ function decodeMapIndefinite(at, to) {
at += _offset;
const value = decode(at, to);
at += _offset;
- map2[key] = value;
+ map3[key] = value;
}
throw new Error("expected break marker.");
}
@@ -30572,11 +35788,10 @@ function castBigInt(bigInt) {
}
return bigInt;
}
-var import_util_utf84, USE_TEXT_DECODER, USE_BUFFER, payload, dataView, textDecoder, _offset, minorValueToArgumentLength;
+var 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";
@@ -30604,7 +35819,7 @@ function ensureSpace(bytes) {
}
}
}
-function toUint8Array() {
+function toUint8Array2() {
const out = alloc(cursor);
out.set(data.subarray(0, cursor), 0);
cursor = 0;
@@ -30652,7 +35867,7 @@ function encode(_input) {
encodeHeader(majorUtf8String, Buffer.byteLength(input));
cursor += data.write(input, cursor);
} else {
- const bytes = (0, import_util_utf85.fromUtf8)(input);
+ const bytes = fromUtf8(input);
encodeHeader(majorUtf8String, bytes.byteLength);
data.set(bytes, cursor);
cursor += bytes.byteLength;
@@ -30781,11 +35996,10 @@ function encode(_input) {
throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`);
}
}
-var import_util_utf85, USE_BUFFER2, initialSize, data, dataView2, cursor;
+var 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;
@@ -30809,9 +36023,9 @@ var init_cbor = __esm({
serialize(input) {
try {
encode(input);
- return toUint8Array();
+ return toUint8Array2();
} catch (e5) {
- toUint8Array();
+ toUint8Array2();
throw e5;
}
},
@@ -30868,14 +36082,12 @@ var init_parseCborBody = __esm({
});
// node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js
-var import_util_base643, CborCodec, CborShapeSerializer, CborShapeDeserializer;
+var 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 {
@@ -30899,13 +36111,13 @@ var init_CborCodec = __esm({
const ns = NormalizedSchema.of(schema);
if (source == null) {
if (ns.isIdempotencyToken()) {
- return (0, import_uuid.v4)();
+ return generateIdempotencyToken();
}
return source;
}
if (ns.isBlobSchema()) {
if (typeof source === "string") {
- return (this.serdeContext?.base64Decoder ?? import_util_base643.fromBase64)(source);
+ return (this.serdeContext?.base64Decoder ?? fromBase64)(source);
}
return source;
}
@@ -30995,7 +36207,7 @@ var init_CborCodec = __esm({
}
if (ns.isBlobSchema()) {
if (typeof value === "string") {
- return (this.serdeContext?.base64Decoder ?? import_util_base643.fromBase64)(value);
+ return (this.serdeContext?.base64Decoder ?? fromBase64)(value);
}
return value;
}
@@ -31079,13 +36291,12 @@ var init_CborCodec = __esm({
});
// node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js
-var import_util_middleware5, SmithyRpcV2CborProtocol;
+var 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 {
@@ -31121,12 +36332,12 @@ var init_SmithyRpcV2CborProtocol = __esm({
} catch (e5) {
}
}
- const { service, operation: operation2 } = (0, import_util_middleware5.getSmithyContext)(context);
- const path3 = `/service/${service}/operation/${operation2}`;
+ const { service, operation: operation2 } = getSmithyContext(context);
+ const path4 = `/service/${service}/operation/${operation2}`;
if (request.path.endsWith("/")) {
- request.path += path3.slice(1);
+ request.path += path4.slice(1);
} else {
- request.path += path3;
+ request.path += path4;
}
return request;
}
@@ -31165,7 +36376,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(message);
+ const exception = new ErrorCtor({});
const output = {};
for (const [name, member2] of ns.structIterator()) {
output[name] = this.deserializer.readValue(member2, dataObject[name]);
@@ -31192,11 +36403,11 @@ var init_cbor2 = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js
-var import_smithy_client, ProtocolLib;
+var 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;
@@ -31274,7 +36485,7 @@ var init_ProtocolLib = __esm({
decorateServiceException(exception, additions = {}) {
if (this.queryCompat) {
const msg = exception.Message ?? additions.Message;
- const error3 = (0, import_smithy_client.decorateServiceException)(exception, additions);
+ const error3 = decorateServiceException(exception, additions);
if (msg) {
error3.message = msg;
}
@@ -31289,7 +36500,7 @@ var init_ProtocolLib = __esm({
}
return error3;
}
- return (0, import_smithy_client.decorateServiceException)(exception, additions);
+ return decorateServiceException(exception, additions);
}
setQueryCompatError(output, response) {
const queryErrorHeader = response.headers?.["x-amzn-query-error"];
@@ -31370,7 +36581,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(message);
+ const exception = new ErrorCtor({});
const output = {};
for (const [name, member2] of ns.structIterator()) {
if (dataObject[name] != null) {
@@ -31398,15 +36609,15 @@ var init_coercing_serializers = __esm({
return val;
}
if (typeof val === "number" || typeof val === "bigint") {
- const warning2 = new Error(`Received number ${val} where a string was expected.`);
- warning2.name = "Warning";
- console.warn(warning2);
+ const warning3 = new Error(`Received number ${val} where a string was expected.`);
+ warning3.name = "Warning";
+ console.warn(warning3);
return String(val);
}
if (typeof val === "boolean") {
- const warning2 = new Error(`Received boolean ${val} where a string was expected.`);
- warning2.name = "Warning";
- console.warn(warning2);
+ const warning3 = new Error(`Received boolean ${val} where a string was expected.`);
+ warning3.name = "Warning";
+ console.warn(warning3);
return String(val);
}
return val;
@@ -31420,9 +36631,9 @@ var init_coercing_serializers = __esm({
if (typeof val === "string") {
const lowercase = val.toLowerCase();
if (val !== "" && lowercase !== "false" && lowercase !== "true") {
- const warning2 = new Error(`Received string "${val}" where a boolean was expected.`);
- warning2.name = "Warning";
- console.warn(warning2);
+ const warning3 = new Error(`Received string "${val}" where a boolean was expected.`);
+ warning3.name = "Warning";
+ console.warn(warning3);
}
return val !== "" && lowercase !== "false";
}
@@ -31437,9 +36648,9 @@ var init_coercing_serializers = __esm({
if (typeof val === "string") {
const num = Number(val);
if (num.toString() !== val) {
- const warning2 = new Error(`Received string "${val}" where a number was expected.`);
- warning2.name = "Warning";
- console.warn(warning2);
+ const warning3 = new Error(`Received string "${val}" where a number was expected.`);
+ warning3.name = "Warning";
+ console.warn(warning3);
return val;
}
return num;
@@ -31519,17 +36730,17 @@ var init_jsonReviver = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js
-var import_smithy_client2, import_util_utf86, collectBodyString;
+var collectBodyString;
var init_common = __esm({
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() {
- 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));
+ init_protocols();
+ init_serde();
+ collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => (context?.utf8Encoder ?? toUtf8)(body));
}
});
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js
-var parseJsonBody, parseJsonErrorBody, findKey, sanitizeErrorCode, loadRestJsonErrorCode;
+var parseJsonBody, parseJsonErrorBody, findKey, sanitizeErrorCode, loadRestJsonErrorCode, loadJsonRpcErrorCode, loadErrorCode;
var init_parseJsonBody = __esm({
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() {
init_common();
@@ -31571,17 +36782,32 @@ var init_parseJsonBody = __esm({
return cleanValue;
};
loadRestJsonErrorCode = (output, data3) => {
- 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"]);
+ 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;
}
}
};
@@ -31589,13 +36815,13 @@ var init_parseJsonBody = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js
-var import_util_base644, JsonShapeDeserializer;
+var JsonShapeDeserializer;
var init_JsonShapeDeserializer = __esm({
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js"() {
init_protocols();
init_schema();
init_serde();
- import_util_base644 = __toESM(require_dist_cjs10());
+ init_serde();
init_ConfigurableSerdeContext();
init_UnionSerde();
init_jsonReviver();
@@ -31673,7 +36899,7 @@ var init_JsonShapeDeserializer = __esm({
}
}
if (ns.isBlobSchema() && typeof value === "string") {
- return (0, import_util_base644.fromBase64)(value);
+ return fromBase64(value);
}
const mediaType = ns.getMergedTraits().mediaType;
if (ns.isStringSchema() && typeof value === "string" && mediaType) {
@@ -31797,13 +37023,12 @@ var init_jsonReplacer = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js
-var import_util_base645, JsonShapeSerializer;
+var 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 {
@@ -31907,7 +37132,7 @@ var init_JsonShapeSerializer = __esm({
if (ns === this.rootSchema) {
return value;
}
- return (this.serdeContext?.base64Encoder ?? import_util_base645.toBase64)(value);
+ return (this.serdeContext?.base64Encoder ?? toBase64)(value);
}
if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
const format2 = determineTimestampFormat(ns, this.settings);
@@ -31932,7 +37157,7 @@ var init_JsonShapeSerializer = __esm({
}
if (ns.isStringSchema()) {
if (typeof value === "undefined" && ns.isIdempotencyToken()) {
- return (0, import_uuid.v4)();
+ return generateIdempotencyToken();
}
const mediaType = ns.getMergedTraits().mediaType;
if (value != null && mediaType) {
@@ -31953,7 +37178,7 @@ var init_JsonShapeSerializer = __esm({
if (ns === this.rootSchema) {
return value;
}
- return (this.serdeContext?.base64Encoder ?? import_util_base645.toBase64)(value);
+ return (this.serdeContext?.base64Encoder ?? toBase64)(value);
}
if (typeof value === "bigint") {
this.useReplacer = true;
@@ -32061,16 +37286,17 @@ var init_AwsJsonRpcProtocol = __esm({
return this.codec;
}
async handleError(operationSchema, context, response, dataObject, metadata) {
- if (this.awsQueryCompatible) {
+ const { awsQueryCompatible } = this;
+ if (awsQueryCompatible) {
this.mixin.setQueryCompatError(dataObject, response);
}
- const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
+ const errorIdentifier = loadJsonRpcErrorCode(response, dataObject, awsQueryCompatible) ?? "Unknown";
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
- const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : void 0);
+ const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, 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(message);
+ const exception = new ErrorCtor({});
const output = {};
const errorDeserializer = this.codec.createDeserializer();
for (const [name, member2] of ns.structIterator()) {
@@ -32078,7 +37304,7 @@ var init_AwsJsonRpcProtocol = __esm({
output[name] = errorDeserializer.readObject(member2, dataObject[name]);
}
}
- if (this.awsQueryCompatible) {
+ if (awsQueryCompatible) {
this.mixin.queryCompatOutput(dataObject, output);
}
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
@@ -32218,7 +37444,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(message);
+ const exception = new ErrorCtor({});
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
const output = {};
const errorDeserializer = this.codec.createDeserializer();
@@ -32239,10 +37465,10 @@ var init_AwsRestJsonProtocol = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js
-var import_smithy_client3, awsExpectUnion;
+var awsExpectUnion;
var init_awsExpectUnion = __esm({
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"() {
- import_smithy_client3 = __toESM(require_dist_cjs34());
+ init_serde();
awsExpectUnion = (value) => {
if (value == null) {
return void 0;
@@ -32250,7 +37476,7 @@ var init_awsExpectUnion = __esm({
if (typeof value === "object" && "__type" in value) {
delete value.__type;
}
- return (0, import_smithy_client3.expectUnion)(value);
+ return expectUnion(value);
};
}
});
@@ -32265,7 +37491,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: () => Bt, XMLParser: () => Tt, XMLValidator: () => Ut });
+ t.r(e5), t.d(e5, { XMLBuilder: () => Xt, XMLParser: () => Tt, XMLValidator: () => Yt });
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 = [];
@@ -33300,7 +38526,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, ">");
+ const i7 = gt(t2, n4, false);
i7 && ((i7 && i7.tagName) === e6 && "/" !== i7.tagExp[i7.tagExp.length - 1] && s2++, n4 = i7.closeIndex);
}
}
@@ -33405,7 +38631,7 @@ var require_fxp = __commonJS({
if (a6[h6]) {
let t3 = vt(a6[h6], e6, n4, i6);
const s3 = At(t3, e6);
- 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);
+ 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);
else {
const n5 = e6.jPath ? i6.toString() : i6;
e6.isArray(h6, n5, s3) ? r6[h6] = [t3] : r6[h6] = t3;
@@ -33461,7 +38687,16 @@ var require_fxp = __commonJS({
return O.getMetaDataSymbol();
}
}
- function Ct(t2, e6) {
+ 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) {
let n4 = "";
e6.format && e6.indentBy.length > 0 && (n4 = "\n");
const i6 = [];
@@ -33469,123 +38704,120 @@ var require_fxp = __commonJS({
const n5 = e6.stopNodes[t3];
"string" == typeof n5 ? i6.push(new G(n5)) : n5 instanceof G && i6.push(n5);
}
- return Pt(t2, e6, n4, new R(), i6);
+ return It(t2, e6, n4, new R(), i6);
}
- function Pt(t2, e6, n4, i6, s2) {
+ function It(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 = Vt(n5, e6), n5;
+ return n5 = Ft(n5, e6), n5;
}
return "";
}
for (let a6 = 0; a6 < t2.length; a6++) {
- const h6 = t2[a6], l4 = Dt(h6);
+ const h6 = t2[a6], l4 = Vt(h6);
if (void 0 === l4) continue;
- const u2 = Ot(h6[":@"], e6);
+ const u2 = Dt(h6[":@"], e6);
i6.push(l4, u2);
- const p3 = jt(i6, s2);
+ const p3 = kt(i6, s2);
if (l4 === e6.textNodeName) {
let t3 = h6[l4];
- p3 || (t3 = e6.tagValueProcessor(l4, t3), t3 = Vt(t3, e6)), o3 && (r6 += n4), r6 += t3, o3 = false, i6.pop();
+ p3 || (t3 = e6.tagValueProcessor(l4, t3), t3 = Ft(t3, e6)), o3 && (r6 += n4), r6 += t3, o3 = false, i6.pop();
continue;
}
if (l4 === e6.cdataPropName) {
- o3 && (r6 += n4);
- const t3 = h6[l4][0][e6.textNodeName];
- r6 += `/g, "]]]]>")}]]>`, o3 = false, i6.pop();
+ o3 && (r6 += n4), r6 += ``, o3 = false, i6.pop();
continue;
}
if (l4 === e6.commentPropName) {
- const t3 = h6[l4][0][e6.textNodeName];
- r6 += n4 + ``, o3 = true, i6.pop();
+ r6 += n4 + ``, o3 = true, i6.pop();
continue;
}
if ("?" === l4[0]) {
- const t3 = Mt(h6[":@"], e6, p3), s3 = "?xml" === l4 ? "" : n4;
+ const t3 = Lt(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}${Mt(h6[":@"], e6, p3)}`;
+ const d6 = n4 + `<${l4}${Lt(h6[":@"], e6, p3)}`;
let f6;
- 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}${l4}>` : (r6 += d6 + ">", f6 && "" !== n4 && (f6.includes("/>") || f6.includes("")) ? r6 += n4 + e6.indentBy + f6 + n4 : r6 += f6, r6 += `${l4}>`) : r6 += d6 + "/>", o3 = true, i6.pop();
+ 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}${l4}>` : (r6 += d6 + ">", f6 && "" !== n4 && (f6.includes("/>") || f6.includes("")) ? r6 += n4 + e6.indentBy + f6 + n4 : r6 += f6, r6 += `${l4}>`) : r6 += d6 + "/>", o3 = true, i6.pop();
}
return r6;
}
- function Ot(t2, e6) {
+ function Dt(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] = 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] = Ot(t2[s2]), i6 = true);
return i6 ? n4 : null;
}
- function $t(t2, e6) {
+ function Mt(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 = Dt(s2);
+ const s2 = t2[i6], r6 = Vt(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 = It(s2[":@"], e6), i7 = $t(s2[r6], e6);
+ const t3 = jt(s2[":@"], e6), i7 = Mt(s2[r6], e6);
i7 && 0 !== i7.length ? n4 += `<${r6}${t3}>${i7}${r6}>` : n4 += `<${r6}${t3}/>`;
}
}
}
return n4;
}
- function It(t2, e6) {
+ function jt(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)}="${s2}"`;
+ true === s2 && e6.suppressBooleanAttributes ? n4 += ` ${i6.substr(e6.attributeNamePrefix.length)}` : n4 += ` ${i6.substr(e6.attributeNamePrefix.length)}="${Ot(s2)}"`;
}
return n4;
}
- function Dt(t2) {
+ function Vt(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 Mt(t2, e6, n4) {
+ function Lt(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 = Vt(r6, e6)), true === r6 && e6.suppressBooleanAttributes ? i6 += ` ${s2.substr(e6.attributeNamePrefix.length)}` : i6 += ` ${s2.substr(e6.attributeNamePrefix.length)}="${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)}"`;
}
return i6;
}
- function jt(t2, e6) {
+ function kt(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 Vt(t2, e6) {
+ function Ft(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 Lt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e6) {
+ const Rt = { 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 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++) {
+ 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++) {
const e7 = this.options.stopNodes[t3];
"string" == typeof e7 ? this.stopNodeExpressions.push(new G(e7)) : e7 instanceof G && this.stopNodeExpressions.push(e7);
}
@@ -33597,11 +38829,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 = Gt), this.processTextOrObjNode = Ft, this.options.format ? (this.indentate = Rt, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
+ } : () => 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() {
return "";
}, this.tagEndChar = ">", this.newLine = "");
}
- function Ft(t2, e6, n4, i6) {
+ function Bt(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);
@@ -33610,25 +38842,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 Rt(t2) {
+ function Ut(t2) {
return this.options.indentBy.repeat(t2);
}
- function Gt(t2) {
+ function Wt(t2) {
return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen);
}
- kt.prototype.build = function(t2) {
- if (this.options.preserveOrder) return Ct(t2, this.options);
+ Gt.prototype.build = function(t2) {
+ if (this.options.preserveOrder) return $t(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;
}
- }, kt.prototype.j2x = function(t2, e6, n4) {
+ }, Gt.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 ? 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 || a6 === this.options.commentPropName ? 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);
@@ -33674,22 +38906,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 };
- }, 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) {
+ }, 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) {
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] = 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] = Ot(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] = t2[i6], n4 = true);
+ s2 && (e6[s2] = Ot(t2[i6]), n4 = true);
}
return n4 ? e6 : null;
- }, kt.prototype.buildRawContent = function(t2) {
+ }, Gt.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];
@@ -33712,7 +38944,7 @@ var require_fxp = __commonJS({
} else e6 += `<${n4}>${i6}${n4}>`;
}
return e6;
- }, kt.prototype.buildAttributesForStopNode = function(t2) {
+ }, Gt.prototype.buildAttributesForStopNode = function(t2) {
if (!t2 || "object" != typeof t2) return "";
let e6 = "";
if (this.options.attributesGroupName && t2[this.options.attributesGroupName]) {
@@ -33731,26 +38963,26 @@ var require_fxp = __commonJS({
}
}
return e6;
- }, kt.prototype.buildObjectNode = function(t2, e6, n4, i6) {
+ }, Gt.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 = "" + e6 + this.tagEndChar, r6 = "";
return "?" === e6[0] && (r6 = "?", s2 = ""), !n4 && "" !== n4 || -1 !== t2.indexOf("<") ? false !== this.options.commentPropName && e6 === this.options.commentPropName && 0 === r6.length ? this.indentate(i6) + `` + this.newLine : this.indentate(i6) + "<" + e6 + n4 + r6 + this.tagEndChar + t2 + this.indentate(i6) + s2 : this.indentate(i6) + "<" + e6 + n4 + r6 + ">" + t2 + s2;
}
- }, kt.prototype.closeTag = function(t2) {
+ }, Gt.prototype.closeTag = function(t2) {
let e6 = "";
return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e6 = "/") : e6 = this.options.suppressEmptyNode ? "/" : `>${t2}`, e6;
- }, kt.prototype.checkStopNode = function(t2) {
+ }, Gt.prototype.checkStopNode = function(t2) {
if (!this.stopNodeExpressions || 0 === this.stopNodeExpressions.length) return false;
for (let e6 = 0; e6 < this.stopNodeExpressions.length; e6++) if (t2.matches(this.stopNodeExpressions[e6])) return true;
return false;
- }, kt.prototype.buildTextValNode = function(t2, e6, n4, i6, s2) {
+ }, Gt.prototype.buildTextValNode = function(t2, e6, n4, i6, s2) {
if (false !== this.options.cdataPropName && e6 === this.options.cdataPropName) {
- const e7 = String(t2).replace(/\]\]>/g, "]]]]>");
+ const e7 = Pt(t2);
return this.indentate(i6) + `` + this.newLine;
}
if (false !== this.options.commentPropName && e6 === this.options.commentPropName) {
- const e7 = String(t2).replace(/--/g, "- -").replace(/-$/, "- ");
+ const e7 = Ct(t2);
return this.indentate(i6) + `` + this.newLine;
}
if ("?" === e6[0]) return this.indentate(i6) + "<" + e6 + n4 + "?" + this.tagEndChar;
@@ -33758,14 +38990,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 + "" + e6 + this.tagEndChar;
}
- }, kt.prototype.replaceEntitiesValue = function(t2) {
+ }, Gt.prototype.replaceEntitiesValue = function(t2) {
if (t2 && t2.length > 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 Bt = kt, Ut = { validate: l3 };
+ const Xt = Gt, Yt = { validate: l3 };
module2.exports = e5;
})();
}
@@ -33837,12 +39069,12 @@ var require_nodable_entities = __commonJS({
}
function mergeEntityMaps(...maps) {
const out = /* @__PURE__ */ Object.create(null);
- for (const map2 of maps) {
- if (!map2) {
+ for (const map3 of maps) {
+ if (!map3) {
continue;
}
- for (const key of Object.keys(map2)) {
- const raw = map2[key];
+ for (const key of Object.keys(map3)) {
+ const raw = map3[key];
if (typeof raw === "string") {
out[key] = raw;
} else if (raw && typeof raw === "object" && raw.val !== void 0) {
@@ -33921,13 +39153,13 @@ var require_nodable_entities = __commonJS({
this._ncrOnLevel = ncrCfg.onLevel;
this._ncrNullLevel = ncrCfg.nullLevel;
}
- setExternalEntities(map2) {
- if (map2) {
- for (const key of Object.keys(map2)) {
+ setExternalEntities(map3) {
+ if (map3) {
+ for (const key of Object.keys(map3)) {
validateEntityName(key);
}
}
- this._externalMap = mergeEntityMaps(map2);
+ this._externalMap = mergeEntityMaps(map3);
}
addExternalEntity(key, value) {
validateEntityName(key);
@@ -33935,10 +39167,10 @@ var require_nodable_entities = __commonJS({
this._externalMap[key] = value;
}
}
- addInputEntities(map2) {
+ addInputEntities(map3) {
this._totalExpansions = 0;
this._expandedLength = 0;
- this._inputMap = mergeEntityMaps(map2);
+ this._inputMap = mergeEntityMaps(map3);
}
reset() {
this._inputMap = /* @__PURE__ */ Object.create(null);
@@ -34159,7 +39391,7 @@ var require_xml_parser = __commonJS({
});
// node_modules/@aws-sdk/xml-builder/dist-cjs/index.js
-var require_dist_cjs38 = __commonJS({
+var require_dist_cjs11 = __commonJS({
"node_modules/@aws-sdk/xml-builder/dist-cjs/index.js"(exports2) {
"use strict";
var xmlParser = require_xml_parser();
@@ -34290,14 +39522,14 @@ var require_dist_cjs38 = __commonJS({
});
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js
-var import_xml_builder, import_smithy_client4, import_util_utf87, XmlShapeDeserializer;
+var import_xml_builder, XmlShapeDeserializer;
var init_XmlShapeDeserializer = __esm({
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js"() {
- import_xml_builder = __toESM(require_dist_cjs38());
+ import_xml_builder = __toESM(require_dist_cjs11());
+ init_client2();
init_protocols();
init_schema();
- import_smithy_client4 = __toESM(require_dist_cjs34());
- import_util_utf87 = __toESM(require_dist_cjs9());
+ init_serde();
init_ConfigurableSerdeContext();
init_UnionSerde();
XmlShapeDeserializer = class extends SerdeContextConfig {
@@ -34329,7 +39561,7 @@ var init_XmlShapeDeserializer = __esm({
}
return output;
}
- const xmlString = (this.serdeContext?.utf8Encoder ?? import_util_utf87.toUtf8)(bytes);
+ const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes);
const parsedObject = this.parseXml(xmlString);
return this.readSchema(schema, key ? parsedObject[key] : parsedObject);
}
@@ -34434,7 +39666,7 @@ var init_XmlShapeDeserializer = __esm({
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
- return (0, import_smithy_client4.getValueFromTextNode)(parsedObjToReturn);
+ return getValueFromTextNode(parsedObjToReturn);
}
return {};
}
@@ -34443,14 +39675,13 @@ var init_XmlShapeDeserializer = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js
-var import_smithy_client5, import_util_base646, QueryShapeSerializer;
+var QueryShapeSerializer;
var init_QueryShapeSerializer = __esm({
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js"() {
init_protocols();
init_schema();
init_serde();
- import_smithy_client5 = __toESM(require_dist_cjs34());
- import_util_base646 = __toESM(require_dist_cjs10());
+ init_serde();
init_ConfigurableSerdeContext();
QueryShapeSerializer = class extends SerdeContextConfig {
settings;
@@ -34470,7 +39701,7 @@ var init_QueryShapeSerializer = __esm({
if (ns.isBlobSchema()) {
if (typeof value === "string" || value instanceof Uint8Array) {
this.writeKey(prefix);
- this.writeValue((this.serdeContext?.base64Encoder ?? import_util_base646.toBase64)(value));
+ this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value));
}
} else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {
if (value != null) {
@@ -34478,7 +39709,7 @@ var init_QueryShapeSerializer = __esm({
this.writeValue(String(value));
} else if (ns.isIdempotencyToken()) {
this.writeKey(prefix);
- this.writeValue((0, import_uuid.v4)());
+ this.writeValue(generateIdempotencyToken());
}
} else if (ns.isBigIntegerSchema()) {
if (value != null) {
@@ -34499,7 +39730,7 @@ var init_QueryShapeSerializer = __esm({
this.writeValue(value.toISOString().replace(".000Z", "Z"));
break;
case 6:
- this.writeValue((0, import_smithy_client5.dateToUtcString)(value));
+ this.writeValue(dateToUtcString(value));
break;
case 7:
this.writeValue(String(value.getTime() / 1e3));
@@ -34724,7 +39955,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(message);
+ const exception = new ErrorCtor({});
const output = {
Type: errorData.Error.Type,
Code: errorData.Error.Code,
@@ -34798,11 +40029,11 @@ var init_QuerySerializerSettings = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js
-var import_xml_builder2, import_smithy_client6, parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode;
+var import_xml_builder2, 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_cjs38());
- import_smithy_client6 = __toESM(require_dist_cjs34());
+ import_xml_builder2 = __toESM(require_dist_cjs11());
+ init_client2();
init_common();
parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
if (encoded.length) {
@@ -34824,7 +40055,7 @@ var init_parseXmlBody = __esm({
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
delete parsedObjToReturn[textNodeName];
}
- return (0, import_smithy_client6.getValueFromTextNode)(parsedObjToReturn);
+ return getValueFromTextNode(parsedObjToReturn);
}
return {};
});
@@ -34850,15 +40081,14 @@ var init_parseXmlBody = __esm({
});
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js
-var import_xml_builder3, import_smithy_client7, import_util_base647, XmlShapeSerializer;
+var import_xml_builder3, XmlShapeSerializer;
var init_XmlShapeSerializer = __esm({
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js"() {
- import_xml_builder3 = __toESM(require_dist_cjs38());
+ import_xml_builder3 = __toESM(require_dist_cjs11());
init_protocols();
init_schema();
init_serde();
- import_smithy_client7 = __toESM(require_dist_cjs34());
- import_util_base647 = __toESM(require_dist_cjs10());
+ init_serde();
init_ConfigurableSerdeContext();
XmlShapeSerializer = class extends SerdeContextConfig {
settings;
@@ -34874,7 +40104,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 ?? import_util_base647.fromBase64)(value);
+ this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? fromBase64)(value);
} else {
this.buffer = this.writeStruct(ns, value, void 0);
const traits = ns.getMergedTraits();
@@ -34993,7 +40223,7 @@ var init_XmlShapeSerializer = __esm({
container.addChildNode(listNode);
}
}
- writeMap(mapMember, map2, container, parentXmlns, containerIsMap = false) {
+ writeMap(mapMember, map3, container, parentXmlns, containerIsMap = false) {
if (!mapMember.isMemberSchema()) {
throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`);
}
@@ -35027,8 +40257,8 @@ var init_XmlShapeSerializer = __esm({
entry.addChildNode(valueNode);
};
if (flat) {
- for (const key in map2) {
- const val = map2[key];
+ for (const key in map3) {
+ const val = map3[key];
if (sparse || val != null) {
const entry = import_xml_builder3.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
addKeyValue(entry, key, val);
@@ -35044,8 +40274,8 @@ var init_XmlShapeSerializer = __esm({
}
container.addChildNode(mapNode);
}
- for (const key in map2) {
- const val = map2[key];
+ for (const key in map3) {
+ const val = map3[key];
if (sparse || val != null) {
const entry = import_xml_builder3.XmlNode.of("entry");
addKeyValue(entry, key, val);
@@ -35062,7 +40292,7 @@ var init_XmlShapeSerializer = __esm({
let nodeContents = null;
if (value && typeof value === "object") {
if (ns.isBlobSchema()) {
- nodeContents = (this.serdeContext?.base64Encoder ?? import_util_base647.toBase64)(value);
+ nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value);
} else if (ns.isTimestampSchema() && value instanceof Date) {
const format2 = determineTimestampFormat(ns, this.settings);
switch (format2) {
@@ -35070,14 +40300,14 @@ var init_XmlShapeSerializer = __esm({
nodeContents = value.toISOString().replace(".000Z", "Z");
break;
case 6:
- nodeContents = (0, import_smithy_client7.dateToUtcString)(value);
+ nodeContents = dateToUtcString(value);
break;
case 7:
nodeContents = String(value.getTime() / 1e3);
break;
default:
console.warn("Missing timestamp format, using http date", value);
- nodeContents = (0, import_smithy_client7.dateToUtcString)(value);
+ nodeContents = dateToUtcString(value);
break;
}
} else if (ns.isBigDecimalSchema() && value) {
@@ -35096,7 +40326,7 @@ var init_XmlShapeSerializer = __esm({
}
if (ns.isStringSchema()) {
if (value === void 0 && ns.isIdempotencyToken()) {
- nodeContents = (0, import_uuid.v4)();
+ nodeContents = generateIdempotencyToken();
} else {
nodeContents = String(value);
}
@@ -35225,7 +40455,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(message);
+ const exception = new ErrorCtor({});
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
const output = {};
const errorDeserializer = this.codec.createDeserializer();
@@ -35276,6 +40506,7 @@ __export(protocols_exports2, {
_toNum: () => _toNum,
_toStr: () => _toStr,
awsExpectUnion: () => awsExpectUnion,
+ loadJsonRpcErrorCode: () => loadJsonRpcErrorCode,
loadRestJsonErrorCode: () => loadRestJsonErrorCode,
loadRestXmlErrorCode: () => loadRestXmlErrorCode,
parseJsonBody: () => parseJsonBody,
@@ -35308,2298 +40539,11 @@ 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 core = (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((error3) => {
- console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error3);
- });
- 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) => (error3) => {
- throw error3;
- };
- var defaultSuccessHandler2 = (httpResponse, signingProperties) => {
- };
- var s3ExpressHttpSigningMiddlewareOptions = core.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), core.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 warning2 = `@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(warning2);
- } else {
- context.logger?.warn?.(warning2);
- }
- 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.1044.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.8",
- "@aws-sdk/credential-provider-node": "^3.972.39",
- "@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.38",
- "@aws-sdk/region-config-resolver": "^3.972.13",
- "@aws-sdk/signature-v4-multi-region": "^3.996.25",
- "@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.24",
- "@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.7",
- "@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.6",
- "@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 http6 = require("http");
- var nodeConfigProvider = require_dist_cjs30();
- var urlParser = require_dist_cjs18();
- function httpRequest(options) {
- return new Promise((resolve, reject) => {
- const req = http6.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 (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 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.6",
- 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.8",
- "@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.38",
- "@aws-sdk/region-config-resolver": "^3.972.13",
- "@aws-sdk/signature-v4-multi-region": "^3.996.25",
- "@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.24",
- "@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.7",
- "@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.6",
- "@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 promises3 = 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 promises3.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 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];
- };
- 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 crypto4 = 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 ? crypto4.createHmac(this.algorithmIdentifier, castSourceData(this.secret)) : crypto4.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 import_util_endpoints, k, a, b, c, d, e, f, g, h, i, j, _data, root, r, nodes, bdd;
+var 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"() {
- import_util_endpoints = __toESM(require_dist_cjs20());
+ init_endpoints();
k = "ref";
a = -1;
b = true;
@@ -37684,37 +40628,37 @@ var init_bdd = __esm({
r + 2,
r + 3
]);
- bdd = import_util_endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
+ bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js
-var import_util_endpoints2, import_util_endpoints3, cache, defaultEndpointResolver;
+var cache, defaultEndpointResolver;
var init_endpointResolver = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js"() {
- import_util_endpoints2 = __toESM(require_dist_cjs21());
- import_util_endpoints3 = __toESM(require_dist_cjs20());
+ init_client3();
+ init_endpoints();
init_bdd();
- cache = new import_util_endpoints3.EndpointCache({
+ cache = new EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
});
defaultEndpointResolver = (endpointParams, context = {}) => {
- return cache.get(endpointParams, () => (0, import_util_endpoints3.decideEndpoint)(bdd, {
+ return cache.get(endpointParams, () => decideEndpoint(bdd, {
endpointParams,
logger: context.logger
}));
};
- import_util_endpoints3.customEndpointFunctions.aws = import_util_endpoints2.awsEndpointFunctions;
+ customEndpointFunctions.aws = awsEndpointFunctions;
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js
-var import_smithy_client8, SSOOIDCServiceException;
+var SSOOIDCServiceException;
var init_SSOOIDCServiceException = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js"() {
- import_smithy_client8 = __toESM(require_dist_cjs34());
- SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client8.ServiceException {
+ init_client2();
+ SSOOIDCServiceException = class _SSOOIDCServiceException extends ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype);
@@ -38056,24 +41000,23 @@ var init_schemas_0 = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js
-var import_smithy_client9, import_url_parser2, import_util_base648, import_util_utf88, getRuntimeConfig;
+var 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();
- 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_client2();
+ init_protocols();
+ init_serde();
init_httpAuthSchemeProvider();
init_endpointResolver();
init_schemas_0();
getRuntimeConfig = (config) => {
return {
apiVersion: "2019-06-10",
- base64Decoder: config?.base64Decoder ?? import_util_base648.fromBase64,
- base64Encoder: config?.base64Encoder ?? import_util_base648.toBase64,
+ base64Decoder: config?.base64Decoder ?? fromBase64,
+ base64Encoder: config?.base64Encoder ?? toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
extensions: config?.extensions ?? [],
@@ -38090,7 +41033,7 @@ var init_runtimeConfig_shared = __esm({
signer: new NoAuthSigner()
}
],
- logger: config?.logger ?? new import_smithy_client9.NoOpLogger(),
+ logger: config?.logger ?? new NoOpLogger(),
protocol: config?.protocol ?? AwsRestJsonProtocol,
protocolSettings: config?.protocolSettings ?? {
defaultNamespace: "com.amazonaws.ssooidc",
@@ -38099,36 +41042,31 @@ var init_runtimeConfig_shared = __esm({
serviceTarget: "AWSSSOOIDCService"
},
serviceId: config?.serviceId ?? "SSO OIDC",
- urlParser: config?.urlParser ?? import_url_parser2.parseUrl,
- utf8Decoder: config?.utf8Decoder ?? import_util_utf88.fromUtf8,
- utf8Encoder: config?.utf8Encoder ?? import_util_utf88.toUtf8
+ urlParser: config?.urlParser ?? parseUrl,
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
+ utf8Encoder: config?.utf8Encoder ?? toUtf8
};
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js
-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 import_node_http_handler, getRuntimeConfig2;
var init_runtimeConfig = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js"() {
init_package();
- init_client();
+ init_client3();
init_httpAuthSchemes2();
- 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_client2();
+ init_config2();
+ init_retry2();
+ init_serde();
+ import_node_http_handler = __toESM(require_dist_cjs9());
init_runtimeConfig_shared();
getRuntimeConfig2 = (config) => {
- (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);
+ emitWarningIfUnsupportedVersion2(process.version);
+ const defaultsMode = resolveDefaultsModeConfig(config);
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getRuntimeConfig(config);
emitWarningIfUnsupportedVersion(process.version);
const loaderConfig = {
@@ -38140,90 +41078,26 @@ var init_runtimeConfig = __esm({
...config,
runtime: "node",
defaultsMode,
- 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 }),
+ 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 }),
requestHandler: import_node_http_handler.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
- 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
+ retryMode: config?.retryMode ?? loadConfig({
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
}, config),
- sha256: config?.sha256 ?? import_hash_node.Hash.bind(null, "sha256"),
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? import_node_http_handler.streamCollector,
- 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)
+ 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)
};
};
}
});
-// 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({
@@ -38269,62 +41143,59 @@ var init_httpAuthExtensionConfiguration = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js
-var import_region_config_resolver, import_protocol_http12, import_smithy_client11, resolveRuntimeExtensions;
+var resolveRuntimeExtensions;
var init_runtimeExtensions = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js"() {
- import_region_config_resolver = __toESM(require_dist_cjs48());
- import_protocol_http12 = __toESM(require_dist_cjs2());
- import_smithy_client11 = __toESM(require_dist_cjs34());
+ init_client3();
+ init_client2();
+ init_protocols();
init_httpAuthExtensionConfiguration();
resolveRuntimeExtensions = (runtimeConfig, extensions) => {
- 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));
+ const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
extensions.forEach((extension) => extension.configure(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));
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js
-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 SSOOIDCClient;
var init_SSOOIDCClient = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js"() {
- 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_client3();
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 import_smithy_client12.Client {
+ SSOOIDCClient = class extends 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 = (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_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_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((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(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(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
@@ -38341,25 +41212,25 @@ var init_SSOOIDCClient = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js
-var import_middleware_endpoint2, import_smithy_client13, CreateTokenCommand;
+var CreateTokenCommand;
var init_CreateTokenCommand = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js"() {
- import_middleware_endpoint2 = __toESM(require_dist_cjs32());
- import_smithy_client13 = __toESM(require_dist_cjs34());
+ init_client2();
+ init_endpoints();
init_EndpointParameters();
init_schemas_0();
- CreateTokenCommand = class extends import_smithy_client13.Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
- return [(0, import_middleware_endpoint2.getEndpointPlugin)(config, Command2.getEndpointParameterInstructions())];
+ CreateTokenCommand = class extends Command2.classBuilder().ep(commonParams).m(function(Command3, cs, config, o2) {
+ return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())];
}).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").sc(CreateToken$).build() {
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js
-var import_smithy_client14, commands, SSOOIDC;
+var commands, SSOOIDC;
var init_SSOOIDC = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js"() {
- import_smithy_client14 = __toESM(require_dist_cjs34());
+ init_client2();
init_CreateTokenCommand();
init_SSOOIDCClient();
commands = {
@@ -38367,7 +41238,7 @@ var init_SSOOIDC = __esm({
};
SSOOIDC = class extends SSOOIDCClient {
};
- (0, import_smithy_client14.createAggregatedClient)(commands, SSOOIDC);
+ createAggregatedClient(commands, SSOOIDC);
}
});
@@ -38403,7 +41274,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: () => import_smithy_client13.Command,
+ $Command: () => Command2,
AccessDeniedException: () => AccessDeniedException,
AccessDeniedException$: () => AccessDeniedException$,
AccessDeniedExceptionReason: () => AccessDeniedExceptionReason,
@@ -38436,7 +41307,7 @@ __export(sso_oidc_exports, {
UnauthorizedClientException$: () => UnauthorizedClientException$,
UnsupportedGrantTypeException: () => UnsupportedGrantTypeException,
UnsupportedGrantTypeException$: () => UnsupportedGrantTypeException$,
- __Client: () => import_smithy_client12.Client,
+ __Client: () => Client,
errorTypeRegistries: () => errorTypeRegistries
});
var init_sso_oidc = __esm({
@@ -38453,22 +41324,21 @@ var init_sso_oidc = __esm({
});
// node_modules/@aws-sdk/token-providers/dist-cjs/index.js
-var require_dist_cjs49 = __commonJS({
+var require_dist_cjs12 = __commonJS({
"node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2) {
"use strict";
- var client = (init_client(), __toCommonJS(client_exports));
+ var client = (init_client3(), __toCommonJS(client_exports2));
var httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
- var propertyProvider = require_dist_cjs28();
- var sharedIniFileLoader = require_dist_cjs29();
+ var config = (init_config2(), __toCommonJS(config_exports));
var node_fs = require("node:fs");
var fromEnvSigningName = ({ logger: logger2, signingName } = {}) => async () => {
logger2?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
if (!signingName) {
- throw new propertyProvider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger2 });
+ throw new config.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger2 });
}
const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName);
if (!(bearerTokenKey in process.env)) {
- throw new propertyProvider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger2 });
+ throw new config.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger2 });
}
const token = { token: process.env[bearerTokenKey] };
client.setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
@@ -38478,11 +41348,11 @@ var require_dist_cjs49 = __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 coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
+ const coalesce2 = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
const ssoOidcClient = new SSOOIDCClient2(Object.assign({}, init.clientConfig ?? {}, {
region: ssoRegion ?? init.clientConfig?.region,
- logger: coalesce("logger"),
- userAgentAppId: coalesce("userAgentAppId")
+ logger: coalesce2("logger"),
+ userAgentAppId: coalesce2("userAgentAppId")
}));
return ssoOidcClient;
};
@@ -38498,51 +41368,51 @@ var require_dist_cjs49 = __commonJS({
};
var validateTokenExpiry = (token) => {
if (token.expiration && token.expiration.getTime() < Date.now()) {
- throw new propertyProvider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
+ throw new config.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
}
};
var validateTokenKey = (key, value, forRefresh = false) => {
if (typeof value === "undefined") {
- throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
+ throw new config.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
}
};
var { writeFile: writeFile2 } = node_fs.promises;
var writeSSOTokenToFile = (id, ssoToken) => {
- const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id);
+ const tokenFilepath = config.getSSOTokenFilepath(id);
const tokenString = JSON.stringify(ssoToken, null, 2);
return writeFile2(tokenFilepath, tokenString);
};
var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);
var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
init.logger?.debug("@aws-sdk/token-providers - fromSso");
- const profiles = await sharedIniFileLoader.parseKnownFiles(init);
- const profileName = sharedIniFileLoader.getProfileName({
+ const profiles = await config.parseKnownFiles(init);
+ const profileName = config.getProfileName({
profile: init.profile ?? callerClientConfig?.profile
});
const profile = profiles[profileName];
if (!profile) {
- throw new propertyProvider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
+ throw new config.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
} else if (!profile["sso_session"]) {
- throw new propertyProvider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
+ throw new config.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
}
const ssoSessionName = profile["sso_session"];
- const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
+ const ssoSessions = await config.loadSsoSessionData(init);
const ssoSession = ssoSessions[ssoSessionName];
if (!ssoSession) {
- throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
+ throw new config.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 propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
+ throw new config.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
}
}
ssoSession["sso_start_url"];
const ssoRegion = ssoSession["sso_region"];
let ssoToken;
try {
- ssoToken = await sharedIniFileLoader.getSSOTokenFromFile(ssoSessionName);
+ ssoToken = await config.getSSOTokenFromFile(ssoSessionName);
} catch (e5) {
- throw new propertyProvider.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
+ throw new config.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);
@@ -38582,19 +41452,19 @@ var require_dist_cjs49 = __commonJS({
return existingToken;
}
};
- var fromStatic = ({ token, logger: logger2 }) => async () => {
+ var fromStatic2 = ({ token, logger: logger2 }) => async () => {
logger2?.debug("@aws-sdk/token-providers - fromStatic");
if (!token || !token.token) {
- throw new propertyProvider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
+ throw new config.TokenProviderError(`Please pass a valid token to fromStatic`, false);
}
return token;
};
- var nodeProvider = (init = {}) => propertyProvider.memoize(propertyProvider.chain(fromSso(init), async () => {
- throw new propertyProvider.TokenProviderError("Could not load token from any providers", false);
+ var nodeProvider = (init = {}) => config.memoize(config.chain(fromSso(init), async () => {
+ throw new config.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 = fromStatic;
+ exports2.fromStatic = fromStatic2;
exports2.nodeProvider = nodeProvider;
}
});
@@ -38620,15 +41490,15 @@ function createSmithyApiNoAuthHttpAuthOption2(authParameters) {
schemeId: "smithy.api#noAuth"
};
}
-var import_util_middleware7, defaultSSOHttpAuthSchemeParametersProvider, defaultSSOHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig2;
+var defaultSSOHttpAuthSchemeParametersProvider, defaultSSOHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig2;
var init_httpAuthSchemeProvider2 = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js"() {
init_httpAuthSchemes2();
- import_util_middleware7 = __toESM(require_dist_cjs6());
+ init_client2();
defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
- operation: (0, import_util_middleware7.getSmithyContext)(context).operation,
- region: await (0, import_util_middleware7.normalizeProvider)(config.region)() || (() => {
+ operation: getSmithyContext(context).operation,
+ region: await normalizeProvider(config.region)() || (() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})()
};
@@ -38649,7 +41519,7 @@ var init_httpAuthSchemeProvider2 = __esm({
resolveHttpAuthSchemeConfig2 = (config) => {
const config_0 = resolveAwsSdkSigV4Config(config);
return Object.assign(config_0, {
- authSchemePreference: (0, import_util_middleware7.normalizeProvider)(config.authSchemePreference ?? [])
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
});
};
}
@@ -38676,10 +41546,10 @@ var init_EndpointParameters2 = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js
-var import_util_endpoints4, k2, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, _data2, root2, r2, nodes2, bdd2;
+var 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"() {
- import_util_endpoints4 = __toESM(require_dist_cjs20());
+ init_endpoints();
k2 = "ref";
a2 = -1;
b2 = true;
@@ -38764,37 +41634,37 @@ var init_bdd2 = __esm({
r2 + 2,
r2 + 3
]);
- bdd2 = import_util_endpoints4.BinaryDecisionDiagram.from(nodes2, root2, _data2.conditions, _data2.results);
+ bdd2 = BinaryDecisionDiagram.from(nodes2, root2, _data2.conditions, _data2.results);
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js
-var import_util_endpoints5, import_util_endpoints6, cache2, defaultEndpointResolver2;
+var cache2, defaultEndpointResolver2;
var init_endpointResolver2 = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js"() {
- import_util_endpoints5 = __toESM(require_dist_cjs21());
- import_util_endpoints6 = __toESM(require_dist_cjs20());
+ init_client3();
+ init_endpoints();
init_bdd2();
- cache2 = new import_util_endpoints6.EndpointCache({
+ cache2 = new EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
});
defaultEndpointResolver2 = (endpointParams, context = {}) => {
- return cache2.get(endpointParams, () => (0, import_util_endpoints6.decideEndpoint)(bdd2, {
+ return cache2.get(endpointParams, () => decideEndpoint(bdd2, {
endpointParams,
logger: context.logger
}));
};
- import_util_endpoints6.customEndpointFunctions.aws = import_util_endpoints5.awsEndpointFunctions;
+ customEndpointFunctions.aws = awsEndpointFunctions;
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js
-var import_smithy_client15, SSOServiceException;
+var SSOServiceException;
var init_SSOServiceException = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js"() {
- import_smithy_client15 = __toESM(require_dist_cjs34());
- SSOServiceException = class _SSOServiceException extends import_smithy_client15.ServiceException {
+ init_client2();
+ SSOServiceException = class _SSOServiceException extends ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, _SSOServiceException.prototype);
@@ -38954,24 +41824,23 @@ var init_schemas_02 = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.shared.js
-var import_smithy_client16, import_url_parser3, import_util_base649, import_util_utf89, getRuntimeConfig3;
+var 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();
- 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_client2();
+ init_protocols();
+ init_serde();
init_httpAuthSchemeProvider2();
init_endpointResolver2();
init_schemas_02();
getRuntimeConfig3 = (config) => {
return {
apiVersion: "2019-06-10",
- base64Decoder: config?.base64Decoder ?? import_util_base649.fromBase64,
- base64Encoder: config?.base64Encoder ?? import_util_base649.toBase64,
+ base64Decoder: config?.base64Decoder ?? fromBase64,
+ base64Encoder: config?.base64Encoder ?? toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver2,
extensions: config?.extensions ?? [],
@@ -38988,7 +41857,7 @@ var init_runtimeConfig_shared2 = __esm({
signer: new NoAuthSigner()
}
],
- logger: config?.logger ?? new import_smithy_client16.NoOpLogger(),
+ logger: config?.logger ?? new NoOpLogger(),
protocol: config?.protocol ?? AwsRestJsonProtocol,
protocolSettings: config?.protocolSettings ?? {
defaultNamespace: "com.amazonaws.sso",
@@ -38997,36 +41866,31 @@ var init_runtimeConfig_shared2 = __esm({
serviceTarget: "SWBPortalService"
},
serviceId: config?.serviceId ?? "SSO",
- urlParser: config?.urlParser ?? import_url_parser3.parseUrl,
- utf8Decoder: config?.utf8Decoder ?? import_util_utf89.fromUtf8,
- utf8Encoder: config?.utf8Encoder ?? import_util_utf89.toUtf8
+ urlParser: config?.urlParser ?? parseUrl,
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
+ utf8Encoder: config?.utf8Encoder ?? toUtf8
};
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js
-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 import_node_http_handler2, getRuntimeConfig4;
var init_runtimeConfig2 = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js"() {
init_package();
- init_client();
+ init_client3();
init_httpAuthSchemes2();
- 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_client2();
+ init_config2();
+ init_retry2();
+ init_serde();
+ import_node_http_handler2 = __toESM(require_dist_cjs9());
init_runtimeConfig_shared2();
getRuntimeConfig4 = (config) => {
- (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);
+ emitWarningIfUnsupportedVersion2(process.version);
+ const defaultsMode = resolveDefaultsModeConfig(config);
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getRuntimeConfig3(config);
emitWarningIfUnsupportedVersion(process.version);
const loaderConfig = {
@@ -39038,21 +41902,21 @@ var init_runtimeConfig2 = __esm({
...config,
runtime: "node",
defaultsMode,
- 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 }),
+ 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 }),
requestHandler: import_node_http_handler2.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
- 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
+ retryMode: config?.retryMode ?? loadConfig({
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
}, config),
- sha256: config?.sha256 ?? import_hash_node2.Hash.bind(null, "sha256"),
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? import_node_http_handler2.streamCollector,
- 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)
+ 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)
};
};
}
@@ -39103,62 +41967,59 @@ var init_httpAuthExtensionConfiguration2 = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeExtensions.js
-var import_region_config_resolver2, import_protocol_http13, import_smithy_client18, resolveRuntimeExtensions2;
+var resolveRuntimeExtensions2;
var init_runtimeExtensions2 = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeExtensions.js"() {
- import_region_config_resolver2 = __toESM(require_dist_cjs48());
- import_protocol_http13 = __toESM(require_dist_cjs2());
- import_smithy_client18 = __toESM(require_dist_cjs34());
+ init_client3();
+ init_client2();
+ init_protocols();
init_httpAuthExtensionConfiguration2();
resolveRuntimeExtensions2 = (runtimeConfig, extensions) => {
- 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));
+ const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration2(runtimeConfig));
extensions.forEach((extension) => extension.configure(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));
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig2(extensionConfiguration));
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSOClient.js
-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 SSOClient;
var init_SSOClient = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSOClient.js"() {
- 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_client3();
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 import_smithy_client19.Client {
+ SSOClient = class extends 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 = (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_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_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((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(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(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
@@ -39175,25 +42036,25 @@ var init_SSOClient = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js
-var import_middleware_endpoint4, import_smithy_client20, GetRoleCredentialsCommand;
+var GetRoleCredentialsCommand;
var init_GetRoleCredentialsCommand = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js"() {
- import_middleware_endpoint4 = __toESM(require_dist_cjs32());
- import_smithy_client20 = __toESM(require_dist_cjs34());
+ init_client2();
+ init_endpoints();
init_EndpointParameters2();
init_schemas_02();
- GetRoleCredentialsCommand = class extends import_smithy_client20.Command.classBuilder().ep(commonParams2).m(function(Command2, cs, config, o2) {
- return [(0, import_middleware_endpoint4.getEndpointPlugin)(config, Command2.getEndpointParameterInstructions())];
+ GetRoleCredentialsCommand = class extends Command2.classBuilder().ep(commonParams2).m(function(Command3, cs, config, o2) {
+ return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())];
}).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").sc(GetRoleCredentials$).build() {
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSO.js
-var import_smithy_client21, commands2, SSO;
+var commands2, SSO;
var init_SSO = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSO.js"() {
- import_smithy_client21 = __toESM(require_dist_cjs34());
+ init_client2();
init_GetRoleCredentialsCommand();
init_SSOClient();
commands2 = {
@@ -39201,7 +42062,7 @@ var init_SSO = __esm({
};
SSO = class extends SSOClient {
};
- (0, import_smithy_client21.createAggregatedClient)(commands2, SSO);
+ createAggregatedClient(commands2, SSO);
}
});
@@ -39221,7 +42082,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: () => import_smithy_client20.Command,
+ $Command: () => Command2,
GetRoleCredentials$: () => GetRoleCredentials$,
GetRoleCredentialsCommand: () => GetRoleCredentialsCommand,
GetRoleCredentialsRequest$: () => GetRoleCredentialsRequest$,
@@ -39239,7 +42100,7 @@ __export(sso_exports, {
TooManyRequestsException$: () => TooManyRequestsException$,
UnauthorizedException: () => UnauthorizedException,
UnauthorizedException$: () => UnauthorizedException$,
- __Client: () => import_smithy_client19.Client,
+ __Client: () => Client,
errorTypeRegistries: () => errorTypeRegistries2
});
var init_sso = __esm({
@@ -39265,13 +42126,12 @@ var require_loadSso_BKDNrsal = __commonJS({
});
// node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js
-var require_dist_cjs50 = __commonJS({
+var require_dist_cjs13 = __commonJS({
"node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports2) {
"use strict";
- var propertyProvider = require_dist_cjs28();
- var sharedIniFileLoader = require_dist_cjs29();
- var client = (init_client(), __toCommonJS(client_exports));
- var tokenProviders = require_dist_cjs49();
+ var config = (init_config2(), __toCommonJS(config_exports));
+ var client = (init_client3(), __toCommonJS(client_exports2));
+ var tokenProviders = require_dist_cjs12();
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 }) => {
@@ -39290,23 +42150,23 @@ var require_dist_cjs50 = __commonJS({
expiresAt: new Date(_token.expiration).toISOString()
};
} catch (e5) {
- throw new propertyProvider.CredentialsProviderError(e5.message, {
+ throw new config.CredentialsProviderError(e5.message, {
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
logger: logger2
});
}
} else {
try {
- token = await sharedIniFileLoader.getSSOTokenFromFile(ssoStartUrl);
+ token = await config.getSSOTokenFromFile(ssoStartUrl);
} catch (e5) {
- throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
+ throw new config.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 propertyProvider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
+ throw new config.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
logger: logger2
});
@@ -39328,14 +42188,14 @@ var require_dist_cjs50 = __commonJS({
accessToken
}));
} catch (e5) {
- throw new propertyProvider.CredentialsProviderError(e5, {
+ throw new config.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 propertyProvider.CredentialsProviderError("SSO returns an invalid temporary credential.", {
+ throw new config.CredentialsProviderError("SSO returns an invalid temporary credential.", {
tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
logger: logger2
});
@@ -39358,7 +42218,7 @@ var require_dist_cjs50 = __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 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(", ")}
+ 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(", ")}
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger: logger2 });
}
return profile;
@@ -39367,32 +42227,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 = sharedIniFileLoader.getProfileName({
+ const profileName = config.getProfileName({
profile: init.profile ?? callerClientConfig?.profile
});
if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
- const profiles = await sharedIniFileLoader.parseKnownFiles(init);
+ const profiles = await config.parseKnownFiles(init);
const profile = profiles[profileName];
if (!profile) {
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
+ throw new config.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
}
if (!isSsoProfile(profile)) {
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
+ throw new config.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
logger: init.logger
});
}
if (profile?.sso_session) {
- const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);
+ const ssoSessions = await config.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 propertyProvider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
+ throw new config.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
tryNextLink: false,
logger: init.logger
});
}
if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
- throw new propertyProvider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
+ throw new config.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
tryNextLink: false,
logger: init.logger
});
@@ -39418,7 +42278,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 propertyProvider.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
+ throw new config.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
} else {
return resolveSSOCredentials({
ssoStartUrl,
@@ -39465,15 +42325,15 @@ function createSmithyApiNoAuthHttpAuthOption3(authParameters) {
schemeId: "smithy.api#noAuth"
};
}
-var import_util_middleware8, defaultSigninHttpAuthSchemeParametersProvider, defaultSigninHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig3;
+var defaultSigninHttpAuthSchemeParametersProvider, defaultSigninHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig3;
var init_httpAuthSchemeProvider3 = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthSchemeProvider.js"() {
init_httpAuthSchemes2();
- import_util_middleware8 = __toESM(require_dist_cjs6());
+ init_client2();
defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
- operation: (0, import_util_middleware8.getSmithyContext)(context).operation,
- region: await (0, import_util_middleware8.normalizeProvider)(config.region)() || (() => {
+ operation: getSmithyContext(context).operation,
+ region: await normalizeProvider(config.region)() || (() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})()
};
@@ -39494,7 +42354,7 @@ var init_httpAuthSchemeProvider3 = __esm({
resolveHttpAuthSchemeConfig3 = (config) => {
const config_0 = resolveAwsSdkSigV4Config(config);
return Object.assign(config_0, {
- authSchemePreference: (0, import_util_middleware8.normalizeProvider)(config.authSchemePreference ?? [])
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
});
};
}
@@ -39521,10 +42381,10 @@ var init_EndpointParameters3 = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js
-var import_util_endpoints7, m, a3, b3, c3, d3, e3, f3, g3, h3, i3, j3, k3, l, _data3, root3, r3, nodes3, bdd3;
+var 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"() {
- import_util_endpoints7 = __toESM(require_dist_cjs20());
+ init_endpoints();
m = "ref";
a3 = -1;
b3 = true;
@@ -39621,37 +42481,37 @@ var init_bdd3 = __esm({
r3 + 2,
r3 + 3
]);
- bdd3 = import_util_endpoints7.BinaryDecisionDiagram.from(nodes3, root3, _data3.conditions, _data3.results);
+ bdd3 = BinaryDecisionDiagram.from(nodes3, root3, _data3.conditions, _data3.results);
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js
-var import_util_endpoints8, import_util_endpoints9, cache3, defaultEndpointResolver3;
+var cache3, defaultEndpointResolver3;
var init_endpointResolver3 = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js"() {
- import_util_endpoints8 = __toESM(require_dist_cjs21());
- import_util_endpoints9 = __toESM(require_dist_cjs20());
+ init_client3();
+ init_endpoints();
init_bdd3();
- cache3 = new import_util_endpoints9.EndpointCache({
+ cache3 = new EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
});
defaultEndpointResolver3 = (endpointParams, context = {}) => {
- return cache3.get(endpointParams, () => (0, import_util_endpoints9.decideEndpoint)(bdd3, {
+ return cache3.get(endpointParams, () => decideEndpoint(bdd3, {
endpointParams,
logger: context.logger
}));
};
- import_util_endpoints9.customEndpointFunctions.aws = import_util_endpoints8.awsEndpointFunctions;
+ customEndpointFunctions.aws = awsEndpointFunctions;
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js
-var import_smithy_client22, SigninServiceException;
+var SigninServiceException;
var init_SigninServiceException = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js"() {
- import_smithy_client22 = __toESM(require_dist_cjs34());
- SigninServiceException = class _SigninServiceException extends import_smithy_client22.ServiceException {
+ init_client2();
+ SigninServiceException = class _SigninServiceException extends ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, _SigninServiceException.prototype);
@@ -39854,24 +42714,23 @@ var init_schemas_03 = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.shared.js
-var import_smithy_client23, import_url_parser4, import_util_base6410, import_util_utf810, getRuntimeConfig5;
+var 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();
- 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_client2();
+ init_protocols();
+ init_serde();
init_httpAuthSchemeProvider3();
init_endpointResolver3();
init_schemas_03();
getRuntimeConfig5 = (config) => {
return {
apiVersion: "2023-01-01",
- base64Decoder: config?.base64Decoder ?? import_util_base6410.fromBase64,
- base64Encoder: config?.base64Encoder ?? import_util_base6410.toBase64,
+ base64Decoder: config?.base64Decoder ?? fromBase64,
+ base64Encoder: config?.base64Encoder ?? toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver3,
extensions: config?.extensions ?? [],
@@ -39888,7 +42747,7 @@ var init_runtimeConfig_shared3 = __esm({
signer: new NoAuthSigner()
}
],
- logger: config?.logger ?? new import_smithy_client23.NoOpLogger(),
+ logger: config?.logger ?? new NoOpLogger(),
protocol: config?.protocol ?? AwsRestJsonProtocol,
protocolSettings: config?.protocolSettings ?? {
defaultNamespace: "com.amazonaws.signin",
@@ -39897,36 +42756,31 @@ var init_runtimeConfig_shared3 = __esm({
serviceTarget: "Signin"
},
serviceId: config?.serviceId ?? "Signin",
- urlParser: config?.urlParser ?? import_url_parser4.parseUrl,
- utf8Decoder: config?.utf8Decoder ?? import_util_utf810.fromUtf8,
- utf8Encoder: config?.utf8Encoder ?? import_util_utf810.toUtf8
+ urlParser: config?.urlParser ?? parseUrl,
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
+ utf8Encoder: config?.utf8Encoder ?? toUtf8
};
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js
-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 import_node_http_handler3, getRuntimeConfig6;
var init_runtimeConfig3 = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js"() {
init_package();
- init_client();
+ init_client3();
init_httpAuthSchemes2();
- 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_client2();
+ init_config2();
+ init_retry2();
+ init_serde();
+ import_node_http_handler3 = __toESM(require_dist_cjs9());
init_runtimeConfig_shared3();
getRuntimeConfig6 = (config) => {
- (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);
+ emitWarningIfUnsupportedVersion2(process.version);
+ const defaultsMode = resolveDefaultsModeConfig(config);
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getRuntimeConfig5(config);
emitWarningIfUnsupportedVersion(process.version);
const loaderConfig = {
@@ -39938,21 +42792,21 @@ var init_runtimeConfig3 = __esm({
...config,
runtime: "node",
defaultsMode,
- 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 }),
+ 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 }),
requestHandler: import_node_http_handler3.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
- 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
+ retryMode: config?.retryMode ?? loadConfig({
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
}, config),
- sha256: config?.sha256 ?? import_hash_node3.Hash.bind(null, "sha256"),
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? import_node_http_handler3.streamCollector,
- 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)
+ 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)
};
};
}
@@ -40003,62 +42857,59 @@ var init_httpAuthExtensionConfiguration3 = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeExtensions.js
-var import_region_config_resolver3, import_protocol_http14, import_smithy_client25, resolveRuntimeExtensions3;
+var resolveRuntimeExtensions3;
var init_runtimeExtensions3 = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeExtensions.js"() {
- import_region_config_resolver3 = __toESM(require_dist_cjs48());
- import_protocol_http14 = __toESM(require_dist_cjs2());
- import_smithy_client25 = __toESM(require_dist_cjs34());
+ init_client3();
+ init_client2();
+ init_protocols();
init_httpAuthExtensionConfiguration3();
resolveRuntimeExtensions3 = (runtimeConfig, extensions) => {
- 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));
+ const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration3(runtimeConfig));
extensions.forEach((extension) => extension.configure(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));
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig3(extensionConfiguration));
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/SigninClient.js
-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 SigninClient;
var init_SigninClient = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/SigninClient.js"() {
- 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_client3();
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 import_smithy_client26.Client {
+ SigninClient = class extends 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 = (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_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_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((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(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(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
httpAuthSchemeParametersProvider: defaultSigninHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
@@ -40075,25 +42926,25 @@ var init_SigninClient = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js
-var import_middleware_endpoint6, import_smithy_client27, CreateOAuth2TokenCommand;
+var CreateOAuth2TokenCommand;
var init_CreateOAuth2TokenCommand = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js"() {
- import_middleware_endpoint6 = __toESM(require_dist_cjs32());
- import_smithy_client27 = __toESM(require_dist_cjs34());
+ init_client2();
+ init_endpoints();
init_EndpointParameters3();
init_schemas_03();
- CreateOAuth2TokenCommand = class extends import_smithy_client27.Command.classBuilder().ep(commonParams3).m(function(Command2, cs, config, o2) {
- return [(0, import_middleware_endpoint6.getEndpointPlugin)(config, Command2.getEndpointParameterInstructions())];
+ CreateOAuth2TokenCommand = class extends Command2.classBuilder().ep(commonParams3).m(function(Command3, cs, config, o2) {
+ return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())];
}).s("Signin", "CreateOAuth2Token", {}).n("SigninClient", "CreateOAuth2TokenCommand").sc(CreateOAuth2Token$).build() {
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/Signin.js
-var import_smithy_client28, commands3, Signin;
+var commands3, Signin;
var init_Signin = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/Signin.js"() {
- import_smithy_client28 = __toESM(require_dist_cjs34());
+ init_client2();
init_CreateOAuth2TokenCommand();
init_SigninClient();
commands3 = {
@@ -40101,7 +42952,7 @@ var init_Signin = __esm({
};
Signin = class extends SigninClient {
};
- (0, import_smithy_client28.createAggregatedClient)(commands3, Signin);
+ createAggregatedClient(commands3, Signin);
}
});
@@ -40136,7 +42987,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: () => import_smithy_client27.Command,
+ $Command: () => Command2,
AccessDeniedException: () => AccessDeniedException2,
AccessDeniedException$: () => AccessDeniedException$2,
AccessToken$: () => AccessToken$,
@@ -40157,7 +43008,7 @@ __export(signin_exports, {
TooManyRequestsError$: () => TooManyRequestsError$,
ValidationException: () => ValidationException,
ValidationException$: () => ValidationException$,
- __Client: () => import_smithy_client26.Client,
+ __Client: () => Client,
errorTypeRegistries: () => errorTypeRegistries3
});
var init_signin = __esm({
@@ -40174,13 +43025,12 @@ var init_signin = __esm({
});
// node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js
-var require_dist_cjs51 = __commonJS({
+var require_dist_cjs14 = __commonJS({
"node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js"(exports2) {
"use strict";
- var client = (init_client(), __toCommonJS(client_exports));
- var propertyProvider = require_dist_cjs28();
- var sharedIniFileLoader = require_dist_cjs29();
- var protocolHttp = require_dist_cjs2();
+ var client = (init_client3(), __toCommonJS(client_exports2));
+ var config = (init_config2(), __toCommonJS(config_exports));
+ var protocols2 = (init_protocols(), __toCommonJS(protocols_exports));
var node_crypto = require("node:crypto");
var node_fs = require("node:fs");
var node_os = require("node:os");
@@ -40198,7 +43048,7 @@ var require_dist_cjs51 = __commonJS({
async loadCredentials() {
const token = await this.loadToken();
if (!token) {
- throw new propertyProvider.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });
+ throw new config.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();
@@ -40253,7 +43103,7 @@ var require_dist_cjs51 = __commonJS({
const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};
const { refreshToken, expiresIn } = response.tokenOutput ?? {};
if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {
- throw new propertyProvider.CredentialsProviderError("Token refresh response missing required fields", {
+ throw new config.CredentialsProviderError("Token refresh response missing required fields", {
logger: this.logger,
tryNextLink: false
});
@@ -40297,9 +43147,9 @@ var require_dist_cjs51 = __commonJS({
default:
message = `Failed to refresh token: ${String(error3)}. Please re-authenticate using \`aws login\``;
}
- throw new propertyProvider.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });
+ throw new config.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });
}
- throw new propertyProvider.CredentialsProviderError(`Failed to refresh token: ${String(error3)}. Please re-authenticate using aws login`, { logger: this.logger });
+ throw new config.CredentialsProviderError(`Failed to refresh token: ${String(error3)}. Please re-authenticate using aws login`, { logger: this.logger });
}
}
async loadToken() {
@@ -40307,7 +43157,7 @@ var require_dist_cjs51 = __commonJS({
try {
let tokenData;
try {
- tokenData = await sharedIniFileLoader.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });
+ tokenData = await config.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });
} catch {
tokenData = await node_fs.promises.readFile(tokenFilePath, "utf8");
}
@@ -40317,14 +43167,14 @@ var require_dist_cjs51 = __commonJS({
missingFields.push("accountId");
}
if (missingFields.length > 0) {
- throw new propertyProvider.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
+ throw new config.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
logger: this.logger,
tryNextLink: false
});
}
return token;
} catch (error3) {
- throw new propertyProvider.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error3)}`, {
+ throw new config.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error3)}`, {
logger: this.logger,
tryNextLink: false
});
@@ -40368,7 +43218,7 @@ var require_dist_cjs51 = __commonJS({
}
createDPoPInterceptor(middlewareStack) {
middlewareStack.add((next) => async (args) => {
- if (protocolHttp.HttpRequest.isInstance(args.request)) {
+ if (protocols2.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);
@@ -40427,19 +43277,19 @@ var require_dist_cjs51 = __commonJS({
const signatureB64 = rawSignature.toString("base64url");
return `${message}.${signatureB64}`;
} catch (error3) {
- throw new propertyProvider.CredentialsProviderError(`Failed to generate Dpop proof: ${error3 instanceof Error ? error3.message : String(error3)}`, { logger: this.logger, tryNextLink: false });
+ throw new config.CredentialsProviderError(`Failed to generate Dpop proof: ${error3 instanceof Error ? error3.message : String(error3)}`, { logger: this.logger, tryNextLink: false });
}
}
};
var fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");
- const profiles = await sharedIniFileLoader.parseKnownFiles(init || {});
- const profileName = sharedIniFileLoader.getProfileName({
+ const profiles = await config.parseKnownFiles(init || {});
+ const profileName = config.getProfileName({
profile: init?.profile ?? callerClientConfig?.profile
});
const profile = profiles[profileName];
if (!profile?.login_session) {
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
+ throw new config.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
tryNextLink: true,
logger: init?.logger
});
@@ -40453,10 +43303,10 @@ var require_dist_cjs51 = __commonJS({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js
-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 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"() {
- import_util_endpoints10 = __toESM(require_dist_cjs20());
+ init_endpoints();
q = "ref";
a4 = -1;
b4 = true;
@@ -40617,28 +43467,28 @@ var init_bdd4 = __esm({
r4 + 4,
r4 + 5
]);
- bdd4 = import_util_endpoints10.BinaryDecisionDiagram.from(nodes4, root4, _data4.conditions, _data4.results);
+ bdd4 = BinaryDecisionDiagram.from(nodes4, root4, _data4.conditions, _data4.results);
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js
-var import_util_endpoints11, import_util_endpoints12, cache4, defaultEndpointResolver4;
+var cache4, defaultEndpointResolver4;
var init_endpointResolver4 = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js"() {
- import_util_endpoints11 = __toESM(require_dist_cjs21());
- import_util_endpoints12 = __toESM(require_dist_cjs20());
+ init_client3();
+ init_endpoints();
init_bdd4();
- cache4 = new import_util_endpoints12.EndpointCache({
+ cache4 = new EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
});
defaultEndpointResolver4 = (endpointParams, context = {}) => {
- return cache4.get(endpointParams, () => (0, import_util_endpoints12.decideEndpoint)(bdd4, {
+ return cache4.get(endpointParams, () => decideEndpoint(bdd4, {
endpointParams,
logger: context.logger
}));
};
- import_util_endpoints12.customEndpointFunctions.aws = import_util_endpoints11.awsEndpointFunctions;
+ customEndpointFunctions.aws = awsEndpointFunctions;
}
});
@@ -40678,31 +43528,30 @@ function createSmithyApiNoAuthHttpAuthOption4(authParameters) {
schemeId: "smithy.api#noAuth"
};
}
-var import_signature_v4_multi_region, import_middleware_endpoint7, import_util_middleware9, createEndpointRuleSetHttpAuthSchemeParametersProvider, _defaultSTSHttpAuthSchemeParametersProvider, defaultSTSHttpAuthSchemeParametersProvider, createEndpointRuleSetHttpAuthSchemeProvider, _defaultSTSHttpAuthSchemeProvider, defaultSTSHttpAuthSchemeProvider, resolveStsAuthConfig, resolveHttpAuthSchemeConfig4;
+var import_signature_v4_multi_region, createEndpointRuleSetHttpAuthSchemeParametersProvider, _defaultSTSHttpAuthSchemeParametersProvider, defaultSTSHttpAuthSchemeParametersProvider, createEndpointRuleSetHttpAuthSchemeProvider, _defaultSTSHttpAuthSchemeProvider, defaultSTSHttpAuthSchemeProvider, 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_cjs40());
- import_middleware_endpoint7 = __toESM(require_dist_cjs32());
- import_util_middleware9 = __toESM(require_dist_cjs6());
+ import_signature_v4_multi_region = __toESM(require_dist_cjs6());
+ init_client2();
+ init_endpoints();
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 = (0, import_util_middleware9.getSmithyContext)(context)?.commandInstance?.constructor?.getEndpointParameterInstructions;
+ const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor?.getEndpointParameterInstructions;
if (!instructionsFn) {
throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
}
- const endpointParameters = await (0, import_middleware_endpoint7.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config);
+ const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
return Object.assign(defaultParameters, endpointParameters);
};
_defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
- operation: (0, import_util_middleware9.getSmithyContext)(context).operation,
- region: await (0, import_util_middleware9.normalizeProvider)(config.region)() || (() => {
+ operation: getSmithyContext(context).operation,
+ region: await normalizeProvider(config.region)() || (() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})()
};
@@ -40770,15 +43619,11 @@ var init_httpAuthSchemeProvider4 = __esm({
"aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
"smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption4
});
- resolveStsAuthConfig = (input) => Object.assign(input, {
- stsClientCtor: STSClient
- });
resolveHttpAuthSchemeConfig4 = (config) => {
- 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 ?? [])
+ const config_0 = resolveAwsSdkSigV4Config(config);
+ const config_1 = resolveAwsSdkSigV4AConfig(config_0);
+ return Object.assign(config_1, {
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
});
};
}
@@ -40807,11 +43652,11 @@ var init_EndpointParameters4 = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js
-var import_smithy_client29, STSServiceException;
+var STSServiceException;
var init_STSServiceException = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js"() {
- import_smithy_client29 = __toESM(require_dist_cjs34());
- STSServiceException = class _STSServiceException extends import_smithy_client29.ServiceException {
+ init_client2();
+ STSServiceException = class _STSServiceException extends ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, _STSServiceException.prototype);
@@ -41113,25 +43958,24 @@ var init_schemas_04 = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js
-var import_signature_v4_multi_region2, import_smithy_client30, import_url_parser5, import_util_base6411, import_util_utf811, getRuntimeConfig7;
+var import_signature_v4_multi_region2, 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_cjs40());
+ import_signature_v4_multi_region2 = __toESM(require_dist_cjs6());
init_dist_es();
- 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_client2();
+ init_protocols();
+ init_serde();
init_httpAuthSchemeProvider4();
init_endpointResolver4();
init_schemas_04();
getRuntimeConfig7 = (config) => {
return {
apiVersion: "2011-06-15",
- base64Decoder: config?.base64Decoder ?? import_util_base6411.fromBase64,
- base64Encoder: config?.base64Encoder ?? import_util_base6411.toBase64,
+ base64Decoder: config?.base64Decoder ?? fromBase64,
+ base64Encoder: config?.base64Encoder ?? toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver4,
extensions: config?.extensions ?? [],
@@ -41153,7 +43997,7 @@ var init_runtimeConfig_shared4 = __esm({
signer: new NoAuthSigner()
}
],
- logger: config?.logger ?? new import_smithy_client30.NoOpLogger(),
+ logger: config?.logger ?? new NoOpLogger(),
protocol: config?.protocol ?? AwsQueryProtocol,
protocolSettings: config?.protocolSettings ?? {
defaultNamespace: "com.amazonaws.sts",
@@ -41164,37 +44008,32 @@ var init_runtimeConfig_shared4 = __esm({
},
serviceId: config?.serviceId ?? "STS",
signerConstructor: config?.signerConstructor ?? import_signature_v4_multi_region2.SignatureV4MultiRegion,
- urlParser: config?.urlParser ?? import_url_parser5.parseUrl,
- utf8Decoder: config?.utf8Decoder ?? import_util_utf811.fromUtf8,
- utf8Encoder: config?.utf8Encoder ?? import_util_utf811.toUtf8
+ urlParser: config?.urlParser ?? parseUrl,
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
+ utf8Encoder: config?.utf8Encoder ?? toUtf8
};
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js
-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 import_node_http_handler4, getRuntimeConfig8;
var init_runtimeConfig4 = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js"() {
init_package();
- init_client();
+ init_client3();
init_httpAuthSchemes2();
- import_util_user_agent_node4 = __toESM(require_dist_cjs44());
- import_config_resolver7 = __toESM(require_dist_cjs26());
init_dist_es();
- 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_client2();
+ init_config2();
+ init_retry2();
+ init_serde();
+ import_node_http_handler4 = __toESM(require_dist_cjs9());
init_runtimeConfig_shared4();
getRuntimeConfig8 = (config) => {
- (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);
+ emitWarningIfUnsupportedVersion2(process.version);
+ const defaultsMode = resolveDefaultsModeConfig(config);
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getRuntimeConfig7(config);
emitWarningIfUnsupportedVersion(process.version);
const loaderConfig = {
@@ -41206,9 +44045,9 @@ var init_runtimeConfig4 = __esm({
...config,
runtime: "node",
defaultsMode,
- 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 }),
+ 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 }),
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
@@ -41226,19 +44065,19 @@ var init_runtimeConfig4 = __esm({
signer: new NoAuthSigner()
}
],
- 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 }),
+ maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
+ region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
requestHandler: import_node_http_handler4.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
- 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
+ retryMode: config?.retryMode ?? loadConfig({
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
}, config),
- sha256: config?.sha256 ?? import_hash_node4.Hash.bind(null, "sha256"),
- sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, import_node_config_provider4.loadConfig)(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
+ sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
streamCollector: config?.streamCollector ?? import_node_http_handler4.streamCollector,
- 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)
+ 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)
};
};
}
@@ -41289,62 +44128,59 @@ var init_httpAuthExtensionConfiguration4 = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js
-var import_region_config_resolver4, import_protocol_http15, import_smithy_client32, resolveRuntimeExtensions4;
+var resolveRuntimeExtensions4;
var init_runtimeExtensions4 = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js"() {
- import_region_config_resolver4 = __toESM(require_dist_cjs48());
- import_protocol_http15 = __toESM(require_dist_cjs2());
- import_smithy_client32 = __toESM(require_dist_cjs34());
+ init_client3();
+ init_client2();
+ init_protocols();
init_httpAuthExtensionConfiguration4();
resolveRuntimeExtensions4 = (runtimeConfig, extensions) => {
- 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));
+ const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration4(runtimeConfig));
extensions.forEach((extension) => extension.configure(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));
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig4(extensionConfiguration));
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js
-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 STSClient;
var init_STSClient = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js"() {
- 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_client3();
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 import_smithy_client33.Client {
+ STSClient = class extends 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 = (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_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_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((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(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(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
@@ -41362,40 +44198,40 @@ var init_STSClient = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js
-var import_middleware_endpoint9, import_smithy_client34, AssumeRoleCommand;
+var AssumeRoleCommand;
var init_AssumeRoleCommand = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js"() {
- import_middleware_endpoint9 = __toESM(require_dist_cjs32());
- import_smithy_client34 = __toESM(require_dist_cjs34());
+ init_client2();
+ init_endpoints();
init_EndpointParameters4();
init_schemas_04();
- AssumeRoleCommand = class extends import_smithy_client34.Command.classBuilder().ep(commonParams4).m(function(Command2, cs, config, o2) {
- return [(0, import_middleware_endpoint9.getEndpointPlugin)(config, Command2.getEndpointParameterInstructions())];
+ AssumeRoleCommand = class extends Command2.classBuilder().ep(commonParams4).m(function(Command3, cs, config, o2) {
+ return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(AssumeRole$).build() {
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js
-var import_middleware_endpoint10, import_smithy_client35, AssumeRoleWithWebIdentityCommand;
+var AssumeRoleWithWebIdentityCommand;
var init_AssumeRoleWithWebIdentityCommand = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js"() {
- import_middleware_endpoint10 = __toESM(require_dist_cjs32());
- import_smithy_client35 = __toESM(require_dist_cjs34());
+ init_client2();
+ init_endpoints();
init_EndpointParameters4();
init_schemas_04();
- AssumeRoleWithWebIdentityCommand = class extends import_smithy_client35.Command.classBuilder().ep(commonParams4).m(function(Command2, cs, config, o2) {
- return [(0, import_middleware_endpoint10.getEndpointPlugin)(config, Command2.getEndpointParameterInstructions())];
+ AssumeRoleWithWebIdentityCommand = class extends Command2.classBuilder().ep(commonParams4).m(function(Command3, cs, config, o2) {
+ return [getEndpointPlugin(config, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(AssumeRoleWithWebIdentity$).build() {
};
}
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js
-var import_smithy_client36, commands4, STS;
+var commands4, STS;
var init_STS = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js"() {
- import_smithy_client36 = __toESM(require_dist_cjs34());
+ init_client2();
init_AssumeRoleCommand();
init_AssumeRoleWithWebIdentityCommand();
init_STSClient();
@@ -41405,7 +44241,7 @@ var init_STS = __esm({
};
STS = class extends STSClient {
};
- (0, import_smithy_client36.createAggregatedClient)(commands4, STS);
+ createAggregatedClient(commands4, STS);
}
});
@@ -41424,11 +44260,10 @@ var init_models_04 = __esm({
});
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js
-var import_region_config_resolver5, getAccountIdFromAssumedRoleUser, resolveRegion, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity, isH2;
+var getAccountIdFromAssumedRoleUser, resolveRegion, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity, isH2;
var init_defaultStsRoleAssumers = __esm({
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js"() {
- init_client();
- import_region_config_resolver5 = __toESM(require_dist_cjs48());
+ init_client3();
init_AssumeRoleCommand();
init_AssumeRoleWithWebIdentityCommand();
getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
@@ -41444,7 +44279,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 (0, import_region_config_resolver5.stsRegionDefaultResolver)(loaderConfig)());
+ const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await 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;
};
@@ -41564,6 +44399,7 @@ 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$,
@@ -41595,7 +44431,7 @@ __export(sts_exports, {
STSServiceException: () => STSServiceException,
STSServiceException$: () => STSServiceException$,
Tag$: () => Tag$,
- __Client: () => import_smithy_client33.Client,
+ __Client: () => Client,
decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider,
errorTypeRegistries: () => errorTypeRegistries4,
getDefaultRoleAssumer: () => getDefaultRoleAssumer2,
@@ -41615,14 +44451,13 @@ var init_sts = __esm({
});
// node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js
-var require_dist_cjs52 = __commonJS({
+var require_dist_cjs15 = __commonJS({
"node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2) {
"use strict";
- var sharedIniFileLoader = require_dist_cjs29();
- var propertyProvider = require_dist_cjs28();
+ var config = (init_config2(), __toCommonJS(config_exports));
var node_child_process = require("node:child_process");
var node_util = require("node:util");
- var client = (init_client(), __toCommonJS(client_exports));
+ var client = (init_client3(), __toCommonJS(client_exports2));
var getValidatedProcessCredentials = (profileName, data3, profiles) => {
if (data3.Version !== 1) {
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
@@ -41657,7 +44492,7 @@ var require_dist_cjs52 = __commonJS({
if (profiles[profileName]) {
const credentialProcess = profile["credential_process"];
if (credentialProcess !== void 0) {
- const execPromise = node_util.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec);
+ const execPromise = node_util.promisify(config.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec);
try {
const { stdout } = await execPromise(credentialProcess);
let data3;
@@ -41668,21 +44503,21 @@ var require_dist_cjs52 = __commonJS({
}
return getValidatedProcessCredentials(profileName, data3, profiles);
} catch (error3) {
- throw new propertyProvider.CredentialsProviderError(error3.message, { logger: logger2 });
+ throw new config.CredentialsProviderError(error3.message, { logger: logger2 });
}
} else {
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger: logger2 });
+ throw new config.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger: logger2 });
}
} else {
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
+ throw new config.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 sharedIniFileLoader.parseKnownFiles(init);
- return resolveProcessCredentials(sharedIniFileLoader.getProfileName({
+ const profiles = await config.parseKnownFiles(init);
+ return resolveProcessCredentials(config.getProfileName({
profile: init.profile ?? callerClientConfig?.profile
}), profiles, init.logger);
};
@@ -41694,43 +44529,6 @@ var require_dist_cjs52 = __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) => {
@@ -41738,7 +44536,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(() => __importStar2((init_sts(), __toCommonJS(sts_exports))));
+ const { getDefaultRoleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity3 } = await Promise.resolve().then(() => (init_sts(), sts_exports));
roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity3({
...init.clientConfig,
credentialProviderLogger: init.logger,
@@ -41768,9 +44566,8 @@ var require_fromTokenFile = __commonJS({
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.fromTokenFile = void 0;
- 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 client_1 = (init_client3(), __toCommonJS(client_exports2));
+ var config_1 = (init_config2(), __toCommonJS(config_exports));
var node_fs_1 = require("node:fs");
var fromWebToken_1 = require_fromWebToken();
var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
@@ -41782,13 +44579,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 property_provider_1.CredentialsProviderError("Web identity configuration not specified", {
+ throw new config_1.CredentialsProviderError("Web identity configuration not specified", {
logger: init.logger
});
}
const credentials = await (0, fromWebToken_1.fromWebToken)({
...init,
- webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
+ webIdentityToken: config_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
roleArn,
roleSessionName
})(awsIdentityProperties);
@@ -41802,7 +44599,7 @@ var require_fromTokenFile = __commonJS({
});
// node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js
-var require_dist_cjs53 = __commonJS({
+var require_dist_cjs16 = __commonJS({
"node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2) {
"use strict";
var fromTokenFile = require_fromTokenFile();
@@ -41825,36 +44622,35 @@ var require_dist_cjs53 = __commonJS({
});
// node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js
-var require_dist_cjs54 = __commonJS({
+var require_dist_cjs17 = __commonJS({
"node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2) {
"use strict";
- var sharedIniFileLoader = require_dist_cjs29();
- var propertyProvider = require_dist_cjs28();
- var client = (init_client(), __toCommonJS(client_exports));
- var credentialProviderLogin = require_dist_cjs51();
+ var config = (init_config2(), __toCommonJS(config_exports));
+ var client = (init_client3(), __toCommonJS(client_exports2));
+ var credentialProviderLogin = require_dist_cjs14();
var resolveCredentialSource = (credentialSource, profileName, logger2) => {
const sourceProvidersMap = {
EcsContainer: async (options) => {
- const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs43()));
- const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs42()));
+ const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs10()));
+ const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs8()));
logger2?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
- return async () => propertyProvider.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
+ return async () => config.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_cjs42()));
+ const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs8()));
return async () => fromInstanceMetadata(options)().then(setNamedProvider);
},
Environment: async (options) => {
logger2?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
- const { fromEnv } = await Promise.resolve().then(() => __toESM(require_dist_cjs41()));
- return async () => fromEnv(options)().then(setNamedProvider);
+ const { fromEnv: fromEnv2 } = await Promise.resolve().then(() => __toESM(require_dist_cjs7()));
+ return async () => fromEnv2(options)().then(setNamedProvider);
}
};
if (credentialSource in sourceProvidersMap) {
return sourceProvidersMap[credentialSource];
} else {
- throw new propertyProvider.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger: logger2 });
+ throw new config.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");
@@ -41892,7 +44688,7 @@ var require_dist_cjs54 = __commonJS({
}, options.clientPlugins);
}
if (source_profile && source_profile in visitedProfiles) {
- 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 });
+ 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 });
}
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, {
@@ -41911,7 +44707,7 @@ var require_dist_cjs54 = __commonJS({
const { mfa_serial } = profileData;
if (mfa_serial) {
if (!options.mfaCodeProvider) {
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
+ throw new config.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);
@@ -41934,12 +44730,12 @@ var require_dist_cjs54 = __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_cjs52())).then(({ fromProcess }) => fromProcess({
+ var resolveProcessCredentials = async (options, profile) => Promise.resolve().then(() => __toESM(require_dist_cjs15())).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_cjs50()));
+ const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs13()));
return fromSSO({
profile,
logger: options.logger,
@@ -41969,7 +44765,7 @@ var require_dist_cjs54 = __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_cjs53())).then(({ fromTokenFile }) => fromTokenFile({
+ var resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => Promise.resolve().then(() => __toESM(require_dist_cjs16())).then(({ fromTokenFile }) => fromTokenFile({
webIdentityTokenFile: profile.web_identity_token_file,
roleArn: profile.role_arn,
roleSessionName: profile.role_session_name,
@@ -42002,12 +44798,12 @@ var require_dist_cjs54 = __commonJS({
if (isLoginProfile(data3)) {
return resolveLoginCredentials(profileName, options, callerClientConfig);
}
- throw new propertyProvider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
+ throw new config.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 sharedIniFileLoader.parseKnownFiles(init);
- return resolveProfileData(sharedIniFileLoader.getProfileName({
+ const profiles = await config.parseKnownFiles(init);
+ return resolveProfileData(config.getProfileName({
profile: init.profile ?? callerClientConfig?.profile
}), profiles, init, callerClientConfig);
};
@@ -42016,36 +44812,44 @@ var require_dist_cjs54 = __commonJS({
});
// node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js
-var require_dist_cjs55 = __commonJS({
+var require_dist_cjs18 = __commonJS({
"node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2) {
"use strict";
- var credentialProviderEnv = require_dist_cjs41();
- var propertyProvider = require_dist_cjs28();
- var sharedIniFileLoader = require_dist_cjs29();
- var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
+ var credentialProviderEnv = require_dist_cjs7();
+ var config = (init_config2(), __toCommonJS(config_exports));
+ var ENV_IMDS_DISABLED2 = "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_cjs42()));
+ const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require_dist_cjs8()));
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_cjs43()));
- return propertyProvider.chain(fromHttp(init), fromContainerMetadata(init));
+ const { fromHttp } = await Promise.resolve().then(() => __toESM(require_dist_cjs10()));
+ return config.chain(fromHttp(init), fromContainerMetadata(init));
}
- if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") {
+ if (process.env[ENV_IMDS_DISABLED2] && process.env[ENV_IMDS_DISABLED2] !== "false") {
return async () => {
- throw new propertyProvider.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger });
+ throw new config.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 chain = internalCreateChain(providers);
+ const chain2 = internalCreateChain(providers);
let activeLock;
let passiveLock;
let credentials;
+ let forceRefreshLock;
const provider = async (options) => {
if (options?.forceRefresh) {
- return await chain(options);
+ if (!forceRefreshLock) {
+ forceRefreshLock = chain2(options).then((c5) => {
+ credentials = c5;
+ }).finally(() => {
+ forceRefreshLock = void 0;
+ });
+ }
+ await forceRefreshLock;
+ return credentials;
}
if (credentials?.expiration) {
if (credentials?.expiration?.getTime() < Date.now()) {
@@ -42057,14 +44861,14 @@ var require_dist_cjs55 = __commonJS({
} else if (!credentials || treatAsExpired?.(credentials)) {
if (credentials) {
if (!passiveLock) {
- passiveLock = chain(options).then((c5) => {
+ passiveLock = chain2(options).then((c5) => {
credentials = c5;
}).finally(() => {
passiveLock = void 0;
});
}
} else {
- activeLock = chain(options).then((c5) => {
+ activeLock = chain2(options).then((c5) => {
credentials = c5;
}).finally(() => {
activeLock = void 0;
@@ -42094,7 +44898,7 @@ var require_dist_cjs55 = __commonJS({
var multipleCredentialSourceWarningEmitted = false;
var defaultProvider = (init = {}) => memoizeChain([
async () => {
- const profile = init.profile ?? process.env[sharedIniFileLoader.ENV_PROFILE];
+ const profile = init.profile ?? process.env[config.ENV_PROFILE];
if (profile) {
const envStaticCredentialsAreSet = process.env[credentialProviderEnv.ENV_KEY] && process.env[credentialProviderEnv.ENV_SECRET];
if (envStaticCredentialsAreSet) {
@@ -42112,7 +44916,7 @@ var require_dist_cjs55 = __commonJS({
multipleCredentialSourceWarningEmitted = true;
}
}
- throw new propertyProvider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
+ throw new config.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
logger: init.logger,
tryNextLink: true
});
@@ -42124,24 +44928,24 @@ var require_dist_cjs55 = __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 propertyProvider.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
+ throw new config.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_cjs50()));
+ const { fromSSO } = await Promise.resolve().then(() => __toESM(require_dist_cjs13()));
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_cjs54()));
+ const { fromIni } = await Promise.resolve().then(() => __toESM(require_dist_cjs17()));
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_cjs52()));
+ const { fromProcess } = await Promise.resolve().then(() => __toESM(require_dist_cjs15()));
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_cjs53()));
+ const { fromTokenFile } = await Promise.resolve().then(() => __toESM(require_dist_cjs16()));
return fromTokenFile(init)(awsIdentityProperties);
},
async () => {
@@ -42149,7 +44953,7 @@ var require_dist_cjs55 = __commonJS({
return (await remoteProvider(init))();
},
async () => {
- throw new propertyProvider.CredentialsProviderError("Could not load credentials from any providers", {
+ throw new config.CredentialsProviderError("Could not load credentials from any providers", {
tryNextLink: false,
logger: init.logger
});
@@ -42169,11 +44973,11 @@ var require_STSServiceException = __commonJS({
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.STSServiceException = exports2.__ServiceException = void 0;
- var smithy_client_1 = require_dist_cjs34();
+ var client_1 = (init_client2(), __toCommonJS(client_exports));
Object.defineProperty(exports2, "__ServiceException", { enumerable: true, get: function() {
- return smithy_client_1.ServiceException;
+ return client_1.ServiceException;
} });
- var STSServiceException2 = class _STSServiceException extends smithy_client_1.ServiceException {
+ var STSServiceException2 = class _STSServiceException extends client_1.ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, _STSServiceException.prototype);
@@ -42216,7 +45020,7 @@ var require_errors2 = __commonJS({
}
};
exports2.MalformedPolicyDocumentException = MalformedPolicyDocumentException2;
- var PackedPolicyTooLargeException2 = class _PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException {
+ var PackedPolicyTooLargeException3 = class _PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException {
name = "PackedPolicyTooLargeException";
$fault = "client";
constructor(opts) {
@@ -42228,7 +45032,7 @@ var require_errors2 = __commonJS({
Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);
}
};
- exports2.PackedPolicyTooLargeException = PackedPolicyTooLargeException2;
+ exports2.PackedPolicyTooLargeException = PackedPolicyTooLargeException3;
var RegionDisabledException2 = class _RegionDisabledException extends STSServiceException_1.STSServiceException {
name = "RegionDisabledException";
$fault = "client";
@@ -42952,20 +45756,19 @@ 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_cjs40();
+ var signature_v4_multi_region_1 = require_dist_cjs6();
var core_1 = (init_dist_es(), __toCommonJS(dist_es_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 client_1 = (init_client2(), __toCommonJS(client_exports));
+ var protocols_2 = (init_protocols(), __toCommonJS(protocols_exports));
+ var serde_1 = (init_serde(), __toCommonJS(serde_exports));
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 ?? util_base64_1.fromBase64,
- base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
+ base64Decoder: config?.base64Decoder ?? serde_1.fromBase64,
+ base64Encoder: config?.base64Encoder ?? serde_1.toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
extensions: config?.extensions ?? [],
@@ -42987,7 +45790,7 @@ var require_runtimeConfig_shared = __commonJS({
signer: new core_1.NoAuthSigner()
}
],
- logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
+ logger: config?.logger ?? new client_1.NoOpLogger(),
protocol: config?.protocol ?? protocols_1.AwsQueryProtocol,
protocolSettings: config?.protocolSettings ?? {
defaultNamespace: "com.amazonaws.sts",
@@ -42998,9 +45801,9 @@ var require_runtimeConfig_shared = __commonJS({
},
serviceId: config?.serviceId ?? "STS",
signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion,
- urlParser: config?.urlParser ?? url_parser_1.parseUrl,
- utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
- utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
+ urlParser: config?.urlParser ?? protocols_2.parseUrl,
+ utf8Decoder: config?.utf8Decoder ?? serde_1.fromUtf8,
+ utf8Encoder: config?.utf8Encoder ?? serde_1.toUtf8
};
};
exports2.getRuntimeConfig = getRuntimeConfig9;
@@ -43015,25 +45818,20 @@ 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_client(), __toCommonJS(client_exports));
+ var client_1 = (init_client3(), __toCommonJS(client_exports2));
var httpAuthSchemes_1 = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
- 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 credential_provider_node_1 = require_dist_cjs18();
var core_1 = (init_dist_es(), __toCommonJS(dist_es_exports));
- 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 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 runtimeConfig_shared_1 = require_runtimeConfig_shared();
var getRuntimeConfig9 = (config) => {
- (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);
+ (0, client_2.emitWarningIfUnsupportedVersion)(process.version);
+ const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
+ const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
(0, client_1.emitWarningIfUnsupportedVersion)(process.version);
const loaderConfig = {
@@ -43045,10 +45843,10 @@ var require_runtimeConfig = __commonJS({
...config,
runtime: "node",
defaultsMode,
- 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,
+ authSchemePreference: config?.authSchemePreference ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
+ bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
@@ -43066,35 +45864,61 @@ var require_runtimeConfig = __commonJS({
signer: new core_1.NoAuthSigner()
}
],
- 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 }),
+ 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 }),
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
- 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
+ retryMode: config?.retryMode ?? (0, config_1.loadConfig)({
+ ...retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
+ default: async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE
}, config),
- 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),
+ sha256: config?.sha256 ?? serde_1.Hash.bind(null, "sha256"),
+ sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
- 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)
+ 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)
};
};
exports2.getRuntimeConfig = getRuntimeConfig9;
}
});
-// 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) {
+// 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) {
"use strict";
- 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;
+ 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;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
@@ -43107,8 +45931,8 @@ var require_httpAuthExtensionConfiguration = __commonJS({
httpAuthSchemes() {
return _httpAuthSchemes;
},
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider2) {
+ _httpAuthSchemeProvider = httpAuthSchemeProvider2;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
@@ -43121,155 +45945,95 @@ var require_httpAuthExtensionConfiguration = __commonJS({
}
};
};
- exports2.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration5;
- var resolveHttpAuthRuntimeConfig5 = (config) => {
+ var resolveHttpAuthRuntimeConfig5 = (config2) => {
return {
- httpAuthSchemes: config.httpAuthSchemes(),
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
- credentials: config.credentials()
+ httpAuthSchemes: config2.httpAuthSchemes(),
+ httpAuthSchemeProvider: config2.httpAuthSchemeProvider(),
+ credentials: config2.credentials()
};
};
- 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));
+ var resolveRuntimeExtensions5 = (runtimeConfig2, extensions) => {
+ const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig2), client.getDefaultExtensionConfiguration(runtimeConfig2), protocols2.getHttpHandlerExtensionConfiguration(runtimeConfig2), getHttpAuthExtensionConfiguration5(runtimeConfig2));
extensions.forEach((extension) => extension.configure(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));
+ return Object.assign(runtimeConfig2, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols2.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig5(extensionConfiguration));
};
- 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 {
+ var STSClient3 = class extends client.Client {
config;
constructor(...[configuration]) {
- const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
super(_config_0);
this.initConfig = _config_0;
- 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 || []);
+ 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 || []);
this.config = _config_8;
- 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(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, core_1.getHttpSigningPlugin)(this.config));
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
}
destroy() {
super.destroy();
}
};
- 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(Command2, cs, config, o2) {
- return [middlewareEndpoint.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
+ var AssumeRoleCommand3 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) {
+ return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(schemas_0.AssumeRole$).build() {
};
- var AssumeRoleWithSAMLCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command2, cs, config, o2) {
- return [middlewareEndpoint.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
+ var AssumeRoleWithSAMLCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) {
+ return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {}).n("STSClient", "AssumeRoleWithSAMLCommand").sc(schemas_0.AssumeRoleWithSAML$).build() {
};
- var AssumeRoleWithWebIdentityCommand3 = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command2, cs, config, o2) {
- return [middlewareEndpoint.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
+ var AssumeRoleWithWebIdentityCommand3 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) {
+ return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(schemas_0.AssumeRoleWithWebIdentity$).build() {
};
- var AssumeRootCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command2, cs, config, o2) {
- return [middlewareEndpoint.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
+ var AssumeRootCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) {
+ return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "AssumeRoot", {}).n("STSClient", "AssumeRootCommand").sc(schemas_0.AssumeRoot$).build() {
};
- var DecodeAuthorizationMessageCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command2, cs, config, o2) {
- return [middlewareEndpoint.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
+ var DecodeAuthorizationMessageCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) {
+ return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {}).n("STSClient", "DecodeAuthorizationMessageCommand").sc(schemas_0.DecodeAuthorizationMessage$).build() {
};
- var GetAccessKeyInfoCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command2, cs, config, o2) {
- return [middlewareEndpoint.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
+ var GetAccessKeyInfoCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) {
+ return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {}).n("STSClient", "GetAccessKeyInfoCommand").sc(schemas_0.GetAccessKeyInfo$).build() {
};
- var GetCallerIdentityCommand2 = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command2, cs, config, o2) {
- return [middlewareEndpoint.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
+ var GetCallerIdentityCommand2 = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) {
+ return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {}).n("STSClient", "GetCallerIdentityCommand").sc(schemas_0.GetCallerIdentity$).build() {
};
- var GetDelegatedAccessTokenCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command2, cs, config, o2) {
- return [middlewareEndpoint.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
+ var GetDelegatedAccessTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) {
+ return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "GetDelegatedAccessToken", {}).n("STSClient", "GetDelegatedAccessTokenCommand").sc(schemas_0.GetDelegatedAccessToken$).build() {
};
- var GetFederationTokenCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command2, cs, config, o2) {
- return [middlewareEndpoint.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
+ var GetFederationTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) {
+ return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {}).n("STSClient", "GetFederationTokenCommand").sc(schemas_0.GetFederationToken$).build() {
};
- var GetSessionTokenCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command2, cs, config, o2) {
- return [middlewareEndpoint.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
+ var GetSessionTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) {
+ return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {}).n("STSClient", "GetSessionTokenCommand").sc(schemas_0.GetSessionToken$).build() {
};
- var GetWebIdentityTokenCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command2, cs, config, o2) {
- return [middlewareEndpoint.getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
+ var GetWebIdentityTokenCommand = class extends client.Command.classBuilder().ep(commonParams5).m(function(Command3, cs, config2, o2) {
+ return [endpoints.getEndpointPlugin(config2, Command3.getEndpointParameterInstructions())];
}).s("AWSSecurityTokenServiceV20110615", "GetWebIdentityToken", {}).n("STSClient", "GetWebIdentityTokenCommand").sc(schemas_0.GetWebIdentityToken$).build() {
};
var commands5 = {
@@ -43285,9 +46049,9 @@ var require_dist_cjs56 = __commonJS({
GetSessionTokenCommand,
GetWebIdentityTokenCommand
};
- var STS2 = class extends STSClient3.STSClient {
+ var STS2 = class extends STSClient3 {
};
- smithyClient.createAggregatedClient(commands5, STS2);
+ client.createAggregatedClient(commands5, STS2);
var getAccountIdFromAssumedRoleUser2 = (assumedRoleUser) => {
if (typeof assumedRoleUser?.Arn === "string") {
const arnComponents = assumedRoleUser.Arn.split(":");
@@ -43301,7 +46065,7 @@ var require_dist_cjs56 = __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 regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());
+ const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await client$1.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;
};
@@ -43340,7 +46104,7 @@ var require_dist_cjs56 = __commonJS({
...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
...accountId && { accountId }
};
- client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
+ client$1.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
return credentials;
};
};
@@ -43377,9 +46141,9 @@ var require_dist_cjs56 = __commonJS({
...accountId && { accountId }
};
if (accountId) {
- client.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
+ client$1.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
}
- client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
+ client$1.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
return credentials;
};
};
@@ -43391,22 +46155,23 @@ var require_dist_cjs56 = __commonJS({
return baseCtor;
else
return class CustomizableSTSClient extends baseCtor {
- constructor(config) {
- super(config);
+ constructor(config2) {
+ super(config2);
for (const customization of customizations) {
this.middlewareStack.use(customization);
}
}
};
};
- var getDefaultRoleAssumer3 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor2(STSClient3.STSClient, stsPlugins));
- var getDefaultRoleAssumerWithWebIdentity3 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor2(STSClient3.STSClient, stsPlugins));
+ var getDefaultRoleAssumer3 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor2(STSClient3, stsPlugins));
+ var getDefaultRoleAssumerWithWebIdentity3 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor2(STSClient3, stsPlugins));
var decorateDefaultCredentialProvider2 = (provider) => (input) => provider({
roleAssumer: getDefaultRoleAssumer3(input),
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity3(input),
...input
});
- exports2.$Command = smithyClient.Command;
+ exports2.$Command = client.Command;
+ exports2.__Client = client.Client;
exports2.STSServiceException = STSServiceException2.STSServiceException;
exports2.AssumeRoleCommand = AssumeRoleCommand3;
exports2.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand;
@@ -43420,16 +46185,10 @@ var require_dist_cjs56 = __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__"]
@@ -43695,7 +46454,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(env) {
+ function setup(env2) {
createDebug16.debug = createDebug16;
createDebug16.default = createDebug16;
createDebug16.coerce = coerce;
@@ -43704,8 +46463,8 @@ var require_common = __commonJS({
createDebug16.enabled = enabled;
createDebug16.humanize = require_ms();
createDebug16.destroy = destroy;
- Object.keys(env).forEach((key) => {
- createDebug16[key] = env[key];
+ Object.keys(env2).forEach((key) => {
+ createDebug16[key] = env2[key];
});
createDebug16.names = [];
createDebug16.skips = [];
@@ -43795,8 +46554,8 @@ var require_common = __commonJS({
createDebug16.namespaces = namespaces;
createDebug16.names = [];
createDebug16.skips = [];
- const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
- for (const ns of split) {
+ const split2 = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
+ for (const ns of split2) {
if (ns[0] === "-") {
createDebug16.skips.push(ns.slice(1));
} else {
@@ -44059,20 +46818,20 @@ var require_supports_color = __commonJS({
var os7 = require("os");
var tty = require("tty");
var hasFlag = require_has_flag();
- var { env } = process;
+ var { env: env2 } = 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 env) {
- if (env.FORCE_COLOR === "true") {
+ if ("FORCE_COLOR" in env2) {
+ if (env2.FORCE_COLOR === "true") {
forceColor = 1;
- } else if (env.FORCE_COLOR === "false") {
+ } else if (env2.FORCE_COLOR === "false") {
forceColor = 0;
} else {
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
+ forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3);
}
}
function translateLevel(level) {
@@ -44100,7 +46859,7 @@ var require_supports_color = __commonJS({
return 0;
}
const min = forceColor || 0;
- if (env.TERM === "dumb") {
+ if (env2.TERM === "dumb") {
return min;
}
if (process.platform === "win32") {
@@ -44110,34 +46869,34 @@ var require_supports_color = __commonJS({
}
return 1;
}
- if ("CI" in env) {
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
+ if ("CI" in env2) {
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
return 1;
}
return min;
}
- if ("TEAMCITY_VERSION" in env) {
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+ if ("TEAMCITY_VERSION" in env2) {
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
}
- if (env.COLORTERM === "truecolor") {
+ if (env2.COLORTERM === "truecolor") {
return 3;
}
- if ("TERM_PROGRAM" in env) {
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
- switch (env.TERM_PROGRAM) {
+ if ("TERM_PROGRAM" in env2) {
+ const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
+ switch (env2.TERM_PROGRAM) {
case "iTerm.app":
return version >= 3 ? 3 : 2;
case "Apple_Terminal":
return 2;
}
}
- if (/-256(color)?$/i.test(env.TERM)) {
+ if (/-256(color)?$/i.test(env2.TERM)) {
return 2;
}
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
return 1;
}
- if ("COLORTERM" in env) {
+ if ("COLORTERM" in env2) {
return 1;
}
return min;
@@ -44354,16 +47113,16 @@ function omit(obj, ...keys) {
}
return ret;
}
-var net2, tls, import_debug, import_events, import_url, debug2, HttpProxyAgent;
+var net2, tls, import_debug5, import_events, import_url, debug2, HttpProxyAgent;
var init_dist2 = __esm({
"node_modules/proxy-agent/node_modules/http-proxy-agent/dist/index.js"() {
net2 = __toESM(require("net"), 1);
tls = __toESM(require("tls"), 1);
- import_debug = __toESM(require_src(), 1);
+ import_debug5 = __toESM(require_src(), 1);
import_events = require("events");
init_dist();
import_url = require("url");
- debug2 = (0, import_debug.default)("http-proxy-agent");
+ debug2 = (0, import_debug5.default)("http-proxy-agent");
HttpProxyAgent = class extends Agent4 {
constructor(proxy, opts) {
super(opts);
@@ -44522,11 +47281,11 @@ function parseProxyResponse(socket) {
read();
});
}
-var import_debug2, debug3;
+var import_debug6, debug3;
var init_parse_proxy_response = __esm({
"node_modules/proxy-agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js"() {
- import_debug2 = __toESM(require_src(), 1);
- debug3 = (0, import_debug2.default)("https-proxy-agent:parse-proxy-response");
+ import_debug6 = __toESM(require_src(), 1);
+ debug3 = (0, import_debug6.default)("https-proxy-agent:parse-proxy-response");
}
});
@@ -44548,17 +47307,17 @@ function omit2(obj, ...keys) {
}
return ret;
}
-var net3, tls2, import_assert, import_debug3, import_url2, debug4, setServernameFromNonIpHost, HttpsProxyAgent;
+var net3, tls2, import_assert, import_debug7, import_url2, debug4, setServernameFromNonIpHost, HttpsProxyAgent;
var init_dist3 = __esm({
"node_modules/proxy-agent/node_modules/https-proxy-agent/dist/index.js"() {
net3 = __toESM(require("net"), 1);
tls2 = __toESM(require("tls"), 1);
import_assert = __toESM(require("assert"), 1);
- import_debug3 = __toESM(require_src(), 1);
+ import_debug7 = __toESM(require_src(), 1);
init_dist();
import_url2 = require("url");
init_parse_proxy_response();
- debug4 = (0, import_debug3.default)("https-proxy-agent");
+ debug4 = (0, import_debug7.default)("https-proxy-agent");
setServernameFromNonIpHost = (options) => {
if (options.servername === void 0 && options.host && !net3.isIP(options.host)) {
return {
@@ -46145,12 +48904,12 @@ 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 constants4 = __importStar2(require_constants7());
var address_error_1 = require_address_error();
- var isCorrect4 = common.isCorrect(constants3.BITS);
+ var isCorrect4 = common.isCorrect(constants4.BITS);
var Address4 = class _Address4 {
constructor(address) {
- this.groups = constants3.GROUPS;
+ this.groups = constants4.GROUPS;
this.parsedAddress = [];
this.parsedSubnet = "";
this.subnet = "/32";
@@ -46159,15 +48918,15 @@ var require_ipv4 = __commonJS({
this.isCorrect = isCorrect4;
this.isInSubnet = common.isInSubnet;
this.address = address;
- const subnet = constants3.RE_SUBNET_STRING.exec(address);
+ const subnet = constants4.RE_SUBNET_STRING.exec(address);
if (subnet) {
this.parsedSubnet = subnet[0].replace("/", "");
this.subnetMask = parseInt(this.parsedSubnet, 10);
this.subnet = `/${this.subnetMask}`;
- if (this.subnetMask < 0 || this.subnetMask > constants3.BITS) {
+ if (this.subnetMask < 0 || this.subnetMask > constants4.BITS) {
throw new address_error_1.AddressError("Invalid subnet mask.");
}
- address = address.replace(constants3.RE_SUBNET_STRING, "");
+ address = address.replace(constants4.RE_SUBNET_STRING, "");
}
this.addressMinusSuffix = address;
this.parsedAddress = this.parse(address);
@@ -46195,7 +48954,7 @@ var require_ipv4 = __commonJS({
*/
parse(address) {
const groups = address.split(".");
- if (!address.match(constants3.RE_ADDRESS)) {
+ if (!address.match(constants4.RE_ADDRESS)) {
throw new address_error_1.AddressError("Invalid IPv4 address.");
}
return groups;
@@ -46218,7 +48977,7 @@ var require_ipv4 = __commonJS({
* address.subnetMask; // 24
*/
static fromAddressAndMask(address, mask) {
- const bits = common.prefixLengthFromMask(new _Address4(mask).bigInt(), constants3.BITS);
+ const bits = common.prefixLengthFromMask(new _Address4(mask).bigInt(), constants4.BITS);
return new _Address4(`${address}/${bits}`);
}
/**
@@ -46232,9 +48991,9 @@ var require_ipv4 = __commonJS({
*/
static fromAddressAndWildcardMask(address, wildcardMask) {
const wildcard = new _Address4(wildcardMask).bigInt();
- const allOnes = (BigInt(1) << BigInt(constants3.BITS)) - BigInt(1);
+ const allOnes = (BigInt(1) << BigInt(constants4.BITS)) - BigInt(1);
const mask = wildcard ^ allOnes;
- const bits = common.prefixLengthFromMask(mask, constants3.BITS);
+ const bits = common.prefixLengthFromMask(mask, constants4.BITS);
return new _Address4(`${address}/${bits}`);
}
/**
@@ -46252,7 +49011,7 @@ var require_ipv4 = __commonJS({
*/
static fromWildcard(input) {
const groups = input.split(".");
- if (groups.length !== constants3.GROUPS) {
+ if (groups.length !== constants4.GROUPS) {
throw new address_error_1.AddressError("Wildcard pattern must have 4 octets");
}
let firstWildcard = -1;
@@ -46267,7 +49026,7 @@ var require_ipv4 = __commonJS({
}
const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard;
const replaced = groups.map((g5) => g5 === "*" ? "0" : g5);
- const subnetBits = constants3.BITS - trailing * 8;
+ const subnetBits = constants4.BITS - trailing * 8;
return new _Address4(`${replaced.join(".")}/${subnetBits}`);
}
/**
@@ -46337,7 +49096,7 @@ var require_ipv4 = __commonJS({
toGroup6() {
const output = [];
let i5;
- for (i5 = 0; i5 < constants3.GROUPS; i5 += 2) {
+ for (i5 = 0; i5 < constants4.GROUPS; i5 += 2) {
output.push(`${common.stringToPaddedHex(this.parsedAddress[i5])}${common.stringToPaddedHex(this.parsedAddress[i5 + 1])}`);
}
return output.join(":");
@@ -46354,7 +49113,7 @@ var require_ipv4 = __commonJS({
* @returns {bigint}
*/
_startAddress() {
- return BigInt(`0b${this.mask() + "0".repeat(constants3.BITS - this.subnetMask)}`);
+ return BigInt(`0b${this.mask() + "0".repeat(constants4.BITS - this.subnetMask)}`);
}
/**
* The first address in the range given by this address' subnet.
@@ -46378,7 +49137,7 @@ var require_ipv4 = __commonJS({
* @returns {bigint}
*/
_endAddress() {
- return BigInt(`0b${this.mask() + "1".repeat(constants3.BITS - this.subnetMask)}`);
+ return BigInt(`0b${this.mask() + "1".repeat(constants4.BITS - this.subnetMask)}`);
}
/**
* The last address in the range given by this address' subnet
@@ -46403,7 +49162,7 @@ var require_ipv4 = __commonJS({
* @returns {Address4}
*/
subnetMaskAddress() {
- return _Address4.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(constants3.BITS - this.subnetMask)}`));
+ return _Address4.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(constants4.BITS - this.subnetMask)}`));
}
/**
* The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is
@@ -46412,7 +49171,7 @@ var require_ipv4 = __commonJS({
* @returns {Address4}
*/
wildcardMask() {
- return _Address4.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(constants3.BITS - this.subnetMask)}`));
+ return _Address4.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(constants4.BITS - this.subnetMask)}`));
}
/**
* The network address in CIDR string form, e.g. `192.168.1.0/24` for
@@ -46554,7 +49313,7 @@ var require_ipv4 = __commonJS({
*/
binaryZeroPad() {
if (this._binaryZeroPad === void 0) {
- this._binaryZeroPad = this.bigInt().toString(2).padStart(constants3.BITS, "0");
+ this._binaryZeroPad = this.bigInt().toString(2).padStart(constants4.BITS, "0");
}
return this._binaryZeroPad;
}
@@ -46564,7 +49323,7 @@ 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(constants4.RE_ADDRESS, `${segments.slice(0, 2).join(".")}.${segments.slice(2, 4).join(".")}`);
}
};
exports2.Address4 = Address4;
@@ -46658,8 +49417,8 @@ var require_helpers = __commonJS({
const letters = s.split("");
return letters.map((n3, i5) => `${spanAllZeroes(n3)}`).join("");
}
- function spanLeadingZeroesSimple(group) {
- return escapeHtml(group).replace(/^(0+)/, '$1');
+ function spanLeadingZeroesSimple(group4) {
+ return escapeHtml(group4).replace(/^(0+)/, '$1');
}
function spanLeadingZeroes(address) {
const groups = address.split(":");
@@ -46718,27 +49477,27 @@ var require_regular_expressions = __commonJS({
function groupPossibilities(possibilities) {
return `(${possibilities.join("|")})`;
}
- function padGroup(group) {
- if (group.length < 4) {
- return `0{0,${4 - group.length}}${group}`;
+ function padGroup(group4) {
+ if (group4.length < 4) {
+ return `0{0,${4 - group4.length}}${group4}`;
}
- return group;
+ return group4;
}
exports2.ADDRESS_BOUNDARY = "[^A-Fa-f0-9:]";
function simpleRegularExpression(groups) {
const zeroIndexes = [];
- groups.forEach((group, i5) => {
- const groupInteger = parseInt(group, 16);
+ groups.forEach((group4, i5) => {
+ const groupInteger = parseInt(group4, 16);
if (groupInteger === 0) {
zeroIndexes.push(i5);
}
});
- const possibilities = zeroIndexes.map((zeroIndex) => groups.map((group, i5) => {
+ const possibilities = zeroIndexes.map((zeroIndex) => groups.map((group4, i5) => {
if (i5 === zeroIndex) {
const elision = i5 === 0 || i5 === v6.GROUPS - 1 ? ":" : "";
- return groupPossibilities([padGroup(group), elision]);
+ return groupPossibilities([padGroup(group4), elision]);
}
- return padGroup(group);
+ return padGroup(group4);
}).join(":"));
possibilities.push(groups.map(padGroup).join(":"));
return groupPossibilities(possibilities);
@@ -47420,7 +50179,7 @@ var require_ipv6 = __commonJS({
} else {
throw new address_error_1.AddressError("Too many :: groups found");
}
- groups = groups.map((group) => parseInt(group, 16).toString(16));
+ groups = groups.map((group4) => parseInt(group4, 16).toString(16));
if (groups.length !== this.groups) {
throw new address_error_1.AddressError("Incorrect number of groups found");
}
@@ -47549,14 +50308,14 @@ var require_ipv6 = __commonJS({
* Address6.fromAddress4Nat64('192.0.2.33', '2001:db8::/32').correctForm(); // '2001:db8:c000:221::'
*/
static fromAddress4Nat64(address, prefix = "64:ff9b::/96") {
- const v4 = new ipv4_1.Address4(address);
+ 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 = v4.binaryZeroPad();
+ const v4Bits = v42.binaryZeroPad();
let bits;
if (pl === 96) {
bits = prefixBits.slice(0, 96) + v4Bits;
@@ -48857,17 +51616,17 @@ function omit3(obj, ...keys) {
}
return ret;
}
-var import_socks, import_debug4, dns, net4, tls3, import_url3, debug5, setServernameFromNonIpHost2, SocksProxyAgent;
+var import_socks, import_debug8, dns, net4, tls3, import_url3, debug5, setServernameFromNonIpHost2, SocksProxyAgent;
var init_dist4 = __esm({
"node_modules/proxy-agent/node_modules/socks-proxy-agent/dist/index.js"() {
import_socks = __toESM(require_build(), 1);
init_dist();
- import_debug4 = __toESM(require_src(), 1);
+ import_debug8 = __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_debug4.default)("socks-proxy-agent");
+ debug5 = (0, import_debug8.default)("socks-proxy-agent");
setServernameFromNonIpHost2 = (options) => {
if (options.servername === void 0 && options.host && !net4.isIP(options.host)) {
return {
@@ -49183,15 +51942,15 @@ var init_notmodified = __esm({
});
// node_modules/get-uri/dist/data.js
-var import_debug5, import_stream, import_crypto, debug6, DataReadable, data2;
+var import_debug9, import_stream, import_crypto, debug6, DataReadable, data2;
var init_data = __esm({
"node_modules/get-uri/dist/data.js"() {
- import_debug5 = __toESM(require_src(), 1);
+ import_debug9 = __toESM(require_src(), 1);
import_stream = require("stream");
import_crypto = require("crypto");
init_node();
init_notmodified();
- debug6 = (0, import_debug5.default)("get-uri:data");
+ debug6 = (0, import_debug9.default)("get-uri:data");
DataReadable = class extends import_stream.Readable {
constructor(hash, buf) {
super();
@@ -49234,15 +51993,15 @@ var init_notfound = __esm({
function isNotModified(prev, curr) {
return +prev.mtime === +curr.mtime;
}
-var import_debug6, import_fs2, import_url4, debug7, file;
+var import_debug10, import_fs2, import_url4, debug7, file;
var init_file = __esm({
"node_modules/get-uri/dist/file.js"() {
- import_debug6 = __toESM(require_src(), 1);
+ import_debug10 = __toESM(require_src(), 1);
import_fs2 = require("fs");
init_notfound();
init_notmodified();
import_url4 = require("url");
- debug7 = (0, import_debug6.default)("get-uri:file");
+ debug7 = (0, import_debug10.default)("get-uri:file");
file = async ({ href: uri }, opts = {}) => {
const {
cache: cache5,
@@ -50521,7 +53280,7 @@ var require_Client = __commonJS({
};
var LIST_COMMANDS_DEFAULT = () => ["LIST -a", "LIST"];
var LIST_COMMANDS_MLSD = () => ["MLSD", "LIST -a", "LIST"];
- var Client2 = class {
+ var Client3 = class {
/**
* Instantiate an FTP client.
*
@@ -50742,8 +53501,8 @@ var require_Client = __commonJS({
/**
* Set the working directory.
*/
- async cd(path3) {
- const validPath = await this.protectWhitespace(path3);
+ async cd(path4) {
+ const validPath = await this.protectWhitespace(path4);
return this.send("CWD " + validPath);
}
/**
@@ -50756,8 +53515,8 @@ var require_Client = __commonJS({
* Get the last modified time of a file. This is not supported by every FTP server, in which case
* calling this method will throw an exception.
*/
- async lastMod(path3) {
- const validPath = await this.protectWhitespace(path3);
+ async lastMod(path4) {
+ const validPath = await this.protectWhitespace(path4);
const res = await this.send(`MDTM ${validPath}`);
const date2 = res.message.slice(4);
return (0, parseListMLSD_1.parseMLSxDate)(date2);
@@ -50765,8 +53524,8 @@ var require_Client = __commonJS({
/**
* Get the size of a file.
*/
- async size(path3) {
- const validPath = await this.protectWhitespace(path3);
+ async size(path4) {
+ const validPath = await this.protectWhitespace(path4);
const command = `SIZE ${validPath}`;
const res = await this.send(command);
const size = parseInt(res.message.slice(4), 10);
@@ -50793,8 +53552,8 @@ var require_Client = __commonJS({
* You can ignore FTP error return codes which won't throw an exception if e.g.
* the file doesn't exist.
*/
- async remove(path3, ignoreErrorCodes = false) {
- const validPath = await this.protectWhitespace(path3);
+ async remove(path4, ignoreErrorCodes = false) {
+ const validPath = await this.protectWhitespace(path4);
if (ignoreErrorCodes) {
return this.sendIgnoringError(`DELE ${validPath}`);
}
@@ -50948,8 +53707,8 @@ var require_Client = __commonJS({
*
* @param [path] Path to remote file or directory.
*/
- async list(path3 = "") {
- const validPath = await this.protectWhitespace(path3);
+ async list(path4 = "") {
+ const validPath = await this.protectWhitespace(path4);
let lastError;
for (const candidate of this.availableListCommands) {
const command = validPath === "" ? candidate : `${candidate} ${validPath}`;
@@ -51119,21 +53878,21 @@ var require_Client = __commonJS({
/**
* Remove an empty directory, will fail if not empty.
*/
- async removeEmptyDir(path3) {
- const validPath = await this.protectWhitespace(path3);
+ async removeEmptyDir(path4) {
+ const validPath = await this.protectWhitespace(path4);
return this.send(`RMD ${validPath}`);
}
/**
* FTP servers can't handle filenames that have leading whitespace. This method transforms
* a given path to fix that issue for most cases.
*/
- async protectWhitespace(path3) {
- if (!path3.startsWith(" ")) {
- return path3;
+ async protectWhitespace(path4) {
+ if (!path4.startsWith(" ")) {
+ return path4;
}
const pwd = await this.pwd();
const absolutePathPrefix = pwd.endsWith("/") ? pwd : pwd + "/";
- return absolutePathPrefix + path3;
+ return absolutePathPrefix + path4;
}
async _exitAtCurrentDirectory(func) {
const userDir = await this.pwd();
@@ -51209,12 +53968,12 @@ var require_Client = __commonJS({
return this.downloadToDir(localDirPath);
}
};
- exports2.Client = Client2;
- async function ensureLocalDirectory(path3) {
+ exports2.Client = Client3;
+ async function ensureLocalDirectory(path4) {
try {
- await fsStat(path3);
+ await fsStat(path4);
} catch (_a2) {
- await fsMkDir(path3, { recursive: true });
+ await fsMkDir(path4, { recursive: true });
}
}
async function ignoreError(func) {
@@ -51273,16 +54032,16 @@ var require_dist = __commonJS({
});
// node_modules/get-uri/dist/ftp.js
-var import_basic_ftp, import_stream2, import_path, import_debug7, debug8, ftp;
+var import_basic_ftp, import_stream2, import_path, import_debug11, debug8, ftp;
var init_ftp = __esm({
"node_modules/get-uri/dist/ftp.js"() {
import_basic_ftp = __toESM(require_dist(), 1);
import_stream2 = require("stream");
import_path = require("path");
- import_debug7 = __toESM(require_src(), 1);
+ import_debug11 = __toESM(require_src(), 1);
init_notfound();
init_notmodified();
- debug8 = (0, import_debug7.default)("get-uri:ftp");
+ debug8 = (0, import_debug11.default)("get-uri:ftp");
ftp = async (url, opts = {}) => {
const { cache: cache5 } = opts;
const filepath = decodeURIComponent(url.pathname);
@@ -51418,17 +54177,17 @@ function getCache(url, cache5) {
}
return null;
}
-var import_http2, import_https3, import_events2, import_debug8, debug9, http4;
+var import_http2, import_https3, import_events2, import_debug12, debug9, http4;
var init_http = __esm({
"node_modules/get-uri/dist/http.js"() {
import_http2 = __toESM(require("http"), 1);
import_https3 = __toESM(require("https"), 1);
import_events2 = require("events");
- import_debug8 = __toESM(require_src(), 1);
+ import_debug12 = __toESM(require_src(), 1);
init_http_error();
init_notfound();
init_notmodified();
- debug9 = (0, import_debug8.default)("get-uri:http");
+ debug9 = (0, import_debug12.default)("get-uri:http");
http4 = async (url, opts = {}) => {
debug9("GET %o", url.href);
const cache5 = getCache(url, opts.cache);
@@ -51541,16 +54300,16 @@ async function getUri(uri, opts) {
const getter = protocols[protocol];
return getter(url, opts);
}
-var import_debug9, debug10, protocols, VALID_PROTOCOLS;
+var import_debug13, debug10, protocols, VALID_PROTOCOLS;
var init_dist6 = __esm({
"node_modules/get-uri/dist/index.js"() {
- import_debug9 = __toESM(require_src(), 1);
+ import_debug13 = __toESM(require_src(), 1);
init_data();
init_file();
init_ftp();
init_http();
init_https();
- debug10 = (0, import_debug9.default)("get-uri");
+ debug10 = (0, import_debug13.default)("get-uri");
protocols = {
data: data2,
file,
@@ -51784,23 +54543,23 @@ var require_estraverse = __commonJS({
return false;
}
};
- function Element(node, path3, wrap, ref) {
+ function Element(node, path4, wrap, ref) {
this.node = node;
- this.path = path3;
+ this.path = path4;
this.wrap = wrap;
this.ref = ref;
}
function Controller() {
}
- Controller.prototype.path = function path3() {
+ Controller.prototype.path = function path4() {
var i5, iz, j5, jz, result, element;
- function addToPath(result2, path4) {
- if (Array.isArray(path4)) {
- for (j5 = 0, jz = path4.length; j5 < jz; ++j5) {
- result2.push(path4[j5]);
+ function addToPath(result2, path5) {
+ if (Array.isArray(path5)) {
+ for (j5 = 0, jz = path5.length; j5 < jz; ++j5) {
+ result2.push(path5[j5]);
}
} else {
- result2.push(path4);
+ result2.push(path5);
}
}
if (!this.__current.path) {
@@ -52684,17 +55443,17 @@ var require_util10 = __commonJS({
return url;
}
exports2.urlGenerate = urlGenerate;
- function normalize(aPath) {
- var path3 = aPath;
+ function normalize2(aPath) {
+ var path4 = aPath;
var url = urlParse(aPath);
if (url) {
if (!url.path) {
return aPath;
}
- path3 = url.path;
+ path4 = url.path;
}
- var isAbsolute = exports2.isAbsolute(path3);
- var parts = path3.split(/\/+/);
+ var isAbsolute = exports2.isAbsolute(path4);
+ var parts = path4.split(/\/+/);
for (var part, up = 0, i5 = parts.length - 1; i5 >= 0; i5--) {
part = parts[i5];
if (part === ".") {
@@ -52711,18 +55470,18 @@ var require_util10 = __commonJS({
}
}
}
- path3 = parts.join("/");
- if (path3 === "") {
- path3 = isAbsolute ? "/" : ".";
+ path4 = parts.join("/");
+ if (path4 === "") {
+ path4 = isAbsolute ? "/" : ".";
}
if (url) {
- url.path = path3;
+ url.path = path4;
return urlGenerate(url);
}
- return path3;
+ return path4;
}
- exports2.normalize = normalize;
- function join2(aRoot, aPath) {
+ exports2.normalize = normalize2;
+ function join7(aRoot, aPath) {
if (aRoot === "") {
aRoot = ".";
}
@@ -52747,14 +55506,14 @@ var require_util10 = __commonJS({
aRootUrl.host = aPath;
return urlGenerate(aRootUrl);
}
- var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
+ var joined = aPath.charAt(0) === "/" ? aPath : normalize2(aRoot.replace(/\/+$/, "") + "/" + aPath);
if (aRootUrl) {
aRootUrl.path = joined;
return urlGenerate(aRootUrl);
}
return joined;
}
- exports2.join = join2;
+ exports2.join = join7;
exports2.isAbsolute = function(aPath) {
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
};
@@ -52927,9 +55686,9 @@ var require_util10 = __commonJS({
parsed.path = parsed.path.substring(0, index + 1);
}
}
- sourceURL = join2(urlGenerate(parsed), sourceURL);
+ sourceURL = join7(urlGenerate(parsed), sourceURL);
}
- return normalize(sourceURL);
+ return normalize2(sourceURL);
}
exports2.computeSourceURL = computeSourceURL;
}
@@ -53296,22 +56055,22 @@ var require_source_map_generator = __commonJS({
}, this);
};
SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
- var map2 = {
+ var map3 = {
version: this._version,
sources: this._sources.toArray(),
names: this._names.toArray(),
mappings: this._serializeMappings()
};
if (this._file != null) {
- map2.file = this._file;
+ map3.file = this._file;
}
if (this._sourceRoot != null) {
- map2.sourceRoot = this._sourceRoot;
+ map3.sourceRoot = this._sourceRoot;
}
if (this._sourcesContents) {
- map2.sourcesContent = this._generateSourcesContent(map2.sources, map2.sourceRoot);
+ map3.sourcesContent = this._generateSourcesContent(map3.sources, map3.sourceRoot);
}
- return map2;
+ return map3;
};
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
return JSON.stringify(this.toJSON());
@@ -54204,7 +56963,7 @@ var require_source_node = __commonJS({
line: 1,
column: 0
};
- var map2 = new SourceMapGenerator(aArgs);
+ var map3 = new SourceMapGenerator(aArgs);
var sourceMappingActive = false;
var lastOriginalSource = null;
var lastOriginalLine = null;
@@ -54214,7 +56973,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) {
- map2.addMapping({
+ map3.addMapping({
source: original.source,
original: {
line: original.line,
@@ -54233,7 +56992,7 @@ var require_source_node = __commonJS({
lastOriginalName = original.name;
sourceMappingActive = true;
} else if (sourceMappingActive) {
- map2.addMapping({
+ map3.addMapping({
generated: {
line: generated.line,
column: generated.column
@@ -54250,7 +57009,7 @@ var require_source_node = __commonJS({
lastOriginalSource = null;
sourceMappingActive = false;
} else if (sourceMappingActive) {
- map2.addMapping({
+ map3.addMapping({
source: original.source,
original: {
line: original.line,
@@ -54269,9 +57028,9 @@ var require_source_node = __commonJS({
}
});
this.walkSourceContents(function(sourceFile, sourceContent) {
- map2.setSourceContent(sourceFile, sourceContent);
+ map3.setSourceContent(sourceFile, sourceContent);
});
- return { code: generated.code, map: map2 };
+ return { code: generated.code, map: map3 };
};
exports2.SourceNode = SourceNode;
}
@@ -54484,7 +57243,7 @@ var require_escodegen = __commonJS({
var len = str.length;
return len && esutils.code.isLineTerminator(str.charCodeAt(len - 1));
}
- function merge(target, override) {
+ function merge2(target, override) {
var key;
for (key in override) {
if (override.hasOwnProperty(key)) {
@@ -54729,7 +57488,7 @@ var require_escodegen = __commonJS({
function noEmptySpace() {
return space ? space : " ";
}
- function join2(left, right) {
+ function join7(left, right) {
var leftSource, rightSource, leftCharCode, rightCharCode;
leftSource = toSourceNodeWhenNeeded(left).toString();
if (leftSource.length === 0) {
@@ -55060,8 +57819,8 @@ var require_escodegen = __commonJS({
} else {
result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT));
}
- result = join2(result, operator);
- result = [join2(
+ result = join7(result, operator);
+ result = [join7(
result,
that.generateExpression(stmt.right, Precedence.Assignment, E_TTT)
), ")"];
@@ -55204,11 +57963,11 @@ var require_escodegen = __commonJS({
var result, fragment;
result = ["class"];
if (stmt.id) {
- result = join2(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
+ result = join7(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
}
if (stmt.superClass) {
- fragment = join2("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
- result = join2(result, fragment);
+ fragment = join7("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
+ result = join7(result, fragment);
}
result.push(space);
result.push(this.generateStatement(stmt.body, S_TFFT));
@@ -55221,9 +57980,9 @@ var require_escodegen = __commonJS({
return escapeDirective(stmt.directive) + this.semicolon(flags);
},
DoWhileStatement: function(stmt, flags) {
- var result = join2("do", this.maybeBlock(stmt.body, S_TFFF));
+ var result = join7("do", this.maybeBlock(stmt.body, S_TFFF));
result = this.maybeBlockSuffix(stmt.body, result);
- return join2(result, [
+ return join7(result, [
"while" + space + "(",
this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
")" + this.semicolon(flags)
@@ -55259,11 +58018,11 @@ var require_escodegen = __commonJS({
ExportDefaultDeclaration: function(stmt, flags) {
var result = ["export"], bodyFlags;
bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
- result = join2(result, "default");
+ result = join7(result, "default");
if (isStatement(stmt.declaration)) {
- result = join2(result, this.generateStatement(stmt.declaration, bodyFlags));
+ result = join7(result, this.generateStatement(stmt.declaration, bodyFlags));
} else {
- result = join2(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
+ result = join7(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
}
return result;
},
@@ -55271,15 +58030,15 @@ var require_escodegen = __commonJS({
var result = ["export"], bodyFlags, that = this;
bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
if (stmt.declaration) {
- return join2(result, this.generateStatement(stmt.declaration, bodyFlags));
+ return join7(result, this.generateStatement(stmt.declaration, bodyFlags));
}
if (stmt.specifiers) {
if (stmt.specifiers.length === 0) {
- result = join2(result, "{" + space + "}");
+ result = join7(result, "{" + space + "}");
} else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
- result = join2(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
+ result = join7(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
} else {
- result = join2(result, "{");
+ result = join7(result, "{");
withIndent(function(indent2) {
var i5, iz;
result.push(newline);
@@ -55297,7 +58056,7 @@ var require_escodegen = __commonJS({
result.push(base + "}");
}
if (stmt.source) {
- result = join2(result, [
+ result = join7(result, [
"from" + space,
// ModuleSpecifier
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
@@ -55385,7 +58144,7 @@ var require_escodegen = __commonJS({
];
cursor2 = 0;
if (stmt.specifiers[cursor2].type === Syntax.ImportDefaultSpecifier) {
- result = join2(result, [
+ result = join7(result, [
this.generateExpression(stmt.specifiers[cursor2], Precedence.Sequence, E_TTT)
]);
++cursor2;
@@ -55395,7 +58154,7 @@ var require_escodegen = __commonJS({
result.push(",");
}
if (stmt.specifiers[cursor2].type === Syntax.ImportNamespaceSpecifier) {
- result = join2(result, [
+ result = join7(result, [
space,
this.generateExpression(stmt.specifiers[cursor2], Precedence.Sequence, E_TTT)
]);
@@ -55424,7 +58183,7 @@ var require_escodegen = __commonJS({
}
}
}
- result = join2(result, [
+ result = join7(result, [
"from" + space,
// ModuleSpecifier
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
@@ -55478,7 +58237,7 @@ var require_escodegen = __commonJS({
return result;
},
ThrowStatement: function(stmt, flags) {
- return [join2(
+ return [join7(
"throw",
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
), this.semicolon(flags)];
@@ -55489,7 +58248,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 = join2(result, this.generateStatement(stmt.handlers[i5], S_TFFF));
+ result = join7(result, this.generateStatement(stmt.handlers[i5], S_TFFF));
if (stmt.finalizer || i5 + 1 !== iz) {
result = this.maybeBlockSuffix(stmt.handlers[i5].body, result);
}
@@ -55497,7 +58256,7 @@ var require_escodegen = __commonJS({
} else {
guardedHandlers = stmt.guardedHandlers || [];
for (i5 = 0, iz = guardedHandlers.length; i5 < iz; ++i5) {
- result = join2(result, this.generateStatement(guardedHandlers[i5], S_TFFF));
+ result = join7(result, this.generateStatement(guardedHandlers[i5], S_TFFF));
if (stmt.finalizer || i5 + 1 !== iz) {
result = this.maybeBlockSuffix(guardedHandlers[i5].body, result);
}
@@ -55505,13 +58264,13 @@ var require_escodegen = __commonJS({
if (stmt.handler) {
if (Array.isArray(stmt.handler)) {
for (i5 = 0, iz = stmt.handler.length; i5 < iz; ++i5) {
- result = join2(result, this.generateStatement(stmt.handler[i5], S_TFFF));
+ result = join7(result, this.generateStatement(stmt.handler[i5], S_TFFF));
if (stmt.finalizer || i5 + 1 !== iz) {
result = this.maybeBlockSuffix(stmt.handler[i5].body, result);
}
}
} else {
- result = join2(result, this.generateStatement(stmt.handler, S_TFFF));
+ result = join7(result, this.generateStatement(stmt.handler, S_TFFF));
if (stmt.finalizer) {
result = this.maybeBlockSuffix(stmt.handler.body, result);
}
@@ -55519,7 +58278,7 @@ var require_escodegen = __commonJS({
}
}
if (stmt.finalizer) {
- result = join2(result, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]);
+ result = join7(result, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]);
}
return result;
},
@@ -55553,7 +58312,7 @@ var require_escodegen = __commonJS({
withIndent(function() {
if (stmt.test) {
result = [
- join2("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
+ join7("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
":"
];
} else {
@@ -55601,9 +58360,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 = join2(result, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]);
+ result = join7(result, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]);
} else {
- result = join2(result, join2("else", this.maybeBlock(stmt.alternate, bodyFlags)));
+ result = join7(result, join7("else", this.maybeBlock(stmt.alternate, bodyFlags)));
}
} else {
result.push(this.maybeBlock(stmt.consequent, bodyFlags));
@@ -55704,7 +58463,7 @@ var require_escodegen = __commonJS({
},
ReturnStatement: function(stmt, flags) {
if (stmt.argument) {
- return [join2(
+ return [join7(
"return",
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
), this.semicolon(flags)];
@@ -55736,7 +58495,7 @@ var require_escodegen = __commonJS({
return result;
}
};
- merge(CodeGenerator.prototype, CodeGenerator.Statement);
+ merge2(CodeGenerator.prototype, CodeGenerator.Statement);
CodeGenerator.Expression = {
SequenceExpression: function(expr, precedence, flags) {
var result, i5, iz;
@@ -55793,14 +58552,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 = join2(fragment, expr.operator);
+ result = join7(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 = join2(result, fragment);
+ result = join7(result, fragment);
}
if (expr.operator === "in" && !(flags & F_ALLOW_IN)) {
return ["(", result, ")"];
@@ -55840,7 +58599,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 = join2(
+ result = join7(
"new",
this.generateExpression(expr.callee, Precedence.New, itemFlags)
);
@@ -55890,11 +58649,11 @@ var require_escodegen = __commonJS({
var result, fragment, rightCharCode, leftSource, leftCharCode;
fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
if (space === "") {
- result = join2(expr.operator, fragment);
+ result = join7(expr.operator, fragment);
} else {
result = [expr.operator];
if (expr.operator.length > 2) {
- result = join2(result, fragment);
+ result = join7(result, fragment);
} else {
leftSource = toSourceNodeWhenNeeded(result).toString();
leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
@@ -55917,7 +58676,7 @@ var require_escodegen = __commonJS({
result = "yield";
}
if (expr.argument) {
- result = join2(
+ result = join7(
result,
this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
);
@@ -55925,7 +58684,7 @@ var require_escodegen = __commonJS({
return parenthesize(result, Precedence.Yield, precedence);
},
AwaitExpression: function(expr, precedence, flags) {
- var result = join2(
+ var result = join7(
expr.all ? "await*" : "await",
this.generateExpression(expr.argument, Precedence.Await, E_TTT)
);
@@ -56008,11 +58767,11 @@ var require_escodegen = __commonJS({
var result, fragment;
result = ["class"];
if (expr.id) {
- result = join2(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
+ result = join7(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
}
if (expr.superClass) {
- fragment = join2("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
- result = join2(result, fragment);
+ fragment = join7("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
+ result = join7(result, fragment);
}
result.push(space);
result.push(this.generateStatement(expr.body, S_TFFT));
@@ -56027,7 +58786,7 @@ var require_escodegen = __commonJS({
}
if (expr.kind === "get" || expr.kind === "set") {
fragment = [
- join2(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
+ join7(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
this.generateFunctionBody(expr.value)
];
} else {
@@ -56037,7 +58796,7 @@ var require_escodegen = __commonJS({
this.generateFunctionBody(expr.value)
];
}
- return join2(result, fragment);
+ return join7(result, fragment);
},
Property: function(expr, precedence, flags) {
if (expr.kind === "get" || expr.kind === "set") {
@@ -56232,7 +58991,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 = join2(result, fragment);
+ result = join7(result, fragment);
} else {
result.push(fragment);
}
@@ -56240,13 +58999,13 @@ var require_escodegen = __commonJS({
});
}
if (expr.filter) {
- result = join2(result, "if" + space);
+ result = join7(result, "if" + space);
fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
- result = join2(result, ["(", fragment, ")"]);
+ result = join7(result, ["(", fragment, ")"]);
}
if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
- result = join2(result, fragment);
+ result = join7(result, fragment);
}
result.push(expr.type === Syntax.GeneratorExpression ? ")" : "]");
return result;
@@ -56262,8 +59021,8 @@ var require_escodegen = __commonJS({
} else {
fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
}
- fragment = join2(fragment, expr.of ? "of" : "in");
- fragment = join2(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
+ fragment = join7(fragment, expr.of ? "of" : "in");
+ fragment = join7(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
return ["for" + space + "(", fragment, ")"];
},
SpreadElement: function(expr, precedence, flags) {
@@ -56311,7 +59070,7 @@ var require_escodegen = __commonJS({
], Precedence.Call, precedence);
}
};
- merge(CodeGenerator.prototype, CodeGenerator.Expression);
+ merge2(CodeGenerator.prototype, CodeGenerator.Expression);
CodeGenerator.prototype.generateExpression = function(expr, precedence, flags) {
var result, type;
type = expr.type || Syntax.Property;
@@ -62881,19 +65640,19 @@ var require_types = __commonJS({
})()
);
exports2.Def = Def;
- var Field = (
+ var Field2 = (
/** @class */
(function() {
- function Field2(name, type, defaultFn, hidden) {
+ function Field3(name, type, defaultFn, hidden) {
this.name = name;
this.type = type;
this.defaultFn = defaultFn;
this.hidden = !!hidden;
}
- Field2.prototype.toString = function() {
+ Field3.prototype.toString = function() {
return JSON.stringify(this.name) + ": " + this.type;
};
- Field2.prototype.getValue = function(obj) {
+ Field3.prototype.getValue = function(obj) {
var value = obj[this.name];
if (typeof value !== "undefined") {
return value;
@@ -62903,7 +65662,7 @@ var require_types = __commonJS({
}
return value;
};
- return Field2;
+ return Field3;
})()
);
function shallowStringify(value) {
@@ -62943,7 +65702,7 @@ var require_types = __commonJS({
}
if (isObject.check(value)) {
return new ObjectType(Object.keys(value).map(function(name2) {
- return new Field(name2, Type.from(value[name2], name2));
+ return new Field2(name2, Type.from(value[name2], name2));
}));
}
if (typeof value === "function") {
@@ -62984,7 +65743,7 @@ var require_types = __commonJS({
return type;
}
var isString = defBuiltInType("string", "truthy");
- var isFunction = defBuiltInType("function", function() {
+ var isFunction2 = defBuiltInType("function", function() {
});
var isArray = defBuiltInType("array", []);
var isObject = defBuiltInType("object", {});
@@ -62996,7 +65755,7 @@ var require_types = __commonJS({
var isUndefined = defBuiltInType("undefined", void 0);
var builtInTypes = {
string: isString,
- function: isFunction,
+ function: isFunction2,
array: isArray,
object: isObject,
RegExp: isRegExp,
@@ -63146,7 +65905,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 Field(name, Type.from(type), defaultFn, hidden);
+ this.ownFields[name] = new Field2(name, Type.from(type), defaultFn, hidden);
return this;
};
DefImpl2.prototype.finalize = function() {
@@ -63224,7 +65983,7 @@ var require_types = __commonJS({
if (isUndefined.check(func)) {
delete nodePrototype[name];
} else {
- isFunction.assert(func);
+ isFunction2.assert(func);
Object.defineProperty(nodePrototype, name, {
enumerable: true,
configurable: true,
@@ -63391,16 +66150,16 @@ var require_path = __commonJS({
this.__childCache = null;
};
var Pp = Path.prototype;
- function getChildCache(path3) {
- return path3.__childCache || (path3.__childCache = /* @__PURE__ */ Object.create(null));
+ function getChildCache(path4) {
+ return path4.__childCache || (path4.__childCache = /* @__PURE__ */ Object.create(null));
}
- function getChildPath(path3, name) {
- var cache5 = getChildCache(path3);
- var actualChildValue = path3.getValueProperty(name);
+ function getChildPath(path4, name) {
+ var cache5 = getChildCache(path4);
+ var actualChildValue = path4.getValueProperty(name);
var childPath = cache5[name];
if (!hasOwn.call(cache5, name) || // Ensure consistency between cache and reality.
childPath.value !== actualChildValue) {
- childPath = cache5[name] = new path3.constructor(actualChildValue, path3, name);
+ childPath = cache5[name] = new path4.constructor(actualChildValue, path4, name);
}
return childPath;
}
@@ -63412,12 +66171,12 @@ var require_path = __commonJS({
for (var _i = 0; _i < arguments.length; _i++) {
names[_i] = arguments[_i];
}
- var path3 = this;
+ var path4 = this;
var count = names.length;
for (var i5 = 0; i5 < count; ++i5) {
- path3 = getChildPath(path3, names[i5]);
+ path4 = getChildPath(path4, names[i5]);
}
- return path3;
+ return path4;
};
Pp.each = function each(callback, context) {
var childPaths = [];
@@ -63435,7 +66194,7 @@ var require_path = __commonJS({
}
}
};
- Pp.map = function map2(callback, context) {
+ Pp.map = function map3(callback, context) {
var result = [];
this.each(function(childPath) {
result.push(callback.call(this, childPath));
@@ -63453,12 +66212,12 @@ var require_path = __commonJS({
};
function emptyMoves() {
}
- function getMoves(path3, offset, start, end) {
- isArray.assert(path3.value);
+ function getMoves(path4, offset, start, end) {
+ isArray.assert(path4.value);
if (offset === 0) {
return emptyMoves;
}
- var length = path3.value.length;
+ var length = path4.value.length;
if (length < 1) {
return emptyMoves;
}
@@ -63476,10 +66235,10 @@ var require_path = __commonJS({
isNumber.assert(start);
isNumber.assert(end);
var moves = /* @__PURE__ */ Object.create(null);
- var cache5 = getChildCache(path3);
+ var cache5 = getChildCache(path4);
for (var i5 = start; i5 < end; ++i5) {
- if (hasOwn.call(path3.value, i5)) {
- var childPath = path3.get(i5);
+ if (hasOwn.call(path4.value, i5)) {
+ var childPath = path4.get(i5);
if (childPath.name !== i5) {
throw new Error("");
}
@@ -63497,7 +66256,7 @@ var require_path = __commonJS({
throw new Error("");
}
cache5[newIndex2] = childPath2;
- path3.value[newIndex2] = childPath2.value;
+ path4.value[newIndex2] = childPath2.value;
}
};
}
@@ -63572,34 +66331,34 @@ var require_path = __commonJS({
}
return pp.insertAt.apply(pp, insertAtArgs);
};
- function repairRelationshipWithParent(path3) {
- if (!(path3 instanceof Path)) {
+ function repairRelationshipWithParent(path4) {
+ if (!(path4 instanceof Path)) {
throw new Error("");
}
- var pp = path3.parentPath;
+ var pp = path4.parentPath;
if (!pp) {
- return path3;
+ return path4;
}
var parentValue = pp.value;
var parentCache = getChildCache(pp);
- if (parentValue[path3.name] === path3.value) {
- parentCache[path3.name] = path3;
+ if (parentValue[path4.name] === path4.value) {
+ parentCache[path4.name] = path4;
} else if (isArray.check(parentValue)) {
- var i5 = parentValue.indexOf(path3.value);
+ var i5 = parentValue.indexOf(path4.value);
if (i5 >= 0) {
- parentCache[path3.name = i5] = path3;
+ parentCache[path4.name = i5] = path4;
}
} else {
- parentValue[path3.name] = path3.value;
- parentCache[path3.name] = path3;
+ parentValue[path4.name] = path4.value;
+ parentCache[path4.name] = path4;
}
- if (parentValue[path3.name] !== path3.value) {
+ if (parentValue[path4.name] !== path4.value) {
throw new Error("");
}
- if (path3.parentPath.get(path3.name) !== path3) {
+ if (path4.parentPath.get(path4.name) !== path4) {
throw new Error("");
}
- return path3;
+ return path4;
}
Pp.replace = function replace(replacement) {
var results = [];
@@ -63679,11 +66438,11 @@ var require_scope = __commonJS({
var Expression = namedTypes.Expression;
var isArray = types3.builtInTypes.array;
var b6 = types3.builders;
- var Scope = function Scope2(path3, parentScope) {
+ var Scope = function Scope2(path4, parentScope) {
if (!(this instanceof Scope2)) {
throw new Error("Scope constructor cannot be invoked without 'new'");
}
- ScopeType.assert(path3.value);
+ ScopeType.assert(path4.value);
var depth;
if (parentScope) {
if (!(parentScope instanceof Scope2)) {
@@ -63695,8 +66454,8 @@ var require_scope = __commonJS({
depth = 0;
}
Object.defineProperties(this, {
- path: { value: path3 },
- node: { value: path3.value },
+ path: { value: path4 },
+ node: { value: path4.value },
isGlobal: { value: !parentScope, enumerable: true },
depth: { value: depth },
parent: { value: parentScope },
@@ -63771,50 +66530,50 @@ var require_scope = __commonJS({
this.scan();
return this.types;
};
- function scanScope(path3, bindings, scopeTypes2) {
- var node = path3.value;
+ function scanScope(path4, bindings, scopeTypes2) {
+ var node = path4.value;
ScopeType.assert(node);
if (namedTypes.CatchClause.check(node)) {
- var param = path3.get("param");
+ var param = path4.get("param");
if (param.value) {
addPattern(param, bindings);
}
} else {
- recursiveScanScope(path3, bindings, scopeTypes2);
+ recursiveScanScope(path4, bindings, scopeTypes2);
}
}
- function recursiveScanScope(path3, bindings, scopeTypes2) {
- var node = path3.value;
- if (path3.parent && namedTypes.FunctionExpression.check(path3.parent.node) && path3.parent.node.id) {
- addPattern(path3.parent.get("id"), bindings);
+ function recursiveScanScope(path4, bindings, scopeTypes2) {
+ var node = path4.value;
+ if (path4.parent && namedTypes.FunctionExpression.check(path4.parent.node) && path4.parent.node.id) {
+ addPattern(path4.parent.get("id"), bindings);
}
if (!node) {
} else if (isArray.check(node)) {
- path3.each(function(childPath) {
+ path4.each(function(childPath) {
recursiveScanChild(childPath, bindings, scopeTypes2);
});
} else if (namedTypes.Function.check(node)) {
- path3.get("params").each(function(paramPath) {
+ path4.get("params").each(function(paramPath) {
addPattern(paramPath, bindings);
});
- recursiveScanChild(path3.get("body"), bindings, scopeTypes2);
+ recursiveScanChild(path4.get("body"), bindings, scopeTypes2);
} else if (namedTypes.TypeAlias && namedTypes.TypeAlias.check(node) || namedTypes.InterfaceDeclaration && namedTypes.InterfaceDeclaration.check(node) || namedTypes.TSTypeAliasDeclaration && namedTypes.TSTypeAliasDeclaration.check(node) || namedTypes.TSInterfaceDeclaration && namedTypes.TSInterfaceDeclaration.check(node)) {
- addTypePattern(path3.get("id"), scopeTypes2);
+ addTypePattern(path4.get("id"), scopeTypes2);
} else if (namedTypes.VariableDeclarator.check(node)) {
- addPattern(path3.get("id"), bindings);
- recursiveScanChild(path3.get("init"), bindings, scopeTypes2);
+ addPattern(path4.get("id"), bindings);
+ recursiveScanChild(path4.get("init"), bindings, scopeTypes2);
} else if (node.type === "ImportSpecifier" || node.type === "ImportNamespaceSpecifier" || node.type === "ImportDefaultSpecifier") {
addPattern(
// Esprima used to use the .name field to refer to the local
// binding identifier for ImportSpecifier nodes, but .id for
// ImportNamespaceSpecifier and ImportDefaultSpecifier nodes.
// ESTree/Acorn/ESpree use .local for all three node types.
- path3.get(node.local ? "local" : node.name ? "name" : "id"),
+ path4.get(node.local ? "local" : node.name ? "name" : "id"),
bindings
);
} else if (Node.check(node) && !Expression.check(node)) {
types3.eachField(node, function(name, child) {
- var childPath = path3.get(name);
+ var childPath = path4.get(name);
if (!pathHasValue(childPath, child)) {
throw new Error("");
}
@@ -63822,34 +66581,34 @@ var require_scope = __commonJS({
});
}
}
- function pathHasValue(path3, value) {
- if (path3.value === value) {
+ function pathHasValue(path4, value) {
+ if (path4.value === value) {
return true;
}
- if (Array.isArray(path3.value) && path3.value.length === 0 && Array.isArray(value) && value.length === 0) {
+ if (Array.isArray(path4.value) && path4.value.length === 0 && Array.isArray(value) && value.length === 0) {
return true;
}
return false;
}
- function recursiveScanChild(path3, bindings, scopeTypes2) {
- var node = path3.value;
+ function recursiveScanChild(path4, bindings, scopeTypes2) {
+ var node = path4.value;
if (!node || Expression.check(node)) {
} else if (namedTypes.FunctionDeclaration.check(node) && node.id !== null) {
- addPattern(path3.get("id"), bindings);
+ addPattern(path4.get("id"), bindings);
} else if (namedTypes.ClassDeclaration && namedTypes.ClassDeclaration.check(node)) {
- addPattern(path3.get("id"), bindings);
+ addPattern(path4.get("id"), bindings);
} else if (ScopeType.check(node)) {
if (namedTypes.CatchClause.check(node) && // TODO Broaden this to accept any pattern.
namedTypes.Identifier.check(node.param)) {
var catchParamName = node.param.name;
var hadBinding = hasOwn.call(bindings, catchParamName);
- recursiveScanScope(path3.get("body"), bindings, scopeTypes2);
+ recursiveScanScope(path4.get("body"), bindings, scopeTypes2);
if (!hadBinding) {
delete bindings[catchParamName];
}
}
} else {
- recursiveScanScope(path3, bindings, scopeTypes2);
+ recursiveScanScope(path4, bindings, scopeTypes2);
}
}
function addPattern(patternPath, bindings) {
@@ -64185,53 +66944,53 @@ var require_node_path = __commonJS({
NPp.firstInStatement = function() {
return firstInStatement(this);
};
- function firstInStatement(path3) {
- for (var node, parent; path3.parent; path3 = path3.parent) {
- node = path3.node;
- parent = path3.parent.node;
- if (n3.BlockStatement.check(parent) && path3.parent.name === "body" && path3.name === 0) {
+ function firstInStatement(path4) {
+ for (var node, parent; path4.parent; path4 = path4.parent) {
+ node = path4.node;
+ parent = path4.parent.node;
+ if (n3.BlockStatement.check(parent) && path4.parent.name === "body" && path4.name === 0) {
if (parent.body[0] !== node) {
throw new Error("Nodes must be equal");
}
return true;
}
- if (n3.ExpressionStatement.check(parent) && path3.name === "expression") {
+ if (n3.ExpressionStatement.check(parent) && path4.name === "expression") {
if (parent.expression !== node) {
throw new Error("Nodes must be equal");
}
return true;
}
- if (n3.SequenceExpression.check(parent) && path3.parent.name === "expressions" && path3.name === 0) {
+ if (n3.SequenceExpression.check(parent) && path4.parent.name === "expressions" && path4.name === 0) {
if (parent.expressions[0] !== node) {
throw new Error("Nodes must be equal");
}
continue;
}
- if (n3.CallExpression.check(parent) && path3.name === "callee") {
+ if (n3.CallExpression.check(parent) && path4.name === "callee") {
if (parent.callee !== node) {
throw new Error("Nodes must be equal");
}
continue;
}
- if (n3.MemberExpression.check(parent) && path3.name === "object") {
+ if (n3.MemberExpression.check(parent) && path4.name === "object") {
if (parent.object !== node) {
throw new Error("Nodes must be equal");
}
continue;
}
- if (n3.ConditionalExpression.check(parent) && path3.name === "test") {
+ if (n3.ConditionalExpression.check(parent) && path4.name === "test") {
if (parent.test !== node) {
throw new Error("Nodes must be equal");
}
continue;
}
- if (isBinary(parent) && path3.name === "left") {
+ if (isBinary(parent) && path4.name === "left") {
if (parent.left !== node) {
throw new Error("Nodes must be equal");
}
continue;
}
- if (n3.UnaryExpression.check(parent) && !parent.prefix && path3.name === "argument") {
+ if (n3.UnaryExpression.check(parent) && !parent.prefix && path4.name === "argument") {
if (parent.argument !== node) {
throw new Error("Nodes must be equal");
}
@@ -64294,7 +67053,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 isFunction = types3.builtInTypes.function;
+ var isFunction2 = types3.builtInTypes.function;
var undefined2;
var PathVisitor = function PathVisitor2() {
if (!(this instanceof PathVisitor2)) {
@@ -64321,7 +67080,7 @@ var require_path_visitor = __commonJS({
for (var i5 = 0; i5 < typeNameCount; ++i5) {
var typeName = typeNameKeys[i5];
methodName = "visit" + supertypeTable[typeName];
- if (isFunction.check(visitor[methodName])) {
+ if (isFunction2.check(visitor[methodName])) {
methodNameTable[typeName] = methodName;
}
}
@@ -64344,8 +67103,8 @@ var require_path_visitor = __commonJS({
Vp.constructor = Visitor;
extend(Vp, methods);
extend(Visitor, PathVisitor);
- isFunction.assert(Visitor.fromMethodsObject);
- isFunction.assert(Visitor.visit);
+ isFunction2.assert(Visitor.fromMethodsObject);
+ isFunction2.assert(Visitor.visit);
return new Visitor();
};
function extend(target, source) {
@@ -64401,36 +67160,36 @@ var require_path_visitor = __commonJS({
};
PVp.reset = function(_path) {
};
- PVp.visitWithoutReset = function(path3) {
+ PVp.visitWithoutReset = function(path4) {
if (this instanceof this.Context) {
- return this.visitor.visitWithoutReset(path3);
+ return this.visitor.visitWithoutReset(path4);
}
- if (!(path3 instanceof NodePath)) {
+ if (!(path4 instanceof NodePath)) {
throw new Error("");
}
- var value = path3.value;
+ var value = path4.value;
var methodName = value && typeof value === "object" && typeof value.type === "string" && this._methodNameTable[value.type];
if (methodName) {
- var context = this.acquireContext(path3);
+ var context = this.acquireContext(path4);
try {
return context.invokeVisitorMethod(methodName);
} finally {
this.releaseContext(context);
}
} else {
- return visitChildren(path3, this);
+ return visitChildren(path4, this);
}
};
- function visitChildren(path3, visitor) {
- if (!(path3 instanceof NodePath)) {
+ function visitChildren(path4, visitor) {
+ if (!(path4 instanceof NodePath)) {
throw new Error("");
}
if (!(visitor instanceof PathVisitor)) {
throw new Error("");
}
- var value = path3.value;
+ var value = path4.value;
if (isArray.check(value)) {
- path3.each(visitor.visitWithoutReset, visitor);
+ path4.each(visitor.visitWithoutReset, visitor);
} else if (!isObject.check(value)) {
} else {
var childNames = types3.getFieldNames(value);
@@ -64444,19 +67203,19 @@ var require_path_visitor = __commonJS({
if (!hasOwn.call(value, childName)) {
value[childName] = types3.getFieldValue(value, childName);
}
- childPaths.push(path3.get(childName));
+ childPaths.push(path4.get(childName));
}
for (var i5 = 0; i5 < childCount; ++i5) {
visitor.visitWithoutReset(childPaths[i5]);
}
}
- return path3.value;
+ return path4.value;
}
- PVp.acquireContext = function(path3) {
+ PVp.acquireContext = function(path4) {
if (this._reusableContextStack.length === 0) {
- return new this.Context(path3);
+ return new this.Context(path4);
}
- return this._reusableContextStack.pop().reset(path3);
+ return this._reusableContextStack.pop().reset(path4);
};
PVp.releaseContext = function(context) {
if (!(context instanceof this.Context)) {
@@ -64472,14 +67231,14 @@ var require_path_visitor = __commonJS({
return this._changeReported;
};
function makeContextConstructor(visitor) {
- function Context(path3) {
+ function Context(path4) {
if (!(this instanceof Context)) {
throw new Error("");
}
if (!(this instanceof PathVisitor)) {
throw new Error("");
}
- if (!(path3 instanceof NodePath)) {
+ if (!(path4 instanceof NodePath)) {
throw new Error("");
}
Object.defineProperty(this, "visitor", {
@@ -64488,7 +67247,7 @@ var require_path_visitor = __commonJS({
enumerable: true,
configurable: false
});
- this.currentPath = path3;
+ this.currentPath = path4;
this.needToCallTraverse = true;
Object.seal(this);
}
@@ -64501,14 +67260,14 @@ var require_path_visitor = __commonJS({
return Context;
}
var sharedContextProtoMethods = /* @__PURE__ */ Object.create(null);
- sharedContextProtoMethods.reset = function reset(path3) {
+ sharedContextProtoMethods.reset = function reset(path4) {
if (!(this instanceof this.Context)) {
throw new Error("");
}
- if (!(path3 instanceof NodePath)) {
+ if (!(path4 instanceof NodePath)) {
throw new Error("");
}
- this.currentPath = path3;
+ this.currentPath = path4;
this.needToCallTraverse = true;
return this;
};
@@ -64531,34 +67290,34 @@ var require_path_visitor = __commonJS({
if (this.needToCallTraverse !== false) {
throw new Error("Must either call this.traverse or return false in " + methodName);
}
- var path3 = this.currentPath;
- return path3 && path3.value;
+ var path4 = this.currentPath;
+ return path4 && path4.value;
};
- sharedContextProtoMethods.traverse = function traverse(path3, newVisitor) {
+ sharedContextProtoMethods.traverse = function traverse(path4, newVisitor) {
if (!(this instanceof this.Context)) {
throw new Error("");
}
- if (!(path3 instanceof NodePath)) {
+ if (!(path4 instanceof NodePath)) {
throw new Error("");
}
if (!(this.currentPath instanceof NodePath)) {
throw new Error("");
}
this.needToCallTraverse = false;
- return visitChildren(path3, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
+ return visitChildren(path4, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
};
- sharedContextProtoMethods.visit = function visit2(path3, newVisitor) {
+ sharedContextProtoMethods.visit = function visit2(path4, newVisitor) {
if (!(this instanceof this.Context)) {
throw new Error("");
}
- if (!(path3 instanceof NodePath)) {
+ if (!(path4 instanceof NodePath)) {
throw new Error("");
}
if (!(this.currentPath instanceof NodePath)) {
throw new Error("");
}
this.needToCallTraverse = false;
- return PathVisitor.fromMethodsObject(newVisitor || this.visitor).visitWithoutReset(path3);
+ return PathVisitor.fromMethodsObject(newVisitor || this.visitor).visitWithoutReset(path4);
};
sharedContextProtoMethods.reportChanged = function reportChanged() {
this.visitor.reportChanged();
@@ -65676,7 +68435,7 @@ var require_namedTypes = __commonJS({
});
// node_modules/ast-types/main.js
-var require_main = __commonJS({
+var require_main3 = __commonJS({
"node_modules/ast-types/main.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
@@ -65763,10 +68522,10 @@ function degenerator(code, _names) {
do {
lastNamesLength = names.length;
(0, import_ast_types.visit)(ast, {
- visitVariableDeclaration(path3) {
- if (path3.node.declarations) {
- for (let i5 = 0; i5 < path3.node.declarations.length; i5++) {
- const declaration = path3.node.declarations[i5];
+ visitVariableDeclaration(path4) {
+ if (path4.node.declarations) {
+ for (let i5 = 0; i5 < path4.node.declarations.length; i5++) {
+ const declaration = path4.node.declarations[i5];
if (import_ast_types.namedTypes.VariableDeclarator.check(declaration) && import_ast_types.namedTypes.Identifier.check(declaration.init) && import_ast_types.namedTypes.Identifier.check(declaration.id) && checkName(declaration.init.name, names) && !checkName(declaration.id.name, names)) {
names.push(declaration.id.name);
}
@@ -65774,18 +68533,18 @@ function degenerator(code, _names) {
}
return false;
},
- visitAssignmentExpression(path3) {
- if (import_ast_types.namedTypes.Identifier.check(path3.node.left) && import_ast_types.namedTypes.Identifier.check(path3.node.right) && checkName(path3.node.right.name, names) && !checkName(path3.node.left.name, names)) {
- names.push(path3.node.left.name);
+ visitAssignmentExpression(path4) {
+ if (import_ast_types.namedTypes.Identifier.check(path4.node.left) && import_ast_types.namedTypes.Identifier.check(path4.node.right) && checkName(path4.node.right.name, names) && !checkName(path4.node.left.name, names)) {
+ names.push(path4.node.left.name);
}
return false;
},
- visitFunction(path3) {
- if (path3.node.id) {
+ visitFunction(path4) {
+ if (path4.node.id) {
let shouldDegenerate = false;
- (0, import_ast_types.visit)(path3.node, {
- visitCallExpression(path4) {
- if (checkNames(path4.node, names)) {
+ (0, import_ast_types.visit)(path4.node, {
+ visitCallExpression(path5) {
+ if (checkNames(path5.node, names)) {
shouldDegenerate = true;
}
return false;
@@ -65794,28 +68553,28 @@ function degenerator(code, _names) {
if (!shouldDegenerate) {
return false;
}
- path3.node.async = true;
- if (!checkName(path3.node.id.name, names)) {
- names.push(path3.node.id.name);
+ path4.node.async = true;
+ if (!checkName(path4.node.id.name, names)) {
+ names.push(path4.node.id.name);
}
}
- this.traverse(path3);
+ this.traverse(path4);
}
});
} while (lastNamesLength !== names.length);
(0, import_ast_types.visit)(ast, {
- visitCallExpression(path3) {
- if (checkNames(path3.node, names)) {
+ visitCallExpression(path4) {
+ if (checkNames(path4.node, names)) {
const delegate = false;
- const { name, parent: { node: pNode } } = path3;
- const expr = import_ast_types.builders.awaitExpression(path3.node, delegate);
+ const { name, parent: { node: pNode } } = path4;
+ const expr = import_ast_types.builders.awaitExpression(path4.node, delegate);
if (import_ast_types.namedTypes.CallExpression.check(pNode)) {
pNode.arguments[name] = expr;
} else {
pNode[name] = expr;
}
}
- this.traverse(path3);
+ this.traverse(path4);
}
});
return (0, import_escodegen.generate)(ast);
@@ -65844,7 +68603,7 @@ function checkNames({ callee }, names) {
function checkName(name, names) {
for (let i5 = 0; i5 < names.length; i5++) {
const n3 = names[i5];
- if (import_util.types.isRegExp(n3)) {
+ if (import_util3.types.isRegExp(n3)) {
if (n3.test(name)) {
return true;
}
@@ -65854,13 +68613,13 @@ function checkName(name, names) {
}
return false;
}
-var import_util, import_escodegen, import_esprima, import_ast_types;
+var import_util3, import_escodegen, import_esprima, import_ast_types;
var init_degenerator = __esm({
"node_modules/degenerator/dist/degenerator.js"() {
- import_util = require("util");
+ import_util3 = require("util");
import_escodegen = __toESM(require_escodegen(), 1);
import_esprima = __toESM(require_esprima(), 1);
- import_ast_types = __toESM(require_main(), 1);
+ import_ast_types = __toESM(require_main3(), 1);
}
});
@@ -65965,7 +68724,7 @@ function hostToQuickJSHandle(vm, val) {
return vm.newBigInt(val);
} else if (typeof val === "boolean") {
return val ? vm.true : vm.false;
- } else if (import_util2.types.isPromise(val)) {
+ } else if (import_util4.types.isPromise(val)) {
const promise = vm.newPromise();
val.then((r5) => {
promise.resolve(hostToQuickJSHandle(vm, r5));
@@ -65975,15 +68734,15 @@ function hostToQuickJSHandle(vm, val) {
vm.executePendingJobs();
});
return promise.handle;
- } else if (import_util2.types.isNativeError(val)) {
+ } else if (import_util4.types.isNativeError(val)) {
return vm.newError(val);
}
throw new Error(`Unsupported value: ${val}`);
}
-var import_util2, SANDBOX_FUNCTION_PREFIX;
+var import_util4, SANDBOX_FUNCTION_PREFIX;
var init_compile = __esm({
"node_modules/degenerator/dist/compile.js"() {
- import_util2 = require("util");
+ import_util4 = require("util");
init_degenerator();
SANDBOX_FUNCTION_PREFIX = "__degeneratorSandboxFunction:";
}
@@ -66047,7 +68806,7 @@ function isGMT(v) {
return v === "GMT";
}
var import_dns;
-var init_util = __esm({
+var init_util2 = __esm({
"node_modules/pac-resolver/dist/util.js"() {
import_dns = require("dns");
}
@@ -66067,7 +68826,7 @@ async function dnsResolve(host) {
}
var init_dnsResolve = __esm({
"node_modules/pac-resolver/dist/dnsResolve.js"() {
- init_util();
+ init_util2();
}
});
@@ -66523,7 +69282,7 @@ var import_netmask;
var init_isInNet = __esm({
"node_modules/pac-resolver/dist/isInNet.js"() {
import_netmask = __toESM(require_netmask(), 1);
- init_util();
+ init_util2();
}
});
@@ -66549,7 +69308,7 @@ async function isResolvable(host) {
}
var init_isResolvable = __esm({
"node_modules/pac-resolver/dist/isResolvable.js"() {
- init_util();
+ init_util2();
}
});
@@ -66744,7 +69503,7 @@ function isWeekday(v) {
var weekdays;
var init_weekdayRange = __esm({
"node_modules/pac-resolver/dist/weekdayRange.js"() {
- init_util();
+ init_util2();
weekdays = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
}
});
@@ -67162,7 +69921,7 @@ async function restoreExtensions(descriptors, extensionMeta, mainExports, wasiBu
return loaded;
}
var decoder;
-var init_extensions = __esm({
+var init_extensions2 = __esm({
"node_modules/quickjs-wasi/dist/extensions.js"() {
decoder = new TextDecoder();
}
@@ -67181,10 +69940,10 @@ var import_meta, __addDisposableResource2, __disposeResources2, EvalFlags, Compi
var init_dist9 = __esm({
"node_modules/quickjs-wasi/dist/index.js"() {
init_wasi_shim();
- init_extensions();
+ init_extensions2();
init_version();
import_meta = {};
- __addDisposableResource2 = function(env, value, async) {
+ __addDisposableResource2 = function(env2, value, async) {
if (value !== null && value !== void 0) {
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
var dispose, inner;
@@ -67205,23 +69964,23 @@ var init_dist9 = __esm({
return Promise.reject(e5);
}
};
- env.stack.push({ value, dispose, async });
+ env2.stack.push({ value, dispose, async });
} else if (async) {
- env.stack.push({ async: true });
+ env2.stack.push({ async: true });
}
return value;
};
__disposeResources2 = /* @__PURE__ */ (function(SuppressedError2) {
- return function(env) {
+ return function(env2) {
function fail(e5) {
- env.error = env.hasError ? new SuppressedError2(e5, env.error, "An error was suppressed during disposal.") : e5;
- env.hasError = true;
+ env2.error = env2.hasError ? new SuppressedError2(e5, env2.error, "An error was suppressed during disposal.") : e5;
+ env2.hasError = true;
}
var r5, s = 0;
function next() {
- while (r5 = env.stack.pop()) {
+ while (r5 = env2.stack.pop()) {
try {
- if (!r5.async && s === 1) return s = 0, env.stack.push(r5), Promise.resolve().then(next);
+ 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) {
@@ -67233,8 +69992,8 @@ var init_dist9 = __esm({
fail(e5);
}
}
- if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
- if (env.hasError) throw env.error;
+ if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
+ if (env2.hasError) throw env2.error;
}
return next();
};
@@ -67611,8 +70370,8 @@ var init_dist9 = __esm({
} else if (wasmInput) {
return WebAssembly.compile(wasmInput);
} else {
- const { readFile } = await import("node:fs/promises");
- const buf = await readFile(new URL("../quickjs.wasm", import_meta.url));
+ const { readFile: readFile4 } = await import("node:fs/promises");
+ const buf = await readFile4(new URL("../quickjs.wasm", import_meta.url));
return WebAssembly.compile(buf);
}
}
@@ -69056,17 +71815,17 @@ function omit4(obj, ...keys) {
}
return ret;
}
-var import_socks2, import_debug10, dns2, net7, tls4, import_url5, debug11, setServernameFromNonIpHost3, SocksProxyAgent2;
+var import_socks2, import_debug14, dns2, net7, tls4, import_url5, debug11, setServernameFromNonIpHost3, SocksProxyAgent2;
var init_dist10 = __esm({
"node_modules/pac-proxy-agent/node_modules/socks-proxy-agent/dist/index.js"() {
import_socks2 = __toESM(require_build(), 1);
init_dist5();
- import_debug10 = __toESM(require_src(), 1);
+ import_debug14 = __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_debug10.default)("socks-proxy-agent");
+ debug11 = (0, import_debug14.default)("socks-proxy-agent");
setServernameFromNonIpHost3 = (options) => {
if (options.servername === void 0 && options.host && !net7.isIP(options.host)) {
return {
@@ -69240,11 +71999,11 @@ function parseProxyResponse2(socket) {
read();
});
}
-var import_debug11, debug12;
+var import_debug15, debug12;
var init_parse_proxy_response2 = __esm({
"node_modules/pac-proxy-agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js"() {
- import_debug11 = __toESM(require_src(), 1);
- debug12 = (0, import_debug11.default)("https-proxy-agent:parse-proxy-response");
+ import_debug15 = __toESM(require_src(), 1);
+ debug12 = (0, import_debug15.default)("https-proxy-agent:parse-proxy-response");
}
});
@@ -69266,17 +72025,17 @@ function omit5(obj, ...keys) {
}
return ret;
}
-var net8, tls5, import_assert2, import_debug12, import_url6, debug13, setServernameFromNonIpHost4, HttpsProxyAgent2;
+var net8, tls5, import_assert2, import_debug16, import_url6, debug13, setServernameFromNonIpHost4, HttpsProxyAgent2;
var init_dist11 = __esm({
"node_modules/pac-proxy-agent/node_modules/https-proxy-agent/dist/index.js"() {
net8 = __toESM(require("net"), 1);
tls5 = __toESM(require("tls"), 1);
import_assert2 = __toESM(require("assert"), 1);
- import_debug12 = __toESM(require_src(), 1);
+ import_debug16 = __toESM(require_src(), 1);
init_dist5();
import_url6 = require("url");
init_parse_proxy_response2();
- debug13 = (0, import_debug12.default)("https-proxy-agent");
+ debug13 = (0, import_debug16.default)("https-proxy-agent");
setServernameFromNonIpHost4 = (options) => {
if (options.servername === void 0 && options.host && !net8.isIP(options.host)) {
return {
@@ -69384,16 +72143,16 @@ function omit6(obj, ...keys) {
}
return ret;
}
-var net9, tls6, import_debug13, import_events3, import_url7, debug14, HttpProxyAgent2;
+var net9, tls6, import_debug17, import_events3, import_url7, debug14, HttpProxyAgent2;
var init_dist12 = __esm({
"node_modules/pac-proxy-agent/node_modules/http-proxy-agent/dist/index.js"() {
net9 = __toESM(require("net"), 1);
tls6 = __toESM(require("tls"), 1);
- import_debug13 = __toESM(require_src(), 1);
+ import_debug17 = __toESM(require_src(), 1);
import_events3 = require("events");
init_dist5();
import_url7 = require("url");
- debug14 = (0, import_debug13.default)("http-proxy-agent");
+ debug14 = (0, import_debug17.default)("http-proxy-agent");
HttpProxyAgent2 = class extends Agent6 {
constructor(proxy, opts) {
super(opts);
@@ -69475,20 +72234,20 @@ var dist_exports7 = {};
__export(dist_exports7, {
PacProxyAgent: () => PacProxyAgent
});
-var net10, tls7, crypto3, import_events4, import_debug14, import_url8, debug15, setServernameFromNonIpHost5, PacProxyAgent;
+var net10, tls7, crypto3, import_events4, import_debug18, import_url8, debug15, setServernameFromNonIpHost5, PacProxyAgent;
var init_dist13 = __esm({
"node_modules/pac-proxy-agent/dist/index.js"() {
net10 = __toESM(require("net"), 1);
tls7 = __toESM(require("tls"), 1);
crypto3 = __toESM(require("crypto"), 1);
import_events4 = require("events");
- import_debug14 = __toESM(require_src(), 1);
+ import_debug18 = __toESM(require_src(), 1);
import_url8 = require("url");
init_dist5();
init_dist6();
init_dist8();
init_dist9();
- debug15 = (0, import_debug14.default)("pac-proxy-agent");
+ debug15 = (0, import_debug18.default)("pac-proxy-agent");
setServernameFromNonIpHost5 = (options) => {
if (options.servername === void 0 && options.host && !net10.isIP(options.host)) {
return {
@@ -69895,11 +72654,11 @@ var HttpCodes;
HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable";
HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout";
})(HttpCodes || (HttpCodes = {}));
-var Headers2;
-(function(Headers3) {
- Headers3["Accept"] = "accept";
- Headers3["ContentType"] = "content-type";
-})(Headers2 || (Headers2 = {}));
+var Headers;
+(function(Headers2) {
+ Headers2["Accept"] = "accept";
+ Headers2["ContentType"] = "content-type";
+})(Headers || (Headers = {}));
var MediaTypes;
(function(MediaTypes2) {
MediaTypes2["ApplicationJson"] = "application/json";
@@ -70042,7 +72801,7 @@ var HttpClient = class {
*/
getJson(requestUrl_1) {
return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) {
- additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson);
+ additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
const res = yield this.get(requestUrl, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
@@ -70050,8 +72809,8 @@ var HttpClient = class {
postJson(requestUrl_1, obj_1) {
return __awaiter(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);
+ 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);
});
@@ -70059,8 +72818,8 @@ var HttpClient = class {
putJson(requestUrl_1, obj_1) {
return __awaiter(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);
+ 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);
});
@@ -70068,8 +72827,8 @@ var HttpClient = class {
patchJson(requestUrl_1, obj_1) {
return __awaiter(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);
+ 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);
});
@@ -70299,7 +73058,7 @@ var HttpClient = class {
_getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) {
let clientHeader;
if (this.requestOptions && this.requestOptions.headers) {
- const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers2.ContentType];
+ const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType];
if (headerValue) {
if (typeof headerValue === "number") {
clientHeader = String(headerValue);
@@ -70310,7 +73069,7 @@ var HttpClient = class {
}
}
}
- const additionalValue = additionalHeaders[Headers2.ContentType];
+ const additionalValue = additionalHeaders[Headers.ContentType];
if (additionalValue !== void 0) {
if (typeof additionalValue === "number") {
return String(additionalValue);
@@ -71001,12 +73760,13 @@ function getIDToken(aud) {
// src/assumeRole.ts
var import_node_assert = __toESM(require("node:assert"));
-var import_node_fs = __toESM(require("node:fs"));
-var import_node_path = __toESM(require("node:path"));
-var import_client_sts2 = __toESM(require_dist_cjs56());
+var import_node_path8 = __toESM(require("node:path"));
+var import_client_sts2 = __toESM(require_dist_cjs19());
// src/helpers.ts
-var import_client_sts = __toESM(require_dist_cjs56());
+var fs3 = __toESM(require("node:fs"));
+var path = __toESM(require("node:path"));
+var import_client_sts = __toESM(require_dist_cjs19());
var MAX_TAG_VALUE_LENGTH = 256;
var SANITIZATION_CHARACTER = "_";
var SPECIAL_CHARS_REGEX = /[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]+/;
@@ -71018,13 +73778,13 @@ var UA_FIELDS = [
];
function buildCustomUserAgent() {
const tokens = [[USER_AGENT_PREFIX]];
- for (const { env, label, pattern } of UA_FIELDS) {
- const value = process.env[env];
+ 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(`${env} has unexpected format; omitting from User-Agent`);
+ warning(`${env2} has unexpected format; omitting from User-Agent`);
}
}
return tokens;
@@ -71149,7 +73909,7 @@ function sanitizeGitHubVariables(name) {
async function defaultSleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
-var sleep = defaultSleep;
+var sleep2 = defaultSleep;
function verifyKeys(creds) {
if (!creds) {
return false;
@@ -71182,7 +73942,7 @@ async function retryAndBackoff(fn, isRetryable, maxRetries = 12, retries = 0, ba
info(
`Retry${opName}: attempt ${nextRetry} of ${maxRetries} failed: ${errorMessage(err)}. Retrying after ${Math.floor(delay)}ms.`
);
- await sleep(delay);
+ await sleep2(delay);
if (nextRetry >= maxRetries) {
info(`Retry${opName}: reached max retries (${maxRetries}); giving up.`);
throw err;
@@ -71222,6 +73982,88 @@ function getBooleanInput(name, options) {
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``
);
}
+var O_NOFOLLOW = fs3.constants.O_NOFOLLOW ?? 0;
+function isAllowListed(filePath) {
+ const KUBERNETES_TOKEN_PATH_REGEX = /^\/var\/run\/secrets\/[^/]+\/serviceaccount\/token$/;
+ if (process.platform !== "win32") {
+ return KUBERNETES_TOKEN_PATH_REGEX.test(path.posix.normalize(filePath));
+ }
+ return false;
+}
+function isSymlink(filePath) {
+ try {
+ return fs3.lstatSync(filePath).isSymbolicLink();
+ } catch (err) {
+ if (err.code === "ENOENT") return false;
+ throw err;
+ }
+}
+function refuseSymlinkOnPath(filePath) {
+ const parent = path.dirname(filePath);
+ if (parent !== filePath && isSymlink(parent)) {
+ throw new Error(`Refusing ${filePath} (parent directory is a symbolic link)`);
+ }
+ if (isSymlink(filePath)) {
+ throw new Error(`Refusing ${filePath} (path is a symbolic link)`);
+ }
+}
+function assertRegularFile(fd, filePath) {
+ const stats = fs3.fstatSync(fd);
+ if (!stats.isFile()) {
+ throw new Error(`${filePath} (path is not a regular file)`);
+ }
+}
+function readFileUtf8(filePath) {
+ const allowSymlink = isAllowListed(filePath);
+ if (!allowSymlink) {
+ refuseSymlinkOnPath(filePath);
+ }
+ const openFlags = fs3.constants.O_RDONLY | (allowSymlink ? 0 : O_NOFOLLOW);
+ let fd;
+ try {
+ fd = fs3.openSync(filePath, openFlags);
+ } catch (err) {
+ const code = err.code;
+ if (code === "ENOENT") return null;
+ if (code === "ELOOP") {
+ throw new Error(`Refusing ${filePath} (path is a symbolic link)`);
+ }
+ throw err;
+ }
+ try {
+ assertRegularFile(fd, filePath);
+ return fs3.readFileSync(fd, "utf-8");
+ } finally {
+ fs3.closeSync(fd);
+ }
+}
+function writeFileUtf8(filePath, content, mode = 384) {
+ refuseSymlinkOnPath(filePath);
+ let fd;
+ try {
+ fd = fs3.openSync(filePath, fs3.constants.O_WRONLY | fs3.constants.O_CREAT | fs3.constants.O_TRUNC | O_NOFOLLOW, mode);
+ } catch (err) {
+ if (err.code === "ELOOP") {
+ throw new Error(`Refusing ${filePath} (path is a symbolic link)`);
+ }
+ throw err;
+ }
+ try {
+ assertRegularFile(fd, filePath);
+ if (process.platform !== "win32") {
+ fs3.fchmodSync(fd, mode);
+ }
+ fs3.writeFileSync(fd, content);
+ } finally {
+ fs3.closeSync(fd);
+ }
+}
+function mkdir2(dir, mode = 448) {
+ fs3.mkdirSync(dir, { recursive: true, mode });
+ if (isSymlink(dir)) {
+ throw new Error(`Refusing ${dir} (path is a symbolic link)`);
+ }
+}
// src/assumeRole.ts
async function assumeRoleWithOIDC(params, client, webIdentityToken) {
@@ -71244,14 +74086,15 @@ async function assumeRoleWithWebIdentityTokenFile(params, client, webIdentityTok
debug(
"webIdentityTokenFile provided. Will call sts:AssumeRoleWithWebIdentity and take session tags from token contents."
);
- const webIdentityTokenFilePath = import_node_path.default.isAbsolute(webIdentityTokenFile) ? webIdentityTokenFile : import_node_path.default.join(workspace, webIdentityTokenFile);
- if (!import_node_fs.default.existsSync(webIdentityTokenFilePath)) {
+ const webIdentityTokenFilePath = import_node_path8.default.isAbsolute(webIdentityTokenFile) ? webIdentityTokenFile : import_node_path8.default.join(workspace, webIdentityTokenFile);
+ const webIdentityToken = readFileUtf8(webIdentityTokenFilePath);
+ if (webIdentityToken === null) {
throw new Error(`Web identity token file does not exist: ${webIdentityTokenFilePath}`);
}
info("Assuming role with web identity token file");
try {
- const webIdentityToken = import_node_fs.default.readFileSync(webIdentityTokenFilePath, "utf8");
delete params.Tags;
+ delete params.TransitiveTagKeys;
const creds = await client.send(
new import_client_sts2.AssumeRoleWithWebIdentityCommand({
...params,
@@ -71269,6 +74112,13 @@ async function assumeRoleWithCredentials(params, client) {
const creds = await client.send(new import_client_sts2.AssumeRoleCommand({ ...params }));
return creds;
} catch (error3) {
+ if (error3 instanceof import_client_sts2.PackedPolicyTooLargeException) {
+ info("Session tag size is too large; dropping droppable tags and retrying.");
+ const droppableKeys = new Set(DROPPABLE_TAG_SOURCES.map((s) => s.key));
+ params.Tags = params.Tags?.filter((tag2) => !droppableKeys.has(tag2.Key ?? ""));
+ const creds = await client.send(new import_client_sts2.AssumeRoleCommand({ ...params }));
+ return creds;
+ }
throw new Error(`Could not assume role with user credentials: ${errorMessage(error3)}`);
}
}
@@ -71277,7 +74127,7 @@ 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 = [
+var NON_DROPPABLE_TAG_SOURCES = [
{ key: "Repository", envVar: "GITHUB_REPOSITORY" },
{ key: "Workflow", envVar: "GITHUB_WORKFLOW" },
{ key: "Action", envVar: "GITHUB_ACTION" },
@@ -71285,17 +74135,19 @@ var PROTECTED_TAG_SOURCES = [
{ key: "Commit", envVar: "GITHUB_SHA" },
{ key: "Branch", envVar: "GITHUB_REF" }
];
-var OVERRIDEABLE_TAG_SOURCES_BY_PRIORITY = [
+var DROPPABLE_TAG_SOURCES = [
{ 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)]);
+var PROTECTED_TAG_KEYS = /* @__PURE__ */ new Set([
+ "GitHub",
+ ...NON_DROPPABLE_TAG_SOURCES.map((s) => s.key),
+ ...DROPPABLE_TAG_SOURCES.map((s) => s.key)
+]);
function parseAndValidateCustomTags(customTags, existingTags) {
let parsed;
try {
@@ -71367,30 +74219,26 @@ async function assumeRole(params) {
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) {
+ for (const { key, envVar } of NON_DROPPABLE_TAG_SOURCES) {
+ const value = process.env[envVar];
+ if (value) {
+ protectedTags.push({ Key: key, Value: sanitizeGitHubVariables(value) });
+ }
+ }
+ for (const { key, envVar } of DROPPABLE_TAG_SOURCES) {
const value = process.env[envVar];
if (value) {
protectedTags.push({ Key: key, Value: sanitizeGitHubVariables(value) });
}
}
const parsedCustomTags = customTags ? parseAndValidateCustomTags(customTags, protectedTags) : [];
- const customTagKeys = new Set(parsedCustomTags.map((t) => t.Key));
- const availableOverrideableSlots = MAX_SESSION_TAGS - protectedTags.length - parsedCustomTags.length;
- const overrideableTags = [];
- for (const { key, envVar } of OVERRIDEABLE_TAG_SOURCES_BY_PRIORITY) {
- if (overrideableTags.length >= availableOverrideableSlots) break;
- if (customTagKeys.has(key)) continue;
- const value = process.env[envVar];
- if (value) {
- overrideableTags.push({ Key: key, Value: sanitizeGitHubVariables(value) });
- }
- }
- const tagArray = [...protectedTags, ...overrideableTags, ...parsedCustomTags];
+ const tagArray = [...protectedTags, ...parsedCustomTags];
const tags = roleSkipSessionTagging ? void 0 : tagArray;
if (!tags) {
debug("Role session tagging has been skipped.");
} else {
debug(`${tags.length} role session tags are being used:`);
+ debug(JSON.stringify(tagArray));
}
const transitiveTagKeysArray = roleSkipSessionTagging ? void 0 : transitiveTagKeys?.filter((key) => tags?.some((tag2) => tag2.Key === key));
let roleArn = roleToAssume;
@@ -71433,8 +74281,8 @@ async function assumeRole(params) {
}
// src/CredentialsClient.ts
-var import_client_sts3 = __toESM(require_dist_cjs56());
-var import_node_http_handler5 = __toESM(require_dist_cjs13());
+var import_client_sts3 = __toESM(require_dist_cjs19());
+var import_node_http_handler5 = __toESM(require_dist_cjs9());
// node_modules/proxy-agent/dist/index.js
var http5 = __toESM(require("http"), 1);
@@ -72439,10 +75287,10 @@ var lru_cache_default = LRUCache;
// node_modules/proxy-agent/dist/index.js
init_dist();
-var import_debug15 = __toESM(require_src(), 1);
+var import_debug19 = __toESM(require_src(), 1);
// node_modules/proxy-from-env/index.js
-var DEFAULT_PORTS = {
+var DEFAULT_PORTS2 = {
ftp: 21,
gopher: 70,
http: 80,
@@ -72450,7 +75298,7 @@ var DEFAULT_PORTS = {
ws: 80,
wss: 443
};
-function parseUrl6(urlString) {
+function parseUrl2(urlString) {
try {
return new URL(urlString);
} catch {
@@ -72458,7 +75306,7 @@ function parseUrl6(urlString) {
}
}
function getProxyForUrl(url) {
- var parsedUrl = (typeof url === "string" ? parseUrl6(url) : url) || {};
+ var parsedUrl = (typeof url === "string" ? parseUrl2(url) : url) || {};
var proto = parsedUrl.protocol;
var hostname = parsedUrl.host;
var port = parsedUrl.port;
@@ -72467,7 +75315,7 @@ function getProxyForUrl(url) {
}
proto = proto.split(":", 1)[0];
hostname = hostname.replace(/:\d*$/, "");
- port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
+ port = parseInt(port) || DEFAULT_PORTS2[proto] || 0;
if (!shouldProxy(hostname, port)) {
return "";
}
@@ -72509,7 +75357,7 @@ function getEnv(key) {
}
// node_modules/proxy-agent/dist/index.js
-var debug16 = (0, import_debug15.default)("proxy-agent");
+var debug16 = (0, import_debug19.default)("proxy-agent");
var wellKnownAgents = {
http: async () => (await Promise.resolve().then(() => (init_dist2(), dist_exports))).HttpProxyAgent,
https: async () => (await Promise.resolve().then(() => (init_dist3(), dist_exports2))).HttpsProxyAgent,
@@ -72584,7 +75432,7 @@ var ProxyAgent2 = class extends Agent4 {
};
// src/ProxyResolver.ts
-var DEFAULT_PORTS2 = {
+var DEFAULT_PORTS3 = {
http: 80,
https: 443
};
@@ -72606,7 +75454,7 @@ var ProxyResolver = class {
const proto = parsedUrl.protocol.split(":", 1)[0];
if (!proto) return "";
const hostname = parsedUrl.host;
- const port = parseInt(parsedUrl.port || "") || DEFAULT_PORTS2[proto] || 0;
+ const port = parseInt(parsedUrl.port || "") || DEFAULT_PORTS3[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;
@@ -72715,10 +75563,9 @@ var CredentialsClient = class {
};
// src/profileManager.ts
-var fs4 = __toESM(require("node:fs"));
var os6 = __toESM(require("node:os"));
-var path2 = __toESM(require("node:path"));
-function parseIni(iniData) {
+var path3 = __toESM(require("node:path"));
+function parseIni2(iniData) {
const result = {};
let currentSection;
for (const line of iniData.split(/\r?\n/)) {
@@ -72765,19 +75612,17 @@ 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 || path3.join(os6.homedir(), ".aws", "credentials");
+ const configPath = process.env.AWS_CONFIG_FILE || path3.join(os6.homedir(), ".aws", "config");
return {
credentials: credentialsPath,
config: configPath
};
}
function ensureAwsDirectoryExists(filePath) {
- const dir = path2.dirname(filePath);
- if (!fs4.existsSync(dir)) {
- debug(`Creating directory: ${dir}`);
- fs4.mkdirSync(dir, { recursive: true, mode: 448 });
- }
+ const dir = path3.dirname(filePath);
+ debug(`Ensuring directory exists: ${dir}`);
+ mkdir2(dir, 448);
}
function validateProfileName(profileName) {
if (!profileName || profileName.trim() === "") {
@@ -72794,12 +75639,8 @@ 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 = parseIni(fileContent);
- }
+ const fileContent = readFileUtf8(filePath);
+ const existingContent = fileContent === null ? {} : parseIni2(fileContent);
if (existingContent[sectionName] && !overwriteAwsProfile) {
throw new Error(
`Profile with name "${sectionName}" already exists. Please use the overwrite-aws-profile input if you want to overwrite existing profiles.`
@@ -72808,7 +75649,7 @@ function mergeProfileSection(filePath, sectionName, data3, overwriteAwsProfile)
existingContent[sectionName] = data3;
const content = stringifyIni(existingContent);
debug(`Writing profile to ${filePath}`);
- fs4.writeFileSync(filePath, content, { mode: 384 });
+ writeFileUtf8(filePath, content, 384);
}
function writeProfileFiles(profileName, credentials, region, overwriteAwsProfile) {
try {
@@ -72975,11 +75816,13 @@ async function run() {
sourceAccountId = await withRetry(() => exportAccountId(credentialsClient, maskAccountId), "exportAccountId");
}
if (AccessKeyId || roleChaining) {
- await withRetry(
- () => credentialsClient.validateCredentials(AccessKeyId, roleChaining, expectedAccountIds),
- "validateCredentials"
- );
- sourceAccountId = await withRetry(() => exportAccountId(credentialsClient, maskAccountId), "exportAccountId");
+ if (outputEnvCredentials) {
+ await withRetry(
+ () => credentialsClient.validateCredentials(AccessKeyId, roleChaining, expectedAccountIds),
+ "validateCredentials"
+ );
+ sourceAccountId = await withRetry(() => exportAccountId(credentialsClient, maskAccountId), "exportAccountId");
+ }
}
if (customTags && (useGitHubOIDCProvider() || webIdentityTokenFile)) {
warning(
@@ -73009,7 +75852,7 @@ async function run() {
} while (specialCharacterWorkaround && !verifyKeys(roleCredentials.Credentials));
info(`Authenticated as assumedRoleId ${roleCredentials.AssumedRoleUser?.AssumedRoleId}`);
exportCredentials(roleCredentials.Credentials, outputCredentials, outputEnvCredentials);
- if ((!process.env.GITHUB_ACTIONS || AccessKeyId) && !awsProfile) {
+ if ((!process.env.GITHUB_ACTIONS || AccessKeyId) && !awsProfile && outputEnvCredentials) {
await withRetry(
() => credentialsClient.validateCredentials(
roleCredentials.Credentials?.AccessKeyId,
diff --git a/package-lock.json b/package-lock.json
index 5000cc0..20074cc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,34 +1,34 @@
{
"name": "configure-aws-credentials",
- "version": "6.1.1",
+ "version": "6.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "configure-aws-credentials",
- "version": "6.1.1",
+ "version": "6.2.0",
"license": "MIT",
"dependencies": {
"@actions/core": "^3.0.1",
- "@aws-sdk/client-sts": "^3.1045.0",
- "@smithy/node-http-handler": "^4.7.1",
+ "@aws-sdk/client-sts": "^3.1061.0",
+ "@smithy/node-http-handler": "^4.7.3",
"proxy-agent": "^8.0.1"
},
"devDependencies": {
- "@aws-sdk/credential-provider-env": "^3.972.32",
- "@biomejs/biome": "2.4.15",
- "@smithy/property-provider": "^4.3.1",
- "@types/node": "^25.7.0",
- "@vitest/coverage-v8": "^4.1.6",
+ "@aws-sdk/credential-provider-env": "^3.972.39",
+ "@biomejs/biome": "2.4.16",
+ "@smithy/property-provider": "^4.3.6",
+ "@types/node": "^25.9.1",
+ "@vitest/coverage-v8": "4.1.8",
"aws-sdk-client-mock": "^4.1.0",
"esbuild": "^0.28.0",
- "generate-license-file": "^4.1.1",
+ "generate-license-file": "^4.2.1",
"json-schema": "^0.4.0",
"markdownlint-cli": "^0.48.0",
- "memfs": "^4.57.2",
+ "memfs": "^4.57.6",
"standard-version": "^9.5.0",
"typescript": "^6.0.3",
- "vitest": "^4.1.5"
+ "vitest": "4.1.8"
},
"engines": {
"node": ">= 16.3.0"
@@ -98,44 +98,6 @@
"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",
@@ -170,89 +132,22 @@
"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.1045.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.1045.0.tgz",
- "integrity": "sha512-oDJJ7rM1osvfBdfZuhQ5DM6lHD9iuypL9m2LsEiA/lB8xuE5uPYsftNDcS0J9VRXFSvYTqC14K7Y5vMMKMg0vw==",
+ "version": "3.1061.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.1061.0.tgz",
+ "integrity": "sha512-45pn+cxziQ86ftwX4u5OreEp98oFpozu+2pu6NekwDXp36JavRGS1PsRmijdAWomaCGQ4rDFX0RxgXQq865YiA==",
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
- "@aws-sdk/core": "^3.974.8",
- "@aws-sdk/credential-provider-node": "^3.972.39",
- "@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.38",
- "@aws-sdk/region-config-resolver": "^3.972.13",
- "@aws-sdk/signature-v4-multi-region": "^3.996.25",
- "@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.24",
- "@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.7",
- "@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.6",
- "@smithy/util-utf8": "^4.2.2",
+ "@aws-sdk/core": "^3.974.17",
+ "@aws-sdk/credential-provider-node": "^3.972.50",
+ "@aws-sdk/signature-v4-multi-region": "^3.996.31",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/fetch-http-handler": "^5.4.6",
+ "@smithy/node-http-handler": "^4.7.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -260,24 +155,18 @@
}
},
"node_modules/@aws-sdk/core": {
- "version": "3.974.8",
- "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.974.8.tgz",
- "integrity": "sha512-njR2qoG6ZuB0kvAS2FyICsFZJ6gmCcf2X/7JcD14sUvGDm26wiZ5BrA6LOiUxKFEF+IVe7kdroxyE00YlkiYsw==",
+ "version": "3.974.17",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.974.17.tgz",
+ "integrity": "sha512-r8o4h2K7j6P9ngno+8ei0aK0U/4JwDb7A2fMMxGVoSqDN8AFlIzSDeZHME9LcVLR2codyhtr1WAAg+/nmkeeMA==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/types": "^3.973.8",
- "@aws-sdk/xml-builder": "^3.972.22",
- "@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",
- "@smithy/util-base64": "^4.3.2",
- "@smithy/util-middleware": "^4.2.14",
- "@smithy/util-retry": "^4.3.6",
- "@smithy/util-utf8": "^4.2.2",
+ "@aws-sdk/types": "^3.973.10",
+ "@aws-sdk/xml-builder": "^3.972.27",
+ "@aws/lambda-invoke-store": "^0.2.2",
+ "@smithy/core": "^3.24.6",
+ "@smithy/signature-v4": "^5.4.6",
+ "@smithy/types": "^4.14.3",
+ "bowser": "^2.11.0",
"tslib": "^2.6.2"
},
"engines": {
@@ -285,15 +174,15 @@
}
},
"node_modules/@aws-sdk/credential-provider-env": {
- "version": "3.972.34",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.34.tgz",
- "integrity": "sha512-XT0jtf8Fw9JE6ppsQeoNnZRiG+jqRixMT1v1ZR17G60UvVdsQmTG8nbEyHuEPfMxDXEhfdARaM/XiEhca4lGHQ==",
+ "version": "3.972.43",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.43.tgz",
+ "integrity": "sha512-g0XVQKzaA/4cq1vz1IvCQwYM+1Pkv01J9yHDpCTXekVuGZRDEz0wqBQ1AuYTq7FM6uik4uBGH8Tb5d9YvgeA7g==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "^3.974.8",
- "@aws-sdk/types": "^3.973.8",
- "@smithy/property-provider": "^4.2.14",
- "@smithy/types": "^4.14.1",
+ "@aws-sdk/core": "^3.974.17",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -301,20 +190,17 @@
}
},
"node_modules/@aws-sdk/credential-provider-http": {
- "version": "3.972.36",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.36.tgz",
- "integrity": "sha512-DPoGWfy7J7RKxvbf5kOKIGQkD2ek3dbKgzKIGrnLuvZBz5myU+Im/H6pmc14QcnFbqHMqxvtWSgRDSJW3qXLQg==",
+ "version": "3.972.45",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.45.tgz",
+ "integrity": "sha512-w9PuOoKCt6+xoESvY+zlV0u3PKQ0mVL259PcsVR6a3S/uYJJHnIi4r1NxdJHEcNldUVRIciltWnFMGBR4YEm3g==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "^3.974.8",
- "@aws-sdk/types": "^3.973.8",
- "@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",
+ "@aws-sdk/core": "^3.974.17",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/fetch-http-handler": "^5.4.6",
+ "@smithy/node-http-handler": "^4.7.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -322,24 +208,23 @@
}
},
"node_modules/@aws-sdk/credential-provider-ini": {
- "version": "3.972.38",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.38.tgz",
- "integrity": "sha512-oDzUBu2MGJFgoar05sPMCwSrhw44ASyccrHzj66vO69OZqi7I6hZZxXfuPLC8OCzW7C+sU+bI73XHij41yekgQ==",
+ "version": "3.972.48",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.48.tgz",
+ "integrity": "sha512-+6BQ6Lrnc+EyAGElLRW6j+Sa+RirPHnIJsobvYO6nnyK+oGKmz1ne/ieclbLWyjyDKEU3/JVJWcWY3VLFPvGtQ==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "^3.974.8",
- "@aws-sdk/credential-provider-env": "^3.972.34",
- "@aws-sdk/credential-provider-http": "^3.972.36",
- "@aws-sdk/credential-provider-login": "^3.972.38",
- "@aws-sdk/credential-provider-process": "^3.972.34",
- "@aws-sdk/credential-provider-sso": "^3.972.38",
- "@aws-sdk/credential-provider-web-identity": "^3.972.38",
- "@aws-sdk/nested-clients": "^3.997.6",
- "@aws-sdk/types": "^3.973.8",
- "@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",
+ "@aws-sdk/core": "^3.974.17",
+ "@aws-sdk/credential-provider-env": "^3.972.43",
+ "@aws-sdk/credential-provider-http": "^3.972.45",
+ "@aws-sdk/credential-provider-login": "^3.972.47",
+ "@aws-sdk/credential-provider-process": "^3.972.43",
+ "@aws-sdk/credential-provider-sso": "^3.972.47",
+ "@aws-sdk/credential-provider-web-identity": "^3.972.47",
+ "@aws-sdk/nested-clients": "^3.997.15",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/credential-provider-imds": "^4.3.7",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -347,18 +232,16 @@
}
},
"node_modules/@aws-sdk/credential-provider-login": {
- "version": "3.972.38",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.38.tgz",
- "integrity": "sha512-g1NosS8qe4OF++G2UFCM5ovSkgipC7YYor5KCWatG0UoMSO5YFj9C8muePlyVmOBV/WTI16Jo3/s1NUo/o1Bww==",
+ "version": "3.972.47",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.47.tgz",
+ "integrity": "sha512-Iy2ebWVgrZBH05464uJiQYu6HSSiROnwVZptthEFXx2gWjo1ORCxEAFZB5Cr2MdfrSnZ+0QUPkZ1ZpCqpkUrLQ==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "^3.974.8",
- "@aws-sdk/nested-clients": "^3.997.6",
- "@aws-sdk/types": "^3.973.8",
- "@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",
+ "@aws-sdk/core": "^3.974.17",
+ "@aws-sdk/nested-clients": "^3.997.15",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -366,22 +249,21 @@
}
},
"node_modules/@aws-sdk/credential-provider-node": {
- "version": "3.972.39",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.39.tgz",
- "integrity": "sha512-HEswDQyxUtadoZ/bJsPPENHg7R0Lzym5LuMksJeHvqhCOpP+rtkDLKI4/ZChH4w3cf5kG8n6bZuI8PzajoiqMg==",
+ "version": "3.972.50",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.50.tgz",
+ "integrity": "sha512-b05Aelq5cqAvCCDQjCYacl0XmR8QhBNSqLbsdISkQmlQBa5oPS66zYPteWcSp5LswbpoIe552EUGjluKiadBig==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/credential-provider-env": "^3.972.34",
- "@aws-sdk/credential-provider-http": "^3.972.36",
- "@aws-sdk/credential-provider-ini": "^3.972.38",
- "@aws-sdk/credential-provider-process": "^3.972.34",
- "@aws-sdk/credential-provider-sso": "^3.972.38",
- "@aws-sdk/credential-provider-web-identity": "^3.972.38",
- "@aws-sdk/types": "^3.973.8",
- "@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",
+ "@aws-sdk/credential-provider-env": "^3.972.43",
+ "@aws-sdk/credential-provider-http": "^3.972.45",
+ "@aws-sdk/credential-provider-ini": "^3.972.48",
+ "@aws-sdk/credential-provider-process": "^3.972.43",
+ "@aws-sdk/credential-provider-sso": "^3.972.47",
+ "@aws-sdk/credential-provider-web-identity": "^3.972.47",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/credential-provider-imds": "^4.3.7",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -389,16 +271,15 @@
}
},
"node_modules/@aws-sdk/credential-provider-process": {
- "version": "3.972.34",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.34.tgz",
- "integrity": "sha512-T3IFs4EVmVi1dVN5RciFnklCANSzvrQd/VuHY9ThHSQmYkTogjcGkoJEr+oNUPQZnso52183088NqysMPji1/Q==",
+ "version": "3.972.43",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.43.tgz",
+ "integrity": "sha512-GPokLNyvTfCmuaHk+v3GKVs4ZT3cMu5kgS2a+NPkOMt96cq6fSIK0g+mZHpGS6Cd4QGrPKesANEaLUKgOskTzg==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "^3.974.8",
- "@aws-sdk/types": "^3.973.8",
- "@smithy/property-provider": "^4.2.14",
- "@smithy/shared-ini-file-loader": "^4.4.9",
- "@smithy/types": "^4.14.1",
+ "@aws-sdk/core": "^3.974.17",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -406,18 +287,17 @@
}
},
"node_modules/@aws-sdk/credential-provider-sso": {
- "version": "3.972.38",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.38.tgz",
- "integrity": "sha512-5ZxG+t0+3Q3QPh8KEjX6syskhgNf7I0MN7oGioTf6Lm1NTjfP7sIcYGNsthXC2qR8vcD3edNZwCr2ovfSSWuRA==",
+ "version": "3.972.47",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.47.tgz",
+ "integrity": "sha512-0AzvLrzlvJs0DzbeWGvNj+bX3Uzd7VNS6vDqCOdZzBlCGKGd78uxctJSW9iK/Rt/nxiJqpTvrYQlVJ4guVM2Dw==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "^3.974.8",
- "@aws-sdk/nested-clients": "^3.997.6",
- "@aws-sdk/token-providers": "3.1041.0",
- "@aws-sdk/types": "^3.973.8",
- "@smithy/property-provider": "^4.2.14",
- "@smithy/shared-ini-file-loader": "^4.4.9",
- "@smithy/types": "^4.14.1",
+ "@aws-sdk/core": "^3.974.17",
+ "@aws-sdk/nested-clients": "^3.997.15",
+ "@aws-sdk/token-providers": "3.1060.0",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -425,106 +305,16 @@
}
},
"node_modules/@aws-sdk/credential-provider-web-identity": {
- "version": "3.972.38",
- "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.38.tgz",
- "integrity": "sha512-lYHFF30DGI20jZcYX8cm6Ns0V7f1dDN6g/MBDLTyD/5iw+bXs3yBr2iAiHDkx4RFU5JgsnZvCHYKiRVPRdmOgw==",
+ "version": "3.972.47",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.47.tgz",
+ "integrity": "sha512-eksfbUErOejUAGWBAcNqaP7IX21oUOEo73d9R56k9Ua4d57qS90NEYkWJsuSGzTXMFulCu17qXJI/qGmM7hvoA==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "^3.974.8",
- "@aws-sdk/nested-clients": "^3.997.6",
- "@aws-sdk/types": "^3.973.8",
- "@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": ">=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.37",
- "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.972.37.tgz",
- "integrity": "sha512-Km7M+i8DrLArVzrid1gfxeGhYHBd3uxvE77g0s5a52zPSVosxzQBnJ0gwWb6NIp/DOk8gsBMhi7V+cpJG0ndTA==",
- "license": "Apache-2.0",
- "dependencies": {
- "@aws-sdk/core": "^3.974.8",
- "@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.38",
- "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.972.38.tgz",
- "integrity": "sha512-iz+B29TXcAZsJpwB+AwG/TTGA5l/VnmMZ2UxtiySOZjI6gCdmviXPwdgzcmuazMy16rXoPY4mYCGe7zdNKfx5A==",
- "license": "Apache-2.0",
- "dependencies": {
- "@aws-sdk/core": "^3.974.8",
- "@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.6",
+ "@aws-sdk/core": "^3.974.17",
+ "@aws-sdk/nested-clients": "^3.997.15",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -532,65 +322,20 @@
}
},
"node_modules/@aws-sdk/nested-clients": {
- "version": "3.997.6",
- "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.6.tgz",
- "integrity": "sha512-WBDnqatJl+kGObpfmfSxqnXeYTu3Me8wx8WCtvoxX3pfWrrTv8I4WTMSSs7PZqcRcVh8WeUKMgGFjMG+52SR1w==",
+ "version": "3.997.15",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.15.tgz",
+ "integrity": "sha512-Fpri1/PXKMKveORZ7E00VLTlWS5DkfZkW70PUE+bOnpWpAeHAQLoiDHhkzN3kNWbbSsGg64+IZYiq/EZgME3Mg==",
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
- "@aws-sdk/core": "^3.974.8",
- "@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.38",
- "@aws-sdk/region-config-resolver": "^3.972.13",
- "@aws-sdk/signature-v4-multi-region": "^3.996.25",
- "@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.24",
- "@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.7",
- "@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.6",
- "@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",
+ "@aws-sdk/core": "^3.974.17",
+ "@aws-sdk/signature-v4-multi-region": "^3.996.31",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/fetch-http-handler": "^5.4.6",
+ "@smithy/node-http-handler": "^4.7.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -598,16 +343,14 @@
}
},
"node_modules/@aws-sdk/signature-v4-multi-region": {
- "version": "3.996.25",
- "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.25.tgz",
- "integrity": "sha512-+CMIt3e1VzlklAECmG+DtP1sV8iKq25FuA0OKpnJ4KA0kxUtd7CgClY7/RU6VzJBQwbN4EJ9Ue6plvqx1qGadw==",
+ "version": "3.996.31",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.31.tgz",
+ "integrity": "sha512-Kn2up9SlG1KC6wRtwf0d7waTGF6rvp9DxYqB54x6UCKdQ6kyaXCqHL4WGb5vUJga5kS8FxnjhY0LqM28aMvnNQ==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/middleware-sdk-s3": "^3.972.37",
- "@aws-sdk/types": "^3.973.8",
- "@smithy/protocol-http": "^5.3.14",
- "@smithy/signature-v4": "^5.3.14",
- "@smithy/types": "^4.14.1",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/signature-v4": "^5.4.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -615,17 +358,16 @@
}
},
"node_modules/@aws-sdk/token-providers": {
- "version": "3.1041.0",
- "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1041.0.tgz",
- "integrity": "sha512-Th7kPI6YPtvJUcdznooXJMy+9rQWjmEF81LxaJssngBzuysK4a/x+l8kjm1zb7nYsUPbndnBdUnwng/3PLvtGw==",
+ "version": "3.1060.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1060.0.tgz",
+ "integrity": "sha512-6NZaMKkFhpaNiwLpHi1sZaYjidL/lCJE6ME6NxwA8gv9vQna+Kr0j4OFwVoz6tANRWM3WbGz6jiPsGX/Vkjwow==",
"license": "Apache-2.0",
"dependencies": {
- "@aws-sdk/core": "^3.974.8",
- "@aws-sdk/nested-clients": "^3.997.6",
- "@aws-sdk/types": "^3.973.8",
- "@smithy/property-provider": "^4.2.14",
- "@smithy/shared-ini-file-loader": "^4.4.9",
- "@smithy/types": "^4.14.1",
+ "@aws-sdk/core": "^3.974.17",
+ "@aws-sdk/nested-clients": "^3.997.15",
+ "@aws-sdk/types": "^3.973.10",
+ "@smithy/core": "^3.24.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -633,40 +375,12 @@
}
},
"node_modules/@aws-sdk/types": {
- "version": "3.973.8",
- "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.973.8.tgz",
- "integrity": "sha512-gjlAdtHMbtR9X5iIhVUvbVcy55KnznpC6bkDUWW9z915bi0ckdUr5cjf16Kp6xq0bP5HBD2xzgbL9F9Quv5vUw==",
+ "version": "3.973.10",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.973.10.tgz",
+ "integrity": "sha512-992QrTO7G9qCvKD0fx1rMlqcL14plUcRAbwmqqYVsuF3GrqcvlAL9qxR+baMafarEZ+l7DUQ5lCMmt5mbMhF7g==",
"license": "Apache-2.0",
"dependencies": {
- "@smithy/types": "^4.14.1",
- "tslib": "^2.6.2"
- },
- "engines": {
- "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",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -685,52 +399,14 @@
"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.24",
- "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.973.24.tgz",
- "integrity": "sha512-ZWwlkjcIp7cEL8ZfTpTAPNkwx25p7xol0xlKoWVVf22+nsjwmLcHYtTPjIV1cSpmB/b6DaK4cb1fSkvCXHgRdw==",
- "license": "Apache-2.0",
- "dependencies": {
- "@aws-sdk/middleware-user-agent": "^3.972.38",
- "@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.22",
- "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.22.tgz",
- "integrity": "sha512-PMYKKtJd70IsSG0yHrdAbxBr+ZWBKLvzFZfD3/urxgf6hXVMzuU5M+3MJ5G67RpOmLBu1fAUN65SbWuKUCOlAA==",
+ "version": "3.972.27",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.27.tgz",
+ "integrity": "sha512-hpsCXCOI436kxWpjtRuIHVvuPP81MOw8f18jzfZeg+UOiiOvlqWcmWChzEhJEu16cOC6+ku4ncBN+7rdt+DZ9g==",
"license": "Apache-2.0",
"dependencies": {
- "@nodable/entities": "2.1.0",
- "@smithy/types": "^4.14.1",
- "fast-xml-parser": "5.7.2",
+ "@smithy/types": "^4.14.3",
+ "fast-xml-parser": "5.7.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -829,9 +505,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.16",
+ "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.16.tgz",
+ "integrity": "sha512-x9ajFh1zChVybCiM3TN6OD4phAqLgtPZjFrZF+aTMYCPjwBO+k529TX7PPsAqtGNLeV4UgzwQnowEgS7bGmzcA==",
"dev": true,
"license": "MIT OR Apache-2.0",
"bin": {
@@ -845,20 +521,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.16",
+ "@biomejs/cli-darwin-x64": "2.4.16",
+ "@biomejs/cli-linux-arm64": "2.4.16",
+ "@biomejs/cli-linux-arm64-musl": "2.4.16",
+ "@biomejs/cli-linux-x64": "2.4.16",
+ "@biomejs/cli-linux-x64-musl": "2.4.16",
+ "@biomejs/cli-win32-arm64": "2.4.16",
+ "@biomejs/cli-win32-x64": "2.4.16"
}
},
"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.16",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.16.tgz",
+ "integrity": "sha512-wxPvu4XOA85YJk9ixSWUmq/QBHbid85BISbOAqqBM/5xQpPk9ayjk5375tOlSC0BeCwNSbPFafQBm+vBumXq0A==",
"cpu": [
"arm64"
],
@@ -873,9 +549,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.16",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.16.tgz",
+ "integrity": "sha512-xFCqGPwYusQJp4N4NJLi1XJiZqjwFdjhT+KqtNy+Ug3qgfczqnTa6MSDvxJF6TkuDLoYJItMapz6tAf7kCekFw==",
"cpu": [
"x64"
],
@@ -890,9 +566,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.16",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.16.tgz",
+ "integrity": "sha512-2kFb4//jxfZaP6D+Rj5VkHkxgyD9EoRAVBEQb8PKRv+s4NO2zYNJKXFaJmK1CmhufJOWEfpHKaRbOja7qjmdhQ==",
"cpu": [
"arm64"
],
@@ -907,9 +583,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.16",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.16.tgz",
+ "integrity": "sha512-oYxnW0ARfJkr72ezzF2OR8N/rtkgLUQeYtF8cFhVswbknHxtTcmzSsanVJP8yQKnGpGpc2ck6c5zLvHahL6Cbg==",
"cpu": [
"arm64"
],
@@ -924,9 +600,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.16",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.16.tgz",
+ "integrity": "sha512-NbcBbi/nJqn5baae6wqRXdS7Gadf2uRpehSh6vMSYpG8OhkXl/Xg8aorWrJ+9VWqAT5ml90alLvorkpMW0nBwQ==",
"cpu": [
"x64"
],
@@ -941,9 +617,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.16",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.16.tgz",
+ "integrity": "sha512-iHDS+MCM65DPqWGu+ECC3uoALyj2H7F4nVUPxIPjz/PIl94EUu+EDfGZDzFP+NY1EOPVt9NQvwFqq7HdMmowdg==",
"cpu": [
"x64"
],
@@ -958,9 +634,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.16",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.16.tgz",
+ "integrity": "sha512-0rgImMsNb5v/chhkIFe3wu7PEFClS6RBAYUijGL9UsYN3PanSaoK24HSSuSJb1pYbYYVjzAyZTl3gtjJ84BM8A==",
"cpu": [
"arm64"
],
@@ -975,9 +651,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.16",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.16.tgz",
+ "integrity": "sha512-Kp85jgoBHa05gix6UIRjfCDiUV3w/8VIdZ247VyyO2gEjaw12WEVhdIjlxp/AMzXxqxQwbxNTDVZ3Mwd2RG5rw==",
"cpu": [
"x64"
],
@@ -1497,16 +1173,6 @@
"node": ">=6.9.0"
}
},
- "node_modules/@isaacs/cliui": {
- "version": "9.0.0",
- "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz",
- "integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==",
- "dev": true,
- "license": "BlueOak-1.0.0",
- "engines": {
- "node": ">=18"
- }
- },
"node_modules/@isaacs/fs-minipass": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",
@@ -1607,14 +1273,14 @@
}
},
"node_modules/@jsonjoy.com/fs-core": {
- "version": "4.57.2",
- "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-core/-/fs-core-4.57.2.tgz",
- "integrity": "sha512-SVjwklkpIV5wrynpYtuYnfYH1QF4/nDuLBX7VXdb+3miglcAgBVZb/5y0cOsehRV/9Vb+3UqhkMq3/NR3ztdkQ==",
+ "version": "4.57.6",
+ "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-core/-/fs-core-4.57.6.tgz",
+ "integrity": "sha512-uI++Wx6VkBJqVmkb4ZeExwAVpZiA2Do5NrEtXoDk0Pdvce3ytFXJoviT1sLOj16+qDIMnD5nWPfOhVpnDmRJKg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@jsonjoy.com/fs-node-builtins": "4.57.2",
- "@jsonjoy.com/fs-node-utils": "4.57.2",
+ "@jsonjoy.com/fs-node-builtins": "4.57.6",
+ "@jsonjoy.com/fs-node-utils": "4.57.6",
"thingies": "^2.5.0"
},
"engines": {
@@ -1629,15 +1295,15 @@
}
},
"node_modules/@jsonjoy.com/fs-fsa": {
- "version": "4.57.2",
- "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-fsa/-/fs-fsa-4.57.2.tgz",
- "integrity": "sha512-fhO8+iR2I+OCw668ISDJdn1aArc9zx033sWejIyzQ8RBeXa9bDSaUeA3ix0poYOfrj1KdOzytmYNv2/uLDfV6g==",
+ "version": "4.57.6",
+ "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-fsa/-/fs-fsa-4.57.6.tgz",
+ "integrity": "sha512-pKkw/yC5CzSZKhIIUIsH1przOa+K5jGmZIg1sWaSF24JojyrUFbjcQv7QrcGAudriei6HQ6R0BFj+V8NbQinJw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@jsonjoy.com/fs-core": "4.57.2",
- "@jsonjoy.com/fs-node-builtins": "4.57.2",
- "@jsonjoy.com/fs-node-utils": "4.57.2",
+ "@jsonjoy.com/fs-core": "4.57.6",
+ "@jsonjoy.com/fs-node-builtins": "4.57.6",
+ "@jsonjoy.com/fs-node-utils": "4.57.6",
"thingies": "^2.5.0"
},
"engines": {
@@ -1652,17 +1318,17 @@
}
},
"node_modules/@jsonjoy.com/fs-node": {
- "version": "4.57.2",
- "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node/-/fs-node-4.57.2.tgz",
- "integrity": "sha512-nX2AdL6cOFwLdju9G4/nbRnYevmCJbh7N7hvR3gGm97Cs60uEjyd0rpR+YBS7cTg175zzl22pGKXR5USaQMvKg==",
+ "version": "4.57.6",
+ "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node/-/fs-node-4.57.6.tgz",
+ "integrity": "sha512-Kbn1jdkvDN4F2+BhoB6mMu7NCbhP0bgA5NcI1aJj/Q5UcU+I1JLLW+dEQean33iV4tXv35AzBVKPICnDltBpxw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@jsonjoy.com/fs-core": "4.57.2",
- "@jsonjoy.com/fs-node-builtins": "4.57.2",
- "@jsonjoy.com/fs-node-utils": "4.57.2",
- "@jsonjoy.com/fs-print": "4.57.2",
- "@jsonjoy.com/fs-snapshot": "4.57.2",
+ "@jsonjoy.com/fs-core": "4.57.6",
+ "@jsonjoy.com/fs-node-builtins": "4.57.6",
+ "@jsonjoy.com/fs-node-utils": "4.57.6",
+ "@jsonjoy.com/fs-print": "4.57.6",
+ "@jsonjoy.com/fs-snapshot": "4.57.6",
"glob-to-regex.js": "^1.0.0",
"thingies": "^2.5.0"
},
@@ -1678,9 +1344,9 @@
}
},
"node_modules/@jsonjoy.com/fs-node-builtins": {
- "version": "4.57.2",
- "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-builtins/-/fs-node-builtins-4.57.2.tgz",
- "integrity": "sha512-xhiegylRmhw43Ki2HO1ZBL7DQ5ja/qpRsL29VtQ2xuUHiuDGbgf2uD4p9Qd8hJI5P6RCtGYD50IXHXVq/Ocjcg==",
+ "version": "4.57.6",
+ "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-builtins/-/fs-node-builtins-4.57.6.tgz",
+ "integrity": "sha512-V4DgEFT3Cg5S9fCMOZSCVdTxdJWWLBO0WnAazV7hnCM96u5zXHyW/ubDAfcSVwqjkMJ50W1Y44IXtxRoIwaCVg==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -1695,15 +1361,15 @@
}
},
"node_modules/@jsonjoy.com/fs-node-to-fsa": {
- "version": "4.57.2",
- "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-to-fsa/-/fs-node-to-fsa-4.57.2.tgz",
- "integrity": "sha512-18LmWTSONhoAPW+IWRuf8w/+zRolPFGPeGwMxlAhhfY11EKzX+5XHDBPAw67dBF5dxDErHJbl40U+3IXSDRXSQ==",
+ "version": "4.57.6",
+ "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-to-fsa/-/fs-node-to-fsa-4.57.6.tgz",
+ "integrity": "sha512-+JptNw3iifihxH2rEXrninDzX4FFVW8JD/wPR8GbJPAeL9CQUSblrlumOPB5gZuS7tYRX+PJPLtT7XzKoRhv/Q==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@jsonjoy.com/fs-fsa": "4.57.2",
- "@jsonjoy.com/fs-node-builtins": "4.57.2",
- "@jsonjoy.com/fs-node-utils": "4.57.2"
+ "@jsonjoy.com/fs-fsa": "4.57.6",
+ "@jsonjoy.com/fs-node-builtins": "4.57.6",
+ "@jsonjoy.com/fs-node-utils": "4.57.6"
},
"engines": {
"node": ">=10.0"
@@ -1717,13 +1383,13 @@
}
},
"node_modules/@jsonjoy.com/fs-node-utils": {
- "version": "4.57.2",
- "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-utils/-/fs-node-utils-4.57.2.tgz",
- "integrity": "sha512-rsPSJgekz43IlNbLyAM/Ab+ouYLWGp5DDBfYBNNEqDaSpsbXfthBn29Q4muFA9L0F+Z3mKo+CWlgSCXrf+mOyQ==",
+ "version": "4.57.6",
+ "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-utils/-/fs-node-utils-4.57.6.tgz",
+ "integrity": "sha512-foyUrfS7WmYEUzqYXSNxmJBcSj04TABrkpFabwO9SCDCpVCfJ+qG+2sk5FjfiflG2n0SDFZDCJ6vYlJAEpxJFg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@jsonjoy.com/fs-node-builtins": "4.57.2"
+ "@jsonjoy.com/fs-node-builtins": "4.57.6"
},
"engines": {
"node": ">=10.0"
@@ -1737,13 +1403,13 @@
}
},
"node_modules/@jsonjoy.com/fs-print": {
- "version": "4.57.2",
- "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-print/-/fs-print-4.57.2.tgz",
- "integrity": "sha512-wK9NSow48i4DbDl9F1CQE5TqnyZOJ04elU3WFG5aJ76p+YxO/ulyBBQvKsessPxdo381Bc2pcEoyPujMOhcRqQ==",
+ "version": "4.57.6",
+ "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-print/-/fs-print-4.57.6.tgz",
+ "integrity": "sha512-96eAn4Dudtt67LTeuU47yUD+pg9/G/oKpI10zei9ljk3X3WK4lYKc+n3cpaPCAbKPzoyfxl0mXm8f8Y7BOSFXw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@jsonjoy.com/fs-node-utils": "4.57.2",
+ "@jsonjoy.com/fs-node-utils": "4.57.6",
"tree-dump": "^1.1.0"
},
"engines": {
@@ -1758,14 +1424,14 @@
}
},
"node_modules/@jsonjoy.com/fs-snapshot": {
- "version": "4.57.2",
- "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-snapshot/-/fs-snapshot-4.57.2.tgz",
- "integrity": "sha512-GdduDZuoP5V/QCgJkx9+BZ6SC0EZ/smXAdTS7PfMqgMTGXLlt/bH/FqMYaqB9JmLf05sJPtO0XRbAwwkEEPbVw==",
+ "version": "4.57.6",
+ "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-snapshot/-/fs-snapshot-4.57.6.tgz",
+ "integrity": "sha512-V57CMzbOgTzUWGOWQ8GzHQdpJP6JnrYVNCtTBNxVYEnlVRvo4uEJqHhtAT8vhDFrIuJOXLrTL1Fki4h5oI7xxg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@jsonjoy.com/buffers": "^17.65.0",
- "@jsonjoy.com/fs-node-utils": "4.57.2",
+ "@jsonjoy.com/fs-node-utils": "4.57.6",
"@jsonjoy.com/json-pack": "^17.65.0",
"@jsonjoy.com/util": "^17.65.0"
},
@@ -2005,9 +1671,9 @@
}
},
"node_modules/@nodable/entities": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.0.tgz",
- "integrity": "sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.1.tgz",
+ "integrity": "sha512-Pig3HxDIoMgjdEH8OCf/dkcTmLFjJRjWuq8jSnklu284/TKOPibSRERmOykiwmyXTtv61mP+44f3GMx0tLAyjg==",
"funding": [
{
"type": "github",
@@ -2148,24 +1814,6 @@
"node": "^20.17.0 || >=22.9.0"
}
},
- "node_modules/@npmcli/map-workspaces/node_modules/glob": {
- "version": "13.0.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
- "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
- "dev": true,
- "license": "BlueOak-1.0.0",
- "dependencies": {
- "minimatch": "^10.2.2",
- "minipass": "^7.1.3",
- "path-scurry": "^2.0.2"
- },
- "engines": {
- "node": "18 || 20 || >=22"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/@npmcli/metavuln-calculator": {
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-9.0.3.tgz",
@@ -2222,24 +1870,6 @@
"node": "^20.17.0 || >=22.9.0"
}
},
- "node_modules/@npmcli/package-json/node_modules/glob": {
- "version": "13.0.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
- "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
- "dev": true,
- "license": "BlueOak-1.0.0",
- "dependencies": {
- "minimatch": "^10.2.2",
- "minipass": "^7.1.3",
- "path-scurry": "^2.0.2"
- },
- "engines": {
- "node": "18 || 20 || >=22"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/@npmcli/promise-spawn": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-9.0.1.tgz",
@@ -2294,9 +1924,9 @@
}
},
"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==",
+ "version": "0.133.0",
+ "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz",
+ "integrity": "sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==",
"dev": true,
"license": "MIT",
"funding": {
@@ -2304,9 +1934,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.3.tgz",
+ "integrity": "sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==",
"cpu": [
"arm64"
],
@@ -2321,9 +1951,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.3.tgz",
+ "integrity": "sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==",
"cpu": [
"arm64"
],
@@ -2338,9 +1968,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.3.tgz",
+ "integrity": "sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==",
"cpu": [
"x64"
],
@@ -2355,9 +1985,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.3.tgz",
+ "integrity": "sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==",
"cpu": [
"x64"
],
@@ -2372,9 +2002,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.3.tgz",
+ "integrity": "sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==",
"cpu": [
"arm"
],
@@ -2389,9 +2019,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.3.tgz",
+ "integrity": "sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==",
"cpu": [
"arm64"
],
@@ -2406,9 +2036,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.3.tgz",
+ "integrity": "sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==",
"cpu": [
"arm64"
],
@@ -2423,9 +2053,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.3.tgz",
+ "integrity": "sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==",
"cpu": [
"ppc64"
],
@@ -2440,9 +2070,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.3.tgz",
+ "integrity": "sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==",
"cpu": [
"s390x"
],
@@ -2457,9 +2087,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.3.tgz",
+ "integrity": "sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==",
"cpu": [
"x64"
],
@@ -2474,9 +2104,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.3.tgz",
+ "integrity": "sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==",
"cpu": [
"x64"
],
@@ -2491,9 +2121,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.3.tgz",
+ "integrity": "sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==",
"cpu": [
"arm64"
],
@@ -2508,9 +2138,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.3.tgz",
+ "integrity": "sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==",
"cpu": [
"wasm32"
],
@@ -2527,9 +2157,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.3.tgz",
+ "integrity": "sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==",
"cpu": [
"arm64"
],
@@ -2544,9 +2174,9 @@
}
},
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.3.tgz",
+ "integrity": "sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==",
"cpu": [
"x64"
],
@@ -2561,9 +2191,9 @@
}
},
"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==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz",
+ "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==",
"dev": true,
"license": "MIT"
},
@@ -2688,31 +2318,14 @@
"node": ">=4"
}
},
- "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": {
- "@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.24.1",
- "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.24.1.tgz",
- "integrity": "sha512-3mT7o4qQyUWttYnVK3A0Z/u3Xha3E81tXn32Tz6vjZiUXhBrkEivpw1hBYfh84iFF9CSzkBU9Y1DJ3Q6RQ231g==",
+ "version": "3.24.6",
+ "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.24.6.tgz",
+ "integrity": "sha512-wBXDRup6UU97VKyaiRo8AssnfStPtG0oAAfpq/bC0a1YYau8pM86YB4kM6ccoVi1mS8l/UHbn9oDM+7uozr/ug==",
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/crc32": "5.2.0",
- "@smithy/types": "^4.14.1",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -2720,15 +2333,13 @@
}
},
"node_modules/@smithy/credential-provider-imds": {
- "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==",
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.3.7.tgz",
+ "integrity": "sha512-xj8gq/bjFABAh6qWPSDCYcY3kzQIm4b561C+YnHH4zGq8rOgzQ3Shk+JGlpUxSd41UGiO6FkLdUCtNX1FAeHgg==",
"license": "Apache-2.0",
"dependencies": {
- "@smithy/node-config-provider": "^4.3.14",
- "@smithy/property-provider": "^4.2.14",
- "@smithy/types": "^4.14.1",
- "@smithy/url-parser": "^4.2.14",
+ "@smithy/core": "^3.24.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -2736,43 +2347,13 @@
}
},
"node_modules/@smithy/fetch-http-handler": {
- "version": "5.3.17",
- "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.17.tgz",
- "integrity": "sha512-bXOvQzaSm6MnmLaWA1elgfQcAtN4UP3vXqV97bHuoOrHQOJiLT3ds6o9eo5bqd0TJfRFpzdGnDQdW3FACiAVdw==",
+ "version": "5.4.6",
+ "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.4.6.tgz",
+ "integrity": "sha512-FEwEYJ1jlBKdhe9TPzfghEi1bP55ZeEImlDkEa62bBBYzUcnB6RUCyuiS2mqKt6ZVjUbBgcNhzfIctH+Hevx9g==",
"license": "Apache-2.0",
"dependencies": {
- "@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",
+ "@smithy/core": "^3.24.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -2780,122 +2361,25 @@
}
},
"node_modules/@smithy/is-array-buffer": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.2.tgz",
- "integrity": "sha512-n6rQ4N8Jj4YTQO3YFrlgZuwKodf4zUFs7EJIWH86pSCWBaAtAGBFfCM7Wx6D2bBJ2xqFNxGBSrUWswT3M0VJow==",
+ "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": ">=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.7",
- "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.5.7.tgz",
- "integrity": "sha512-bRt6ZImqVSeTk39Nm81K20ObIiAZ3WefY7G6+iz/0tZjs4dgRRjvRX2sgsH+zi6iDCRR/aQvQofLKxxz4rPBZg==",
- "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.6",
- "@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": ">=14.0.0"
}
},
"node_modules/@smithy/node-http-handler": {
- "version": "4.7.1",
- "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.7.1.tgz",
- "integrity": "sha512-BdEYko85f/ldp68uH8XEyIvo810xFk6eyPH81SRggTOApYHWA+Xu7B2EzLuHbe37WVLaUA7F1fWR3/zBeme2WA==",
+ "version": "4.7.6",
+ "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.7.6.tgz",
+ "integrity": "sha512-3fya8i7GrJilQouk4cZJKdy5k8MWQBpjfXrRNaXDedH8r779tr0jcxyH3+yoTmsluc2+vF4S343yFbnvu8ExDQ==",
"license": "Apache-2.0",
"dependencies": {
- "@smithy/core": "^3.24.1",
- "@smithy/types": "^4.14.1",
+ "@smithy/core": "^3.24.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -2903,77 +2387,13 @@
}
},
"node_modules/@smithy/property-provider": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.3.1.tgz",
- "integrity": "sha512-3NHoqVBhzpY2b4YBx9AqyKC4C8nnEjl5FyKuxrCjvnjinG0ODj+yg1xX360nNahT6wghYjSw1SooCt3kIdnqIA==",
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.3.6.tgz",
+ "integrity": "sha512-0rhHv1Ww27kajF6qewme2aRtJmKFtSwE6EZ2dj5KxdX/R3ANsUugqTnH0tvpZwGiQ3MOMhetuCGFAeKVv3/Onw==",
+ "dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@smithy/core": "^3.24.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",
+ "@smithy/core": "^3.24.6",
"tslib": "^2.6.2"
},
"engines": {
@@ -2981,36 +2401,13 @@
}
},
"node_modules/@smithy/signature-v4": {
- "version": "5.3.14",
- "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.14.tgz",
- "integrity": "sha512-1D9Y/nmlVjCeSivCbhZ7hgEpmHyY1h0GvpSZt3l0xcD9JjmjVC1CHOozS6+Gh+/ldMH8JuJ6cujObQqfayAVFA==",
+ "version": "5.4.6",
+ "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.4.6.tgz",
+ "integrity": "sha512-Ojg4B6oIDlIr1R86xCDJt1zJWnYa0VINmqdjfe9qxWjdRivHalZ3iSlQgVqYbW0MdpFOC5XfHEWsnbmdnpIILQ==",
"license": "Apache-2.0",
"dependencies": {
- "@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",
+ "@smithy/core": "^3.24.6",
+ "@smithy/types": "^4.14.3",
"tslib": "^2.6.2"
},
"engines": {
@@ -3018,61 +2415,9 @@
}
},
"node_modules/@smithy/types": {
- "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==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.14.3.tgz",
+ "integrity": "sha512-YupL0ZWmFtJexUN2cHzkvvF/b9pKrtAIfT1o7/oY/Ppu8IYeZ+lDPM5vZdQJaSeA132dJCqojjGC9NhXeF71VQ==",
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.6.2"
@@ -3082,170 +2427,29 @@
}
},
"node_modules/@smithy/util-buffer-from": {
- "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==",
+ "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": "^4.2.2",
+ "@smithy/is-array-buffer": "^2.2.0",
"tslib": "^2.6.2"
},
"engines": {
- "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.8",
- "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.3.8.tgz",
- "integrity": "sha512-LUIxbTBi+OpvXpg91poGA6BdyoleMDLnfXjVDqyi2RvZmTveY5loE/FgYUBCR5LU2BThW2SoZRh8dTIIy38IPw==",
- "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": ">=14.0.0"
}
},
"node_modules/@smithy/util-utf8": {
- "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==",
+ "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": "^4.2.2",
+ "@smithy/util-buffer-from": "^2.2.0",
"tslib": "^2.6.2"
},
"engines": {
- "node": ">=18.0.0"
- }
- },
- "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": ">=14.0.0"
}
},
"node_modules/@standard-schema/spec": {
@@ -3347,13 +2551,13 @@
"license": "MIT"
},
"node_modules/@types/node": {
- "version": "25.7.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-25.7.0.tgz",
- "integrity": "sha512-z+pdZyxE+RTQE9AcboAZCb4otwcrvgHD+GlBpPgn0emDVt0ohrTMhAwlr2Wd9nZ+nihhYFxO2pThz3C5qSu2Eg==",
+ "version": "25.9.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.1.tgz",
+ "integrity": "sha512-xfrlY7UD5rMJk3ZVJP8BNzS28J36YJg+xp+LPXV1TdWxr8uMH5A860QNxYDGQe/ylDSgjxE52Q9VnO7p75tJxg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "undici-types": "~7.21.0"
+ "undici-types": ">=7.24.0 <7.24.7"
}
},
"node_modules/@types/normalize-package-data": {
@@ -3388,14 +2592,14 @@
"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": "4.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.8.tgz",
+ "integrity": "sha512-lt3kovsyHwYe00wq4D1ti0Z974fWj4NLp6siqiyEufUpyFwK9Yhi7rBhac9JL5aA0zoMrJqc4vYPZRUnI7l7nw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@bcoe/v8-coverage": "^1.0.2",
- "@vitest/utils": "4.1.6",
+ "@vitest/utils": "4.1.8",
"ast-v8-to-istanbul": "^1.0.0",
"istanbul-lib-coverage": "^3.2.2",
"istanbul-lib-report": "^3.0.1",
@@ -3409,8 +2613,8 @@
"url": "https://opencollective.com/vitest"
},
"peerDependencies": {
- "@vitest/browser": "4.1.6",
- "vitest": "4.1.6"
+ "@vitest/browser": "4.1.8",
+ "vitest": "4.1.8"
},
"peerDependenciesMeta": {
"@vitest/browser": {
@@ -3418,17 +2622,45 @@
}
}
},
+ "node_modules/@vitest/coverage-v8/node_modules/@vitest/pretty-format": {
+ "version": "4.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.8.tgz",
+ "integrity": "sha512-9GasEBxpZ1VYIpqHf/0+YGg121uSNwCKOJqIrTwWP/TB7DmFCiaBpNl3aPZzoLWfWkuqhbH8vJIVobZkvdo2cA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "tinyrainbow": "^3.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
+ },
+ "node_modules/@vitest/coverage-v8/node_modules/@vitest/utils": {
+ "version": "4.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.8.tgz",
+ "integrity": "sha512-uOJamYALNhfJ6iolExyQM40yIQwDqYnkKtQ5VCiSe17E33H0aQ/u+1GlRuz4LZBk6Mm3sg90G9hEbmEt37C1Zg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@vitest/pretty-format": "4.1.8",
+ "convert-source-map": "^2.0.0",
+ "tinyrainbow": "^3.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ }
+ },
"node_modules/@vitest/expect": {
- "version": "4.1.6",
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.6.tgz",
- "integrity": "sha512-7EHDquPthALSV0jhhjgEW8FXaviMx7rSqu8W6oqCoAuOhKov814P99QDV1pxMA3QPv21YudvJngIhjrNI4opLg==",
+ "version": "4.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.8.tgz",
+ "integrity": "sha512-h3nDO677RDLEGlBxyQ5CW8RlMThSKSRLUePLOx09gNIWRL40edgA1GCZSZgf1W55MFAG6/Sw14KeaAnqv0NKdQ==",
"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",
+ "@vitest/spy": "4.1.8",
+ "@vitest/utils": "4.1.8",
"chai": "^6.2.2",
"tinyrainbow": "^3.1.0"
},
@@ -3437,13 +2669,13 @@
}
},
"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": "4.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.8.tgz",
+ "integrity": "sha512-LEiN/xe4OSIbKe9HQIp5OC24agGD9J5CnmMgsLohVVoOPWL9a2sBoR6VBx43jQZb7Kr1l4RCuyCJzcAa0+dojw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/spy": "4.1.6",
+ "@vitest/spy": "4.1.8",
"estree-walker": "^3.0.3",
"magic-string": "^0.30.21"
},
@@ -3464,9 +2696,9 @@
}
},
"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": "4.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.8.tgz",
+ "integrity": "sha512-9GasEBxpZ1VYIpqHf/0+YGg121uSNwCKOJqIrTwWP/TB7DmFCiaBpNl3aPZzoLWfWkuqhbH8vJIVobZkvdo2cA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3477,13 +2709,13 @@
}
},
"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": "4.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.8.tgz",
+ "integrity": "sha512-EmVxeBAfMJvycdjd6Hm+RbFBbA9fKvo0Kx37hNpBYoYeavH3RNsBXWDooR1mgD52dCrxIIuP7UotpfiwOikvcg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/utils": "4.1.6",
+ "@vitest/utils": "4.1.8",
"pathe": "^2.0.3"
},
"funding": {
@@ -3491,14 +2723,14 @@
}
},
"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": "4.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.8.tgz",
+ "integrity": "sha512-acfZboRmAIf05DEKcBQy33VXojFJjtUdLyo7oOmV9kebb2xdU01UknNiPuPZoJZQyO7DF0gZdTGTpeAzET9QPQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/pretty-format": "4.1.6",
- "@vitest/utils": "4.1.6",
+ "@vitest/pretty-format": "4.1.8",
+ "@vitest/utils": "4.1.8",
"magic-string": "^0.30.21",
"pathe": "^2.0.3"
},
@@ -3507,9 +2739,9 @@
}
},
"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": "4.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.8.tgz",
+ "integrity": "sha512-6EevtBp6OZOPF7bmz36HrGMeP3txgVSrgebWxHOafDXGkhIzfXK14f8KF6MuFfgXXUeHxmpD3BQxkV00/3s5mA==",
"dev": true,
"license": "MIT",
"funding": {
@@ -3517,13 +2749,13 @@
}
},
"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": "4.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.8.tgz",
+ "integrity": "sha512-uOJamYALNhfJ6iolExyQM40yIQwDqYnkKtQ5VCiSe17E33H0aQ/u+1GlRuz4LZBk6Mm3sg90G9hEbmEt37C1Zg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/pretty-format": "4.1.6",
+ "@vitest/pretty-format": "4.1.8",
"convert-source-map": "^2.0.0",
"tinyrainbow": "^3.1.0"
},
@@ -3806,24 +3038,6 @@
"node": "^20.17.0 || >=22.9.0"
}
},
- "node_modules/cacache/node_modules/glob": {
- "version": "13.0.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
- "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
- "dev": true,
- "license": "BlueOak-1.0.0",
- "dependencies": {
- "minimatch": "^10.2.2",
- "minipass": "^7.1.3",
- "path-scurry": "^2.0.2"
- },
- "engines": {
- "node": "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",
@@ -4399,44 +3613,6 @@
}
}
},
- "node_modules/cross-spawn": {
- "version": "7.0.6",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
- "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "engines": {
- "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",
@@ -4988,9 +4164,9 @@
"license": "Apache-2.0"
},
"node_modules/fast-xml-builder": {
- "version": "1.1.9",
- "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.9.tgz",
- "integrity": "sha512-jcyKVSEX13iseJqg7n/KWw+xnu/7fdrZ333Fac54KjHDIELVCfDDJXYIm6DTJ0Su4gSzrhqiK0DzY/wZbF40mw==",
+ "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==",
"funding": [
{
"type": "github",
@@ -4999,13 +4175,14 @@
],
"license": "MIT",
"dependencies": {
- "path-expression-matcher": "^1.1.3"
+ "path-expression-matcher": "^1.5.0",
+ "xml-naming": "^0.1.0"
}
},
"node_modules/fast-xml-parser": {
- "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==",
+ "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==",
"funding": [
{
"type": "github",
@@ -5015,7 +4192,7 @@
"license": "MIT",
"dependencies": {
"@nodable/entities": "^2.1.0",
- "fast-xml-builder": "^1.1.5",
+ "fast-xml-builder": "^1.1.7",
"path-expression-matcher": "^1.5.0",
"strnum": "^2.2.3"
},
@@ -5074,23 +4251,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/foreground-child": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
- "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "cross-spawn": "^7.0.6",
- "signal-exit": "^4.0.1"
- },
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/fs-minipass": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz",
@@ -5130,9 +4290,9 @@
}
},
"node_modules/generate-license-file": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/generate-license-file/-/generate-license-file-4.1.1.tgz",
- "integrity": "sha512-hh2UnFsUiUkw/NdO1tdwBM4xVKnFPHEnR+2yU9NxDLIupIQNRZf4i0UpzGdJu1wUTSzlMHzy4C+2xv+Tex9suA==",
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/generate-license-file/-/generate-license-file-4.2.1.tgz",
+ "integrity": "sha512-0As00it8cbFYxp8W5vFqGgyEDgsNFoTMycoIMChmPqmw9ablhWHdO78KzjkedUnszWpLdTspby+tEV4WI0KscA==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -5142,11 +4302,11 @@
"commander": "^14.0.2",
"cosmiconfig": "^9.0.0",
"enquirer": "^2.3.6",
- "glob": "^11.0.0",
+ "glob": "^13.0.0",
"json5": "^2.2.3",
"ora": "^5.4.1",
"tslib": "^2.3.0",
- "zod": "^3.21.4"
+ "zod": "^4.0.0"
},
"bin": {
"generate-license-file": "bin/generate-license-file"
@@ -5366,25 +4526,18 @@
"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": "13.0.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
+ "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
- "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"
+ "minimatch": "^10.2.2",
+ "minipass": "^7.1.3",
+ "path-scurry": "^2.0.2"
},
"engines": {
- "node": "20 || >=22"
+ "node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
@@ -5842,22 +4995,6 @@
"node": ">=8"
}
},
- "node_modules/jackspeak": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz",
- "integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==",
- "dev": true,
- "license": "BlueOak-1.0.0",
- "dependencies": {
- "@isaacs/cliui": "^9.0.0"
- },
- "engines": {
- "node": "20 || >=22"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/js-tokens": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz",
@@ -6561,20 +5698,20 @@
"license": "MIT"
},
"node_modules/memfs": {
- "version": "4.57.2",
- "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.57.2.tgz",
- "integrity": "sha512-2nWzSsJzrukurSDna4Z0WywuScK4Id3tSKejgu74u8KCdW4uNrseKRSIDg75C6Yw5ZRqBe0F0EtMNlTbUq8bAQ==",
+ "version": "4.57.6",
+ "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.57.6.tgz",
+ "integrity": "sha512-WQK+DGjKCnPdpSyJUXphz+COF2uEhhsxQ3VIWBSbzpbbXuch3h4FePMqXrXGdLjsTgo4JFzBFsP6AWd9pVazGw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@jsonjoy.com/fs-core": "4.57.2",
- "@jsonjoy.com/fs-fsa": "4.57.2",
- "@jsonjoy.com/fs-node": "4.57.2",
- "@jsonjoy.com/fs-node-builtins": "4.57.2",
- "@jsonjoy.com/fs-node-to-fsa": "4.57.2",
- "@jsonjoy.com/fs-node-utils": "4.57.2",
- "@jsonjoy.com/fs-print": "4.57.2",
- "@jsonjoy.com/fs-snapshot": "4.57.2",
+ "@jsonjoy.com/fs-core": "4.57.6",
+ "@jsonjoy.com/fs-fsa": "4.57.6",
+ "@jsonjoy.com/fs-node": "4.57.6",
+ "@jsonjoy.com/fs-node-builtins": "4.57.6",
+ "@jsonjoy.com/fs-node-to-fsa": "4.57.6",
+ "@jsonjoy.com/fs-node-utils": "4.57.6",
+ "@jsonjoy.com/fs-print": "4.57.6",
+ "@jsonjoy.com/fs-snapshot": "4.57.6",
"@jsonjoy.com/json-pack": "^1.11.0",
"@jsonjoy.com/util": "^1.9.0",
"glob-to-regex.js": "^1.0.1",
@@ -7952,13 +7089,6 @@
"quickjs-wasi": "^2.2.0"
}
},
- "node_modules/package-json-from-dist": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
- "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
- "dev": true,
- "license": "BlueOak-1.0.0"
- },
"node_modules/pacote": {
"version": "21.5.0",
"resolved": "https://registry.npmjs.org/pacote/-/pacote-21.5.0.tgz",
@@ -8090,16 +7220,6 @@
"node": ">=14.0.0"
}
},
- "node_modules/path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
@@ -8196,9 +7316,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.15",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz",
+ "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==",
"dev": true,
"funding": [
{
@@ -8216,7 +7336,7 @@
],
"license": "MIT",
"dependencies": {
- "nanoid": "^3.3.11",
+ "nanoid": "^3.3.12",
"picocolors": "^1.1.1",
"source-map-js": "^1.2.1"
},
@@ -8644,14 +7764,14 @@
"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==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.3.tgz",
+ "integrity": "sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@oxc-project/types": "=0.129.0",
- "@rolldown/pluginutils": "1.0.0"
+ "@oxc-project/types": "=0.133.0",
+ "@rolldown/pluginutils": "^1.0.0"
},
"bin": {
"rolldown": "bin/cli.mjs"
@@ -8660,21 +7780,21 @@
"node": "^20.19.0 || >=22.12.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"
+ "@rolldown/binding-android-arm64": "1.0.3",
+ "@rolldown/binding-darwin-arm64": "1.0.3",
+ "@rolldown/binding-darwin-x64": "1.0.3",
+ "@rolldown/binding-freebsd-x64": "1.0.3",
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.3",
+ "@rolldown/binding-linux-arm64-gnu": "1.0.3",
+ "@rolldown/binding-linux-arm64-musl": "1.0.3",
+ "@rolldown/binding-linux-ppc64-gnu": "1.0.3",
+ "@rolldown/binding-linux-s390x-gnu": "1.0.3",
+ "@rolldown/binding-linux-x64-gnu": "1.0.3",
+ "@rolldown/binding-linux-x64-musl": "1.0.3",
+ "@rolldown/binding-openharmony-arm64": "1.0.3",
+ "@rolldown/binding-wasm32-wasi": "1.0.3",
+ "@rolldown/binding-win32-arm64-msvc": "1.0.3",
+ "@rolldown/binding-win32-x64-msvc": "1.0.3"
}
},
"node_modules/run-con": {
@@ -8745,29 +7865,6 @@
"node": ">=10"
}
},
- "node_modules/shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "shebang-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/siginfo": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
@@ -9205,9 +8302,9 @@
}
},
"node_modules/strnum": {
- "version": "2.2.3",
- "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.3.tgz",
- "integrity": "sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.3.0.tgz",
+ "integrity": "sha512-ums3KNd42PGyx5xaoVTO1mjU1bH3NpY4vsrVlnv9PNGqQj8wd7rJ6nEypLrJ7z5vxK5RP0yMLo6J/Gsm62DI5Q==",
"funding": [
{
"type": "github",
@@ -9311,9 +8408,9 @@
"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": "1.2.2",
+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.2.tgz",
+ "integrity": "sha512-M/Q0B2cp4K7kynaT/vnED1j8TlLY+Pp7C6Wl2bl/7u/F0mUVwdyOpwomQb8JpYLitHUssAJRmLZdMCGsrx7i+g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -9321,9 +8418,9 @@
}
},
"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.17",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -9489,9 +8586,9 @@
}
},
"node_modules/undici-types": {
- "version": "7.21.0",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.21.0.tgz",
- "integrity": "sha512-w9IMgQrz4O0YN1LtB7K5P63vhlIOvC7opSmouCJ+ZywlPAlO9gIkJ+otk6LvGpAs2wg4econaCz3TvQ9xPoyuQ==",
+ "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==",
"dev": true,
"license": "MIT"
},
@@ -9535,17 +8632,17 @@
}
},
"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": "8.0.16",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz",
+ "integrity": "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==",
"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"
+ "postcss": "^8.5.15",
+ "rolldown": "1.0.3",
+ "tinyglobby": "^0.2.17"
},
"bin": {
"vite": "bin/vite.js"
@@ -9613,19 +8710,19 @@
}
},
"node_modules/vitest": {
- "version": "4.1.6",
- "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.6.tgz",
- "integrity": "sha512-6lvjbS3p9b4CrdCmguzbh2/4uoXhGE2q71R4OX5sqF9R1bo9Xd6fGrMAfvp5wnCzlBnFVdCOp6onuTQVbo8iUQ==",
+ "version": "4.1.8",
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.8.tgz",
+ "integrity": "sha512-flY6ScbCIt9HThs+C5HS7jvGOB560DJtk/Z15IQROTA6zEy49Nh8T/dofWTQL+n3vswqn87sbJNiuqw1SDp5Ig==",
"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",
+ "@vitest/expect": "4.1.8",
+ "@vitest/mocker": "4.1.8",
+ "@vitest/pretty-format": "4.1.8",
+ "@vitest/runner": "4.1.8",
+ "@vitest/snapshot": "4.1.8",
+ "@vitest/spy": "4.1.8",
+ "@vitest/utils": "4.1.8",
"es-module-lexer": "^2.0.0",
"expect-type": "^1.3.0",
"magic-string": "^0.30.21",
@@ -9653,12 +8750,12 @@
"@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",
+ "@vitest/browser-playwright": "4.1.8",
+ "@vitest/browser-preview": "4.1.8",
+ "@vitest/browser-webdriverio": "4.1.8",
+ "@vitest/coverage-istanbul": "4.1.8",
+ "@vitest/coverage-v8": "4.1.8",
+ "@vitest/ui": "4.1.8",
"happy-dom": "*",
"jsdom": "*",
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
@@ -9808,6 +8905,21 @@
"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",
@@ -9896,9 +9008,9 @@
}
},
"node_modules/zod": {
- "version": "3.25.76",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
- "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
+ "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
"dev": true,
"license": "MIT",
"funding": {
diff --git a/package.json b/package.json
index 15f39a5..027fa25 100644
--- a/package.json
+++ b/package.json
@@ -1,11 +1,11 @@
{
"name": "configure-aws-credentials",
"description": "A GitHub Action to configure AWS credentials",
- "version": "6.1.1",
+ "version": "6.2.0",
"scripts": {
"build": "tsc",
- "lint": "biome check --error-on-warnings ./src && markdownlint -i node_modules -i CHANGELOG.md '**/*.md'",
- "lint:fix": "biome check --write ./src && markdownlint -i node_modules -i CHANGELOG.md -f '**/*.md'",
+ "lint": "biome check --error-on-warnings ./src ./test && markdownlint -i node_modules -i CHANGELOG.md '**/*.md'",
+ "lint:fix": "biome check --write ./src ./test && markdownlint -i node_modules -i CHANGELOG.md -f '**/*.md'",
"package": "esbuild src/index.ts --bundle --platform=node --target=node24 --outfile=dist/index.js && esbuild src/cleanup/index.ts --bundle --platform=node --target=node24 --outfile=dist/cleanup/index.js && npm run license",
"test": "npm run lint && vitest run && npm run build",
"clean": "del-cli coverage test-reports node_modules",
@@ -17,25 +17,25 @@
"organization": true
},
"devDependencies": {
- "@aws-sdk/credential-provider-env": "^3.972.32",
- "@biomejs/biome": "2.4.15",
- "@smithy/property-provider": "^4.3.1",
- "@types/node": "^25.7.0",
- "@vitest/coverage-v8": "^4.1.6",
+ "@aws-sdk/credential-provider-env": "^3.972.39",
+ "@biomejs/biome": "2.4.16",
+ "@smithy/property-provider": "^4.3.6",
+ "@types/node": "^25.9.1",
+ "@vitest/coverage-v8": "4.1.8",
"aws-sdk-client-mock": "^4.1.0",
"esbuild": "^0.28.0",
- "generate-license-file": "^4.1.1",
+ "generate-license-file": "^4.2.1",
"json-schema": "^0.4.0",
"markdownlint-cli": "^0.48.0",
- "memfs": "^4.57.2",
+ "memfs": "^4.57.6",
"standard-version": "^9.5.0",
"typescript": "^6.0.3",
- "vitest": "^4.1.5"
+ "vitest": "4.1.8"
},
"dependencies": {
"@actions/core": "^3.0.1",
- "@aws-sdk/client-sts": "^3.1045.0",
- "@smithy/node-http-handler": "^4.7.1",
+ "@aws-sdk/client-sts": "^3.1061.0",
+ "@smithy/node-http-handler": "^4.7.3",
"proxy-agent": "^8.0.1"
},
"keywords": [
diff --git a/src/assumeRole.ts b/src/assumeRole.ts
index 700532b..95f6bdc 100644
--- a/src/assumeRole.ts
+++ b/src/assumeRole.ts
@@ -1,11 +1,14 @@
import assert from 'node:assert';
-import fs from 'node:fs';
import path from 'node:path';
import * as core from '@actions/core';
import type { AssumeRoleCommandInput, STSClient, Tag } from '@aws-sdk/client-sts';
-import { AssumeRoleCommand, AssumeRoleWithWebIdentityCommand } from '@aws-sdk/client-sts';
+import {
+ AssumeRoleCommand,
+ AssumeRoleWithWebIdentityCommand,
+ PackedPolicyTooLargeException,
+} from '@aws-sdk/client-sts';
import type { CredentialsClient } from './CredentialsClient';
-import { errorMessage, isDefined, sanitizeGitHubVariables } from './helpers';
+import { errorMessage, isDefined, readFileUtf8, sanitizeGitHubVariables } from './helpers';
async function assumeRoleWithOIDC(params: AssumeRoleCommandInput, client: STSClient, webIdentityToken: string) {
delete params.Tags;
@@ -36,13 +39,14 @@ async function assumeRoleWithWebIdentityTokenFile(
const webIdentityTokenFilePath = path.isAbsolute(webIdentityTokenFile)
? webIdentityTokenFile
: path.join(workspace, webIdentityTokenFile);
- if (!fs.existsSync(webIdentityTokenFilePath)) {
+ const webIdentityToken = readFileUtf8(webIdentityTokenFilePath);
+ if (webIdentityToken === null) {
throw new Error(`Web identity token file does not exist: ${webIdentityTokenFilePath}`);
}
core.info('Assuming role with web identity token file');
try {
- const webIdentityToken = fs.readFileSync(webIdentityTokenFilePath, 'utf8');
delete params.Tags;
+ delete params.TransitiveTagKeys;
const creds = await client.send(
new AssumeRoleWithWebIdentityCommand({
...params,
@@ -61,6 +65,13 @@ async function assumeRoleWithCredentials(params: AssumeRoleCommandInput, client:
const creds = await client.send(new AssumeRoleCommand({ ...params }));
return creds;
} catch (error) {
+ if (error instanceof PackedPolicyTooLargeException) {
+ core.info('Session tag size is too large; dropping droppable tags and retrying.');
+ const droppableKeys = new Set(DROPPABLE_TAG_SOURCES.map((s) => s.key));
+ params.Tags = params.Tags?.filter((tag) => !droppableKeys.has(tag.Key ?? ''));
+ const creds = await client.send(new AssumeRoleCommand({ ...params }));
+ return creds;
+ }
throw new Error(`Could not assume role with user credentials: ${errorMessage(error)}`);
}
}
@@ -87,8 +98,8 @@ 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 }> = [
+// Identity/audit primitives. Always emitted and cannot be dropped.
+const NON_DROPPABLE_TAG_SOURCES: ReadonlyArray<{ key: string; envVar: string }> = [
{ key: 'Repository', envVar: 'GITHUB_REPOSITORY' },
{ key: 'Workflow', envVar: 'GITHUB_WORKFLOW' },
{ key: 'Action', envVar: 'GITHUB_ACTION' },
@@ -97,21 +108,22 @@ const PROTECTED_TAG_SOURCES: ReadonlyArray<{ key: string; envVar: string }> = [
{ 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 }> = [
+// Convenience metadata. If the AssumeRole call fails due to compressed size of
+// session tags being too large, we will drop these tags and retry once.
+const DROPPABLE_TAG_SOURCES: 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)]);
+const PROTECTED_TAG_KEYS = new Set([
+ 'GitHub',
+ ...NON_DROPPABLE_TAG_SOURCES.map((s) => s.key),
+ ...DROPPABLE_TAG_SOURCES.map((s) => s.key),
+]);
export function parseAndValidateCustomTags(customTags: string, existingTags: Tag[]): Tag[] {
let parsed: unknown;
@@ -198,7 +210,13 @@ export async function assumeRole(params: assumeRoleParams) {
// 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) {
+ for (const { key, envVar } of NON_DROPPABLE_TAG_SOURCES) {
+ const value = process.env[envVar];
+ if (value) {
+ protectedTags.push({ Key: key, Value: sanitizeGitHubVariables(value) });
+ }
+ }
+ for (const { key, envVar } of DROPPABLE_TAG_SOURCES) {
const value = process.env[envVar];
if (value) {
protectedTags.push({ Key: key, Value: sanitizeGitHubVariables(value) });
@@ -206,26 +224,15 @@ export async function assumeRole(params: assumeRoleParams) {
}
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 tagArray: Tag[] = [...protectedTags, ...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(JSON.stringify(tagArray));
}
//only populate transitiveTagKeys array if user is actually using session tagging
diff --git a/src/helpers.ts b/src/helpers.ts
index 7fa5298..4ad21e3 100644
--- a/src/helpers.ts
+++ b/src/helpers.ts
@@ -1,3 +1,5 @@
+import * as fs from 'node:fs';
+import * as path from 'node:path';
import * as core from '@actions/core';
import type { Credentials, STSClient } from '@aws-sdk/client-sts';
import { GetCallerIdentityCommand } from '@aws-sdk/client-sts';
@@ -291,3 +293,106 @@ export function getBooleanInput(name: string, options?: core.InputOptions & { de
`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``,
);
}
+
+// O_NOFOLLOW is undefined on Windows. This sets it to 0 if it's not defined.
+const O_NOFOLLOW: number = (fs.constants as { O_NOFOLLOW?: number }).O_NOFOLLOW ?? 0;
+
+export function isAllowListed(filePath: string): boolean {
+ // Kubelet projects service-account tokens through a symlink chain
+ // (token -> ..data/token, ..data -> ../). The containing path is
+ // kubelet-controlled, so we allow symlink-following reads of this fixed
+ // location only.
+ const KUBERNETES_TOKEN_PATH_REGEX = /^\/var\/run\/secrets\/[^/]+\/serviceaccount\/token$/;
+
+ if (process.platform !== 'win32') {
+ // No Kubernetes token paths on Windows
+ return KUBERNETES_TOKEN_PATH_REGEX.test(path.posix.normalize(filePath));
+ }
+ return false;
+}
+
+export function isSymlink(filePath: string): boolean {
+ try {
+ return fs.lstatSync(filePath).isSymbolicLink();
+ } catch (err) {
+ if ((err as NodeJS.ErrnoException).code === 'ENOENT') return false;
+ throw err;
+ }
+}
+
+// Refuses if filePath or its parent directory is a symbolic link.
+function refuseSymlinkOnPath(filePath: string): void {
+ const parent = path.dirname(filePath);
+ if (parent !== filePath && isSymlink(parent)) {
+ throw new Error(`Refusing ${filePath} (parent directory is a symbolic link)`);
+ }
+ if (isSymlink(filePath)) {
+ throw new Error(`Refusing ${filePath} (path is a symbolic link)`);
+ }
+}
+
+function assertRegularFile(fd: number, filePath: string): void {
+ const stats = fs.fstatSync(fd);
+ if (!stats.isFile()) {
+ throw new Error(`${filePath} (path is not a regular file)`);
+ }
+}
+
+// ENOENT: file does not exist
+// ELOOP: too many symbolic links (from NOFOLLOW)
+
+export function readFileUtf8(filePath: string): string | null {
+ const allowSymlink = isAllowListed(filePath);
+ if (!allowSymlink) {
+ refuseSymlinkOnPath(filePath);
+ }
+ const openFlags = fs.constants.O_RDONLY | (allowSymlink ? 0 : O_NOFOLLOW);
+ let fd: number;
+ try {
+ fd = fs.openSync(filePath, openFlags);
+ } catch (err) {
+ const code = (err as NodeJS.ErrnoException).code;
+ if (code === 'ENOENT') return null;
+ if (code === 'ELOOP') {
+ throw new Error(`Refusing ${filePath} (path is a symbolic link)`);
+ }
+ throw err;
+ }
+ try {
+ assertRegularFile(fd, filePath);
+ return fs.readFileSync(fd, 'utf-8');
+ } finally {
+ fs.closeSync(fd);
+ }
+}
+
+export function writeFileUtf8(filePath: string, content: string, mode = 0o600): void {
+ refuseSymlinkOnPath(filePath);
+ let fd: number;
+ try {
+ fd = fs.openSync(filePath, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_TRUNC | O_NOFOLLOW, mode);
+ } catch (err) {
+ if ((err as NodeJS.ErrnoException).code === 'ELOOP') {
+ throw new Error(`Refusing ${filePath} (path is a symbolic link)`);
+ }
+ throw err;
+ }
+ try {
+ assertRegularFile(fd, filePath);
+ // openSync only applies mode on creation.
+ // If the file already exists, we need to ensure the mode is correct.
+ if (process.platform !== 'win32') {
+ fs.fchmodSync(fd, mode);
+ }
+ fs.writeFileSync(fd, content);
+ } finally {
+ fs.closeSync(fd);
+ }
+}
+
+export function mkdir(dir: string, mode = 0o700): void {
+ fs.mkdirSync(dir, { recursive: true, mode });
+ if (isSymlink(dir)) {
+ throw new Error(`Refusing ${dir} (path is a symbolic link)`);
+ }
+}
diff --git a/src/index.ts b/src/index.ts
index 40d6ae3..2153a32 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -210,11 +210,16 @@ export async function run() {
// Validate that the SDK can actually pick up credentials.
// This validates cases where this action is using existing environment credentials,
// and cases where the user intended to provide input credentials but the secrets inputs resolved to empty strings.
- await withRetry(
- () => credentialsClient.validateCredentials(AccessKeyId, roleChaining, expectedAccountIds),
- 'validateCredentials',
- );
- sourceAccountId = await withRetry(() => exportAccountId(credentialsClient, maskAccountId), 'exportAccountId');
+ // Skip when output-env-credentials is false: input IAM keys were not written to env, so
+ // the default chain would resolve to ambient runner credentials and the access-key check
+ // would spuriously fail (see #1554).
+ if (outputEnvCredentials) {
+ await withRetry(
+ () => credentialsClient.validateCredentials(AccessKeyId, roleChaining, expectedAccountIds),
+ 'validateCredentials',
+ );
+ sourceAccountId = await withRetry(() => exportAccountId(credentialsClient, maskAccountId), 'exportAccountId');
+ }
}
if (customTags && (useGitHubOIDCProvider() || webIdentityTokenFile)) {
core.warning(
@@ -247,13 +252,12 @@ export async function run() {
} while (specialCharacterWorkaround && !verifyKeys(roleCredentials.Credentials));
core.info(`Authenticated as assumedRoleId ${roleCredentials.AssumedRoleUser?.AssumedRoleId}`);
exportCredentials(roleCredentials.Credentials, outputCredentials, outputEnvCredentials);
- // We need to validate the credentials in 2 of our use-cases
- // First: self-hosted runners. If the GITHUB_ACTIONS environment variable
- // is set to `true` then we are NOT in a self-hosted runner.
- // Second: Customer provided credentials manually (IAM User keys stored in GH Secrets)
- // If we are using a profile, don't validate credentials yet (since they most likely won't be in the environment).
- // Wait until after creds are written to the profile file to try validation.
- if ((!process.env.GITHUB_ACTIONS || AccessKeyId) && !awsProfile) {
+ // 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(
diff --git a/src/profileManager.ts b/src/profileManager.ts
index d98db43..89e8ae6 100644
--- a/src/profileManager.ts
+++ b/src/profileManager.ts
@@ -1,8 +1,8 @@
-import * as fs from 'node:fs';
import * as os from 'node:os';
import * as path from 'node:path';
import * as core from '@actions/core';
import type { Credentials } from '@aws-sdk/client-sts';
+import { mkdir, readFileUtf8, writeFileUtf8 } from './helpers';
/**
* Parse an INI-format string into a nested object.
@@ -87,10 +87,8 @@ export function getProfileFilePaths(): ProfileFilePaths {
*/
export function ensureAwsDirectoryExists(filePath: string): void {
const dir = path.dirname(filePath);
- if (!fs.existsSync(dir)) {
- core.debug(`Creating directory: ${dir}`);
- fs.mkdirSync(dir, { recursive: true, mode: 0o700 });
- }
+ core.debug(`Ensuring directory exists: ${dir}`);
+ mkdir(dir, 0o700);
}
/**
@@ -127,14 +125,8 @@ export function mergeProfileSection(
data: Record,
overwriteAwsProfile: boolean,
): void {
- let existingContent: Record> = {};
-
- // Read existing file if it exists
- if (fs.existsSync(filePath)) {
- core.debug(`Reading existing file: ${filePath}`);
- const fileContent = fs.readFileSync(filePath, 'utf-8');
- existingContent = parseIni(fileContent);
- }
+ const fileContent = readFileUtf8(filePath);
+ const existingContent: Record> = fileContent === null ? {} : parseIni(fileContent);
if (existingContent[sectionName] && !overwriteAwsProfile) {
throw new Error(
@@ -147,7 +139,7 @@ export function mergeProfileSection(
const content = stringifyIni(existingContent);
core.debug(`Writing profile to ${filePath}`);
- fs.writeFileSync(filePath, content, { mode: 0o600 });
+ writeFileUtf8(filePath, content, 0o600);
}
/**
diff --git a/test/assumeRole.test.ts b/test/assumeRole.test.ts
new file mode 100644
index 0000000..566f0d9
--- /dev/null
+++ b/test/assumeRole.test.ts
@@ -0,0 +1,63 @@
+import * as core from '@actions/core';
+import { AssumeRoleWithWebIdentityCommand, GetCallerIdentityCommand, STSClient } from '@aws-sdk/client-sts';
+import { mockClient } from 'aws-sdk-client-mock';
+import { fs, vol } from 'memfs';
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+import * as helpers from '../src/helpers';
+import { run } from '../src/index';
+import mocks from './mockinputs.test';
+
+vi.mock('node:fs');
+vi.mock('@actions/core');
+
+const mockedSTSClient = mockClient(STSClient);
+
+describe('assumeRoleWithWebIdentityTokenFile', {}, () => {
+ beforeEach(() => {
+ vi.restoreAllMocks();
+ vi.clearAllMocks();
+ mockedSTSClient.reset();
+ vol.reset();
+ helpers.withsleep(() => Promise.resolve());
+ vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.WEBIDENTITY_TOKEN_FILE_INPUTS));
+ vi.mocked(core.getMultilineInput).mockReturnValue([]);
+ mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY });
+ process.env = { ...mocks.envs };
+ fs.mkdirSync('/home/github', { recursive: true });
+ });
+
+ afterEach(() => {
+ helpers.reset();
+ });
+
+ it('refuses when the token file is a symlink and never calls STS', async () => {
+ fs.mkdirSync('/etc', { recursive: true });
+ fs.writeFileSync('/etc/passwd', 'root:x:0:0::/root:/bin/sh');
+ fs.symlinkSync('/etc/passwd', '/home/github/file.txt');
+
+ await run();
+
+ expect(core.setFailed).toHaveBeenCalledWith(expect.stringMatching(/Refusing .* \(.* symbolic link\)/));
+ expect(mockedSTSClient.commandCalls(AssumeRoleWithWebIdentityCommand)).toHaveLength(0);
+ expect(fs.readFileSync('/etc/passwd', 'utf-8')).toBe('root:x:0:0::/root:/bin/sh');
+ });
+
+ it('preserves the existing missing-file error when the token file does not exist', async () => {
+ await run();
+
+ expect(core.setFailed).toHaveBeenCalledWith(expect.stringContaining('Web identity token file does not exist'));
+ expect(mockedSTSClient.commandCalls(AssumeRoleWithWebIdentityCommand)).toHaveLength(0);
+ });
+
+ it('passes token contents to STS when the file is regular', async () => {
+ fs.writeFileSync('/home/github/file.txt', 'real-token');
+ mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS);
+
+ await run();
+
+ expect(core.setFailed).not.toHaveBeenCalled();
+ const calls = mockedSTSClient.commandCalls(AssumeRoleWithWebIdentityCommand);
+ expect(calls).toHaveLength(1);
+ expect(calls[0]?.args[0].input.WebIdentityToken).toBe('real-token');
+ });
+});
diff --git a/test/helpers.test.ts b/test/helpers.test.ts
index cd4c29e..eefca3c 100644
--- a/test/helpers.test.ts
+++ b/test/helpers.test.ts
@@ -1,12 +1,16 @@
import * as core from '@actions/core';
+import { fs, vol } from 'memfs';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import * as helpers from '../src/helpers';
+vi.mock('node:fs');
vi.mock('@actions/core');
describe('Configure AWS Credentials helpers', {}, () => {
beforeEach(() => {
- vi.resetAllMocks();
+ vi.restoreAllMocks();
+ vi.clearAllMocks();
+ vol.reset();
});
it('removes brackets from GitHub Actor', {}, () => {
const actor = 'actor[bot]';
@@ -48,6 +52,9 @@ describe('Configure AWS Credentials helpers', {}, () => {
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 +75,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,22 +105,163 @@ 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', '');
});
+
+ describe('filesystem helpers', {}, () => {
+ describe('isSymlink', {}, () => {
+ it('returns true for a symlink', {}, () => {
+ fs.mkdirSync('/dir', { recursive: true });
+ fs.writeFileSync('/dir/target', 'data');
+ fs.symlinkSync('/dir/target', '/dir/link');
+ expect(helpers.isSymlink('/dir/link')).toBe(true);
+ });
+
+ it('returns false for a regular file', {}, () => {
+ fs.mkdirSync('/dir', { recursive: true });
+ fs.writeFileSync('/dir/file', 'data');
+ expect(helpers.isSymlink('/dir/file')).toBe(false);
+ });
+
+ it('returns false for a missing path', {}, () => {
+ expect(helpers.isSymlink('/nonexistent')).toBe(false);
+ });
+ });
+
+ describe('readFileUtf8', {}, () => {
+ it('returns content for a regular file', {}, () => {
+ fs.mkdirSync('/dir', { recursive: true });
+ fs.writeFileSync('/dir/file', 'hello');
+ expect(helpers.readFileUtf8('/dir/file')).toBe('hello');
+ });
+
+ it('returns null when the file does not exist', {}, () => {
+ fs.mkdirSync('/dir', { recursive: true });
+ expect(helpers.readFileUtf8('/dir/missing')).toBe(null);
+ });
+
+ it('refuses to read through a symlink at the target', {}, () => {
+ fs.mkdirSync('/dir', { recursive: true });
+ fs.writeFileSync('/dir/secret', 'sensitive');
+ fs.symlinkSync('/dir/secret', '/dir/link');
+ expect(() => helpers.readFileUtf8('/dir/link')).toThrow(/Refusing .* \(.* symbolic link\)/);
+ });
+
+ it('refuses to read when the parent directory is a symlink', {}, () => {
+ fs.mkdirSync('/real/.aws', { recursive: true });
+ fs.writeFileSync('/real/.aws/credentials', 'data');
+ fs.mkdirSync('/home', { recursive: true });
+ fs.symlinkSync('/real/.aws', '/home/.aws');
+ expect(() => helpers.readFileUtf8('/home/.aws/credentials')).toThrow(/Refusing .* \(.* symbolic link\)/);
+ });
+
+ it('refuses to read when the path is a directory', {}, () => {
+ fs.mkdirSync('/dir/subdir', { recursive: true });
+ expect(() => helpers.readFileUtf8('/dir/subdir')).toThrow(/not a regular file/);
+ });
+
+ it.skipIf(process.platform === 'win32')(
+ 'follows the kubelet projected-token symlink chain at /var/run/secrets/*/serviceaccount/token',
+ () => {
+ fs.mkdirSync('/var/run/secrets/eks.amazonaws.com/serviceaccount/..2026_05_28_00_00_00.123', {
+ recursive: true,
+ });
+ fs.writeFileSync(
+ '/var/run/secrets/eks.amazonaws.com/serviceaccount/..2026_05_28_00_00_00.123/token',
+ 'jwt-token',
+ );
+ fs.symlinkSync('..2026_05_28_00_00_00.123', '/var/run/secrets/eks.amazonaws.com/serviceaccount/..data');
+ fs.symlinkSync('..data/token', '/var/run/secrets/eks.amazonaws.com/serviceaccount/token');
+ expect(helpers.readFileUtf8('/var/run/secrets/eks.amazonaws.com/serviceaccount/token')).toBe('jwt-token');
+ },
+ );
+
+ it.skipIf(process.platform === 'win32')('still refuses symlinks at lookalike paths outside the allowlist', () => {
+ fs.mkdirSync('/var/run/secrets/eks.amazonaws.com/serviceaccount', { recursive: true });
+ fs.writeFileSync('/var/run/secrets/eks.amazonaws.com/serviceaccount/secret', 'jwt-token');
+ fs.symlinkSync(
+ '/var/run/secrets/eks.amazonaws.com/serviceaccount/secret',
+ '/var/run/secrets/eks.amazonaws.com/serviceaccount/token2',
+ );
+ expect(() => helpers.readFileUtf8('/var/run/secrets/eks.amazonaws.com/serviceaccount/token2')).toThrow(
+ /Refusing .* \(.* symbolic link\)/,
+ );
+ });
+ });
+
+ describe('isAllowListed', {}, () => {
+ it.skipIf(process.platform === 'win32')('matches the canonical kubelet projected-token path', () => {
+ expect(helpers.isAllowListed('/var/run/secrets/eks.amazonaws.com/serviceaccount/token')).toBe(true);
+ expect(helpers.isAllowListed('/var/run/secrets/kubernetes.io/serviceaccount/token')).toBe(true);
+ });
+
+ it.skipIf(process.platform === 'win32')('rejects nested or unrelated paths', () => {
+ expect(helpers.isAllowListed('/var/run/secrets/serviceaccount/token')).toBe(false);
+ expect(helpers.isAllowListed('/var/run/secrets/a/b/serviceaccount/token')).toBe(false);
+ expect(helpers.isAllowListed('/var/run/secrets/eks.amazonaws.com/serviceaccount/token2')).toBe(false);
+ expect(helpers.isAllowListed('/etc/var/run/secrets/foo/serviceaccount/token')).toBe(false);
+ });
+
+ it.skipIf(process.platform === 'win32')('normalizes path traversal attempts', () => {
+ expect(helpers.isAllowListed('/var/run/secrets/foo/serviceaccount/../../../../etc/passwd')).toBe(false);
+ });
+ });
+
+ describe('writeFileUtf8', {}, () => {
+ it('writes content with the specified mode', {}, () => {
+ fs.mkdirSync('/dir', { recursive: true });
+ helpers.writeFileUtf8('/dir/file', 'payload', 0o600);
+ expect(fs.readFileSync('/dir/file', 'utf-8')).toBe('payload');
+ expect(fs.statSync('/dir/file').mode & 0o777).toBe(0o600);
+ });
+
+ it('refuses to follow a symlink at the target and leaves the target file untouched', {}, () => {
+ fs.mkdirSync('/dir', { recursive: true });
+ fs.writeFileSync('/dir/target', 'original');
+ fs.symlinkSync('/dir/target', '/dir/link');
+ expect(() => helpers.writeFileUtf8('/dir/link', 'attacker', 0o600)).toThrow(/Refusing .* \(.* symbolic link\)/);
+ expect(fs.readFileSync('/dir/target', 'utf-8')).toBe('original');
+ });
+
+ it.skipIf(process.platform === 'win32')('tightens mode on existing files', () => {
+ fs.mkdirSync('/dir', { recursive: true });
+ fs.writeFileSync('/dir/file', 'old', { mode: 0o644 });
+ helpers.writeFileUtf8('/dir/file', 'new', 0o600);
+ expect(fs.statSync('/dir/file').mode & 0o777).toBe(0o600);
+ });
+ });
+
+ describe('mkdir', {}, () => {
+ it('is idempotent on a regular directory', {}, () => {
+ helpers.mkdir('/some/nested/dir', 0o700);
+ helpers.mkdir('/some/nested/dir', 0o700);
+ expect(fs.statSync('/some/nested/dir').isDirectory()).toBe(true);
+ });
+
+ it('refuses when the target directory is a symlink', {}, () => {
+ fs.mkdirSync('/real', { recursive: true });
+ fs.mkdirSync('/home', { recursive: true });
+ fs.symlinkSync('/real', '/home/.aws');
+ expect(() => helpers.mkdir('/home/.aws', 0o700)).toThrow(/Refusing .* \(.* symbolic link\)/);
+ });
+ });
+ });
});
diff --git a/test/index.test.ts b/test/index.test.ts
index b84c883..d03181a 100644
--- a/test/index.test.ts
+++ b/test/index.test.ts
@@ -3,6 +3,7 @@ import {
AssumeRoleCommand,
AssumeRoleWithWebIdentityCommand,
GetCallerIdentityCommand,
+ PackedPolicyTooLargeException,
STSClient,
} from '@aws-sdk/client-sts';
import { mockClient } from 'aws-sdk-client-mock';
@@ -151,6 +152,29 @@ 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));
@@ -179,6 +203,18 @@ describe('Configure AWS Credentials', {}, () => {
expect(core.setOutput).toHaveBeenCalledTimes(2);
expect(core.setFailed).not.toHaveBeenCalled();
});
+ it('does not send Tags or TransitiveTagKeys to AssumeRoleWithWebIdentity', async () => {
+ // AssumeRoleWithWebIdentity reads session tags from JWT claims, not the request.
+ // Both fields must be stripped before the STS call.
+ vi.mocked(core.getMultilineInput).mockImplementation((name: string) => {
+ if (name === 'transitive-tag-keys') return ['Repository'];
+ return [];
+ });
+ await run();
+ const callInput = mockedSTSClient.commandCalls(AssumeRoleWithWebIdentityCommand)[0].args[0].input;
+ expect(callInput.Tags).toBeUndefined();
+ expect(callInput.TransitiveTagKeys).toBeUndefined();
+ });
});
describe('Assume existing role', {}, () => {
@@ -259,9 +295,9 @@ describe('Configure AWS Credentials', {}, () => {
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);
+ // + 6 droppable (EventName, BaseRef, HeadRef, RunId, Job, TriggeringActor).
+ // No custom-tags, all env vars set in mocks.envs → all 13 should be present, nothing else.
+ expect(tags).toHaveLength(13);
const tagsByKey = Object.fromEntries(tags.map((t) => [t.Key, t.Value]));
expect(tagsByKey).toEqual({
GitHub: 'Actions',
@@ -274,14 +310,12 @@ describe('Configure AWS Credentials', {}, () => {
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 () => {
+ it('omits droppable 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;
@@ -295,6 +329,27 @@ describe('Configure AWS Credentials', {}, () => {
expect(tagKeys).toContain('EventName');
expect(tagKeys).toContain('RunId');
});
+ it('drops droppable tags and retries on PackedPolicyTooLargeException', {}, async () => {
+ vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS));
+ mockedSTSClient
+ .on(AssumeRoleCommand)
+ .rejectsOnce(new PackedPolicyTooLargeException({ message: 'too large', $metadata: {} }))
+ .resolvesOnce(mocks.outputs.STS_CREDENTIALS);
+ await run();
+ expect(core.info).toHaveBeenCalledWith('Session tag size is too large; dropping droppable tags and retrying.');
+ const retryInput = mockedSTSClient.commandCalls(AssumeRoleCommand)[1].args[0].input;
+ const retryTagKeys = (retryInput.Tags ?? []).map((t) => t.Key);
+ expect(retryTagKeys).not.toContain('EventName');
+ expect(retryTagKeys).not.toContain('BaseRef');
+ expect(retryTagKeys).not.toContain('HeadRef');
+ expect(retryTagKeys).not.toContain('RunId');
+ expect(retryTagKeys).not.toContain('Job');
+ expect(retryTagKeys).not.toContain('TriggeringActor');
+ // Protected tags remain
+ expect(retryTagKeys).toContain('GitHub');
+ expect(retryTagKeys).toContain('Repository');
+ expect(core.setFailed).not.toHaveBeenCalled();
+ });
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';
@@ -347,8 +402,6 @@ describe('Configure AWS Credentials', {}, () => {
{ 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' },
@@ -397,7 +450,7 @@ describe('Configure AWS Credentials', {}, () => {
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 () => {
+ it('rejects custom tags that conflict with droppable tag keys', {}, async () => {
vi.mocked(core.getInput).mockImplementation(
mocks.getInput({
...mocks.IAM_ASSUMEROLE_INPUTS,
@@ -405,13 +458,10 @@ describe('Configure AWS Credentials', {}, () => {
}),
);
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');
+ expect(core.setFailed).toHaveBeenCalledWith(
+ "custom-tags: key 'EventName' conflicts with a protected session tag set by this action and cannot be overridden",
+ );
+ expect(mockedSTSClient.commandCalls(AssumeRoleCommand)).toHaveLength(0);
});
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.
@@ -427,62 +477,10 @@ describe('Configure AWS Credentials', {}, () => {
);
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).
+ it('rejects custom-tags that would exceed the session-tag limit', {}, async () => {
+ // 13 existing tags (7 non-droppable + 6 droppable) + 38 custom = 51 > 50.
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++) {
+ for (let i = 0; i < 38; i++) {
customTagsObj[`Custom${i}`] = `value${i}`;
}
vi.mocked(core.getInput).mockImplementation(
@@ -495,12 +493,10 @@ describe('Configure AWS Credentials', {}, () => {
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.
+ it('allows custom-tags up to the session-tag limit', {}, async () => {
+ // 13 existing tags + 37 custom = 50, exactly at the limit.
const customTagsObj: Record = {};
- for (let i = 0; i < 40; i++) {
+ for (let i = 0; i < 37; i++) {
customTagsObj[`Custom${i}`] = `value${i}`;
}
vi.mocked(core.getInput).mockImplementation(
@@ -509,15 +505,10 @@ describe('Configure AWS Credentials', {}, () => {
'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']);
+ expect(core.setFailed).not.toHaveBeenCalled();
+ const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? [];
+ expect(tags).toHaveLength(50);
});
});
diff --git a/test/mockinputs.test.ts b/test/mockinputs.test.ts
index b5233ca..68ee8a0 100644
--- a/test/mockinputs.test.ts
+++ b/test/mockinputs.test.ts
@@ -83,6 +83,14 @@ const inputs = {
'output-env-credentials': 'false',
'output-credentials': 'true',
},
+ IAM_ASSUMEROLE_NO_ENV_INPUTS: {
+ 'aws-access-key-id': 'MYAWSACCESSKEYID',
+ 'aws-secret-access-key': 'MYAWSSECRETACCESSKEY',
+ 'role-to-assume': 'arn:aws:iam::111111111111:role/MY-ROLE',
+ 'aws-region': 'fake-region-1',
+ 'output-env-credentials': 'false',
+ 'output-credentials': 'true',
+ },
};
const envs = {
@@ -97,8 +105,6 @@ const envs = {
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]',
diff --git a/test/profileManager.test.ts b/test/profileManager.test.ts
index 5702684..19bf1c1 100644
--- a/test/profileManager.test.ts
+++ b/test/profileManager.test.ts
@@ -11,12 +11,13 @@ import {
writeProfileFiles,
} from '../src/profileManager';
-vi.mock('@actions/core');
vi.mock('node:fs');
+vi.mock('@actions/core');
describe('Profile Manager', {}, () => {
beforeEach(() => {
- vi.resetAllMocks();
+ vi.restoreAllMocks();
+ vi.clearAllMocks();
vol.reset();
});
@@ -735,4 +736,69 @@ describe('Profile Manager', {}, () => {
);
});
});
+
+ describe('symlink hardening', {}, () => {
+ const credsPath = '/home/user/.aws/credentials';
+ const configPath = '/home/user/.aws/config';
+
+ beforeEach(() => {
+ process.env.AWS_SHARED_CREDENTIALS_FILE = credsPath;
+ process.env.AWS_CONFIG_FILE = configPath;
+ });
+
+ it('mergeProfileSection refuses when the credentials path is a symlink and leaves the target unchanged', {}, () => {
+ fs.mkdirSync('/home/user/.aws', { recursive: true });
+ fs.mkdirSync('/etc', { recursive: true });
+ fs.writeFileSync('/etc/passwd', 'root:x:0:0::/root:/bin/sh');
+ fs.symlinkSync('/etc/passwd', credsPath);
+
+ expect(() => mergeProfileSection(credsPath, 'dev', { aws_access_key_id: 'AKIA' }, true)).toThrow(
+ /Refusing .* \(.* symbolic link\)/,
+ );
+ expect(fs.readFileSync('/etc/passwd', 'utf-8')).toBe('root:x:0:0::/root:/bin/sh');
+ });
+
+ it('mergeProfileSection refuses when the config path is a symlink', {}, () => {
+ fs.mkdirSync('/home/user/.aws', { recursive: true });
+ fs.mkdirSync('/etc', { recursive: true });
+ fs.writeFileSync('/etc/sensitive', 'do not overwrite');
+ fs.symlinkSync('/etc/sensitive', configPath);
+
+ expect(() => mergeProfileSection(configPath, 'profile dev', { region: 'us-east-1' }, true)).toThrow(
+ /Refusing .* \(.* symbolic link\)/,
+ );
+ expect(fs.readFileSync('/etc/sensitive', 'utf-8')).toBe('do not overwrite');
+ });
+
+ it('ensureAwsDirectoryExists refuses when ~/.aws is a symlink', {}, () => {
+ fs.mkdirSync('/real-target', { recursive: true });
+ fs.mkdirSync('/home/user', { recursive: true });
+ fs.symlinkSync('/real-target', '/home/user/.aws');
+
+ expect(() => ensureAwsDirectoryExists(credsPath)).toThrow(/Refusing .* \(.* symbolic link\)/);
+ });
+
+ it('writeProfileFiles refuses to overwrite a pre-existing symlink at the credentials path', {}, () => {
+ fs.mkdirSync('/home/user/.aws', { recursive: true });
+ fs.mkdirSync('/etc', { recursive: true });
+ fs.writeFileSync('/etc/passwd', 'root:x:0:0::/root:/bin/sh');
+ fs.symlinkSync('/etc/passwd', credsPath);
+
+ expect(() =>
+ writeProfileFiles('dev', { AccessKeyId: 'AKIA', SecretAccessKey: 'secret' }, 'us-east-1', true),
+ ).toThrow(/Refusing .* \(.* symbolic link\)/);
+
+ expect(fs.lstatSync(credsPath).isSymbolicLink()).toBe(true);
+ expect(fs.readFileSync('/etc/passwd', 'utf-8')).toBe('root:x:0:0::/root:/bin/sh');
+ });
+
+ it('happy path still writes both files with mode 0o600 when no symlinks are present', {}, () => {
+ writeProfileFiles('dev', { AccessKeyId: 'AKIA', SecretAccessKey: 'secret' }, 'us-east-1', false);
+
+ expect(fs.statSync(credsPath).mode & 0o777).toBe(0o600);
+ expect(fs.statSync(configPath).mode & 0o777).toBe(0o600);
+ expect(fs.lstatSync(credsPath).isSymbolicLink()).toBe(false);
+ expect(fs.lstatSync(configPath).isSymbolicLink()).toBe(false);
+ });
+ });
});