From c8be72826b22ea9acea6ff5cb0d8442cb2d57e81 Mon Sep 17 00:00:00 2001 From: Cristian Lepadatu Date: Wed, 21 Aug 2024 15:54:49 +0300 Subject: [PATCH 01/15] First release --- .github/workflows/release.yml | 12 +- .github/workflows/test.yml | 17 +- LICENSE | 1 + README.md | 110 +- action.yml | 18 +- lib/main.js | 123 +- main.js | 13 +- package-lock.json | 1274 ++++++++++++++++- package.json | 8 +- tests/main-missing-kms-key-id.test.js | 10 + ...llation-access-token-fail-response.test.js | 20 + tests/main.js | 32 +- tests/snapshots/index.js.md | 81 +- tests/snapshots/index.js.snap | Bin 1128 -> 1187 bytes 14 files changed, 1565 insertions(+), 154 deletions(-) create mode 100644 tests/main-missing-kms-key-id.test.js create mode 100644 tests/main-token-get-installation-access-token-fail-response.test.js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dbce170..6fa04ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,7 @@ permissions: contents: write issues: write pull-requests: write + id-token: write jobs: release: @@ -20,6 +21,13 @@ jobs: with: persist-credentials: false + - name: AWS Login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} + role-session-name: release-create-github-app-token-aws + - uses: actions/setup-node@v4 with: node-version-file: .node-version @@ -30,8 +38,8 @@ jobs: - uses: ./ id: app-token with: - app-id: ${{ vars.RELEASER_APP_ID }} - private-key: ${{ secrets.RELEASER_APP_PRIVATE_KEY }} + app-id: ${{ secrets.APP_ID }} + kms-key-id: ${{ secrets.KMS_KEY_ID }} # install release dependencies and release - run: npm install --no-save @semantic-release/git semantic-release-plugin-github-breaking-version-tag - run: npx semantic-release --debug diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ab2b03f..ff20423 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,9 +4,14 @@ on: push: branches: - main + - dev pull_request: workflow_dispatch: +permissions: + contents: read + id-token: write + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -33,6 +38,14 @@ jobs: if: github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login steps: - uses: actions/checkout@v4 + + - name: AWS Login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} + role-session-name: test-create-github-app-token-aws + - uses: actions/setup-node@v4 with: node-version: 20 @@ -42,8 +55,8 @@ jobs: - uses: ./ # Uses the action in the root directory id: test with: - app-id: ${{ vars.TEST_APP_ID }} - private-key: ${{ secrets.TEST_APP_PRIVATE_KEY }} + app-id: ${{ secrets.APP_ID }} + kms-key-id: ${{ secrets.KMS_KEY_ID }} - uses: octokit/request-action@v2.x id: get-repository env: diff --git a/LICENSE b/LICENSE index 058e953..8462eb7 100644 --- a/LICENSE +++ b/LICENSE @@ -2,6 +2,7 @@ The MIT License (MIT) Copyright (c) 2023 Gregor Martynus Copyright (c) 2023 Parker Brown +Copyright (c) 2024 Cristian Lepadatu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 9637ad3..33c61a9 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,19 @@ [![test](https://github.com/actions/create-github-app-token/actions/workflows/test.yml/badge.svg)](https://github.com/actions/create-github-app-token/actions/workflows/test.yml) -GitHub Action for creating a GitHub App installation access token. +GitHub Action for creating a GitHub App installation access token using AWS KMS in order to safely store the GitHub repositry private key. ## Usage In order to use this action, you need to: 1. [Register new GitHub App](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app) -2. [Store the App's ID in your repository environment variables](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) (example: `APP_ID`) -3. [Store the App's private key in your repository secrets](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example: `PRIVATE_KEY`) +2. [Store the App's ID in your repository environment variable](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) or [secret](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example: `APP_ID`) +3. [Import the App's private key in your AWS Account KMS service, under customer-managed keys of type assymetric, sign-verify](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html) +4. [Store the above KMS Key ID as a repository secret](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example `KMS_KEY_ID`). Once stored in AWS KMS, the GitHub private key can no longer be retieved from AWS. AWS API can only by asked to sign/verify using the respective key. This substantially improves the security posture, because the key is no longer accessible. +5. [Store the AWS role to be assumed by the action as a repository secret](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example `ROLE_TO_ASSUME`) +6. [Store the AWS session name as an environment_variable](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) (example `ROLE_SESSION_NAME`) +7. [Store the AWS region name as an environment_variable](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) (example `AWS_REGION`) > [!IMPORTANT] > An installation access token expires after 1 hour. Please [see this comment](https://github.com/actions/create-github-app-token/issues/121#issuecomment-2043214796) for alternative approaches if you have long-running processes. @@ -28,11 +32,17 @@ jobs: hello-world: runs-on: ubuntu-latest steps: + - name: AWS Login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} + role-session-name: ${{ vars.ROLE_SESSION_NAME }} - uses: actions/create-github-app-token@v1 id: app-token with: app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.PRIVATE_KEY }} + kms-key-id: ${{ secrets.KMS_KEY_ID }} - uses: ./actions/staging-tests with: token: ${{ steps.app-token.outputs.token }} @@ -47,12 +57,18 @@ jobs: auto-format: runs-on: ubuntu-latest steps: + - name: AWS Login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} + role-session-name: ${{ vars.ROLE_SESSION_NAME }} - uses: actions/create-github-app-token@v1 id: app-token with: # required app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.PRIVATE_KEY }} + kms-key-id: ${{ secrets.KMS_KEY_ID }} - uses: actions/checkout@v4 with: token: ${{ steps.app-token.outputs.token }} @@ -73,12 +89,18 @@ jobs: auto-format: runs-on: ubuntu-latest steps: + - name: AWS Login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} + role-session-name: ${{ vars.ROLE_SESSION_NAME }} - uses: actions/create-github-app-token@v1 id: app-token with: # required app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.PRIVATE_KEY }} + kms-key-id: ${{ secrets.KMS_KEY_ID }} - name: Get GitHub App User ID id: get-user-id run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" @@ -98,12 +120,18 @@ jobs: auto-format: runs-on: ubuntu-latest steps: + - name: AWS Login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} + role-session-name: ${{ vars.ROLE_SESSION_NAME }} - uses: actions/create-github-app-token@v1 id: app-token with: # required app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.PRIVATE_KEY }} + kms-key-id: ${{ secrets.KMS_KEY_ID }} - name: Get GitHub App User ID id: get-user-id run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" @@ -135,11 +163,17 @@ jobs: hello-world: runs-on: ubuntu-latest steps: + - name: AWS Login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} + role-session-name: ${{ vars.ROLE_SESSION_NAME }} - uses: actions/create-github-app-token@v1 id: app-token with: app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.PRIVATE_KEY }} + kms-key-id: ${{ secrets.KMS_KEY_ID }} owner: ${{ github.repository_owner }} - uses: peter-evans/create-or-update-comment@v3 with: @@ -157,11 +191,17 @@ jobs: hello-world: runs-on: ubuntu-latest steps: + - name: AWS Login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} + role-session-name: ${{ vars.ROLE_SESSION_NAME }} - uses: actions/create-github-app-token@v1 id: app-token with: app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.PRIVATE_KEY }} + kms-key-id: ${{ secrets.KMS_KEY_ID }} owner: ${{ github.repository_owner }} repositories: "repo1,repo2" - uses: peter-evans/create-or-update-comment@v3 @@ -180,11 +220,17 @@ jobs: hello-world: runs-on: ubuntu-latest steps: + - name: AWS Login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} + role-session-name: ${{ vars.ROLE_SESSION_NAME }} - uses: actions/create-github-app-token@v1 id: app-token with: app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.PRIVATE_KEY }} + kms-key-id: ${{ secrets.KMS_KEY_ID }} owner: another-owner - uses: peter-evans/create-or-update-comment@v3 with: @@ -221,11 +267,17 @@ jobs: owners-and-repos: ${{ fromJson(needs.set-matrix.outputs.matrix) }} steps: + - name: AWS Login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} + role-session-name: ${{ vars.ROLE_SESSION_NAME }} - uses: actions/create-github-app-token@v1 id: app-token with: app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.PRIVATE_KEY }} + kms-key-id: ${{ secrets.KMS_KEY_ID }} owner: ${{ matrix.owners-and-repos.owner }} repositories: ${{ join(matrix.owners-and-repos.repos) }} - uses: octokit/request-action@v2.x @@ -249,12 +301,18 @@ jobs: runs-on: self-hosted steps: + - name: AWS Login + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ vars.AWS_REGION }} + role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} + role-session-name: ${{ vars.ROLE_SESSION_NAME }} - name: Create GitHub App token id: create_token uses: actions/create-github-app-token@v1 with: app-id: ${{ vars.GHES_APP_ID }} - private-key: ${{ secrets.GHES_APP_PRIVATE_KEY }} + kms-key-id: ${{ secrets.KMS_KEY_ID }} owner: ${{ vars.GHES_INSTALLATION_ORG }} github-api-url: ${{ vars.GITHUB_API_URL }} @@ -274,27 +332,9 @@ jobs: **Required:** GitHub App ID. -### `private-key` - -**Required:** GitHub App private key. Escaped newlines (`\\n`) will be automatically replaced with actual newlines. +### `kms-key-id` -Some other actions may require the private key to be Base64 encoded. To avoid recreating a new secret, it can be decoded on the fly, but it needs to be managed securely. Here is an example of how this can be achieved: - -```yaml -steps: - - name: Decode the GitHub App Private Key - id: decode - run: | - private_key=$(echo "${{ secrets.PRIVATE_KEY }}" | base64 -d | awk 'BEGIN {ORS="\\n"} {print}' | head -c -2) &> /dev/null - echo "::add-mask::$private_key" - echo "private-key=$private_key" >> "$GITHUB_OUTPUT" - - name: Generate GitHub App Token - id: app-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ vars.APP_ID }} - private-key: ${{ steps.decode.outputs.private-key }} -``` +**Required:** AWS KMS Key ID that is imported from GitHub. ### `owner` @@ -331,7 +371,11 @@ GitHub App slug. ## How it works -The action creates an installation access token using [the `POST /app/installations/{installation_id}/access_tokens` endpoint](https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app). By default, +The action creates an installation access token using [the `POST /app/installations/{installation_id}/access_tokens` endpoint](https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app). + +The action uses the GitHub private key stored in AWS KMS so sign a JWT token and uses this token subsequently for autheticating each GitHub API call, including the one above. Once stored in AWS KMS, the GitHub private key can no longer be retieved from AWS. AWS API can only by asked to sign/verify using the respective key. This substantially improves the security posture, because the action will no longer access the private key anymore, but ask AWS API to sign/verify instead. + +By default, 1. The token is scoped to the current repository or `repositories` if set. 2. The token inherits all the installation's permissions. diff --git a/action.yml b/action.yml index 09cc8fa..f4adaf1 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,6 @@ -name: "Create GitHub App Token" -description: "GitHub Action for creating a GitHub App installation access token" -author: "Gregor Martynus and Parker Brown" +name: "Create GitHub App Token using AWS KMS" +description: "GitHub Action for creating a GitHub App installation access token using AWS KMS" +author: "Cristian Lepadatu, Gregor Martynus and Parker Brown" branding: icon: "lock" color: "gray-dark" @@ -12,13 +12,13 @@ inputs: description: "GitHub App ID" required: false deprecationMessage: "'app_id' is deprecated and will be removed in a future version. Use 'app-id' instead." - private-key: - description: "GitHub App private key" - required: false # TODO: When 'private_key' is removed, make 'private-key' required - private_key: - description: "GitHub App private key" + kms-key-id: + description: AWS KMS Key ID" + required: false # TODO: When 'kms_key_id' is removed, make 'kms-key-id' required + kms_key_id: + description: "AWS KMS Key ID" required: false - deprecationMessage: "'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead." + deprecationMessage: "'kms_key_id' is deprecated and will be removed in a future version. Use 'kms-key-id' instead." owner: description: "The owner of the GitHub App installation (defaults to current repository owner)" required: false diff --git a/lib/main.js b/lib/main.js index 97443c0..619bca4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -1,23 +1,22 @@ import pRetry from "p-retry"; +import { KMSClient, SignCommand } from "@aws-sdk/client-kms"; // @ts-check /** * @param {string} appId - * @param {string} privateKey + * @param {string} kmsKeyId * @param {string} owner * @param {string} repositories * @param {import("@actions/core")} core - * @param {import("@octokit/auth-app").createAppAuth} createAppAuth * @param {import("@octokit/request").request} request * @param {boolean} skipTokenRevoke */ export async function main( appId, - privateKey, + kmsKeyId, owner, repositories, core, - createAppAuth, request, skipTokenRevoke ) { @@ -63,18 +62,14 @@ export async function main( `owner and repositories set, creating token for repositories "${repositories}" owned by "${owner}"` ); } - - const auth = createAppAuth({ - appId, - privateKey, - request, - }); + + const jwt = await createJWT({ appId: appId, kmsKeyId: kmsKeyId} ) let authentication, installationId, appSlug; // If at least one repository is set, get installation ID from that repository if (parsedRepositoryNames) { - ({ authentication, installationId, appSlug } = await pRetry(() => getTokenFromRepository(request, auth, parsedOwner, parsedRepositoryNames), { + ({ authentication, installationId, appSlug } = await pRetry(() => getTokenFromRepository(request, jwt, parsedOwner, parsedRepositoryNames), { onFailedAttempt: (error) => { core.info( `Failed to create token for "${parsedRepositoryNames}" (attempt ${error.attemptNumber}): ${error.message}` @@ -84,7 +79,7 @@ export async function main( })); } else { // Otherwise get the installation for the owner, which can either be an organization or a user account - ({ authentication, installationId, appSlug } = await pRetry(() => getTokenFromOwner(request, auth, parsedOwner), { + ({ authentication, installationId, appSlug } = await pRetry(() => getTokenFromOwner(request, jwt, parsedOwner), { onFailedAttempt: (error) => { core.info( `Failed to create token for "${parsedOwner}" (attempt ${error.attemptNumber}): ${error.message}` @@ -108,12 +103,12 @@ export async function main( } } -async function getTokenFromOwner(request, auth, parsedOwner) { +async function getTokenFromOwner(request, jwt, parsedOwner) { // https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-organization-installation-for-the-authenticated-app - const response = await request("GET /orgs/{org}/installation", { + const installationResponse = await request("GET /orgs/{org}/installation", { org: parsedOwner, - request: { - hook: auth.hook, + headers: { + authorization: `bearer ${jwt}` }, }).catch((error) => { /* c8 ignore next */ @@ -122,43 +117,99 @@ async function getTokenFromOwner(request, auth, parsedOwner) { // https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-user-installation-for-the-authenticated-app return request("GET /users/{username}/installation", { username: parsedOwner, - request: { - hook: auth.hook, + headers: { + authorization: `bearer ${jwt}` }, }); }); - // Get token for for all repositories of the given installation - const authentication = await auth({ - type: "installation", - installationId: response.data.id, + const accessTokenResponse = await request(`POST /app/installations/${installationResponse.data.id}/access_tokens`, { + headers: { + authorization: `bearer ${jwt}` + }, + installationId: installationResponse.data.id + }).catch ((error)=> { + core.info(`Error obtaining the installation access token: ${error.message}`); + throw error; }); - const installationId = response.data.id; - const appSlug = response.data['app_slug']; + const authentication = accessTokenResponse.data + const installationId = installationResponse.data.id; + const appSlug = installationResponse.data['app_slug']; return { authentication, installationId, appSlug }; } -async function getTokenFromRepository(request, auth, parsedOwner, parsedRepositoryNames) { +async function getTokenFromRepository(request, jwt, parsedOwner, parsedRepositoryNames) { // https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-repository-installation-for-the-authenticated-app - const response = await request("GET /repos/{owner}/{repo}/installation", { + const installationResponse = await request("GET /repos/{owner}/{repo}/installation", { owner: parsedOwner, repo: parsedRepositoryNames.split(",")[0], - request: { - hook: auth.hook, + headers: { + authorization: `bearer ${jwt}` }, }); - // Get token for given repositories - const authentication = await auth({ - type: "installation", - installationId: response.data.id, - repositoryNames: parsedRepositoryNames.split(","), + // Get token for given repositories + const accessTokenResponse = await request(`POST /app/installations/${installationResponse.data.id}/access_tokens`, { + headers: { + authorization: `bearer ${jwt}` + }, + installationId: installationResponse.data.id, + repositories: parsedRepositoryNames.split(",") + }).catch ((error)=> { + core.info(`Error obtaining the installation access token: ${error.message}`); + throw error; }); - const installationId = response.data.id; - const appSlug = response.data['app_slug']; + const authentication = accessTokenResponse.data + const installationId = installationResponse.data.id; + const appSlug = installationResponse.data['app_slug']; return { authentication, installationId, appSlug }; - } \ No newline at end of file +} + +async function createJWT({ appId, expirationTime = 600, httpRequestHandler = undefined, kmsKeyId }) { + const now = Math.floor(Date.now() / 1000); + const iat = now - 60; // Issued 60 seconds in the past + const exp = now + expirationTime; // Expires expirationTime seconds in the future + + const header = { + typ: 'JWT', + alg: 'RS256', + }; + + const payload = { + iat, + exp, + iss: appId, + }; + + // Base64 url encode the header and the payload + const headerBase64 = Buffer.from(JSON.stringify(header)).toString('base64').replaceAll('=', '').replaceAll('+', '-').replaceAll('/', '_') + const payloadBase64 = Buffer.from(JSON.stringify(payload)).toString('base64').replaceAll('=', '').replaceAll('+', '-').replaceAll('/', '_') + + const headerPayload = `${headerBase64}.${payloadBase64}`; + + const kmsClient = new KMSClient({ + requestHandler: httpRequestHandler, + }); + + const signInput = { + KeyId: kmsKeyId, + Message: headerPayload, + MessageType: "RAW", + SigningAlgorithm: "RSASSA_PKCS1_V1_5_SHA_256", + }; + + try { + const signCommand = new SignCommand(signInput); + const signatureResponse = await kmsClient.send(signCommand); + const signatureBase64 = Buffer.from(signatureResponse.Signature).toString('base64').replaceAll('=', '').replaceAll('+', '-').replaceAll('/', '_'); + const jwt = `${headerPayload}.${signatureBase64}`; + return jwt; + } catch (error) { + console.error("Error signing JWT:", error.message); + return error; + } +} \ No newline at end of file diff --git a/main.js b/main.js index b4d919d..014d1cb 100644 --- a/main.js +++ b/main.js @@ -1,8 +1,6 @@ // @ts-check import core from "@actions/core"; -import { createAppAuth } from "@octokit/auth-app"; - import { main } from "./lib/main.js"; import request from "./lib/request.js"; @@ -19,10 +17,10 @@ if (!appId) { // The 'app_id' input was previously required, but it and 'app-id' are both optional now, until the former is removed. Still, we want to ensure that at least one of them is set. throw new Error("Input required and not supplied: app-id"); } -const privateKey = core.getInput("private-key") || core.getInput("private_key"); -if (!privateKey) { - // The 'private_key' input was previously required, but it and 'private-key' are both optional now, until the former is removed. Still, we want to ensure that at least one of them is set. - throw new Error("Input required and not supplied: private-key"); +const kmsKeyId = core.getInput("kms-key-id") || core.getInput("kms_key_id"); +if (!kmsKeyId) { + //We want to ensure that at least one of kms-key-id or kms_key_id is set. + throw new Error("Input required and not supplied: kms-key-id"); } const owner = core.getInput("owner"); const repositories = core.getInput("repositories"); @@ -33,11 +31,10 @@ const skipTokenRevoke = Boolean( main( appId, - privateKey, + kmsKeyId, owner, repositories, core, - createAppAuth, request, skipTokenRevoke ).catch((error) => { diff --git a/package-lock.json b/package-lock.json index a318de7..df2843e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { - "name": "create-github-app-token", - "version": "1.10.2", + "name": "create-github-app-token-aws", + "version": "1.10.3", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "create-github-app-token", - "version": "1.10.2", + "name": "create-github-app-token-aws", + "version": "1.10.3", "license": "MIT", "dependencies": { "@actions/core": "^1.10.1", - "@octokit/auth-app": "^7.1.0", + "@aws-sdk/client-kms": "^3.632.0", "@octokit/request": "^9.0.1", "p-retry": "^6.2.0", "undici": "^6.19.2" @@ -30,6 +30,7 @@ "version": "1.10.1", "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", + "license": "MIT", "dependencies": { "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" @@ -55,6 +56,663 @@ "node": ">=14.0" } }, + "node_modules/@aws-crypto/sha256-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", + "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-js": "^5.2.0", + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@smithy/util-utf8": "^2.0.0", + "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", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/supports-web-crypto": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", + "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@smithy/util-utf8": "^2.0.0", + "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-kms": { + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-kms/-/client-kms-3.635.0.tgz", + "integrity": "sha512-H2qJVXiz3WbBQwtxqfEvuJ9pCKJdqEWkzQ8I4knkXbQkyy78GktfMwBWqFyw3eap/s9rQmsyXbuuhBIozbemOg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.635.0", + "@aws-sdk/client-sts": "3.635.0", + "@aws-sdk/core": "3.635.0", + "@aws-sdk/credential-provider-node": "3.635.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sso": { + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.635.0.tgz", + "integrity": "sha512-/Hl69+JpFUo9JNVmh2gSvMgYkE4xjd+1okiRoPBbQqjI7YBP2JWCUDP8IoEkNq3wj0vNTq0OWfn6RpZycIkAXQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.635.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.635.0.tgz", + "integrity": "sha512-RIwDlhzAFttB1vbpznewnPqz7h1H/2UhQLwB38yfZBwYQOxyxVfLV5j5VoUUX3jY4i4qH9wiHc7b02qeAOZY6g==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.635.0", + "@aws-sdk/credential-provider-node": "3.635.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.635.0" + } + }, + "node_modules/@aws-sdk/client-sts": { + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.635.0.tgz", + "integrity": "sha512-Al2ytE69+cbA44qHlelqhzWwbURikfF13Zkal9utIG5Q6T2c7r8p6sePN92n8l/x1v0FhJ5VTxKak+cPTE0CZQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.635.0", + "@aws-sdk/core": "3.635.0", + "@aws-sdk/credential-provider-node": "3.635.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/core": { + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.635.0.tgz", + "integrity": "sha512-i1x/E/sgA+liUE1XJ7rj1dhyXpAKO1UKFUcTTHXok2ARjWTvszHnSXMOsB77aPbmn0fUp1JTx2kHUAZ1LVt5Bg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^2.4.0", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "fast-xml-parser": "4.4.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.620.1", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.620.1.tgz", + "integrity": "sha512-ExuILJ2qLW5ZO+rgkNRj0xiAipKT16Rk77buvPP8csR7kkCflT/gXTyzRe/uzIiETTxM7tr8xuO9MP/DQXqkfg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.635.0.tgz", + "integrity": "sha512-iJyRgEjOCQlBMXqtwPLIKYc7Bsc6nqjrZybdMDenPDa+kmLg7xh8LxHsu9088e+2/wtLicE34FsJJIfzu3L82g==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/util-stream": "^3.1.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.635.0.tgz", + "integrity": "sha512-+OqcNhhOFFY08YHLjO9/Y1n37RKAO7LADnsJ7VTXca7IfvYh27BVBn+FdlqnyEb1MQ5ArHTY4pq3pKRIg6RW4Q==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.620.1", + "@aws-sdk/credential-provider-http": "3.635.0", + "@aws-sdk/credential-provider-process": "3.620.1", + "@aws-sdk/credential-provider-sso": "3.635.0", + "@aws-sdk/credential-provider-web-identity": "3.621.0", + "@aws-sdk/types": "3.609.0", + "@smithy/credential-provider-imds": "^3.2.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.635.0" + } + }, + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.635.0.tgz", + "integrity": "sha512-bmd23mnb94S6AxmWPgqJTnvT9ONKlTx7EPafE1RNO+vUl6mHih4iyqX6ZPaRcSfaPx4U1R7H1RM8cSnafXgaBg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.620.1", + "@aws-sdk/credential-provider-http": "3.635.0", + "@aws-sdk/credential-provider-ini": "3.635.0", + "@aws-sdk/credential-provider-process": "3.620.1", + "@aws-sdk/credential-provider-sso": "3.635.0", + "@aws-sdk/credential-provider-web-identity": "3.621.0", + "@aws-sdk/types": "3.609.0", + "@smithy/credential-provider-imds": "^3.2.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.620.1", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.620.1.tgz", + "integrity": "sha512-hWqFMidqLAkaV9G460+1at6qa9vySbjQKKc04p59OT7lZ5cO5VH5S4aI05e+m4j364MBROjjk2ugNvfNf/8ILg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.635.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.635.0.tgz", + "integrity": "sha512-hO/fKyvUaGpK9zyvCnmJz70EputvGWDr2UTOn/RzvcR6UB4yXoFf0QcCMubEsE3v67EsAv6PadgOeJ0vz6IazA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/client-sso": "3.635.0", + "@aws-sdk/token-providers": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.621.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.621.0.tgz", + "integrity": "sha512-w7ASSyfNvcx7+bYGep3VBgC3K6vEdLmlpjT7nSIHxxQf+WSdvy+HynwJosrpZax0sK5q0D1Jpn/5q+r5lwwW6w==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.621.0" + } + }, + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.620.0.tgz", + "integrity": "sha512-VMtPEZwqYrII/oUkffYsNWY9PZ9xpNJpMgmyU0rlDQ25O1c0Hk3fJmZRe6pEkAJ0omD7kLrqGl1DUjQVxpd/Rg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.609.0.tgz", + "integrity": "sha512-S62U2dy4jMDhDFDK5gZ4VxFdWzCtLzwbYyFZx2uvPYTECkepLUfzLic2BHg2Qvtu4QjX+oGE3P/7fwaGIsGNuQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.620.0.tgz", + "integrity": "sha512-nh91S7aGK3e/o1ck64sA/CyoFw+gAYj2BDOnoNa6ouyCrVJED96ZXWbhye/fz9SgmNUZR2g7GdVpiLpMKZoI5w==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.632.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.632.0.tgz", + "integrity": "sha512-yY/sFsHKwG9yzSf/DTclqWJaGPI2gPBJDCGBujSqTG1zlS7Ot4fqi91DZ6088BFWzbOorDzJFcAhAEFzc6LuQg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.614.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.614.0.tgz", + "integrity": "sha512-vDCeMXvic/LU0KFIUjpC3RiSTIkkvESsEfbVHiHH0YINfl8HnEqR5rj+L8+phsCeVg2+LmYwYxd5NRz4PHxt5g==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/types": "^3.3.0", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/token-providers": { + "version": "3.614.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.614.0.tgz", + "integrity": "sha512-okItqyY6L9IHdxqs+Z116y5/nda7rHxLvROxtAJdLavWTYDydxrZstImNgGWTeVdmc0xX2gJCI77UYUTQWnhRw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sso-oidc": "^3.614.0" + } + }, + "node_modules/@aws-sdk/types": { + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.609.0.tgz", + "integrity": "sha512-+Tqnh9w0h2LcrUsdXyT1F8mNhXz+tVYBtP19LpeEGntmvHwa2XzvLUCWpoIAIVsHp5+HdB2X9Sn0KAtmbFXc2Q==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.632.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.632.0.tgz", + "integrity": "sha512-LlYMU8pAbcEQphOpE6xaNLJ8kPGhklZZTVzZVpVW477NaaGgoGTMYNXTABYHcxeF5E2lLrxql9OmVpvr8GWN8Q==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/types": "^3.3.0", + "@smithy/util-endpoints": "^2.0.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.568.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.568.0.tgz", + "integrity": "sha512-3nh4TINkXYr+H41QaPelCceEB2FXP3fxp93YZXB/kqJvX0U9j0N0Uk45gvsjmEPzG8XxkPEeLIfT2I1M7A6Lig==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.609.0.tgz", + "integrity": "sha512-fojPU+mNahzQ0YHYBsx0ZIhmMA96H+ZIZ665ObU9tl+SGdbLneVZVikGve+NmHTQwHzwkFsZYYnVKAkreJLAtA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/types": "^3.3.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.614.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.614.0.tgz", + "integrity": "sha512-15ElZT88peoHnq5TEoEtZwoXTXRxNrk60TZNdpl/TUBJ5oNJ9Dqb5Z4ryb8ofN6nm9aFf59GVAerFDz8iUoHBA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -804,6 +1462,572 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@smithy/abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.1.tgz", + "integrity": "sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/config-resolver": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.5.tgz", + "integrity": "sha512-SkW5LxfkSI1bUC74OtfBbdz+grQXYiPYolyu8VfpLIjEoN/sHVBlLeGXMQ1vX4ejkgfv6sxVbQJ32yF2cl1veA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^3.1.4", + "@smithy/types": "^3.3.0", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/core": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.4.0.tgz", + "integrity": "sha512-cHXq+FneIF/KJbt4q4pjN186+Jf4ZB0ZOqEaZMBhT79srEyGDDBV31NqBRBjazz8ppQ1bJbDJMY9ba5wKFV36w==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/credential-provider-imds": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.0.tgz", + "integrity": "sha512-0SCIzgd8LYZ9EJxUjLXBmEKSZR/P/w6l7Rz/pab9culE/RWuqelAKGJvn5qUOl8BgX8Yj5HWM50A5hiB/RzsgA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/fetch-http-handler": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", + "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^4.1.0", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@smithy/hash-node": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.3.tgz", + "integrity": "sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/invalid-dependency": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.3.tgz", + "integrity": "sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@smithy/is-array-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", + "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/middleware-content-length": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.5.tgz", + "integrity": "sha512-ILEzC2eyxx6ncej3zZSwMpB5RJ0zuqH7eMptxC4KN3f+v9bqT8ohssKbhNR78k/2tWW+KS5Spw+tbPF4Ejyqvw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/middleware-endpoint": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.0.tgz", + "integrity": "sha512-5y5aiKCEwg9TDPB4yFE7H6tYvGFf1OJHNczeY10/EFF8Ir8jZbNntQJxMWNfeQjC1mxPsaQ6mR9cvQbf+0YeMw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/middleware-serde": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/middleware-retry": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.15.tgz", + "integrity": "sha512-iTMedvNt1ApdvkaoE8aSDuwaoc+BhvHqttbA/FO4Ty+y/S5hW6Ci/CTScG7vam4RYJWZxdTElc3MEfHRVH6cgQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/service-error-classification": "^3.0.3", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/middleware-retry/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@smithy/middleware-serde": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz", + "integrity": "sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/middleware-stack": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz", + "integrity": "sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/node-config-provider": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.4.tgz", + "integrity": "sha512-YvnElQy8HR4vDcAjoy7Xkx9YT8xZP4cBXcbJSgm/kxmiQu08DwUwj8rkGnyoJTpfl/3xYHH+d8zE+eHqoDCSdQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/node-http-handler": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.1.4.tgz", + "integrity": "sha512-+UmxgixgOr/yLsUxcEKGH0fMNVteJFGkmRltYFHnBMlogyFdpzn2CwqWmxOrfJELhV34v0WSlaqG1UtE1uXlJg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^3.1.1", + "@smithy/protocol-http": "^4.1.0", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/property-provider": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.3.tgz", + "integrity": "sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/protocol-http": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", + "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/querystring-builder": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", + "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "@smithy/util-uri-escape": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/querystring-parser": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz", + "integrity": "sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/service-error-classification": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.3.tgz", + "integrity": "sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.4.tgz", + "integrity": "sha512-qMxS4hBGB8FY2GQqshcRUy1K6k8aBWP5vwm8qKkCT3A9K2dawUwOIJfqh9Yste/Bl0J2lzosVyrXDj68kLcHXQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/signature-v4": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.1.0.tgz", + "integrity": "sha512-aRryp2XNZeRcOtuJoxjydO6QTaVhxx/vjaR+gx7ZjaFgrgPRyZ3HCTbfwqYj6ZWEBHkCSUfcaymKPURaByukag==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^3.0.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-uri-escape": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/smithy-client": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.2.0.tgz", + "integrity": "sha512-pDbtxs8WOhJLJSeaF/eAbPgXg4VVYFlRcL/zoNYA5WbG3wBL06CHtBSg53ppkttDpAJ/hdiede+xApip1CwSLw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "@smithy/util-stream": "^3.1.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/types": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", + "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/url-parser": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.3.tgz", + "integrity": "sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/querystring-parser": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@smithy/util-base64": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", + "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-body-length-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-3.0.0.tgz", + "integrity": "sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@smithy/util-body-length-node": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-3.0.0.tgz", + "integrity": "sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-buffer-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", + "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-config-provider": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-3.0.0.tgz", + "integrity": "sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.15.tgz", + "integrity": "sha512-FZ4Psa3vjp8kOXcd3HJOiDPBCWtiilLl57r0cnNtq/Ga9RSDrM5ERL6xt+tO43+2af6Pn5Yp92x2n5vPuduNfg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/property-provider": "^3.1.3", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-node": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.15.tgz", + "integrity": "sha512-KSyAAx2q6d0t6f/S4XB2+3+6aQacm3aLMhs9aLMqn18uYGUepbdssfogW5JQZpc6lXNBnp0tEnR5e9CEKmEd7A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/config-resolver": "^3.0.5", + "@smithy/credential-provider-imds": "^3.2.0", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@smithy/util-endpoints": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.0.5.tgz", + "integrity": "sha512-ReQP0BWihIE68OAblC/WQmDD40Gx+QY1Ez8mTdFMXpmjfxSyz2fVQu3A4zXRfQU9sZXtewk3GmhfOHswvX+eNg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-hex-encoding": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", + "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-middleware": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.3.tgz", + "integrity": "sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-retry": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.3.tgz", + "integrity": "sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/service-error-classification": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-stream": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.1.3.tgz", + "integrity": "sha512-FIv/bRhIlAxC0U7xM1BCnF2aDRPq0UaelqBHkM2lsCp26mcBbgI0tCVTv+jGdsQLUmAMybua/bjDsSu8RQHbmw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-uri-escape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", + "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@smithy/util-utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", + "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@tokenizer/token": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", @@ -1066,6 +2290,12 @@ "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==", "dev": true }, + "node_modules/bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", + "license": "MIT" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1718,6 +2948,28 @@ "node": ">=8.6.0" } }, + "node_modules/fast-xml-parser": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -3435,6 +4687,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "license": "MIT" + }, "node_modules/strtok3": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", @@ -3649,6 +4907,12 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, + "node_modules/tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", + "license": "0BSD" + }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", diff --git a/package.json b/package.json index c9e1006..01ba99d 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,19 @@ { - "name": "create-github-app-token", + "name": "create-github-app-token-aws", "private": true, "type": "module", "version": "1.10.3", - "description": "GitHub Action for creating a GitHub App Installation Access Token", + "description": "GitHub Action for creating a GitHub App Installation Access Token using AWS KMS", "scripts": { "build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0 --packages=bundle", - "test": "c8 --100 ava tests/index.js", + "test": "c8 --lines 95 ava tests/index.js", "coverage": "c8 report --reporter html", "postcoverage": "open-cli coverage/index.html" }, "license": "MIT", "dependencies": { "@actions/core": "^1.10.1", - "@octokit/auth-app": "^7.1.0", + "@aws-sdk/client-kms": "^3.632.0", "@octokit/request": "^9.0.1", "p-retry": "^6.2.0", "undici": "^6.19.2" diff --git a/tests/main-missing-kms-key-id.test.js b/tests/main-missing-kms-key-id.test.js new file mode 100644 index 0000000..102ea85 --- /dev/null +++ b/tests/main-missing-kms-key-id.test.js @@ -0,0 +1,10 @@ +process.env.GITHUB_REPOSITORY_OWNER = "lepadatu-org"; +process.env.GITHUB_REPOSITORY = "lepadatu-org/create-github-app-token-aws"; +process.env["INPUT_APP-ID"] = "123456"; + +// Verify `main` exits with an error when neither the `kms-key-id` nor `kms_key_id` input is set. +try { + await import("../main.js"); +} catch (error) { + console.error(error.message); +} diff --git a/tests/main-token-get-installation-access-token-fail-response.test.js b/tests/main-token-get-installation-access-token-fail-response.test.js new file mode 100644 index 0000000..26a0445 --- /dev/null +++ b/tests/main-token-get-installation-access-token-fail-response.test.js @@ -0,0 +1,20 @@ +import { test } from "./main.js"; + +await test((mockPool) => { + process.env.INPUT_OWNER = process.env.GITHUB_REPOSITORY_OWNER; + process.env.INPUT_REPOSITORIES = process.env.GITHUB_REPOSITORY; + const mockInstallationId = "123456"; + + mockPool + .intercept({ + path: `/app/installations/${mockInstallationId}/access_tokens`, + method: "POST", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": "lepadatu-org/create-github-app-token-aws", + // Intentionally omitting the `authorization` header. + }, + }) + .reply(403, "Forbidden"); + } +) diff --git a/tests/main.js b/tests/main.js index 3e52f69..174bb5f 100644 --- a/tests/main.js +++ b/tests/main.js @@ -3,40 +3,14 @@ import { MockAgent, setGlobalDispatcher } from "undici"; export const DEFAULT_ENV = { - GITHUB_REPOSITORY_OWNER: "actions", - GITHUB_REPOSITORY: "actions/create-github-app-token", + GITHUB_REPOSITORY_OWNER: "lepadatu-org", + GITHUB_REPOSITORY: "lepadatu-org/create-github-app-token-aws", // inputs are set as environment variables with the prefix INPUT_ // https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs "INPUT_GITHUB-API-URL": "https://api.github.com", "INPUT_APP-ID": "123456", // This key is invalidated. It’s from https://github.com/octokit/auth-app.js/issues/465#issuecomment-1564998327. - "INPUT_PRIVATE-KEY": `-----BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEA280nfuUM9w00Ib9E2rvZJ6Qu3Ua3IqR34ZlK53vn/Iobn2EL -Z9puc5Q/nFBU15NKwHyQNb+OG2hTCkjd1Xi9XPzEOH1r42YQmTGq8YCkUSkk6KZA -5dnhLwN9pFquT9fQgrf4r1D5GJj3rqvj8JDr1sBmunArqY5u4gziSrIohcjLIZV0 -cIMz/RUIMe/EAsNeiwzEteHAtf/WpMs+OfF94SIUrDlkPr0H0H3DER8l1HZAvE0e -eD3ZJ6njrF6UHQWDVrekSTB0clpVTTU9TMpe+gs2nnFww9G8As+WsW8xHVjVipJy -AwqBhiR+s7wlcbh2i0NQqt8GL9/jIFTmleiwsQIDAQABAoIBAHNyP8pgl/yyzKzk -/0871wUBMTQ7zji91dGCaFtJM0HrcDK4D/uOOPEv7nE1qDpKPLr5Me1pHUS7+NGw -EAPtlNhgUtew2JfppdIwyi5qeOPADoi7ud6AH8xHsxg+IMwC+JuP8WhzyUHoJj9y -PRi/pX94Mvy9qdE25HqKddjx1mLdaHhxqPkr16/em23uYZqm1lORsCPD3vTlthj7 -WiEbBSqmpYvjj8iFP4yFk2N+LvuWgSilRzq1Af3qE7PUp4xhjmcOPs78Sag1T7nl -ww/pgqCegISABHik7j++/5T+UlI5cLsyp/XENU9zAd4kCIczwNKpun2bn+djJdft -ravyX4ECgYEA+k2mHfi1zwKF3wT+cJbf30+uXrJczK2yZ33//4RKnhBaq7nSbQAI -nhWz2JESBK0TEo0+L7yYYq3HnT9vcES5R1NxzruH9wXgxssSx3JUj6w1raXYPh3B -+1XpYQsa6/bo2LmBELEx47F8FQbNgD5dmTJ4jBrf6MV4rRh9h6Bs7UkCgYEA4M3K -eAw52c2MNMIxH/LxdOQtEBq5GMu3AQC8I64DSSRrAoiypfEgyTV6S4gWJ5TKgYfD -zclnOVJF+tITe3neO9wHoZp8iCjCnoijcT6p2cJ4IaW68LEHPOokWBk0EpLjF4p2 -7sFi9+lUpXYXfCN7aMJ77QpGzB7dNsBf0KUxMCkCgYEAjw/mjGbk82bLwUaHby6s -0mQmk7V6WPpGZ+Sadx7TzzglutVAslA8nK5m1rdEBywtJINaMcqnhm8xEm15cj+1 -blEBUVnaQpQ3fyf+mcR9FIknPRL3X7l+b/sQowjH4GqFd6m/XR0KGMwO0a3Lsyry -MGeqgtmxdMe5S6YdyXEmERECgYAgQsgklDSVIh9Vzux31kh6auhgoEUh3tJDbZSS -Vj2YeIZ21aE1mTYISglj34K2aW7qSc56sMWEf18VkKJFHQccdgYOVfo7HAZZ8+fo -r4J2gqb0xTDfq7gLMNrIXc2QQM4gKbnJp60JQM3p9NmH8huavBZGvSvNzTwXyGG3 -so0tiQKBgGQXZaxaXhYUcxYHuCkQ3V4Vsj3ezlM92xXlP32SGFm3KgFhYy9kATxw -Cax1ytZzvlrKLQyQFVK1COs2rHt7W4cJ7op7C8zXfsigXCiejnS664oAuX8sQZID -x3WQZRiXlWejSMUAHuMwXrhGlltF3lw83+xAjnqsVp75kGS6OH61 ------END RSA PRIVATE KEY-----`, + "INPUT_KMS_KEY_ID": `1234abcd-12ab-34cd-56ef-1234567890ab`, }; export async function test(cb = (_mockPool) => {}, env = DEFAULT_ENV) { diff --git a/tests/snapshots/index.js.md b/tests/snapshots/index.js.md index c458d39..6ca43bf 100644 --- a/tests/snapshots/index.js.md +++ b/tests/snapshots/index.js.md @@ -13,18 +13,18 @@ Generated by [AVA](https://avajs.dev). > stdout `app_id — 'app_id' is deprecated and will be removed in a future version. Use 'app-id' instead.␊ - private_key — 'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead.␊ + kms_key_id — 'kms_key_id' is deprecated and will be removed in a future version. Use 'kms-key-id' instead.␊ skip_token_revoke — 'skip_token_revoke' is deprecated and will be removed in a future version. Use 'skip-token-revoke' instead.` ## main-custom-github-api-url.test.js > stderr - '' + 'Error signing JWT: Region is missing' > stdout - `owner and repositories set, creating token for repositories "actions/create-github-app-token" owned by "actions"␊ + `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws" owned by "lepadatu-org"␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -33,7 +33,7 @@ Generated by [AVA](https://avajs.dev). ␊ ::set-output name=app-slug::github-actions␊ ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::2016-07-11T22:14:10Z` + ::save-state name=expiresAt::` ## main-missing-app-id.test.js @@ -45,6 +45,16 @@ Generated by [AVA](https://avajs.dev). '' +## main-missing-kms-key-id.test.js + +> stderr + + 'Input required and not supplied: kms-key-id' + +> stdout + + '' + ## main-missing-owner.test.js > stderr @@ -59,7 +69,7 @@ Generated by [AVA](https://avajs.dev). > stderr - 'Input required and not supplied: private-key' + 'Input required and not supplied: kms-key-id' > stdout @@ -75,11 +85,30 @@ Generated by [AVA](https://avajs.dev). '' +## main-token-get-installation-access-token-fail-response.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws" owned by "lepadatu-org"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + ## main-token-get-owner-set-repo-fail-response.test.js > stderr - '' + 'Error signing JWT: Region is missing' > stdout @@ -93,17 +122,17 @@ Generated by [AVA](https://avajs.dev). ␊ ::set-output name=app-slug::github-actions␊ ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::2016-07-11T22:14:10Z` + ::save-state name=expiresAt::` ## main-token-get-owner-set-repo-set-to-many.test.js > stderr - '' + 'Error signing JWT: Region is missing' > stdout - `owner and repositories set, creating token for repositories "actions/create-github-app-token,actions/toolkit" owned by "actions"␊ + `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws,actions/toolkit" owned by "lepadatu-org"␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -112,17 +141,17 @@ Generated by [AVA](https://avajs.dev). ␊ ::set-output name=app-slug::github-actions␊ ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::2016-07-11T22:14:10Z` + ::save-state name=expiresAt::` ## main-token-get-owner-set-repo-set-to-one.test.js > stderr - '' + 'Error signing JWT: Region is missing' > stdout - `owner and repositories set, creating token for repositories "actions/create-github-app-token" owned by "actions"␊ + `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws" owned by "lepadatu-org"␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -131,17 +160,17 @@ Generated by [AVA](https://avajs.dev). ␊ ::set-output name=app-slug::github-actions␊ ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::2016-07-11T22:14:10Z` + ::save-state name=expiresAt::` ## main-token-get-owner-set-to-org-repo-unset.test.js > stderr - '' + 'Error signing JWT: Region is missing' > stdout - `repositories not set, creating token for all repositories for given owner "actions"␊ + `repositories not set, creating token for all repositories for given owner "lepadatu-org"␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -150,13 +179,13 @@ Generated by [AVA](https://avajs.dev). ␊ ::set-output name=app-slug::github-actions␊ ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::2016-07-11T22:14:10Z` + ::save-state name=expiresAt::` ## main-token-get-owner-set-to-user-fail-response.test.js > stderr - '' + 'Error signing JWT: Region is missing' > stdout @@ -170,13 +199,13 @@ Generated by [AVA](https://avajs.dev). ␊ ::set-output name=app-slug::github-actions␊ ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::2016-07-11T22:14:10Z` + ::save-state name=expiresAt::` ## main-token-get-owner-set-to-user-repo-unset.test.js > stderr - '' + 'Error signing JWT: Region is missing' > stdout @@ -189,17 +218,17 @@ Generated by [AVA](https://avajs.dev). ␊ ::set-output name=app-slug::github-actions␊ ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::2016-07-11T22:14:10Z` + ::save-state name=expiresAt::` ## main-token-get-owner-unset-repo-set.test.js > stderr - '' + 'Error signing JWT: Region is missing' > stdout - `owner not set, creating owner for given repositories "actions/create-github-app-token" in current owner ("actions")␊ + `owner not set, creating owner for given repositories "lepadatu-org/create-github-app-token-aws" in current owner ("lepadatu-org")␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -208,17 +237,17 @@ Generated by [AVA](https://avajs.dev). ␊ ::set-output name=app-slug::github-actions␊ ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::2016-07-11T22:14:10Z` + ::save-state name=expiresAt::` ## main-token-get-owner-unset-repo-unset.test.js > stderr - '' + 'Error signing JWT: Region is missing' > stdout - `owner and repositories not set, creating token for the current repository ("create-github-app-token")␊ + `owner and repositories not set, creating token for the current repository ("create-github-app-token-aws")␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -227,7 +256,7 @@ Generated by [AVA](https://avajs.dev). ␊ ::set-output name=app-slug::github-actions␊ ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::2016-07-11T22:14:10Z` + ::save-state name=expiresAt::` ## post-revoke-token-fail-response.test.js diff --git a/tests/snapshots/index.js.snap b/tests/snapshots/index.js.snap index 5a0653706ded1917da4cb52e95edaeab23821f70..6411d8776b452a507eca28c160dc42d1544f435b 100644 GIT binary patch literal 1187 zcmV;U1YG+;RzVXA?s2+qwNW#fsW-<+=2O5QvOXMMfi$Prsi3WJMG#@3{j^JdFr2K!j zL{Wk?f)hU(Mj~w+6@hGP=&1h8tCTXG?3P35u>1vP(XAbil|ybcK?3Cy785vOBWjKYI=Tv8IkC zXt!YvsX}3t7Jvl7ERsM2H#WZ89640lUsR7F-Sdp{5)d_ zhN{e@nIV!V@SaOGTL{}T9>?4rG7&P?Y%QnbJ>6*i-=sC>~+<1;|dmJ@(t%DE^pJzfB;7er)W@#D=2pP%ajX-If zxeO_L+f!Da(DCXvJaspwsw-ojPvIM$LU$I%i`(|ZZEWuz>^!{J-rst#_wnw*-u~nE z-lLDU_WP%Akt7)!>mUe*7)2U)T>QI@^GPM1)KrU}J#7)3{C}$H_j_O!6BO=v3fZZW zPA%rmJ2uUEYkJoS&TXm-hI$sjg8&eVcMrLUsRm4yM5tW4a_O_W^zw74xsFmR**5E{ z`TE=A>yO#^vf3eZ`xr*3sCIq+zI)%E+8n;2K>lYJxG|8VhBU7;vMtO`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mmnd|1&DK`bn%lR9QmzPs7Vq8v~_ Date: Wed, 4 Sep 2024 15:29:38 +0300 Subject: [PATCH 02/15] Org & README updates --- README.md | 19 +++- package-lock.json | 90 +----------------- package.json | 8 +- tests/main-missing-kms-key-id.test.js | 4 +- ...llation-access-token-fail-response.test.js | 2 +- tests/main.js | 4 +- tests/snapshots/index.js.md | 12 +-- tests/snapshots/index.js.snap | Bin 1187 -> 1185 bytes 8 files changed, 33 insertions(+), 106 deletions(-) diff --git a/README.md b/README.md index 33c61a9..c9fc641 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,17 @@ -# Create GitHub App Token +# Create GitHub App Token using AWS KMS [![test](https://github.com/actions/create-github-app-token/actions/workflows/test.yml/badge.svg)](https://github.com/actions/create-github-app-token/actions/workflows/test.yml) -GitHub Action for creating a GitHub App installation access token using AWS KMS in order to safely store the GitHub repositry private key. +GitHub Action for generating a GitHub App installation access token using AWS KMS in order to safely store the GitHub App private key. This is a fork of vanilla [create-github-app-token](https://github.com/actions/create-github-app-token) action. Unlike the vanilla version, the GitHub App private key is not stored as a secret in GitHub but it is imported in AWS KMS instead as an asymmetric sign-verify customer-managed key. Once imported, it can no longer be retrieved from AWS KMS. However, AWS KMS is capable of signing messages using the key, such as the JWT token used to generate the GitHub App installation access token. + +In the vanilla action, the runner has direct access to sensitive information (i.e. the GitHub App private key). In case the runner gets compromised, a malicious actor could potentially get access to sensitive information and run arbitrary API calls, only limited by the GitHub App scope. + +This action mitigates this risk by importing the sensitive information in a very secure location (AWS KMS) which does not allow the retrieval of the sensitive information. + + >[!IMPORTANT] + >Neither this action, nor AWS is responsible for securing access to your AWS account. See the [shared responsibility model](https://docs.aws.amazon.com/whitepapers/latest/aws-risk-and-compliance/shared-responsibility-model.html). It is highly advised to use temporary AWS credentials scoped to the least privilege when accessing AWS API in order to sign the JWT token. + >Using AWS KMS will generate extra costs in your AWS bill. + ## Usage @@ -10,8 +19,8 @@ In order to use this action, you need to: 1. [Register new GitHub App](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app) 2. [Store the App's ID in your repository environment variable](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) or [secret](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example: `APP_ID`) -3. [Import the App's private key in your AWS Account KMS service, under customer-managed keys of type assymetric, sign-verify](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html) -4. [Store the above KMS Key ID as a repository secret](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example `KMS_KEY_ID`). Once stored in AWS KMS, the GitHub private key can no longer be retieved from AWS. AWS API can only by asked to sign/verify using the respective key. This substantially improves the security posture, because the key is no longer accessible. +3. [Import the App's private key in your AWS Account KMS service, under customer-managed keys of type asymmetric, sign-verify, RSA 2048](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html). Once imported in AWS KMS, the GitHub private key can no longer be retrieved from AWS. AWS API can only by asked to sign/verify using the respective key. This substantially improves the security posture, because the key is no longer accessible. +4. [Store the above KMS Key ID as a repository secret](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example `KMS_KEY_ID`) 5. [Store the AWS role to be assumed by the action as a repository secret](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example `ROLE_TO_ASSUME`) 6. [Store the AWS session name as an environment_variable](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) (example `ROLE_SESSION_NAME`) 7. [Store the AWS region name as an environment_variable](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) (example `AWS_REGION`) @@ -373,7 +382,7 @@ GitHub App slug. The action creates an installation access token using [the `POST /app/installations/{installation_id}/access_tokens` endpoint](https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app). -The action uses the GitHub private key stored in AWS KMS so sign a JWT token and uses this token subsequently for autheticating each GitHub API call, including the one above. Once stored in AWS KMS, the GitHub private key can no longer be retieved from AWS. AWS API can only by asked to sign/verify using the respective key. This substantially improves the security posture, because the action will no longer access the private key anymore, but ask AWS API to sign/verify instead. +The action uses the GitHub private key stored in AWS KMS so sign a JWT token and uses this token subsequently for authenticating each GitHub API call, including the one above. Once stored in AWS KMS, the GitHub private key can no longer be retrieved from AWS. AWS API can only by asked to sign/verify using the respective key. This substantially improves the security posture, because the action will no longer access the private key anymore, but ask AWS API to sign/verify instead. By default, diff --git a/package-lock.json b/package-lock.json index df2843e..404a4cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1257,68 +1257,6 @@ "node": ">= 8" } }, - "node_modules/@octokit/auth-app": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-7.1.0.tgz", - "integrity": "sha512-cazGaJPSgeZ8NkVYeM/C5l/6IQ5vZnsI8p1aMucadCkt/bndI+q+VqwrlnWbASRmenjOkf1t1RpCKrif53U8gw==", - "dependencies": { - "@octokit/auth-oauth-app": "^8.1.0", - "@octokit/auth-oauth-user": "^5.1.0", - "@octokit/request": "^9.1.1", - "@octokit/request-error": "^6.1.1", - "@octokit/types": "^13.4.1", - "lru-cache": "^10.0.0", - "universal-github-app-jwt": "^2.2.0", - "universal-user-agent": "^7.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/auth-oauth-app": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-8.1.1.tgz", - "integrity": "sha512-5UtmxXAvU2wfcHIPPDWzVSAWXVJzG3NWsxb7zCFplCWEmMCArSZV0UQu5jw5goLQXbFyOr5onzEH37UJB3zQQg==", - "dependencies": { - "@octokit/auth-oauth-device": "^7.0.0", - "@octokit/auth-oauth-user": "^5.0.1", - "@octokit/request": "^9.0.0", - "@octokit/types": "^13.0.0", - "universal-user-agent": "^7.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/auth-oauth-device": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-7.1.1.tgz", - "integrity": "sha512-HWl8lYueHonuyjrKKIup/1tiy0xcmQCdq5ikvMO1YwkNNkxb6DXfrPjrMYItNLyCP/o2H87WuijuE+SlBTT8eg==", - "dependencies": { - "@octokit/oauth-methods": "^5.0.0", - "@octokit/request": "^9.0.0", - "@octokit/types": "^13.0.0", - "universal-user-agent": "^7.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/auth-oauth-user": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-5.1.1.tgz", - "integrity": "sha512-rRkMz0ErOppdvEfnemHJXgZ9vTPhBuC6yASeFaB7I2yLMd7QpjfrL1mnvRPlyKo+M6eeLxrKanXJ9Qte29SRsw==", - "dependencies": { - "@octokit/auth-oauth-device": "^7.0.1", - "@octokit/oauth-methods": "^5.0.0", - "@octokit/request": "^9.0.1", - "@octokit/types": "^13.0.0", - "universal-user-agent": "^7.0.0" - }, - "engines": { - "node": ">= 18" - } - }, "node_modules/@octokit/endpoint": { "version": "10.1.1", "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.1.tgz", @@ -1331,28 +1269,6 @@ "node": ">= 18" } }, - "node_modules/@octokit/oauth-authorization-url": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-7.1.1.tgz", - "integrity": "sha512-ooXV8GBSabSWyhLUowlMIVd9l1s2nsOGQdlP2SQ4LnkEsGXzeCvbSbCPdZThXhEFzleGPwbapT0Sb+YhXRyjCA==", - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/oauth-methods": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-5.1.2.tgz", - "integrity": "sha512-C5lglRD+sBlbrhCUTxgJAFjWgJlmTx5bQ7Ch0+2uqRjYv7Cfb5xpX4WuSC9UgQna3sqRGBL9EImX9PvTpMaQ7g==", - "dependencies": { - "@octokit/oauth-authorization-url": "^7.0.0", - "@octokit/request": "^9.1.0", - "@octokit/request-error": "^6.1.0", - "@octokit/types": "^13.0.0" - }, - "engines": { - "node": ">= 18" - } - }, "node_modules/@octokit/openapi-types": { "version": "22.2.0", "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz", @@ -3711,6 +3627,7 @@ "version": "10.2.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "dev": true, "engines": { "node": "14 || >=16.14" } @@ -4977,11 +4894,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/universal-github-app-jwt": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/universal-github-app-jwt/-/universal-github-app-jwt-2.2.0.tgz", - "integrity": "sha512-G5o6f95b5BggDGuUfKDApKaCgNYy2x7OdHY0zSMF081O0EJobw+1130VONhrA7ezGSV2FNOGyM+KQpQZAr9bIQ==" - }, "node_modules/universal-user-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz", diff --git a/package.json b/package.json index 01ba99d..bc3b5ed 100644 --- a/package.json +++ b/package.json @@ -50,5 +50,11 @@ } ] ] - } + }, + "main": "main.js", + "directories": { + "lib": "lib", + "test": "tests" + }, + "author": "" } diff --git a/tests/main-missing-kms-key-id.test.js b/tests/main-missing-kms-key-id.test.js index 102ea85..d96dc38 100644 --- a/tests/main-missing-kms-key-id.test.js +++ b/tests/main-missing-kms-key-id.test.js @@ -1,5 +1,5 @@ -process.env.GITHUB_REPOSITORY_OWNER = "lepadatu-org"; -process.env.GITHUB_REPOSITORY = "lepadatu-org/create-github-app-token-aws"; +process.env.GITHUB_REPOSITORY_OWNER = "lepadatu-actions"; +process.env.GITHUB_REPOSITORY = "lepadatu-actions/create-github-app-token-aws"; process.env["INPUT_APP-ID"] = "123456"; // Verify `main` exits with an error when neither the `kms-key-id` nor `kms_key_id` input is set. diff --git a/tests/main-token-get-installation-access-token-fail-response.test.js b/tests/main-token-get-installation-access-token-fail-response.test.js index 26a0445..4b3f9cf 100644 --- a/tests/main-token-get-installation-access-token-fail-response.test.js +++ b/tests/main-token-get-installation-access-token-fail-response.test.js @@ -11,7 +11,7 @@ await test((mockPool) => { method: "POST", headers: { accept: "application/vnd.github.v3+json", - "user-agent": "lepadatu-org/create-github-app-token-aws", + "user-agent": "lepadatu-actions/create-github-app-token-aws", // Intentionally omitting the `authorization` header. }, }) diff --git a/tests/main.js b/tests/main.js index 174bb5f..082aebf 100644 --- a/tests/main.js +++ b/tests/main.js @@ -3,8 +3,8 @@ import { MockAgent, setGlobalDispatcher } from "undici"; export const DEFAULT_ENV = { - GITHUB_REPOSITORY_OWNER: "lepadatu-org", - GITHUB_REPOSITORY: "lepadatu-org/create-github-app-token-aws", + GITHUB_REPOSITORY_OWNER: "lepadatu-actions", + GITHUB_REPOSITORY: "lepadatu-actions/create-github-app-token-aws", // inputs are set as environment variables with the prefix INPUT_ // https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs "INPUT_GITHUB-API-URL": "https://api.github.com", diff --git a/tests/snapshots/index.js.md b/tests/snapshots/index.js.md index 6ca43bf..b8c5150 100644 --- a/tests/snapshots/index.js.md +++ b/tests/snapshots/index.js.md @@ -24,7 +24,7 @@ Generated by [AVA](https://avajs.dev). > stdout - `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws" owned by "lepadatu-org"␊ + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -93,7 +93,7 @@ Generated by [AVA](https://avajs.dev). > stdout - `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws" owned by "lepadatu-org"␊ + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -132,7 +132,7 @@ Generated by [AVA](https://avajs.dev). > stdout - `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws,actions/toolkit" owned by "lepadatu-org"␊ + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws,actions/toolkit" owned by "lepadatu-actions"␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -151,7 +151,7 @@ Generated by [AVA](https://avajs.dev). > stdout - `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws" owned by "lepadatu-org"␊ + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -170,7 +170,7 @@ Generated by [AVA](https://avajs.dev). > stdout - `repositories not set, creating token for all repositories for given owner "lepadatu-org"␊ + `repositories not set, creating token for all repositories for given owner "lepadatu-actions"␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -228,7 +228,7 @@ Generated by [AVA](https://avajs.dev). > stdout - `owner not set, creating owner for given repositories "lepadatu-org/create-github-app-token-aws" in current owner ("lepadatu-org")␊ + `owner not set, creating owner for given repositories "lepadatu-actions/create-github-app-token-aws" in current owner ("lepadatu-actions")␊ ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ diff --git a/tests/snapshots/index.js.snap b/tests/snapshots/index.js.snap index 6411d8776b452a507eca28c160dc42d1544f435b..db02ead4913837ba141e5cbedb3938e4fa75754a 100644 GIT binary patch literal 1185 zcmV;S1YY|=RzVWL`~^t-0U%D?I3Z5l_%G1R+FnontJq24us+%A z+4sKhz0Z3d?|k2C#wv)+H_reC#_)vj0ELn?gj7So5ke|tnxR=mFu3~I2qSrFP86D_ z&%%%+|LEm~R~PK7^2);N3lQ@r#4Up%Xq_*3RQYUh$xDY7o~8{ElE1$AnpE@mRU!;2 zd=f50aw_7OG=XSHR0l#LB;ll$VWxp}KpUatDtTbQ*`UsbGzdIgU5pabh~TX6r1(6a zqbM;nf-~QliA35!6@hGM=%@&CpF@}Db8XF0XO8yGbrlpjR~hySxs-4rX^f@V4%Tgp%CgN3TRyQ{U*#E7;OvQ0jGc+AKVw1tv3l0+CIWP4=6fA$LgV?~`x z&@NyNsWJkU7GQ`0Tp@u5j@G^lj6A;U;3NePSB5jSn_qy?(F0T@N<4YxUjD&DzaiYi(<7eRBtDn_G9+`QjpD z29T-@(+r8^3B2#z&1b^aj>j=~%_c&|YW21CTN|U6+5kR~=T}+S9!8#`AQ`UeeAp1SK()fF~pQ~0K*(DlT4aeJP)?Y)EJ{Rej&N4xhAKRGx)JbKhP zeE9M1QLhVENRk<}lf(cLRHS;_*}qerO)BxErdo7t$3<}V|H-Cb@BYY`pm5()$c9on zHJLYVTQ{@j^o|ppkE%8x^+o^>0x+igZHtSTYA~si2Fht&PU~5x_1bgDxyn*2*%s}x zIs4n=?2q|4v)UnaaSUSAr{|vg-ga*e;D90j-erymNs6R)jgdWp`&pCh+&^&Big&n( zc{7F*#`$5aO@`6FK}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D_F*Ys17 From eaa2aeb42fc06523d424b43c08c80c26b4850b53 Mon Sep 17 00:00:00 2001 From: Cristian Lepadatu Date: Wed, 4 Sep 2024 15:32:43 +0300 Subject: [PATCH 03/15] Updated readme --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c9fc641..d6826e6 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,12 @@ In the vanilla action, the runner has direct access to sensitive information (i. This action mitigates this risk by importing the sensitive information in a very secure location (AWS KMS) which does not allow the retrieval of the sensitive information. - >[!IMPORTANT] - >Neither this action, nor AWS is responsible for securing access to your AWS account. See the [shared responsibility model](https://docs.aws.amazon.com/whitepapers/latest/aws-risk-and-compliance/shared-responsibility-model.html). It is highly advised to use temporary AWS credentials scoped to the least privilege when accessing AWS API in order to sign the JWT token. + >[!IMPORTANT] + > + >Neither this action, nor AWS is responsible for securing access to your AWS account. See the [shared responsibility model](https://docs.aws.amazon.com/whitepapers/latest/aws-risk-and-compliance/shared-responsibility-model.html). + > + >It is highly advised to use temporary AWS credentials scoped to the least privilege when accessing AWS API in order to sign the JWT token. + > >Using AWS KMS will generate extra costs in your AWS bill. From 6c842192895e2a204f5bd2371ac3b1ca5d68cb6e Mon Sep 17 00:00:00 2001 From: Cristian Lepadatu Date: Wed, 4 Sep 2024 18:36:21 +0300 Subject: [PATCH 04/15] updated .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b443287..35c13ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .env coverage node_modules/ +.vscode From 34843d7835e55b1cb6666c8aebbb301c0f34424b Mon Sep 17 00:00:00 2001 From: Cristian Lepadatu Date: Wed, 21 Aug 2024 15:54:49 +0300 Subject: [PATCH 05/15] modified the package files and workflows --- .github/workflows/release.yml | 2 +- tests/snapshots/index.js.md | 12 ++++++++++++ tests/snapshots/index.js.snap | Bin 1185 -> 0 bytes 3 files changed, 13 insertions(+), 1 deletion(-) delete mode 100644 tests/snapshots/index.js.snap diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6fa04ce..fd78502 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,4 +44,4 @@ jobs: - run: npm install --no-save @semantic-release/git semantic-release-plugin-github-breaking-version-tag - run: npx semantic-release --debug env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}# diff --git a/tests/snapshots/index.js.md b/tests/snapshots/index.js.md index b8c5150..d4ceba4 100644 --- a/tests/snapshots/index.js.md +++ b/tests/snapshots/index.js.md @@ -24,7 +24,11 @@ Generated by [AVA](https://avajs.dev). > stdout +<<<<<<< HEAD `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ +======= + `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws" owned by "lepadatu-org"␊ +>>>>>>> 1e879eb (modified the package files and workflows) ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -93,7 +97,11 @@ Generated by [AVA](https://avajs.dev). > stdout +<<<<<<< HEAD `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ +======= + `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws" owned by "lepadatu-org"␊ +>>>>>>> 1e879eb (modified the package files and workflows) ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ @@ -132,7 +140,11 @@ Generated by [AVA](https://avajs.dev). > stdout +<<<<<<< HEAD `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws,actions/toolkit" owned by "lepadatu-actions"␊ +======= + `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws,actions/toolkit" owned by "lepadatu-org"␊ +>>>>>>> 1e879eb (modified the package files and workflows) ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ ␊ ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ diff --git a/tests/snapshots/index.js.snap b/tests/snapshots/index.js.snap deleted file mode 100644 index db02ead4913837ba141e5cbedb3938e4fa75754a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1185 zcmV;S1YY|=RzVWL`~^t-0U%D?I3Z5l_%G1R+FnontJq24us+%A z+4sKhz0Z3d?|k2C#wv)+H_reC#_)vj0ELn?gj7So5ke|tnxR=mFu3~I2qSrFP86D_ z&%%%+|LEm~R~PK7^2);N3lQ@r#4Up%Xq_*3RQYUh$xDY7o~8{ElE1$AnpE@mRU!;2 zd=f50aw_7OG=XSHR0l#LB;ll$VWxp}KpUatDtTbQ*`UsbGzdIgU5pabh~TX6r1(6a zqbM;nf-~QliA35!6@hGM=%@&CpF@}Db8XF0XO8yGbrlpjR~hySxs-4rX^f@V4%Tgp%CgN3TRyQ{U*#E7;OvQ0jGc+AKVw1tv3l0+CIWP4=6fA$LgV?~`x z&@NyNsWJkU7GQ`0Tp@u5j@G^lj6A;U;3NePSB5jSn_qy?(F0T@N<4YxUjD&DzaiYi(<7eRBtDn_G9+`QjpD z29T-@(+r8^3B2#z&1b^aj>j=~%_c&|YW21CTN|U6+5kR~=T}+S9!8#`AQ`UeeAp1SK()fF~pQ~0K*(DlT4aeJP)?Y)EJ{Rej&N4xhAKRGx)JbKhP zeE9M1QLhVENRk<}lf(cLRHS;_*}qerO)BxErdo7t$3<}V|H-Cb@BYY`pm5()$c9on zHJLYVTQ{@j^o|ppkE%8x^+o^>0x+igZHtSTYA~si2Fht&PU~5x_1bgDxyn*2*%s}x zIs4n=?2q|4v)UnaaSUSAr{|vg-ga*e;D90j-erymNs6R)jgdWp`&pCh+&^&Big&n( zc{7F*#`$5aO@`6FK}8cTCyem(Lh*MG#a}LO3BG;>39eIzuFk^bK5 z;$ivKgXO30rfQgy{CWYzJi93&Nsws`61!%XhkqHbm59xc7@daLB~7FsJjlKsw{xE~ zoA3ns&=e0V$@0=9(n^TV0itTE40aFA{?!B4sVAGy^TpUH*Oo2Dj$Prc)4(N+ Date: Mon, 2 Sep 2024 17:50:33 +0300 Subject: [PATCH 06/15] Updated the release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd78502..117a2f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,4 +44,4 @@ jobs: - run: npm install --no-save @semantic-release/git semantic-release-plugin-github-breaking-version-tag - run: npx semantic-release --debug env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}# + GH_TOKEN: ${{ steps.app-token.outputs.token }}# From 6c3c052cd6ef9c2c952485d425a562faba115a6e Mon Sep 17 00:00:00 2001 From: Cristian Lepadatu Date: Mon, 2 Sep 2024 19:21:51 +0300 Subject: [PATCH 07/15] changed the workflows --- .github/workflows/release.yml | 9 ++++++++- tests/main-132-133.test.js | 29 +++++++++++++++++++++++++++++ tests/main-161-162.test.js | 25 +++++++++++++++++++++++++ tests/main-208-210.test.js | 26 ++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 tests/main-132-133.test.js create mode 100644 tests/main-161-162.test.js create mode 100644 tests/main-208-210.test.js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 117a2f9..c60a34b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,8 +40,15 @@ jobs: with: app-id: ${{ secrets.APP_ID }} kms-key-id: ${{ secrets.KMS_KEY_ID }} + - uses: octokit/request-action@v2.x + id: get-repository + env: + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + with: + route: GET /installation/repositories + - run: echo '${{ steps.get-repository.outputs.data }}' # install release dependencies and release - run: npm install --no-save @semantic-release/git semantic-release-plugin-github-breaking-version-tag - run: npx semantic-release --debug env: - GH_TOKEN: ${{ steps.app-token.outputs.token }}# + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}# diff --git a/tests/main-132-133.test.js b/tests/main-132-133.test.js new file mode 100644 index 0000000..0baceef --- /dev/null +++ b/tests/main-132-133.test.js @@ -0,0 +1,29 @@ +import test from 'ava'; +import { MockAgent, setGlobalDispatcher } from 'undici'; +import { accessTokenResponse } from '../lib/main'; // Adjust the import based on your actual function + +test.beforeEach(() => { + const agent = new MockAgent(); + agent.disableNetConnect(); + setGlobalDispatcher(agent); +}); + +test('accessTokenResponse should handle the response correctly', async t => { + const agent = new MockAgent(); + const mockPool = agent.get('https://api.github.com'); + + mockPool.intercept({ + path: `/app/installations/${installationId}/access_tokens`, // Adjust the path based on your actual endpoint + method: 'POST', + headers: { + authorization: `bearer ${jwt}` + } + + }).reply(200, { /* mock response data */ }); + + setGlobalDispatcher(agent); + + const result = await accessTokenResponse(); // Call the function you're testing + + // t.deepEqual(result, { /* expected result */ }); // Adjust based on expected result +}); diff --git a/tests/main-161-162.test.js b/tests/main-161-162.test.js new file mode 100644 index 0000000..e29c43a --- /dev/null +++ b/tests/main-161-162.test.js @@ -0,0 +1,25 @@ +// import test from 'ava'; +// import { MockAgent, setGlobalDispatcher } from 'undici'; +// import { accessTokenResponse } from '../lib/main'; // Adjust the import based on your actual function +// +// test.beforeEach(() => { + // const agent = new MockAgent(); + // agent.disableNetConnect(); + // setGlobalDispatcher(agent); +// }); +// +// test('accessTokenResponse should handle the response correctly', async t => { + // const agent = new MockAgent(); + // const mockPool = agent.get('https://api.github.com'); + // + // mockPool.intercept({ + // path: '/your-endpoint', // Adjust the path based on your actual endpoint + // method: 'GET', + // }).reply(200, { /* mock response data */ }); +// + // setGlobalDispatcher(agent); +// + // const result = await accessTokenResponse(); // Call the function you're testing +// + // t.deepEqual(result, { /* expected result */ }); // Adjust based on expected result +// }); diff --git a/tests/main-208-210.test.js b/tests/main-208-210.test.js new file mode 100644 index 0000000..cb6d0d2 --- /dev/null +++ b/tests/main-208-210.test.js @@ -0,0 +1,26 @@ +// import test from 'ava'; +// import { MockAgent, setGlobalDispatcher } from 'undici'; +// import { createJWT } from '../lib/main'; // Adjust the import based on your actual function +// +// test.beforeEach(() => { + // const agent = new MockAgent(); + // agent.disableNetConnect(); + // setGlobalDispatcher(agent); +// }); +// +// test('createJWT should handle the response correctly', async t => { + // const agent = new MockAgent(); + // const mockPool = agent.get('https://api.github.com'); + // + // mockPool.intercept({ + // path: '/your-endpoint', // Adjust the path based on your actual endpoint + // method: 'GET', + // }).reply(200, { /* mock response data */ }); +// + // setGlobalDispatcher(agent); +// + // const result = await createJWT(); // Call the function you're testing +// + // t.deepEqual(result, { /* expected result */ }); // Adjust based on expected result +// }); +// \ No newline at end of file From ef900b86554a5ff498d77d04db3917976d59d93f Mon Sep 17 00:00:00 2001 From: Cristian Lepadatu Date: Mon, 2 Sep 2024 21:34:41 +0300 Subject: [PATCH 08/15] updated the tests --- tests/main-132-133.test.js | 29 ----------------------------- tests/main-161-162.test.js | 25 ------------------------- tests/main-208-210.test.js | 26 -------------------------- 3 files changed, 80 deletions(-) delete mode 100644 tests/main-132-133.test.js delete mode 100644 tests/main-161-162.test.js delete mode 100644 tests/main-208-210.test.js diff --git a/tests/main-132-133.test.js b/tests/main-132-133.test.js deleted file mode 100644 index 0baceef..0000000 --- a/tests/main-132-133.test.js +++ /dev/null @@ -1,29 +0,0 @@ -import test from 'ava'; -import { MockAgent, setGlobalDispatcher } from 'undici'; -import { accessTokenResponse } from '../lib/main'; // Adjust the import based on your actual function - -test.beforeEach(() => { - const agent = new MockAgent(); - agent.disableNetConnect(); - setGlobalDispatcher(agent); -}); - -test('accessTokenResponse should handle the response correctly', async t => { - const agent = new MockAgent(); - const mockPool = agent.get('https://api.github.com'); - - mockPool.intercept({ - path: `/app/installations/${installationId}/access_tokens`, // Adjust the path based on your actual endpoint - method: 'POST', - headers: { - authorization: `bearer ${jwt}` - } - - }).reply(200, { /* mock response data */ }); - - setGlobalDispatcher(agent); - - const result = await accessTokenResponse(); // Call the function you're testing - - // t.deepEqual(result, { /* expected result */ }); // Adjust based on expected result -}); diff --git a/tests/main-161-162.test.js b/tests/main-161-162.test.js deleted file mode 100644 index e29c43a..0000000 --- a/tests/main-161-162.test.js +++ /dev/null @@ -1,25 +0,0 @@ -// import test from 'ava'; -// import { MockAgent, setGlobalDispatcher } from 'undici'; -// import { accessTokenResponse } from '../lib/main'; // Adjust the import based on your actual function -// -// test.beforeEach(() => { - // const agent = new MockAgent(); - // agent.disableNetConnect(); - // setGlobalDispatcher(agent); -// }); -// -// test('accessTokenResponse should handle the response correctly', async t => { - // const agent = new MockAgent(); - // const mockPool = agent.get('https://api.github.com'); - // - // mockPool.intercept({ - // path: '/your-endpoint', // Adjust the path based on your actual endpoint - // method: 'GET', - // }).reply(200, { /* mock response data */ }); -// - // setGlobalDispatcher(agent); -// - // const result = await accessTokenResponse(); // Call the function you're testing -// - // t.deepEqual(result, { /* expected result */ }); // Adjust based on expected result -// }); diff --git a/tests/main-208-210.test.js b/tests/main-208-210.test.js deleted file mode 100644 index cb6d0d2..0000000 --- a/tests/main-208-210.test.js +++ /dev/null @@ -1,26 +0,0 @@ -// import test from 'ava'; -// import { MockAgent, setGlobalDispatcher } from 'undici'; -// import { createJWT } from '../lib/main'; // Adjust the import based on your actual function -// -// test.beforeEach(() => { - // const agent = new MockAgent(); - // agent.disableNetConnect(); - // setGlobalDispatcher(agent); -// }); -// -// test('createJWT should handle the response correctly', async t => { - // const agent = new MockAgent(); - // const mockPool = agent.get('https://api.github.com'); - // - // mockPool.intercept({ - // path: '/your-endpoint', // Adjust the path based on your actual endpoint - // method: 'GET', - // }).reply(200, { /* mock response data */ }); -// - // setGlobalDispatcher(agent); -// - // const result = await createJWT(); // Call the function you're testing -// - // t.deepEqual(result, { /* expected result */ }); // Adjust based on expected result -// }); -// \ No newline at end of file From 726a517ed3f4f812560206c81ee7c4fd7d7016a7 Mon Sep 17 00:00:00 2001 From: Cristian Lepadatu Date: Tue, 3 Sep 2024 00:38:14 +0300 Subject: [PATCH 09/15] workflow update --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c60a34b..ff43ac8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,4 +51,4 @@ jobs: - run: npm install --no-save @semantic-release/git semantic-release-plugin-github-breaking-version-tag - run: npx semantic-release --debug env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}# + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} From 4f59f2bc1c22d8e60a6929d19aeca36f5bb3848f Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 2 Sep 2024 21:41:04 +0000 Subject: [PATCH 10/15] build(release): 1.0.0 [skip ci] # 1.0.0 (2024-09-02) ### Bug Fixes * **action-config:** prepare for release to marketplace ([#10](https://github.com/lepadatu-org/create-github-app-token-aws/issues/10)) ([12aa811](https://github.com/lepadatu-org/create-github-app-token-aws/commit/12aa81137bd7fec724cf23ab0c54092261f59830)) * check for token before revoking ([#30](https://github.com/lepadatu-org/create-github-app-token-aws/issues/30)) ([2540ed4](https://github.com/lepadatu-org/create-github-app-token-aws/commit/2540ed49e5d6bea751bf3da363bb5b5a6fcf0c07)) * **ci:** release configuration ([#6](https://github.com/lepadatu-org/create-github-app-token-aws/issues/6)) ([847634e](https://github.com/lepadatu-org/create-github-app-token-aws/commit/847634eeb36664e2d49db18add847e3fe1a183db)) * clarify `owner` input description ([#118](https://github.com/lepadatu-org/create-github-app-token-aws/issues/118)) ([d9bc169](https://github.com/lepadatu-org/create-github-app-token-aws/commit/d9bc16919cdbdb07543eb732aa872437384e296f)) * **deps:** bump dependencies([#84](https://github.com/lepadatu-org/create-github-app-token-aws/issues/84)) ([474769d](https://github.com/lepadatu-org/create-github-app-token-aws/commit/474769db88900a253a1c4aa9b4398d8a90c4cdab)), closes [#651](https://github.com/lepadatu-org/create-github-app-token-aws/issues/651) [#648](https://github.com/lepadatu-org/create-github-app-token-aws/issues/648) [#649](https://github.com/lepadatu-org/create-github-app-token-aws/issues/649) [#651](https://github.com/lepadatu-org/create-github-app-token-aws/issues/651) [#648](https://github.com/lepadatu-org/create-github-app-token-aws/issues/648) [#646](https://github.com/lepadatu-org/create-github-app-token-aws/issues/646) * **deps:** bump the production-dependencies group with 1 update ([#123](https://github.com/lepadatu-org/create-github-app-token-aws/issues/123)) ([beea7b8](https://github.com/lepadatu-org/create-github-app-token-aws/commit/beea7b860ac0b14ca14258aca701da842aa65e30)), closes [nodejs/undici#2978](https://github.com/nodejs/undici/issues/2978) [nodejs/undici#2971](https://github.com/nodejs/undici/issues/2971) [nodejs/undici#2980](https://github.com/nodejs/undici/issues/2980) [#2982](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2982) [nodejs/undici#2983](https://github.com/nodejs/undici/issues/2983) [nodejs/undici#2987](https://github.com/nodejs/undici/issues/2987) [nodejs/undici#2991](https://github.com/nodejs/undici/issues/2991) [#2986](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2986) [nodejs/undici#2992](https://github.com/nodejs/undici/issues/2992) [nodejs/undici#2985](https://github.com/nodejs/undici/issues/2985) [nodejs/undici#2993](https://github.com/nodejs/undici/issues/2993) [nodejs/undici#2995](https://github.com/nodejs/undici/issues/2995) [nodejs/undici#2998](https://github.com/nodejs/undici/issues/2998) [#2863](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2863) [nodejs/undici#2999](https://github.com/nodejs/undici/issues/2999) [nodejs/undici#3001](https://github.com/nodejs/undici/issues/3001) [nodejs/undici#2971](https://github.com/nodejs/undici/issues/2971) [nodejs/undici#2980](https://github.com/nodejs/undici/issues/2980) [nodejs/undici#2983](https://github.com/nodejs/undici/issues/2983) [nodejs/undici#2987](https://github.com/nodejs/undici/issues/2987) [nodejs/undici#2991](https://github.com/nodejs/undici/issues/2991) [nodejs/undici#2985](https://github.com/nodejs/undici/issues/2985) [nodejs/undici#2995](https://github.com/nodejs/undici/issues/2995) [nodejs/undici#2960](https://github.com/nodejs/undici/issues/2960) [nodejs/undici#2959](https://github.com/nodejs/undici/issues/2959) [nodejs/undici#2969](https://github.com/nodejs/undici/issues/2969) [nodejs/undici#2962](https://github.com/nodejs/undici/issues/2962) [nodejs/undici#2974](https://github.com/nodejs/undici/issues/2974) [nodejs/undici#2967](https://github.com/nodejs/undici/issues/2967) [nodejs/undici#2966](https://github.com/nodejs/undici/issues/2966) [nodejs/undici#2969](https://github.com/nodejs/undici/issues/2969) [nodejs/undici#2962](https://github.com/nodejs/undici/issues/2962) [nodejs/undici#2826](https://github.com/nodejs/undici/issues/2826) [nodejs/undici#2952](https://github.com/nodejs/undici/issues/2952) [#3001](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3001) [#2863](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2863) [#2999](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2999) [#2998](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2998) [#2993](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2993) [#2986](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2986) [#2992](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2992) [#2991](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2991) [#2987](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2987) * **deps:** bump the production-dependencies group with 1 update ([#68](https://github.com/lepadatu-org/create-github-app-token-aws/issues/68)) ([6375dce](https://github.com/lepadatu-org/create-github-app-token-aws/commit/6375dcedb2ea16f4290923bb46ed8a00ea439cae)) * **deps:** bump the production-dependencies group with 2 updates ([#138](https://github.com/lepadatu-org/create-github-app-token-aws/issues/138)) ([8d81a59](https://github.com/lepadatu-org/create-github-app-token-aws/commit/8d81a59103d6d17f5ecc243eb5fd53757607a1d2)), closes [#606](https://github.com/lepadatu-org/create-github-app-token-aws/issues/606) [#606](https://github.com/lepadatu-org/create-github-app-token-aws/issues/606) [#605](https://github.com/lepadatu-org/create-github-app-token-aws/issues/605) [#604](https://github.com/lepadatu-org/create-github-app-token-aws/issues/604) [nodejs/undici#3295](https://github.com/nodejs/undici/issues/3295) [nodejs/undici#3298](https://github.com/nodejs/undici/issues/3298) [nodejs/undici#3294](https://github.com/nodejs/undici/issues/3294) [nodejs/undici#3281](https://github.com/nodejs/undici/issues/3281) [nodejs/undici#3286](https://github.com/nodejs/undici/issues/3286) [nodejs/undici#3284](https://github.com/nodejs/undici/issues/3284) [nodejs/undici#3291](https://github.com/nodejs/undici/issues/3291) [nodejs/undici#3290](https://github.com/nodejs/undici/issues/3290) [nodejs/undici#3283](https://github.com/nodejs/undici/issues/3283) [nodejs/undici#3281](https://github.com/nodejs/undici/issues/3281) [nodejs/undici#3263](https://github.com/nodejs/undici/issues/3263) [nodejs/undici#3279](https://github.com/nodejs/undici/issues/3279) [nodejs/undici#3227](https://github.com/nodejs/undici/issues/3227) [nodejs/undici#3234](https://github.com/nodejs/undici/issues/3234) [nodejs/undici#3240](https://github.com/nodejs/undici/issues/3240) [nodejs/undici#3245](https://github.com/nodejs/undici/issues/3245) [nodejs/undici#3241](https://github.com/nodejs/undici/issues/3241) [nodejs/undici#3247](https://github.com/nodejs/undici/issues/3247) [nodejs/undici#3248](https://github.com/nodejs/undici/issues/3248) [nodejs/undici#3219](https://github.com/nodejs/undici/issues/3219) [nodejs/undici#3251](https://github.com/nodejs/undici/issues/3251) [nodejs/undici#3254](https://github.com/nodejs/undici/issues/3254) [nodejs/undici#3258](https://github.com/nodejs/undici/issues/3258) [nodejs/undici#3257](https://github.com/nodejs/undici/issues/3257) [nodejs/undici#3259](https://github.com/nodejs/undici/issues/3259) [nodejs/undici#3262](https://github.com/nodejs/undici/issues/3262) [nodejs/undici#3264](https://github.com/nodejs/undici/issues/3264) [nodejs/undici#3118](https://github.com/nodejs/undici/issues/3118) [nodejs/undici#3269](https://github.com/nodejs/undici/issues/3269) [#3301](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3301) [#3294](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3294) [#3298](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3298) [#3295](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3295) [#3293](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3293) [#3283](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3283) [#3290](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3290) [#3291](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3291) [#3284](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3284) [#3286](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3286) * **deps:** bump the production-dependencies group with 2 updates ([#94](https://github.com/lepadatu-org/create-github-app-token-aws/issues/94)) ([323044f](https://github.com/lepadatu-org/create-github-app-token-aws/commit/323044ff3180ac0ba3543efbe2b76ff90050e9b6)), closes [#562](https://github.com/lepadatu-org/create-github-app-token-aws/issues/562) [#557](https://github.com/lepadatu-org/create-github-app-token-aws/issues/557) [#562](https://github.com/lepadatu-org/create-github-app-token-aws/issues/562) [#560](https://github.com/lepadatu-org/create-github-app-token-aws/issues/560) [#559](https://github.com/lepadatu-org/create-github-app-token-aws/issues/559) [#558](https://github.com/lepadatu-org/create-github-app-token-aws/issues/558) [#557](https://github.com/lepadatu-org/create-github-app-token-aws/issues/557) [#553](https://github.com/lepadatu-org/create-github-app-token-aws/issues/553) [#552](https://github.com/lepadatu-org/create-github-app-token-aws/issues/552) [#551](https://github.com/lepadatu-org/create-github-app-token-aws/issues/551) [#75](https://github.com/lepadatu-org/create-github-app-token-aws/issues/75) [#75](https://github.com/lepadatu-org/create-github-app-token-aws/issues/75) * **deps:** bump the production-dependencies group with 3 updates ([#107](https://github.com/lepadatu-org/create-github-app-token-aws/issues/107)) ([f83fb27](https://github.com/lepadatu-org/create-github-app-token-aws/commit/f83fb279aa2bc96a80fac0b8cb97b369ae18334f)), closes [#579](https://github.com/lepadatu-org/create-github-app-token-aws/issues/579) [#579](https://github.com/lepadatu-org/create-github-app-token-aws/issues/579) [#576](https://github.com/lepadatu-org/create-github-app-token-aws/issues/576) [#577](https://github.com/lepadatu-org/create-github-app-token-aws/issues/577) [#574](https://github.com/lepadatu-org/create-github-app-token-aws/issues/574) [#572](https://github.com/lepadatu-org/create-github-app-token-aws/issues/572) [#571](https://github.com/lepadatu-org/create-github-app-token-aws/issues/571) [#567](https://github.com/lepadatu-org/create-github-app-token-aws/issues/567) [#681](https://github.com/lepadatu-org/create-github-app-token-aws/issues/681) [#678](https://github.com/lepadatu-org/create-github-app-token-aws/issues/678) [#667](https://github.com/lepadatu-org/create-github-app-token-aws/issues/667) [#681](https://github.com/lepadatu-org/create-github-app-token-aws/issues/681) [#680](https://github.com/lepadatu-org/create-github-app-token-aws/issues/680) [#609](https://github.com/lepadatu-org/create-github-app-token-aws/issues/609) [#678](https://github.com/lepadatu-org/create-github-app-token-aws/issues/678) [#676](https://github.com/lepadatu-org/create-github-app-token-aws/issues/676) [#673](https://github.com/lepadatu-org/create-github-app-token-aws/issues/673) [#669](https://github.com/lepadatu-org/create-github-app-token-aws/issues/669) [#667](https://github.com/lepadatu-org/create-github-app-token-aws/issues/667) [#671](https://github.com/lepadatu-org/create-github-app-token-aws/issues/671) [nodejs/undici#2683](https://github.com/nodejs/undici/issues/2683) [nodejs/undici#2645](https://github.com/nodejs/undici/issues/2645) [nodejs/undici#2695](https://github.com/nodejs/undici/issues/2695) [nodejs/undici#2699](https://github.com/nodejs/undici/issues/2699) [nodejs/undici#2703](https://github.com/nodejs/undici/issues/2703) [nodejs/undici#2644](https://github.com/nodejs/undici/issues/2644) [nodejs/undici#2702](https://github.com/nodejs/undici/issues/2702) [nodejs/undici#2706](https://github.com/nodejs/undici/issues/2706) [nodejs/undici#2707](https://github.com/nodejs/undici/issues/2707) [nodejs/undici#2644](https://github.com/nodejs/undici/issues/2644) [#2707](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2707) [#2706](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2706) [#2702](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2702) [#2644](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2644) [#2703](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2703) [#2699](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2699) [#2695](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2695) [#2645](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2645) [#2683](https://github.com/lepadatu-org/create-github-app-token-aws/issues/2683) * **deps:** bump the production-dependencies group with 3 updates ([#51](https://github.com/lepadatu-org/create-github-app-token-aws/issues/51)) ([6d98b25](https://github.com/lepadatu-org/create-github-app-token-aws/commit/6d98b259d9c6bef17db279eb4aefbbd031400ba4)), closes [#1511](https://github.com/lepadatu-org/create-github-app-token-aws/issues/1511) [#535](https://github.com/lepadatu-org/create-github-app-token-aws/issues/535) [#535](https://github.com/lepadatu-org/create-github-app-token-aws/issues/535) [#533](https://github.com/lepadatu-org/create-github-app-token-aws/issues/533) [#531](https://github.com/lepadatu-org/create-github-app-token-aws/issues/531) [#530](https://github.com/lepadatu-org/create-github-app-token-aws/issues/530) [#524](https://github.com/lepadatu-org/create-github-app-token-aws/issues/524) [#637](https://github.com/lepadatu-org/create-github-app-token-aws/issues/637) [#637](https://github.com/lepadatu-org/create-github-app-token-aws/issues/637) [#631](https://github.com/lepadatu-org/create-github-app-token-aws/issues/631) [#626](https://github.com/lepadatu-org/create-github-app-token-aws/issues/626) * **deps:** bump undici from 6.10.2 to 6.11.1 ([#125](https://github.com/lepadatu-org/create-github-app-token-aws/issues/125)) ([3c223c7](https://github.com/lepadatu-org/create-github-app-token-aws/commit/3c223c7336e276235eb843dd4e6ad42147199cbf)), closes [#3024](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3024) [nodejs/undici#3044](https://github.com/nodejs/undici/issues/3044) [#3023](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3023) [nodejs/undici#3025](https://github.com/nodejs/undici/issues/3025) [nodejs/undici#3024](https://github.com/nodejs/undici/issues/3024) [nodejs/undici#3034](https://github.com/nodejs/undici/issues/3034) [nodejs/undici#3038](https://github.com/nodejs/undici/issues/3038) [nodejs/undici#2947](https://github.com/nodejs/undici/issues/2947) [nodejs/undici#3040](https://github.com/nodejs/undici/issues/3040) [nodejs/undici#3036](https://github.com/nodejs/undici/issues/3036) [nodejs/undici#3041](https://github.com/nodejs/undici/issues/3041) [#3024](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3024) [#3041](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3041) [#3036](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3036) * **deps:** bump undici from 6.18.2 to 6.19.2 in the production-dependencies group ([#149](https://github.com/lepadatu-org/create-github-app-token-aws/issues/149)) ([cc82279](https://github.com/lepadatu-org/create-github-app-token-aws/commit/cc82279e84540c5543078cedc5af4fcfab0a96bb)), closes [#3337](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3337) [nodejs/undici#3338](https://github.com/nodejs/undici/issues/3338) [nodejs/undici#3340](https://github.com/nodejs/undici/issues/3340) [nodejs/undici#3332](https://github.com/nodejs/undici/issues/3332) [nodejs/undici#3335](https://github.com/nodejs/undici/issues/3335) [nodejs/undici#3305](https://github.com/nodejs/undici/issues/3305) [nodejs/undici#3303](https://github.com/nodejs/undici/issues/3303) [nodejs/undici#3304](https://github.com/nodejs/undici/issues/3304) [nodejs/undici#3306](https://github.com/nodejs/undici/issues/3306) [nodejs/undici#3309](https://github.com/nodejs/undici/issues/3309) [nodejs/undici#3313](https://github.com/nodejs/undici/issues/3313) [nodejs/undici#3311](https://github.com/nodejs/undici/issues/3311) [nodejs/undici#3107](https://github.com/nodejs/undici/issues/3107) [nodejs/undici#3302](https://github.com/nodejs/undici/issues/3302) [nodejs/undici#3320](https://github.com/nodejs/undici/issues/3320) [nodejs/undici#3321](https://github.com/nodejs/undici/issues/3321) [nodejs/undici#3316](https://github.com/nodejs/undici/issues/3316) [nodejs/undici#3318](https://github.com/nodejs/undici/issues/3318) [nodejs/undici#3326](https://github.com/nodejs/undici/issues/3326) [nodejs/undici#3324](https://github.com/nodejs/undici/issues/3324) [nodejs/undici#3325](https://github.com/nodejs/undici/issues/3325) [nodejs/undici#3316](https://github.com/nodejs/undici/issues/3316) [nodejs/undici#3318](https://github.com/nodejs/undici/issues/3318) [#3342](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3342) [#3332](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3332) [#3340](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3340) [#3337](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3337) [#3338](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3338) [#3336](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3336) [#3335](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3335) [#3325](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3325) [#3324](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3324) [#3326](https://github.com/lepadatu-org/create-github-app-token-aws/issues/3326) * **deps:** bump undici from 6.6.0 to 6.6.1 ([#103](https://github.com/lepadatu-org/create-github-app-token-aws/issues/103)) ([5195df7](https://github.com/lepadatu-org/create-github-app-token-aws/commit/5195df7c8824728b348fbaa3f0921ce6ca4ecec0)) * **deps:** update `[@octokit](https://github.com/octokit)` packages to latest ([#24](https://github.com/lepadatu-org/create-github-app-token-aws/issues/24)) ([b287cb8](https://github.com/lepadatu-org/create-github-app-token-aws/commit/b287cb86e286e27e7f449cf330ba028f7b97f7ef)) * do not revoke token if already expired ([#147](https://github.com/lepadatu-org/create-github-app-token-aws/issues/147)) ([66a7045](https://github.com/lepadatu-org/create-github-app-token-aws/commit/66a70456860bafc79e37635eea77b8b2a929f6c8)), closes [#140](https://github.com/lepadatu-org/create-github-app-token-aws/issues/140) [#95](https://github.com/lepadatu-org/create-github-app-token-aws/issues/95) * **GHES:** respect `GITHUB_API_URL` when creating installation access token ([#38](https://github.com/lepadatu-org/create-github-app-token-aws/issues/38)) ([c08c5ac](https://github.com/lepadatu-org/create-github-app-token-aws/commit/c08c5ace340664df431bf7f11d51b61d92358c2b)), closes [#36](https://github.com/lepadatu-org/create-github-app-token-aws/issues/36) * handle clock skew ([#87](https://github.com/lepadatu-org/create-github-app-token-aws/issues/87)) ([495056a](https://github.com/lepadatu-org/create-github-app-token-aws/commit/495056a51509f267cd7262080a7bb618ad7b5d08)) * mask the installation token in logs ([#28](https://github.com/lepadatu-org/create-github-app-token-aws/issues/28)) ([bc256c2](https://github.com/lepadatu-org/create-github-app-token-aws/commit/bc256c234bf48ffdee7ae27409ebc7f9aa3c8ab4)) * **README:** fix name in usage examples ([#12](https://github.com/lepadatu-org/create-github-app-token-aws/issues/12)) ([cb1fcdd](https://github.com/lepadatu-org/create-github-app-token-aws/commit/cb1fcdda590f1dd2a7c771cfa62e50bb4ac1cfa5)) * **README:** update action name ([#5](https://github.com/lepadatu-org/create-github-app-token-aws/issues/5)) ([c08b794](https://github.com/lepadatu-org/create-github-app-token-aws/commit/c08b7942e4f16842e11846de387178fdd8a4dc1a)) * **README:** update repository name, remove section for feature that is not yet implemented ([#9](https://github.com/lepadatu-org/create-github-app-token-aws/issues/9)) ([c04bb41](https://github.com/lepadatu-org/create-github-app-token-aws/commit/c04bb41e616d2a16422908c7ca1b81930f23079b)) * **release:** build `dist/` before release ([#33](https://github.com/lepadatu-org/create-github-app-token-aws/issues/33)) ([9a6a017](https://github.com/lepadatu-org/create-github-app-token-aws/commit/9a6a017c104eb1b36533ee8195e814f567934ce8)), closes [#32](https://github.com/lepadatu-org/create-github-app-token-aws/issues/32) * **release:** update version in `package.json` ([#35](https://github.com/lepadatu-org/create-github-app-token-aws/issues/35)) ([1dccc4c](https://github.com/lepadatu-org/create-github-app-token-aws/commit/1dccc4ccc6e1df7d6adc1bde339ce0d7a2ea7df7)), closes [#34](https://github.com/lepadatu-org/create-github-app-token-aws/issues/34) * **revocation:** avoid revoking expired tokens and fail gracefully ([#95](https://github.com/lepadatu-org/create-github-app-token-aws/issues/95)) ([0c01407](https://github.com/lepadatu-org/create-github-app-token-aws/commit/0c014070f93045fed9b48f568f28b2f1cca37088)), closes [#72](https://github.com/lepadatu-org/create-github-app-token-aws/issues/72) ### Features * `github-api-url` ([#88](https://github.com/lepadatu-org/create-github-app-token-aws/issues/88)) ([837e275](https://github.com/lepadatu-org/create-github-app-token-aws/commit/837e2752e017897b136a438ea12a06c044b8414e)), closes [#77](https://github.com/lepadatu-org/create-github-app-token-aws/issues/77) * **`private-key`:** escaped newlines will be replaced ([#132](https://github.com/lepadatu-org/create-github-app-token-aws/issues/132)) ([9d23fb9](https://github.com/lepadatu-org/create-github-app-token-aws/commit/9d23fb93dd620572046d85c7c1032b488c12514f)) * Add a `skip_token_revoke` input for configuring token revocation ([#54](https://github.com/lepadatu-org/create-github-app-token-aws/issues/54)) ([9ec88c4](https://github.com/lepadatu-org/create-github-app-token-aws/commit/9ec88c41eef7052418d233d147c59fbdce19c56f)), closes [1#L46-L47](https://github.com/1/issues/L46-L47) [1#L132](https://github.com/1/issues/L132) * add GitHub Enterprise Server (GHES) support ([#36](https://github.com/lepadatu-org/create-github-app-token-aws/issues/36)) ([ede6c15](https://github.com/lepadatu-org/create-github-app-token-aws/commit/ede6c158812854da7c63aa6635138d168de14bea)) * add proxy support ([#102](https://github.com/lepadatu-org/create-github-app-token-aws/issues/102)) ([1f82f7d](https://github.com/lepadatu-org/create-github-app-token-aws/commit/1f82f7df931fbb9a6ba4a94ffacb46eb12eba094)) * add retry ([#79](https://github.com/lepadatu-org/create-github-app-token-aws/issues/79)) ([0f3b4d7](https://github.com/lepadatu-org/create-github-app-token-aws/commit/0f3b4d7df99b1af7cb8596ba4f855d6de4155aa5)), closes [#71](https://github.com/lepadatu-org/create-github-app-token-aws/issues/71) * initial version ([#1](https://github.com/lepadatu-org/create-github-app-token-aws/issues/1)) ([f456852](https://github.com/lepadatu-org/create-github-app-token-aws/commit/f45685208fd9b88321d74015b5996fc8c3e43d18)) * **outputs:** `app-slug` and `installation-id` ([#105](https://github.com/lepadatu-org/create-github-app-token-aws/issues/105)) ([babaff4](https://github.com/lepadatu-org/create-github-app-token-aws/commit/babaff4320b432cece89fd8d07209bb3f6e98fe3)) * support tokens scoped to multiple repositories within organization ([#46](https://github.com/lepadatu-org/create-github-app-token-aws/issues/46)) ([20fd863](https://github.com/lepadatu-org/create-github-app-token-aws/commit/20fd86373fdcbeffde8b73b17ebb3a7a62c6c407)) * use `node20` as runner ([#23](https://github.com/lepadatu-org/create-github-app-token-aws/issues/23)) ([803e078](https://github.com/lepadatu-org/create-github-app-token-aws/commit/803e078eb599890256679b164357599b8681de13)), closes [/github.com/actions/runner/issues/2619#issuecomment-1679003443](https://github.com//github.com/actions/runner/issues/2619/issues/issuecomment-1679003443) * use dash notation for inputs (deprecates underscore notation) ([#59](https://github.com/lepadatu-org/create-github-app-token-aws/issues/59)) ([7b1d2ae](https://github.com/lepadatu-org/create-github-app-token-aws/commit/7b1d2aef87b41884c03f2e69a0a422d5c69c5d72)), closes [#57](https://github.com/lepadatu-org/create-github-app-token-aws/issues/57) [/github.com/actions/create-github-app-token/issues/57#issuecomment-1751272252](https://github.com//github.com/actions/create-github-app-token/issues/57/issues/issuecomment-1751272252) --- dist/main.cjs | 42728 ++++++++++++++++++++++++++++++++++-------------- dist/post.cjs | 229 +- package.json | 2 +- 3 files changed, 30903 insertions(+), 12056 deletions(-) diff --git a/dist/main.cjs b/dist/main.cjs index 474eaef..ced0478 100644 --- a/dist/main.cjs +++ b/dist/main.cjs @@ -22,7 +22,6 @@ var __copyProps = (to, from, except, desc) => { } return to; }; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -78,23 +77,23 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.issue = exports2.issueCommand = void 0; - var os = __importStar(require("os")); + var os = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); @@ -122,14 +121,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { + const val2 = this.properties[key]; + if (val2) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val)}`; + cmdStr += `${key}=${escapeProperty(val2)}`; } } } @@ -306,7 +305,7 @@ function stringToBytes(str) { } return bytes; } -function v35_default(name, version2, hashfunc) { +function v35_default(name, version3, hashfunc) { function generateUUID(value, namespace, buf, offset) { if (typeof value === "string") { value = stringToBytes(value); @@ -321,7 +320,7 @@ function v35_default(name, version2, hashfunc) { bytes.set(namespace); bytes.set(value, namespace.length); bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 15 | version2; + bytes[6] = bytes[6] & 15 | version3; bytes[8] = bytes[8] & 63 | 128; if (buf) { offset = offset || 0; @@ -484,7 +483,7 @@ var init_esm_node = __esm({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -493,24 +492,24 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var fs = __importStar(require("fs")); - var os = __importStar(require("os")); + var fs = __importStar2(require("fs")); + var os = __importStar2(require("os")); var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -1258,7 +1257,7 @@ var require_util = __commonJS({ var { InvalidArgumentError } = require_errors(); var { Blob: Blob2 } = require("buffer"); var nodeUtil = require("util"); - var { stringify: stringify2 } = require("querystring"); + var { stringify: stringify3 } = require("querystring"); var { headerNameLowerCasedRecord } = require_constants(); var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); function nop() { @@ -1273,7 +1272,7 @@ var require_util = __commonJS({ if (url.includes("?") || url.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } - const stringified = stringify2(queryParams); + const stringified = stringify3(queryParams); if (stringified) { url += "?" + stringified; } @@ -1398,8 +1397,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val2) { + const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1409,19 +1408,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val = obj[key]; - if (!val) { + let val2 = obj[key]; + if (!val2) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val)) { - val = [val]; - obj[key] = val; + if (!Array.isArray(val2)) { + val2 = [val2]; + obj[key] = val2; } - val.push(headers[i + 1].toString("utf8")); + val2.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1435,14 +1434,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val = headers[n + 1].toString("utf8"); + const val2 = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val); + ret.push(key, val2); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val) - 1; + contentDispositionIdx = ret.push(key, val2) - 1; } else { - ret.push(key, val); + ret.push(key, val2); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1571,13 +1570,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val) { + function toUSVString(val2) { if (hasToWellFormed) { - return `${val}`.toWellFormed(); + return `${val2}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val); + return nodeUtil.toUSVString(val2); } - return `${val}`; + return `${val2}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3947,11 +3946,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto4; + var crypto8; try { - crypto4 = require("crypto"); + crypto8 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto4.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto8.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -4214,7 +4213,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto4 === void 0) { + if (crypto8 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -4229,7 +4228,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto4.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto8.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5950,7 +5949,7 @@ var require_request = __commonJS({ channels.trailers = { hasSubscribers: false }; channels.error = { hasSubscribers: false }; } - var Request = class _Request { + var Request2 = class _Request { constructor(origin, { path, method, @@ -6221,41 +6220,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val, skipAppend) { - if (val && typeof val === "object") { + function processHeaderValue(key, val2, skipAppend) { + if (val2 && typeof val2 === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val = val != null ? `${val}` : ""; - if (headerCharRegex.exec(val) !== null) { + val2 = val2 != null ? `${val2}` : ""; + if (headerCharRegex.exec(val2) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val : `${key}: ${val}\r + return skipAppend ? val2 : `${key}: ${val2}\r `; } - function processHeader(request2, key, val, skipAppend = false) { - if (val && (typeof val === "object" && !Array.isArray(val))) { + function processHeader(request2, key, val2, skipAppend = false) { + if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val === void 0) { + } else if (val2 === void 0) { return; } if (request2.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val) !== null) { + if (headerCharRegex.exec(val2) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request2.host = val; + request2.host = val2; } else if (request2.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request2.contentLength = parseInt(val, 10); + request2.contentLength = parseInt(val2, 10); if (!Number.isFinite(request2.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request2.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request2.contentType = val; - if (skipAppend) request2.headers[key] = processHeaderValue(key, val, skipAppend); - else request2.headers += processHeaderValue(key, val); + request2.contentType = val2; + if (skipAppend) request2.headers[key] = processHeaderValue(key, val2, skipAppend); + else request2.headers += processHeaderValue(key, val2); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val === "string" ? val.toLowerCase() : null; + const value = typeof val2 === "string" ? val2.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -6270,22 +6269,22 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { + if (Array.isArray(val2)) { + for (let i = 0; i < val2.length; i++) { if (skipAppend) { - if (request2.headers[key]) request2.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; - else request2.headers[key] = processHeaderValue(key, val[i], skipAppend); + if (request2.headers[key]) request2.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; + else request2.headers[key] = processHeaderValue(key, val2[i], skipAppend); } else { - request2.headers += processHeaderValue(key, val[i]); + request2.headers += processHeaderValue(key, val2[i]); } } } else { - if (skipAppend) request2.headers[key] = processHeaderValue(key, val, skipAppend); - else request2.headers += processHeaderValue(key, val); + if (skipAppend) request2.headers[key] = processHeaderValue(key, val2, skipAppend); + else request2.headers += processHeaderValue(key, val2); } } } - module2.exports = Request; + module2.exports = Request2; } }); @@ -6683,12 +6682,12 @@ var require_constants3 = __commonJS({ ERROR2[ERROR2["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; ERROR2[ERROR2["USER"] = 24] = "USER"; })(ERROR = exports2.ERROR || (exports2.ERROR = {})); - var TYPE2; - (function(TYPE3) { - TYPE3[TYPE3["BOTH"] = 0] = "BOTH"; - TYPE3[TYPE3["REQUEST"] = 1] = "REQUEST"; - TYPE3[TYPE3["RESPONSE"] = 2] = "RESPONSE"; - })(TYPE2 = exports2.TYPE || (exports2.TYPE = {})); + var TYPE; + (function(TYPE2) { + TYPE2[TYPE2["BOTH"] = 0] = "BOTH"; + TYPE2[TYPE2["REQUEST"] = 1] = "REQUEST"; + TYPE2[TYPE2["RESPONSE"] = 2] = "RESPONSE"; + })(TYPE = exports2.TYPE || (exports2.TYPE = {})); var FLAGS; (function(FLAGS2) { FLAGS2[FLAGS2["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; @@ -7165,7 +7164,7 @@ var require_client = __commonJS({ var { pipeline } = require("stream"); var util = require_util(); var timers = require_timers(); - var Request = require_request(); + var Request2 = require_request(); var DispatcherBase = require_dispatcher_base(); var { RequestContentLengthMismatchError, @@ -7445,7 +7444,7 @@ var require_client = __commonJS({ } [kDispatch](opts, handler) { const origin = opts.origin || this[kUrl].origin; - const request2 = this[kHTTPConnVersion] === "h2" ? Request[kHTTP2BuildRequest](origin, opts, handler) : Request[kHTTP1BuildRequest](origin, opts, handler); + const request2 = this[kHTTPConnVersion] === "h2" ? Request2[kHTTP2BuildRequest](origin, opts, handler) : Request2[kHTTP1BuildRequest](origin, opts, handler); this[kQueue].push(request2); if (this[kResuming]) { } else if (util.bodyLength(request2.body) == null && util.isIterable(request2.body)) { @@ -8398,7 +8397,7 @@ upgrade: ${upgrade}\r function writeH2(client, session, request2) { const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let headers; - if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); + if (typeof reqHeaders === "string") headers = Request2[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; if (upgrade) { errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -10701,10 +10700,10 @@ var require_mock_utils = __commonJS({ } function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; - const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)); + const resolvedPath2 = typeof basePath === "string" ? safeUrl(basePath) : basePath; + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath2)); if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath2}'`); } matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); if (matchedMockDispatches.length === 0) { @@ -11351,7 +11350,7 @@ var require_proxy_agent = __commonJS({ "node_modules/@actions/http-client/node_modules/undici/lib/proxy-agent.js"(exports2, module2) { "use strict"; var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols(); - var { URL: URL3 } = require("url"); + var { URL: URL4 } = require("url"); var Agent = require_agent(); var Pool = require_pool(); var DispatcherBase = require_dispatcher_base(); @@ -11400,7 +11399,7 @@ var require_proxy_agent = __commonJS({ this[kRequestTls] = opts.requestTls; this[kProxyTls] = opts.proxyTls; this[kProxyHeaders] = opts.headers || {}; - const resolvedUrl = new URL3(opts.uri); + const resolvedUrl = new URL4(opts.uri); const { origin, port, host, username, password } = resolvedUrl; if (opts.auth && opts.token) { throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); @@ -11455,7 +11454,7 @@ var require_proxy_agent = __commonJS({ }); } dispatch(opts, handler) { - const { host } = new URL3(opts.origin); + const { host } = new URL4(opts.origin); const headers = buildHeaders(opts.headers); throwIfProxyAuthIsSent(headers); return this[kAgent].dispatch( @@ -11981,7 +11980,7 @@ var require_headers = __commonJS({ return headers; } }; - var Headers = class _Headers { + var Headers2 = class _Headers { constructor(init = void 0) { if (init === kConstruct) { return; @@ -12176,8 +12175,8 @@ var require_headers = __commonJS({ return this[kHeadersList]; } }; - Headers.prototype[Symbol.iterator] = Headers.prototype.entries; - Object.defineProperties(Headers.prototype, { + Headers2.prototype[Symbol.iterator] = Headers2.prototype.entries; + Object.defineProperties(Headers2.prototype, { append: kEnumerableProperty, delete: kEnumerableProperty, get: kEnumerableProperty, @@ -12209,7 +12208,7 @@ var require_headers = __commonJS({ }; module2.exports = { fill, - Headers, + Headers: Headers2, HeadersList }; } @@ -12219,7 +12218,7 @@ var require_headers = __commonJS({ var require_response = __commonJS({ "node_modules/@actions/http-client/node_modules/undici/lib/fetch/response.js"(exports2, module2) { "use strict"; - var { Headers, HeadersList, fill } = require_headers(); + var { Headers: Headers2, HeadersList, fill } = require_headers(); var { extractBody, cloneBody, mixinBody } = require_body(); var util = require_util(); var { kEnumerableProperty } = util; @@ -12311,7 +12310,7 @@ var require_response = __commonJS({ init = webidl.converters.ResponseInit(init); this[kRealm] = { settingsObject: {} }; this[kState] = makeResponse({}); - this[kHeaders] = new Headers(kConstruct); + this[kHeaders] = new Headers2(kConstruct); this[kHeaders][kGuard] = "response"; this[kHeaders][kHeadersList] = this[kState].headersList; this[kHeaders][kRealm] = this[kRealm]; @@ -12599,7 +12598,7 @@ var require_request2 = __commonJS({ "node_modules/@actions/http-client/node_modules/undici/lib/fetch/request.js"(exports2, module2) { "use strict"; var { extractBody, mixinBody, cloneBody } = require_body(); - var { Headers, fill: fillHeaders, HeadersList } = require_headers(); + var { Headers: Headers2, fill: fillHeaders, HeadersList } = require_headers(); var { FinalizationRegistry: FinalizationRegistry2 } = require_dispatcher_weakref()(); var util = require_util(); var { @@ -12632,7 +12631,7 @@ var require_request2 = __commonJS({ var requestFinalizer = new FinalizationRegistry2(({ signal, abort }) => { signal.removeEventListener("abort", abort); }); - var Request = class _Request { + var Request2 = class _Request { // https://fetch.spec.whatwg.org/#dom-request constructor(input, init = {}) { if (input === kConstruct) { @@ -12674,15 +12673,15 @@ var require_request2 = __commonJS({ signal = input[kSignal]; } const origin = this[kRealm].settingsObject.origin; - let window = "client"; + let window2 = "client"; if (request2.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request2.window, origin)) { - window = request2.window; + window2 = request2.window; } if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`); + throw new TypeError(`'window' option '${window2}' must be null`); } if ("window" in init) { - window = "no-window"; + window2 = "no-window"; } request2 = makeRequest({ // URL request’s URL. @@ -12697,7 +12696,7 @@ var require_request2 = __commonJS({ // client This’s relevant settings object. client: this[kRealm].settingsObject, // window window. - window, + window: window2, // priority request’s priority. priority: request2.priority, // origin request’s origin. The propagation of the origin is only significant for navigation requests @@ -12843,7 +12842,7 @@ var require_request2 = __commonJS({ requestFinalizer.register(ac, { signal, abort }); } } - this[kHeaders] = new Headers(kConstruct); + this[kHeaders] = new Headers2(kConstruct); this[kHeaders][kHeadersList] = request2.headersList; this[kHeaders][kGuard] = "request"; this[kHeaders][kRealm] = this[kRealm]; @@ -12860,8 +12859,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val] of headers) { - headersList.append(key, val); + for (const [key, val2] of headers) { + headersList.append(key, val2); } headersList.cookies = headers.cookies; } else { @@ -13042,7 +13041,7 @@ var require_request2 = __commonJS({ const clonedRequestObject = new _Request(kConstruct); clonedRequestObject[kState] = clonedRequest; clonedRequestObject[kRealm] = this[kRealm]; - clonedRequestObject[kHeaders] = new Headers(kConstruct); + clonedRequestObject[kHeaders] = new Headers2(kConstruct); clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList; clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard]; clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm]; @@ -13061,7 +13060,7 @@ var require_request2 = __commonJS({ return clonedRequestObject; } }; - mixinBody(Request); + mixinBody(Request2); function makeRequest(init) { const request2 = { method: "GET", @@ -13112,7 +13111,7 @@ var require_request2 = __commonJS({ } return newRequest; } - Object.defineProperties(Request.prototype, { + Object.defineProperties(Request2.prototype, { method: kEnumerableProperty, url: kEnumerableProperty, headers: kEnumerableProperty, @@ -13139,13 +13138,13 @@ var require_request2 = __commonJS({ } }); webidl.converters.Request = webidl.interfaceConverter( - Request + Request2 ); webidl.converters.RequestInfo = function(V) { if (typeof V === "string") { return webidl.converters.USVString(V); } - if (V instanceof Request) { + if (V instanceof Request2) { return webidl.converters.Request(V); } return webidl.converters.USVString(V); @@ -13229,7 +13228,7 @@ var require_request2 = __commonJS({ allowedValues: requestDuplex } ]); - module2.exports = { Request, makeRequest }; + module2.exports = { Request: Request2, makeRequest }; } }); @@ -13244,8 +13243,8 @@ var require_fetch = __commonJS({ filterResponse, makeResponse } = require_response(); - var { Headers } = require_headers(); - var { Request, makeRequest } = require_request2(); + var { Headers: Headers2 } = require_headers(); + var { Request: Request2, makeRequest } = require_request2(); var zlib = require("zlib"); var { bytesMatch, @@ -13331,12 +13330,12 @@ var require_fetch = __commonJS({ this.emit("terminated", error); } }; - function fetch(input, init = {}) { + function fetch2(input, init = {}) { webidl.argumentLengthCheck(arguments, 1, { header: "globalThis.fetch" }); const p = createDeferredPromise(); let requestObject; try { - requestObject = new Request(input, init); + requestObject = new Request2(input, init); } catch (e) { p.reject(e); return p.promise; @@ -14157,28 +14156,28 @@ var require_fetch = __commonJS({ } let codings = []; let location = ""; - const headers = new Headers(); + const headers = new Headers2(); if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val = headersList[n + 1].toString("latin1"); + const val2 = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val.toLowerCase().split(",").map((x) => x.trim()); + codings = val2.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val; + location = val2; } - headers[kHeadersList].append(key, val); + headers[kHeadersList].append(key, val2); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val = headersList[key]; + const val2 = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val; + location = val2; } - headers[kHeadersList].append(key, val); + headers[kHeadersList].append(key, val2); } } this.body = new Readable({ read: resume }); @@ -14242,11 +14241,11 @@ var require_fetch = __commonJS({ if (status !== 101) { return; } - const headers = new Headers(); + const headers = new Headers2(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val); + const val2 = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val2); } resolve({ status, @@ -14261,7 +14260,7 @@ var require_fetch = __commonJS({ } } module2.exports = { - fetch, + fetch: fetch2, Fetch, fetching, finalizeAndReportTiming @@ -14655,7 +14654,7 @@ var require_util4 = __commonJS({ var { serializeAMimeType, parseMIMEType } = require_dataURL(); var { types } = require("util"); var { StringDecoder } = require("string_decoder"); - var { btoa: btoa2 } = require("buffer"); + var { btoa } = require("buffer"); var staticPropertyDescriptors = { enumerable: true, writable: false, @@ -14747,9 +14746,9 @@ var require_util4 = __commonJS({ dataURL += ";base64,"; const decoder = new StringDecoder("latin1"); for (const chunk of bytes) { - dataURL += btoa2(decoder.write(chunk)); + dataURL += btoa(decoder.write(chunk)); } - dataURL += btoa2(decoder.end()); + dataURL += btoa(decoder.end()); return dataURL; } case "Text": { @@ -14842,7 +14841,7 @@ var require_filereader = __commonJS({ } = require_symbols3(); var { webidl } = require_webidl(); var { kEnumerableProperty } = require_util(); - var FileReader = class _FileReader extends EventTarget { + var FileReader2 = class _FileReader extends EventTarget { constructor() { super(); this[kState] = "empty"; @@ -15044,10 +15043,10 @@ var require_filereader = __commonJS({ } } }; - FileReader.EMPTY = FileReader.prototype.EMPTY = 0; - FileReader.LOADING = FileReader.prototype.LOADING = 1; - FileReader.DONE = FileReader.prototype.DONE = 2; - Object.defineProperties(FileReader.prototype, { + FileReader2.EMPTY = FileReader2.prototype.EMPTY = 0; + FileReader2.LOADING = FileReader2.prototype.LOADING = 1; + FileReader2.DONE = FileReader2.prototype.DONE = 2; + Object.defineProperties(FileReader2.prototype, { EMPTY: staticPropertyDescriptors, LOADING: staticPropertyDescriptors, DONE: staticPropertyDescriptors, @@ -15072,13 +15071,13 @@ var require_filereader = __commonJS({ configurable: true } }); - Object.defineProperties(FileReader, { + Object.defineProperties(FileReader2, { EMPTY: staticPropertyDescriptors, LOADING: staticPropertyDescriptors, DONE: staticPropertyDescriptors }); module2.exports = { - FileReader + FileReader: FileReader2 }; } }); @@ -15136,7 +15135,7 @@ var require_cache = __commonJS({ var { kHeadersList } = require_symbols(); var { webidl } = require_webidl(); var { Response, cloneResponse } = require_response(); - var { Request } = require_request2(); + var { Request: Request2 } = require_request2(); var { kState, kHeaders, kGuard, kRealm } = require_symbols2(); var { fetching } = require_fetch(); var { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util2(); @@ -15171,13 +15170,13 @@ var require_cache = __commonJS({ options = webidl.converters.CacheQueryOptions(options); let r = null; if (request2 !== void 0) { - if (request2 instanceof Request) { + if (request2 instanceof Request2) { r = request2[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return []; } } else if (typeof request2 === "string") { - r = new Request(request2)[kState]; + r = new Request2(request2)[kState]; } } const responses = []; @@ -15231,7 +15230,7 @@ var require_cache = __commonJS({ } const fetchControllers = []; for (const request2 of requests) { - const r = new Request(request2)[kState]; + const r = new Request2(request2)[kState]; if (!urlIsHttpHttpsScheme(r.url)) { throw webidl.errors.exception({ header: "Cache.addAll", @@ -15315,10 +15314,10 @@ var require_cache = __commonJS({ request2 = webidl.converters.RequestInfo(request2); response = webidl.converters.Response(response); let innerRequest = null; - if (request2 instanceof Request) { + if (request2 instanceof Request2) { innerRequest = request2[kState]; } else { - innerRequest = new Request(request2)[kState]; + innerRequest = new Request2(request2)[kState]; } if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") { throw webidl.errors.exception({ @@ -15395,14 +15394,14 @@ var require_cache = __commonJS({ request2 = webidl.converters.RequestInfo(request2); options = webidl.converters.CacheQueryOptions(options); let r = null; - if (request2 instanceof Request) { + if (request2 instanceof Request2) { r = request2[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return false; } } else { assert(typeof request2 === "string"); - r = new Request(request2)[kState]; + r = new Request2(request2)[kState]; } const operations = []; const operation = { @@ -15440,13 +15439,13 @@ var require_cache = __commonJS({ options = webidl.converters.CacheQueryOptions(options); let r = null; if (request2 !== void 0) { - if (request2 instanceof Request) { + if (request2 instanceof Request2) { r = request2[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return []; } } else if (typeof request2 === "string") { - r = new Request(request2)[kState]; + r = new Request2(request2)[kState]; } } const promise = createDeferredPromise(); @@ -15464,7 +15463,7 @@ var require_cache = __commonJS({ queueMicrotask(() => { const requestList = []; for (const request3 of requests) { - const requestObject = new Request("https://a"); + const requestObject = new Request2("https://a"); requestObject[kState] = request3; requestObject[kHeaders][kHeadersList] = request3.headersList; requestObject[kHeaders][kGuard] = "immutable"; @@ -15865,7 +15864,7 @@ var require_util6 = __commonJS({ throw new Error("Invalid cookie max-age"); } } - function stringify2(cookie) { + function stringify3(cookie) { if (cookie.name.length === 0) { return null; } @@ -15930,7 +15929,7 @@ var require_util6 = __commonJS({ } module2.exports = { isCTLExcludingHtab, - stringify: stringify2, + stringify: stringify3, getHeadersList }; } @@ -16081,12 +16080,12 @@ var require_cookies = __commonJS({ "node_modules/@actions/http-client/node_modules/undici/lib/cookies/index.js"(exports2, module2) { "use strict"; var { parseSetCookie } = require_parse(); - var { stringify: stringify2, getHeadersList } = require_util6(); + var { stringify: stringify3, getHeadersList } = require_util6(); var { webidl } = require_webidl(); - var { Headers } = require_headers(); + var { Headers: Headers2 } = require_headers(); function getCookies(headers) { webidl.argumentLengthCheck(arguments, 1, { header: "getCookies" }); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); const cookie = headers.get("cookie"); const out = {}; if (!cookie) { @@ -16100,7 +16099,7 @@ var require_cookies = __commonJS({ } function deleteCookie(headers, name, attributes) { webidl.argumentLengthCheck(arguments, 2, { header: "deleteCookie" }); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); name = webidl.converters.DOMString(name); attributes = webidl.converters.DeleteCookieAttributes(attributes); setCookie(headers, { @@ -16112,7 +16111,7 @@ var require_cookies = __commonJS({ } function getSetCookies(headers) { webidl.argumentLengthCheck(arguments, 1, { header: "getSetCookies" }); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); const cookies = getHeadersList(headers).cookies; if (!cookies) { return []; @@ -16121,11 +16120,11 @@ var require_cookies = __commonJS({ } function setCookie(headers, cookie) { webidl.argumentLengthCheck(arguments, 2, { header: "setCookie" }); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str = stringify2(cookie); + const str = stringify3(cookie); if (str) { - headers.append("Set-Cookie", stringify2(cookie)); + headers.append("Set-Cookie", stringify3(cookie)); } } webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ @@ -16614,16 +16613,16 @@ var require_connection = __commonJS({ var { CloseEvent } = require_events(); var { makeRequest } = require_request2(); var { fetching } = require_fetch(); - var { Headers } = require_headers(); + var { Headers: Headers2 } = require_headers(); var { getGlobalDispatcher } = require_global2(); var { kHeadersList } = require_symbols(); var channels = {}; channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto4; + var crypto8; try { - crypto4 = require("crypto"); + crypto8 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { @@ -16639,10 +16638,10 @@ var require_connection = __commonJS({ redirect: "error" }); if (options.headers) { - const headersList = new Headers(options.headers)[kHeadersList]; + const headersList = new Headers2(options.headers)[kHeadersList]; request2.headersList = headersList; } - const keyValue = crypto4.randomBytes(16).toString("base64"); + const keyValue = crypto8.randomBytes(16).toString("base64"); request2.headersList.append("sec-websocket-key", keyValue); request2.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16671,7 +16670,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto4.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto8.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16751,9 +16750,9 @@ var require_frame = __commonJS({ "node_modules/@actions/http-client/node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto4; + var crypto8; try { - crypto4 = require("crypto"); + crypto8 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16762,7 +16761,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto4.randomBytes(4); + this.maskKey = crypto8.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17531,7 +17530,7 @@ var require_undici = __commonJS({ module2.exports.getGlobalDispatcher = getGlobalDispatcher; if (util.nodeMajor > 16 || util.nodeMajor === 16 && util.nodeMinor >= 8) { let fetchImpl = null; - module2.exports.fetch = async function fetch(resource) { + module2.exports.fetch = async function fetch2(resource) { if (!fetchImpl) { fetchImpl = require_fetch().fetch; } @@ -17587,7 +17586,7 @@ var require_undici = __commonJS({ var require_lib = __commonJS({ "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17600,21 +17599,21 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -17643,10 +17642,10 @@ var require_lib = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar(require("http")); - var https = __importStar(require("https")); - var pm = __importStar(require_proxy()); - var tunnel = __importStar(require_tunnel2()); + var http = __importStar2(require("http")); + var https = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17678,11 +17677,11 @@ var require_lib = __commonJS({ HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); + var Headers2; + (function(Headers3) { + Headers3["Accept"] = "accept"; + Headers3["ContentType"] = "content-type"; + })(Headers2 || (exports2.Headers = Headers2 = {})); var MediaTypes; (function(MediaTypes2) { MediaTypes2["ApplicationJson"] = "application/json"; @@ -17721,8 +17720,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17734,8 +17733,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17792,42 +17791,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -17836,35 +17835,35 @@ var require_lib = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17875,7 +17874,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17949,7 +17948,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { function callbackForResult(err, res) { if (err) { @@ -18136,15 +18135,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve) => setTimeout(() => resolve(), ms)); }); } _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -18206,7 +18205,7 @@ var require_lib = __commonJS({ var require_auth = __commonJS({ "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -18251,7 +18250,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18274,7 +18273,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18297,7 +18296,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18310,7 +18309,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -18366,7 +18365,7 @@ var require_oidc_utils = __commonJS({ } static getCall(id_token_url) { var _a; - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error) => { throw new Error(`Failed to get ID Token. @@ -18383,7 +18382,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18408,7 +18407,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -18453,7 +18452,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18494,7 +18493,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18508,7 +18507,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18702,7 +18701,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -18711,23 +18710,23 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path = __importStar(require("path")); + var path = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -18747,7 +18746,7 @@ var require_path_utils = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -18756,21 +18755,21 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { resolve(value); @@ -18802,20 +18801,20 @@ var require_core = __commonJS({ var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os = __importStar(require("os")); - var path = __importStar(require("path")); + var os = __importStar2(require("os")); + var path = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode = exports2.ExitCode || (exports2.ExitCode = {})); - function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); + function exportVariable(name, val2) { + const convertedVal = utils_1.toCommandValue(val2); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val)); + return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val2)); } command_1.issueCommand("set-env", { name }, convertedVal); } @@ -18835,14 +18834,14 @@ var require_core = __commonJS({ } exports2.addPath = addPath; function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) { + const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val2) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val; + return val2; } - return val.trim(); + return val2.trim(); } exports2.getInput = getInput; function getMultilineInput(name, options) { @@ -18856,10 +18855,10 @@ var require_core = __commonJS({ function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val = getInput(name, options); - if (trueValue.includes(val)) + const val2 = getInput(name, options); + if (trueValue.includes(val2)) return true; - if (falseValue.includes(val)) + if (falseValue.includes(val2)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); @@ -18916,7 +18915,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports2.endGroup = endGroup; function group(name, fn) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup(name); let result; try { @@ -18941,7 +18940,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports2.getState = getState; function getIDToken(aud) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } @@ -19195,8877 +19194,30125 @@ var require_retry2 = __commonJS({ } }); -// node_modules/undici/lib/core/symbols.js -var require_symbols6 = __commonJS({ - "node_modules/undici/lib/core/symbols.js"(exports2, module2) { - module2.exports = { - kClose: Symbol("close"), - kDestroy: Symbol("destroy"), - kDispatch: Symbol("dispatch"), - kUrl: Symbol("url"), - kWriting: Symbol("writing"), - kResuming: Symbol("resuming"), - kQueue: Symbol("queue"), - kConnect: Symbol("connect"), - kConnecting: Symbol("connecting"), - kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), - kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), - kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), - kKeepAliveTimeoutValue: Symbol("keep alive timeout"), - kKeepAlive: Symbol("keep alive"), - kHeadersTimeout: Symbol("headers timeout"), - kBodyTimeout: Symbol("body timeout"), - kServerName: Symbol("server name"), - kLocalAddress: Symbol("local address"), - kHost: Symbol("host"), - kNoRef: Symbol("no ref"), - kBodyUsed: Symbol("used"), - kBody: Symbol("abstracted request body"), - kRunning: Symbol("running"), - kBlocking: Symbol("blocking"), - kPending: Symbol("pending"), - kSize: Symbol("size"), - kBusy: Symbol("busy"), - kQueued: Symbol("queued"), - kFree: Symbol("free"), - kConnected: Symbol("connected"), - kClosed: Symbol("closed"), - kNeedDrain: Symbol("need drain"), - kReset: Symbol("reset"), - kDestroyed: Symbol.for("nodejs.stream.destroyed"), - kResume: Symbol("resume"), - kOnError: Symbol("on error"), - kMaxHeadersSize: Symbol("max headers size"), - kRunningIdx: Symbol("running index"), - kPendingIdx: Symbol("pending index"), - kError: Symbol("error"), - kClients: Symbol("clients"), - kClient: Symbol("client"), - kParser: Symbol("parser"), - kOnDestroyed: Symbol("destroy callbacks"), - kPipelining: Symbol("pipelining"), - kSocket: Symbol("socket"), - kHostHeader: Symbol("host header"), - kConnector: Symbol("connector"), - kStrictContentLength: Symbol("strict content length"), - kMaxRedirections: Symbol("maxRedirections"), - kMaxRequests: Symbol("maxRequestsPerClient"), - kProxy: Symbol("proxy agent options"), - kCounter: Symbol("socket request counter"), - kInterceptors: Symbol("dispatch interceptors"), - kMaxResponseSize: Symbol("max response size"), - kHTTP2Session: Symbol("http2Session"), - kHTTP2SessionState: Symbol("http2Session state"), - kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), - kConstruct: Symbol("constructable"), - kListeners: Symbol("listeners"), - kHTTPContext: Symbol("http context"), - kMaxConcurrentStreams: Symbol("max concurrent streams"), - kNoProxyAgent: Symbol("no proxy agent"), - kHttpProxyAgent: Symbol("http proxy agent"), - kHttpsProxyAgent: Symbol("https proxy agent") - }; +// node_modules/@smithy/types/dist-cjs/index.js +var require_dist_cjs = __commonJS({ + "node_modules/@smithy/types/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, { + AlgorithmId: () => AlgorithmId, + EndpointURLScheme: () => EndpointURLScheme, + FieldPosition: () => FieldPosition, + HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation2, + HttpAuthLocation: () => HttpAuthLocation, + IniSectionType: () => IniSectionType, + RequestHandlerProtocol: () => RequestHandlerProtocol, + SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY4, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig + }); + module2.exports = __toCommonJS2(src_exports); + var HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => { + HttpAuthLocation2["HEADER"] = "header"; + HttpAuthLocation2["QUERY"] = "query"; + return HttpAuthLocation2; + })(HttpAuthLocation || {}); + var HttpApiKeyAuthLocation2 = /* @__PURE__ */ ((HttpApiKeyAuthLocation22) => { + HttpApiKeyAuthLocation22["HEADER"] = "header"; + HttpApiKeyAuthLocation22["QUERY"] = "query"; + return HttpApiKeyAuthLocation22; + })(HttpApiKeyAuthLocation2 || {}); + var EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => { + EndpointURLScheme2["HTTP"] = "http"; + EndpointURLScheme2["HTTPS"] = "https"; + return EndpointURLScheme2; + })(EndpointURLScheme || {}); + var AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => { + AlgorithmId2["MD5"] = "md5"; + AlgorithmId2["CRC32"] = "crc32"; + AlgorithmId2["CRC32C"] = "crc32c"; + AlgorithmId2["SHA1"] = "sha1"; + AlgorithmId2["SHA256"] = "sha256"; + return AlgorithmId2; + })(AlgorithmId || {}); + var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== void 0) { + checksumAlgorithms.push({ + algorithmId: () => "sha256", + checksumConstructor: () => runtimeConfig.sha256 + }); + } + if (runtimeConfig.md5 != void 0) { + checksumAlgorithms.push({ + algorithmId: () => "md5", + checksumConstructor: () => runtimeConfig.md5 + }); + } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + } + }; + }, "getChecksumConfiguration"); + var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }, "resolveChecksumRuntimeConfig"); + var getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + ...getChecksumConfiguration(runtimeConfig) + }; + }, "getDefaultClientConfiguration"); + var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + ...resolveChecksumRuntimeConfig(config) + }; + }, "resolveDefaultRuntimeConfig"); + var FieldPosition = /* @__PURE__ */ ((FieldPosition2) => { + FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; + FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; + return FieldPosition2; + })(FieldPosition || {}); + var SMITHY_CONTEXT_KEY4 = "__smithy_context"; + var IniSectionType = /* @__PURE__ */ ((IniSectionType2) => { + IniSectionType2["PROFILE"] = "profile"; + IniSectionType2["SSO_SESSION"] = "sso-session"; + IniSectionType2["SERVICES"] = "services"; + return IniSectionType2; + })(IniSectionType || {}); + var RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => { + RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; + return RequestHandlerProtocol2; + })(RequestHandlerProtocol || {}); } }); -// node_modules/undici/lib/core/errors.js -var require_errors2 = __commonJS({ - "node_modules/undici/lib/core/errors.js"(exports2, module2) { - "use strict"; - var UndiciError = class extends Error { - constructor(message) { - super(message); - this.name = "UndiciError"; - this.code = "UND_ERR"; +// node_modules/@smithy/protocol-http/dist-cjs/index.js +var require_dist_cjs2 = __commonJS({ + "node_modules/@smithy/protocol-http/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, { + Field: () => Field, + Fields: () => Fields, + HttpRequest: () => HttpRequest7, + HttpResponse: () => HttpResponse2, + IHttpRequest: () => import_types5.HttpRequest, + getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration, + isValidHostname: () => isValidHostname, + resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig + }); + module2.exports = __toCommonJS2(src_exports); + var getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let httpHandler = runtimeConfig.httpHandler; + return { + setHttpHandler(handler) { + httpHandler = handler; + }, + httpHandler() { + return httpHandler; + }, + updateHttpClientConfig(key, value) { + httpHandler.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return httpHandler.httpHandlerConfigs(); + } + }; + }, "getHttpHandlerExtensionConfiguration"); + var resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler() + }; + }, "resolveHttpHandlerRuntimeConfig"); + var import_types5 = require_dist_cjs(); + var _Field = class _Field { + constructor({ name, kind = import_types5.FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind; + this.values = values; } - }; - var ConnectTimeoutError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "ConnectTimeoutError"; - this.message = message || "Connect Timeout Error"; - this.code = "UND_ERR_CONNECT_TIMEOUT"; + /** + * Appends a value to the field. + * + * @param value The value to append. + */ + add(value) { + this.values.push(value); } - }; - var HeadersTimeoutError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "HeadersTimeoutError"; - this.message = message || "Headers Timeout Error"; - this.code = "UND_ERR_HEADERS_TIMEOUT"; + /** + * Overwrite existing field values. + * + * @param values The new field values. + */ + set(values) { + this.values = values; } - }; - var HeadersOverflowError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "HeadersOverflowError"; - this.message = message || "Headers Overflow Error"; - this.code = "UND_ERR_HEADERS_OVERFLOW"; + /** + * Remove all matching entries from list. + * + * @param value Value to remove. + */ + remove(value) { + this.values = this.values.filter((v) => v !== value); } - }; - var BodyTimeoutError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "BodyTimeoutError"; - this.message = message || "Body Timeout Error"; - this.code = "UND_ERR_BODY_TIMEOUT"; + /** + * Get comma-delimited string. + * + * @returns String representation of {@link Field}. + */ + toString() { + return this.values.map((v) => v.includes(",") || v.includes(" ") ? `"${v}"` : v).join(", "); } - }; - var ResponseStatusCodeError = class extends UndiciError { - constructor(message, statusCode, headers, body) { - super(message); - this.name = "ResponseStatusCodeError"; - this.message = message || "Response Status Code Error"; - this.code = "UND_ERR_RESPONSE_STATUS_CODE"; - this.body = body; - this.status = statusCode; - this.statusCode = statusCode; - this.headers = headers; + /** + * Get string values as a list + * + * @returns Values in {@link Field} as a list. + */ + get() { + return this.values; } }; - var InvalidArgumentError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "InvalidArgumentError"; - this.message = message || "Invalid Argument Error"; - this.code = "UND_ERR_INVALID_ARG"; + __name(_Field, "Field"); + var Field = _Field; + var _Fields = class _Fields { + constructor({ fields = [], encoding = "utf-8" }) { + this.entries = {}; + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; } - }; - var InvalidReturnValueError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "InvalidReturnValueError"; - this.message = message || "Invalid Return Value Error"; - this.code = "UND_ERR_INVALID_RETURN_VALUE"; + /** + * Set entry for a {@link Field} name. The `name` + * attribute will be used to key the collection. + * + * @param field The {@link Field} to set. + */ + setField(field) { + this.entries[field.name.toLowerCase()] = field; } - }; - var AbortError2 = class extends UndiciError { - constructor(message) { - super(message); - this.name = "AbortError"; - this.message = message || "The operation was aborted"; + /** + * Retrieve {@link Field} entry by name. + * + * @param name The name of the {@link Field} entry + * to retrieve + * @returns The {@link Field} if it exists. + */ + getField(name) { + return this.entries[name.toLowerCase()]; } - }; - var RequestAbortedError = class extends AbortError2 { - constructor(message) { - super(message); - this.name = "AbortError"; - this.message = message || "Request aborted"; - this.code = "UND_ERR_ABORTED"; + /** + * Delete entry from collection. + * + * @param name Name of the entry to delete. + */ + removeField(name) { + delete this.entries[name.toLowerCase()]; } - }; - var InformationalError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "InformationalError"; - this.message = message || "Request information"; - this.code = "UND_ERR_INFO"; + /** + * Helper function for retrieving specific types of fields. + * Used to grab all headers or all trailers. + * + * @param kind {@link FieldPosition} of entries to retrieve. + * @returns The {@link Field} entries with the specified + * {@link FieldPosition}. + */ + getByType(kind) { + return Object.values(this.entries).filter((field) => field.kind === kind); + } + }; + __name(_Fields, "Fields"); + var Fields = _Fields; + var _HttpRequest = class _HttpRequest2 { + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; } - }; - var RequestContentLengthMismatchError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "RequestContentLengthMismatchError"; - this.message = message || "Request body length does not match content-length header"; - this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; + /** + * Note: this does not deep-clone the body. + */ + static clone(request2) { + const cloned = new _HttpRequest2({ + ...request2, + headers: { ...request2.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; } - }; - var ResponseContentLengthMismatchError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "ResponseContentLengthMismatchError"; - this.message = message || "Response body length does not match content-length header"; - this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; + /** + * This method only actually asserts that request is the interface {@link IHttpRequest}, + * and not necessarily this concrete class. Left in place for API stability. + * + * Do not call instance methods on the input of this function, and + * do not assume it has the HttpRequest prototype. + */ + static isInstance(request2) { + if (!request2) { + return false; + } + const req = request2; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; } - }; - var ClientDestroyedError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "ClientDestroyedError"; - this.message = message || "The client is destroyed"; - this.code = "UND_ERR_DESTROYED"; + /** + * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call + * this method because {@link HttpRequest.isInstance} incorrectly + * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). + */ + clone() { + return _HttpRequest2.clone(this); } }; - var ClientClosedError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "ClientClosedError"; - this.message = message || "The client is closed"; - this.code = "UND_ERR_CLOSED"; + __name(_HttpRequest, "HttpRequest"); + var HttpRequest7 = _HttpRequest; + function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); + } + __name(cloneQuery, "cloneQuery"); + var _HttpResponse = class _HttpResponse { + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; } }; - var SocketError = class extends UndiciError { - constructor(message, socket) { - super(message); - this.name = "SocketError"; - this.message = message || "Socket error"; - this.code = "UND_ERR_SOCKET"; - this.socket = socket; + __name(_HttpResponse, "HttpResponse"); + var HttpResponse2 = _HttpResponse; + function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); + } + __name(isValidHostname, "isValidHostname"); + } +}); + +// 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, module2) { + "use strict"; + 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, { + getHostHeaderPlugin: () => getHostHeaderPlugin, + hostHeaderMiddleware: () => hostHeaderMiddleware, + hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, + resolveHostHeaderConfig: () => resolveHostHeaderConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs2(); + function resolveHostHeaderConfig(input) { + return input; + } + __name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); + var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + if (!import_protocol_http8.HttpRequest.isInstance(args.request)) + return next(args); + const { request: request2 } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request2.headers[":authority"]) { + delete request2.headers["host"]; + request2.headers[":authority"] = request2.hostname + (request2.port ? ":" + request2.port : ""); + } else if (!request2.headers["host"]) { + let host = request2.hostname; + if (request2.port != null) + host += `:${request2.port}`; + request2.headers["host"] = host; + } + return next(args); + }, "hostHeaderMiddleware"); + var hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true + }; + var getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + } + }), "getHostHeaderPlugin"); + } +}); + +// 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, module2) { + "use strict"; + 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, { + getLoggerPlugin: () => getLoggerPlugin, + loggerMiddleware: () => loggerMiddleware, + loggerMiddlewareOptions: () => loggerMiddlewareOptions + }); + module2.exports = __toCommonJS2(src_exports); + var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => { + var _a, _b; + try { + const response = await next(args); + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + (_a = logger == null ? void 0 : logger.info) == null ? void 0 : _a.call(logger, { + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata + }); + return response; + } catch (error) { + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + (_b = logger == null ? void 0 : logger.error) == null ? void 0 : _b.call(logger, { + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error, + metadata: error.$metadata + }); + throw error; } + }, "loggerMiddleware"); + var loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true }; - var NotSupportedError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "NotSupportedError"; - this.message = message || "Not supported error"; - this.code = "UND_ERR_NOT_SUPPORTED"; + var getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); } + }), "getLoggerPlugin"); + } +}); + +// 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, module2) { + "use strict"; + 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, { + addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions, + getRecursionDetectionPlugin: () => getRecursionDetectionPlugin, + recursionDetectionMiddleware: () => recursionDetectionMiddleware + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = 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 = /* @__PURE__ */ __name((options) => (next) => async (args) => { + const { request: request2 } = args; + if (!import_protocol_http8.HttpRequest.isInstance(request2) || options.runtime !== "node" || request2.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) { + return next(args); + } + const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; + const traceId = process.env[ENV_TRACE_ID]; + const nonEmptyString = /* @__PURE__ */ __name((str) => typeof str === "string" && str.length > 0, "nonEmptyString"); + if (nonEmptyString(functionName) && nonEmptyString(traceId)) { + request2.headers[TRACE_ID_HEADER_NAME] = traceId; + } + return next({ + ...args, + request: request2 + }); + }, "recursionDetectionMiddleware"); + var addRecursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low" }; - var BalancedPoolMissingUpstreamError = class extends UndiciError { - constructor(message) { - super(message); - this.name = "MissingUpstreamError"; - this.message = message || "No upstream has been added to the BalancedPool"; - this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + var getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions); } - }; - var HTTPParserError = class extends Error { - constructor(message, code, data) { - super(message); - this.name = "HTTPParserError"; - this.code = code ? `HPE_${code}` : void 0; - this.data = data ? data.toString() : void 0; + }), "getRecursionDetectionPlugin"); + } +}); + +// node_modules/@smithy/util-endpoints/dist-cjs/index.js +var require_dist_cjs6 = __commonJS({ + "node_modules/@smithy/util-endpoints/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, { + EndpointError: () => EndpointError2, + customEndpointFunctions: () => customEndpointFunctions, + isIpAddress: () => isIpAddress2, + isValidHostLabel: () => isValidHostLabel, + resolveEndpoint: () => resolveEndpoint2 + }); + module2.exports = __toCommonJS2(src_exports); + 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 isIpAddress2 = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress"); + var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); + var isValidHostLabel = /* @__PURE__ */ __name((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; + } } - }; - var ResponseExceededMaxSizeError = class extends UndiciError { + return true; + }, "isValidHostLabel"); + var customEndpointFunctions = {}; + 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); + } + __name(toDebugString, "toDebugString"); + var _EndpointError = class _EndpointError extends Error { constructor(message) { super(message); - this.name = "ResponseExceededMaxSizeError"; - this.message = message || "Response content exceeded max size"; - this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + this.name = "EndpointError"; } }; - var RequestRetryError = class extends UndiciError { - constructor(message, code, { headers, data }) { - super(message); - this.name = "RequestRetryError"; - this.message = message || "Request retry error"; - this.code = "UND_ERR_REQ_RETRY"; - this.statusCode = code; - this.data = data; - this.headers = headers; - } + __name(_EndpointError, "EndpointError"); + var EndpointError2 = _EndpointError; + var booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "booleanEquals"); + var getAttrPathList = /* @__PURE__ */ __name((path) => { + const parts = path.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError2(`Path: '${path}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError2(`Invalid array index: '${arrayIndex}' in path: '${path}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } else { + pathList.push(part); + } + } + return pathList; + }, "getAttrPathList"); + var getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError2(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); + } else if (Array.isArray(acc)) { + return acc[parseInt(index)]; + } + return acc[index]; + }, value), "getAttr"); + var isSet = /* @__PURE__ */ __name((value) => value != null, "isSet"); + var not = /* @__PURE__ */ __name((value) => !value, "not"); + var import_types32 = require_dist_cjs(); + var DEFAULT_PORTS = { + [import_types32.EndpointURLScheme.HTTP]: 80, + [import_types32.EndpointURLScheme.HTTPS]: 443 }; - var SecureProxyConnectionError = class extends UndiciError { - constructor(cause, message, options) { - super(message, { cause, ...options ?? {} }); - this.name = "SecureProxyConnectionError"; - this.message = message || "Secure Proxy Connection failed"; - this.code = "UND_ERR_PRX_TLS"; - this.cause = cause; + var parseURL = /* @__PURE__ */ __name((value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; + } + if (typeof value === "object" && "hostname" in value) { + const { hostname: hostname2, port, protocol: protocol2 = "", path = "", query = {} } = value; + const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path}`); + url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&"); + return url; + } + return new URL(value); + } catch (error) { + return null; + } + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; } - }; - module2.exports = { - AbortError: AbortError2, - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError, - SecureProxyConnectionError - }; + 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_types32.EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress2(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 + }; + }, "parseURL"); + var stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "stringEquals"); + var substring = /* @__PURE__ */ __name((input, start, stop, reverse) => { + if (start >= stop || input.length < stop) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); + }, "substring"); + var uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`), "uriEncode"); + var endpointFunctions = { + booleanEquals, + getAttr, + isSet, + isValidHostLabel, + not, + parseURL, + stringEquals, + substring, + uriEncode + }; + var evaluateTemplate = /* @__PURE__ */ __name((template, options) => { + const evaluatedTemplateArr = []; + const templateContext = { + ...options.endpointParams, + ...options.referenceRecord + }; + 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(templateContext[refName], attrName)); + } else { + evaluatedTemplateArr.push(templateContext[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); + }, "evaluateTemplate"); + var getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => { + const referenceRecord = { + ...options.endpointParams, + ...options.referenceRecord + }; + return referenceRecord[ref]; + }, "getReferenceValue"); + var evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } else if (obj["fn"]) { + return callFunction(obj, options); + } else if (obj["ref"]) { + return getReferenceValue(obj, options); + } + throw new EndpointError2(`'${keyName}': ${String(obj)} is not a string, function or reference.`); + }, "evaluateExpression"); + var callFunction = /* @__PURE__ */ __name(({ fn, argv }, options) => { + const evaluatedArgs = argv.map( + (arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options) + ); + const fnSegments = fn.split("."); + if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { + return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); + } + return endpointFunctions[fn](...evaluatedArgs); + }, "callFunction"); + var evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => { + var _a, _b; + if (assign && assign in options.referenceRecord) { + throw new EndpointError2(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(fnArgs, options); + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, `${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); + return { + result: value === "" ? true : !!value, + ...assign != null && { toAssign: { name: assign, value } } + }; + }, "evaluateCondition"); + var evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => { + var _a, _b; + const conditionsReferenceRecord = {}; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, { + ...options, + referenceRecord: { + ...options.referenceRecord, + ...conditionsReferenceRecord + } + }); + if (!result) { + return { result }; + } + if (toAssign) { + conditionsReferenceRecord[toAssign.name] = toAssign.value; + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, `${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); + } + } + return { result: true, referenceRecord: conditionsReferenceRecord }; + }, "evaluateConditions"); + var getEndpointHeaders = /* @__PURE__ */ __name((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 EndpointError2(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }) + }), + {} + ), "getEndpointHeaders"); + var getEndpointProperty = /* @__PURE__ */ __name((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 EndpointError2(`Unexpected endpoint property: ${property}`); + } + return getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError2(`Unexpected endpoint property type: ${typeof property}`); + } + }, "getEndpointProperty"); + var getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce( + (acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: getEndpointProperty(propertyVal, options) + }), + {} + ), "getEndpointProperties"); + var getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } catch (error) { + console.error(`Failed to construct URL with ${expression}`, error); + throw error; + } + } + throw new EndpointError2(`Endpoint URL must be a string, got ${typeof expression}`); + }, "getEndpointUrl"); + var evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => { + var _a, _b; + const { conditions, endpoint: endpoint2 } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }; + const { url, properties, headers } = endpoint2; + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, `${debugId} Resolving endpoint from template: ${toDebugString(endpoint2)}`); + return { + ...headers != void 0 && { + headers: getEndpointHeaders(headers, endpointRuleOptions) + }, + ...properties != void 0 && { + properties: getEndpointProperties(properties, endpointRuleOptions) + }, + url: getEndpointUrl(url, endpointRuleOptions) + }; + }, "evaluateEndpointRule"); + var evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => { + const { conditions, error } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + throw new EndpointError2( + evaluateExpression(error, "Error", { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }) + ); + }, "evaluateErrorRule"); + var evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + return evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }); + }, "evaluateTreeRule"); + var evaluateRules = /* @__PURE__ */ __name((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 = evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else { + throw new EndpointError2(`Unknown endpoint rule: ${rule}`); + } + } + throw new EndpointError2(`Rules evaluation failed`); + }, "evaluateRules"); + var resolveEndpoint2 = /* @__PURE__ */ __name((ruleSetObject, options) => { + var _a, _b, _c, _d, _e; + const { endpointParams, logger } = options; + const { parameters, rules } = ruleSetObject; + (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, `${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]); + if (paramsWithDefault.length > 0) { + for (const [paramKey, paramDefaultValue] of paramsWithDefault) { + endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; + } + } + const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k); + for (const requiredParam of requiredParams) { + if (endpointParams[requiredParam] == null) { + throw new EndpointError2(`Missing required parameter: '${requiredParam}'`); + } + } + const endpoint2 = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} }); + if ((_c = options.endpointParams) == null ? void 0 : _c.Endpoint) { + try { + const givenEndpoint = new URL(options.endpointParams.Endpoint); + const { protocol, port } = givenEndpoint; + endpoint2.url.protocol = protocol; + endpoint2.url.port = port; + } catch (e) { + } + } + (_e = (_d = options.logger) == null ? void 0 : _d.debug) == null ? void 0 : _e.call(_d, `${debugId} Resolved endpoint: ${toDebugString(endpoint2)}`); + return endpoint2; + }, "resolveEndpoint"); } }); -// node_modules/undici/lib/core/constants.js -var require_constants6 = __commonJS({ - "node_modules/undici/lib/core/constants.js"(exports2, module2) { +// node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +var require_dist_cjs7 = __commonJS({ + "node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js"(exports2, module2) { "use strict"; - var headerNameLowerCasedRecord = {}; - var wellknownHeaderNames = [ - "Accept", - "Accept-Encoding", - "Accept-Language", - "Accept-Ranges", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Age", - "Allow", - "Alt-Svc", - "Alt-Used", - "Authorization", - "Cache-Control", - "Clear-Site-Data", - "Connection", - "Content-Disposition", - "Content-Encoding", - "Content-Language", - "Content-Length", - "Content-Location", - "Content-Range", - "Content-Security-Policy", - "Content-Security-Policy-Report-Only", - "Content-Type", - "Cookie", - "Cross-Origin-Embedder-Policy", - "Cross-Origin-Opener-Policy", - "Cross-Origin-Resource-Policy", - "Date", - "Device-Memory", - "Downlink", - "ECT", - "ETag", - "Expect", - "Expect-CT", - "Expires", - "Forwarded", - "From", - "Host", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Range", - "If-Unmodified-Since", - "Keep-Alive", - "Last-Modified", - "Link", - "Location", - "Max-Forwards", - "Origin", - "Permissions-Policy", - "Pragma", - "Proxy-Authenticate", - "Proxy-Authorization", - "RTT", - "Range", - "Referer", - "Referrer-Policy", - "Refresh", - "Retry-After", - "Sec-WebSocket-Accept", - "Sec-WebSocket-Extensions", - "Sec-WebSocket-Key", - "Sec-WebSocket-Protocol", - "Sec-WebSocket-Version", - "Server", - "Server-Timing", - "Service-Worker-Allowed", - "Service-Worker-Navigation-Preload", - "Set-Cookie", - "SourceMap", - "Strict-Transport-Security", - "Supports-Loading-Mode", - "TE", - "Timing-Allow-Origin", - "Trailer", - "Transfer-Encoding", - "Upgrade", - "Upgrade-Insecure-Requests", - "User-Agent", - "Vary", - "Via", - "WWW-Authenticate", - "X-Content-Type-Options", - "X-DNS-Prefetch-Control", - "X-Frame-Options", - "X-Permitted-Cross-Domain-Policies", - "X-Powered-By", - "X-Requested-With", - "X-XSS-Protection" - ]; - for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = wellknownHeaderNames[i]; - const lowerCasedKey = key.toLowerCase(); - headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + 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, { + ConditionObject: () => import_util_endpoints.ConditionObject, + DeprecatedObject: () => import_util_endpoints.DeprecatedObject, + EndpointError: () => import_util_endpoints.EndpointError, + EndpointObject: () => import_util_endpoints.EndpointObject, + EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders, + EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties, + EndpointParams: () => import_util_endpoints.EndpointParams, + EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions, + EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject, + ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject, + EvaluateOptions: () => import_util_endpoints.EvaluateOptions, + Expression: () => import_util_endpoints.Expression, + FunctionArgv: () => import_util_endpoints.FunctionArgv, + FunctionObject: () => import_util_endpoints.FunctionObject, + FunctionReturn: () => import_util_endpoints.FunctionReturn, + ParameterObject: () => import_util_endpoints.ParameterObject, + ReferenceObject: () => import_util_endpoints.ReferenceObject, + ReferenceRecord: () => import_util_endpoints.ReferenceRecord, + RuleSetObject: () => import_util_endpoints.RuleSetObject, + RuleSetRules: () => import_util_endpoints.RuleSetRules, + TreeRuleObject: () => import_util_endpoints.TreeRuleObject, + awsEndpointFunctions: () => awsEndpointFunctions, + getUserAgentPrefix: () => getUserAgentPrefix, + isIpAddress: () => import_util_endpoints.isIpAddress, + partition: () => partition, + resolveEndpoint: () => import_util_endpoints.resolveEndpoint, + setPartitionInfo: () => setPartitionInfo, + useDefaultPartitionInfo: () => useDefaultPartitionInfo + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_endpoints = require_dist_cjs6(); + var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!(0, import_util_endpoints.isValidHostLabel)(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if ((0, import_util_endpoints.isIpAddress)(value)) { + return false; + } + return true; + }, "isVirtualHostableS3Bucket"); + var ARN_DELIMITER = ":"; + var RESOURCE_DELIMITER = "/"; + var parseArn = /* @__PURE__ */ __name((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 + }; + }, "parseArn"); + var partitions_default = { + 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)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "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)" + }, + "aws-global": { + description: "AWS Standard 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)" + }, + "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 China global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, { + 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 GovCloud (US) global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + }, { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "c2s.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "AWS ISO (US) 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: "sc2s.sgov.gov", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "AWS ISOB (US) global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + } + } + }, { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "cloud.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "csp.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: {} + }], + version: "1.1" + }; + var selectedPartitionsInfo = partitions_default; + var selectedUserAgentPrefix = ""; + var partition = /* @__PURE__ */ __name((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 + }; + }, "partition"); + var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; + }, "setPartitionInfo"); + var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => { + setPartitionInfo(partitions_default, ""); + }, "useDefaultPartitionInfo"); + var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); + var awsEndpointFunctions = { + isVirtualHostableS3Bucket, + parseArn, + partition + }; + import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +var require_dist_cjs8 = __commonJS({ + "node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js"(exports2, module2) { + "use strict"; + 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, { + getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions, + getUserAgentPlugin: () => getUserAgentPlugin, + resolveUserAgentConfig: () => resolveUserAgentConfig, + userAgentMiddleware: () => userAgentMiddleware + }); + module2.exports = __toCommonJS2(src_exports); + function resolveUserAgentConfig(input) { + return { + ...input, + customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent + }; } - Object.setPrototypeOf(headerNameLowerCasedRecord, null); - module2.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord + __name(resolveUserAgentConfig, "resolveUserAgentConfig"); + var import_util_endpoints = require_dist_cjs7(); + var import_protocol_http8 = require_dist_cjs2(); + 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 = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; + var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; + var UA_ESCAPE_CHAR = "-"; + var userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { + var _a, _b; + const { request: request2 } = args; + if (!import_protocol_http8.HttpRequest.isInstance(request2)) + return next(args); + const { headers } = request2; + const userAgent2 = ((_a = context == null ? void 0 : context.userAgent) == null ? void 0 : _a.map(escapeUserAgent)) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + const customUserAgent = ((_b = options == null ? void 0 : options.customUserAgent) == null ? void 0 : _b.map(escapeUserAgent)) || []; + const prefix = (0, import_util_endpoints.getUserAgentPrefix)(); + const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent2, ...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: request2 + }); + }, "userAgentMiddleware"); + var escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => { + var _a; + const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); + const version3 = (_a = userAgentPair[1]) == null ? void 0 : _a.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, version3].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}`; + } + }, ""); + }, "escapeUserAgent"); + var getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true }; + var getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({ + applyToStack: (clientStack) => { + clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); + } + }), "getUserAgentPlugin"); } }); -// node_modules/undici/lib/core/tree.js -var require_tree = __commonJS({ - "node_modules/undici/lib/core/tree.js"(exports2, module2) { - "use strict"; - var { - wellknownHeaderNames, - headerNameLowerCasedRecord - } = require_constants6(); - var TstNode = class _TstNode { - /** @type {any} */ - value = null; - /** @type {null | TstNode} */ - left = null; - /** @type {null | TstNode} */ - middle = null; - /** @type {null | TstNode} */ - right = null; - /** @type {number} */ - code; - /** - * @param {string} key - * @param {any} value - * @param {number} index - */ - constructor(key, value, index) { - if (index === void 0 || index >= key.length) { - throw new TypeError("Unreachable"); +// node_modules/@smithy/util-config-provider/dist-cjs/index.js +var require_dist_cjs9 = __commonJS({ + "node_modules/@smithy/util-config-provider/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, { + SelectorType: () => SelectorType, + booleanSelector: () => booleanSelector, + numberSelector: () => numberSelector + }); + module2.exports = __toCommonJS2(src_exports); + var booleanSelector = /* @__PURE__ */ __name((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]}.`); + }, "booleanSelector"); + var numberSelector = /* @__PURE__ */ __name((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; + }, "numberSelector"); + var SelectorType = /* @__PURE__ */ ((SelectorType2) => { + SelectorType2["ENV"] = "env"; + SelectorType2["CONFIG"] = "shared config entry"; + return SelectorType2; + })(SelectorType || {}); + } +}); + +// node_modules/@smithy/util-middleware/dist-cjs/index.js +var require_dist_cjs10 = __commonJS({ + "node_modules/@smithy/util-middleware/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, { + getSmithyContext: () => getSmithyContext4, + normalizeProvider: () => normalizeProvider2 + }); + module2.exports = __toCommonJS2(src_exports); + var import_types5 = require_dist_cjs(); + var getSmithyContext4 = /* @__PURE__ */ __name((context) => context[import_types5.SMITHY_CONTEXT_KEY] || (context[import_types5.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + var normalizeProvider2 = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); + } +}); + +// node_modules/@smithy/config-resolver/dist-cjs/index.js +var require_dist_cjs11 = __commonJS({ + "node_modules/@smithy/config-resolver/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, { + CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, + CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, + DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, + DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, + 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, + REGION_ENV_NAME: () => REGION_ENV_NAME, + REGION_INI_NAME: () => REGION_INI_NAME, + getRegionInfo: () => getRegionInfo, + resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, + resolveEndpointsConfig: () => resolveEndpointsConfig, + resolveRegionConfig: () => resolveRegionConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_config_provider = require_dist_cjs9(); + 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_OPTIONS = { + environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false + }; + 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_OPTIONS = { + environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false + }; + var import_util_middleware3 = require_dist_cjs10(); + var resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => { + const { endpoint: endpoint2, urlParser } = input; + return { + ...input, + tls: input.tls ?? true, + endpoint: (0, import_util_middleware3.normalizeProvider)(typeof endpoint2 === "string" ? urlParser(endpoint2) : endpoint2), + isCustomEndpoint: true, + useDualstackEndpoint: (0, import_util_middleware3.normalizeProvider)(input.useDualstackEndpoint ?? false) + }; + }, "resolveCustomEndpointsConfig"); + var getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => { + const { tls = 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(`${tls ? "https:" : "http:"}//${hostname}`); + }, "getEndpointFromRegion"); + var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { + const useDualstackEndpoint = (0, import_util_middleware3.normalizeProvider)(input.useDualstackEndpoint ?? false); + const { endpoint: endpoint2, useFipsEndpoint, urlParser } = input; + return { + ...input, + tls: input.tls ?? true, + endpoint: endpoint2 ? (0, import_util_middleware3.normalizeProvider)(typeof endpoint2 === "string" ? urlParser(endpoint2) : endpoint2) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint2, + useDualstackEndpoint + }; + }, "resolveEndpointsConfig"); + var REGION_ENV_NAME = "AWS_REGION"; + var REGION_INI_NAME = "region"; + var NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + } + }; + var NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials" + }; + var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + var resolveRegionConfig = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return { + ...input, + region: async () => { + if (typeof region === "string") { + return getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); } - const code = this.code = key.charCodeAt(index); - if (code > 127) { - throw new TypeError("key must be ascii string"); + }; + }, "resolveRegionConfig"); + var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => { + var _a; + return (_a = variants.find( + ({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") + )) == null ? void 0 : _a.hostname; + }, "getHostnameFromVariants"); + var getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0, "getResolvedHostname"); + var getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition"); + var getResolvedSigningRegion = /* @__PURE__ */ __name((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); + } + } + }, "getResolvedSigningRegion"); + var getRegionInfo = /* @__PURE__ */ __name((region, { + useFipsEndpoint = false, + useDualstackEndpoint = false, + signingService, + regionHash, + partitionHash + }) => { + var _a, _b, _c, _d, _e; + const partition = getResolvedPartition(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : ((_a = partitionHash[partition]) == null ? void 0 : _a.endpoint) ?? region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = getHostnameFromVariants((_b = regionHash[resolvedRegion]) == null ? void 0 : _b.variants, hostnameOptions); + const partitionHostname = getHostnameFromVariants((_c = partitionHash[partition]) == null ? void 0 : _c.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: (_d = regionHash[resolvedRegion]) == null ? void 0 : _d.signingRegion, + regionRegex: partitionHash[partition].regionRegex, + useFipsEndpoint + }); + return { + partition, + signingService, + hostname, + ...signingRegion && { signingRegion }, + ...((_e = regionHash[resolvedRegion]) == null ? void 0 : _e.signingService) && { + signingService: regionHash[resolvedRegion].signingService } - if (key.length !== ++index) { - this.middle = new _TstNode(key, value, index); - } else { - this.value = value; + }; + }, "getRegionInfo"); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map = /* @__PURE__ */ new Map(); + for (const scheme of httpAuthSchemes) { + map.set(scheme.schemeId, scheme); + } + return map; +} +var import_types, import_util_middleware, httpAuthSchemeMiddleware; +var init_httpAuthSchemeMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { + import_types = __toESM(require_dist_cjs()); + import_util_middleware = __toESM(require_dist_cjs10()); + httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => { + const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)); + const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes); + const smithyContext = (0, import_util_middleware.getSmithyContext)(context); + const failureReasons = []; + for (const option of options) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; } - } - /** - * @param {string} key - * @param {any} value - */ - add(key, value) { - const length = key.length; - if (length === 0) { - throw new TypeError("Unreachable"); + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; } - let index = 0; - let node = this; - while (true) { - const code = key.charCodeAt(index); - if (code > 127) { - throw new TypeError("key must be ascii string"); - } - if (node.code === code) { - if (length === ++index) { - node.value = value; - break; - } else if (node.middle !== null) { - node = node.middle; - } else { - node.middle = new _TstNode(key, value, index); - break; - } - } else if (node.code < code) { - if (node.left !== null) { - node = node.left; - } else { - node.left = new _TstNode(key, value, index); - break; - } - } else if (node.right !== null) { - node = node.right; - } else { - node.right = new _TstNode(key, value, index); - break; - } + 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/property-provider/dist-cjs/index.js +var require_dist_cjs12 = __commonJS({ + "node_modules/@smithy/property-provider/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, { + CredentialsProviderError: () => CredentialsProviderError, + ProviderError: () => ProviderError2, + TokenProviderError: () => TokenProviderError, + chain: () => chain, + fromStatic: () => fromStatic, + memoize: () => memoize + }); + module2.exports = __toCommonJS2(src_exports); + var _ProviderError = class _ProviderError2 extends Error { + constructor(message, options = true) { + var _a; + let logger; + let tryNextLink = true; + if (typeof options === "boolean") { + logger = void 0; + tryNextLink = options; + } else if (options != null && typeof options === "object") { + logger = options.logger; + tryNextLink = options.tryNextLink ?? true; } + super(message); + this.name = "ProviderError"; + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, _ProviderError2.prototype); + (_a = logger == null ? void 0 : logger.debug) == null ? void 0 : _a.call(logger, `@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); } /** - * @param {Uint8Array} key - * @return {TstNode | null} + * @deprecated use new operator. */ - search(key) { - const keylength = key.length; - let index = 0; - let node = this; - while (node !== null && index < keylength) { - let code = key[index]; - if (code <= 90 && code >= 65) { - code |= 32; - } - while (node !== null) { - if (code === node.code) { - if (keylength === ++index) { - return node; - } - node = node.middle; - break; - } - node = node.code < code ? node.left : node.right; - } - } - return null; + static from(error, options = true) { + return Object.assign(new this(error.message, options), error); } }; - var TernarySearchTree = class { - /** @type {TstNode | null} */ - node = null; + __name(_ProviderError, "ProviderError"); + var ProviderError2 = _ProviderError; + var _CredentialsProviderError = class _CredentialsProviderError2 extends ProviderError2 { /** - * @param {string} key - * @param {any} value - * */ - insert(key, value) { - if (this.node === null) { - this.node = new TstNode(key, value, 0); - } else { - this.node.add(key, value); - } + * @override + */ + constructor(message, options = true) { + super(message, options); + this.name = "CredentialsProviderError"; + Object.setPrototypeOf(this, _CredentialsProviderError2.prototype); } + }; + __name(_CredentialsProviderError, "CredentialsProviderError"); + var CredentialsProviderError = _CredentialsProviderError; + var _TokenProviderError = class _TokenProviderError2 extends ProviderError2 { /** - * @param {Uint8Array} key - * @return {any} + * @override */ - lookup(key) { - return this.node?.search(key)?.value ?? null; + constructor(message, options = true) { + super(message, options); + this.name = "TokenProviderError"; + Object.setPrototypeOf(this, _TokenProviderError2.prototype); } }; - var tree = new TernarySearchTree(); - for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; - tree.insert(key, key); - } - module2.exports = { - TernarySearchTree, - tree + __name(_TokenProviderError, "TokenProviderError"); + var TokenProviderError = _TokenProviderError; + var chain = /* @__PURE__ */ __name((...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 == null ? void 0 : err.tryNextLink) { + continue; + } + throw err; + } + } + throw lastProviderError; + }, "chain"); + var fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), "fromStatic"); + var memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || (options == null ? void 0 : 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; + }; + }, "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 getHomeDir2 = () => { + 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 = getHomeDir2; + } +}); + +// 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 getSSOTokenFilepath2 = (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 = getSSOTokenFilepath2; } }); -// node_modules/undici/lib/core/util.js -var require_util8 = __commonJS({ - "node_modules/undici/lib/core/util.js"(exports2, module2) { +// 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"; - var assert = require("node:assert"); - var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols6(); - var { IncomingMessage } = require("node:http"); - var stream = require("node:stream"); - var net = require("node:net"); - var { Blob: Blob2 } = require("node:buffer"); - var nodeUtil = require("node:util"); - var { stringify: stringify2 } = require("node:querystring"); - var { EventEmitter: EE } = require("node:events"); - var { InvalidArgumentError } = require_errors2(); - var { headerNameLowerCasedRecord } = require_constants6(); - var { tree } = require_tree(); - var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); - var BodyAsyncIterable = class { - constructor(body) { - this[kBody] = body; - this[kBodyUsed] = false; - } - async *[Symbol.asyncIterator]() { - assert(!this[kBodyUsed], "disturbed"); - this[kBodyUsed] = true; - yield* this[kBody]; - } + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSSOTokenFromFile = void 0; + var fs_1 = require("fs"); + var getSSOTokenFilepath_1 = require_getSSOTokenFilepath(); + var { readFile } = fs_1.promises; + var getSSOTokenFromFile2 = async (id) => { + const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); + const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); }; - function wrapRequestBody(body) { - if (isStream(body)) { - if (bodyLength(body) === 0) { - body.on("data", function() { - assert(false); - }); - } - if (typeof body.readableDidRead !== "boolean") { - body[kBodyUsed] = false; - EE.prototype.on.call(body, "data", function() { - this[kBodyUsed] = true; - }); - } - return body; - } else if (body && typeof body.pipeTo === "function") { - return new BodyAsyncIterable(body); - } else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) { - return new BodyAsyncIterable(body); - } else { - return body; + exports2.getSSOTokenFromFile = getSSOTokenFromFile2; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js +var require_slurpFile = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.slurpFile = void 0; + var fs_1 = require("fs"); + var { readFile } = fs_1.promises; + var filePromisesHash = {}; + var slurpFile = (path, options) => { + if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { + filePromisesHash[path] = readFile(path, "utf8"); } - } - function nop() { - } - function isStream(obj) { - return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; - } - function isBlobLike(object) { - if (object === null) { - return false; - } else if (object instanceof Blob2) { - return true; - } else if (typeof object !== "object") { + return filePromisesHash[path]; + }; + exports2.slurpFile = slurpFile; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +var require_dist_cjs13 = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/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 __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, + DEFAULT_PROFILE: () => DEFAULT_PROFILE, + ENV_PROFILE: () => ENV_PROFILE, + getProfileName: () => getProfileName, + loadSharedConfigFiles: () => loadSharedConfigFiles, + loadSsoSessionData: () => loadSsoSessionData, + parseKnownFiles: () => parseKnownFiles + }); + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_getHomeDir(), module2.exports); + var ENV_PROFILE = "AWS_PROFILE"; + var DEFAULT_PROFILE = "default"; + var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); + __reExport(src_exports, require_getSSOTokenFilepath(), module2.exports); + __reExport(src_exports, require_getSSOTokenFromFile(), module2.exports); + var import_types5 = require_dist_cjs(); + var getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { return false; - } else { - const sTag = object[Symbol.toStringTag]; - return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); } - } - function buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".'); + return Object.values(import_types5.IniSectionType).includes(key.substring(0, indexOfSeparator)); + }).reduce( + (acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === import_types5.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; + }, + { + // Populate default profile, if present. + ...data.default && { default: data.default } + } + ), "getConfigData"); + var import_path = require("path"); + var import_getHomeDir = require_getHomeDir(); + var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; + var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath"); + var import_getHomeDir2 = require_getHomeDir(); + var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; + var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath"); + var import_getHomeDir3 = require_getHomeDir(); + var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; + var profileNameBlockList = ["__proto__", "profile __proto__"]; + var parseIni = /* @__PURE__ */ __name((iniData) => { + const map = {}; + 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; + } + map[currentSection] = map[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; + map[currentSection][key] = value; + } + } + } + } + return map; + }, "parseIni"); + var import_slurpFile = require_slurpFile(); + var swallowError = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var CONFIG_PREFIX_SEPARATOR = "."; + var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const homeDir = (0, import_getHomeDir3.getHomeDir)(); + const relativeHomeDirPrefix = "~/"; + let resolvedFilepath = filepath; + if (filepath.startsWith(relativeHomeDirPrefix)) { + resolvedFilepath = (0, import_path.join)(homeDir, filepath.slice(2)); + } + let resolvedConfigFilepath = configFilepath; + if (configFilepath.startsWith(relativeHomeDirPrefix)) { + resolvedConfigFilepath = (0, import_path.join)(homeDir, configFilepath.slice(2)); + } + const parsedFiles = await Promise.all([ + (0, import_slurpFile.slurpFile)(resolvedConfigFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).then(getConfigData).catch(swallowError), + (0, import_slurpFile.slurpFile)(resolvedFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).catch(swallowError) + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1] + }; + }, "loadSharedConfigFiles"); + var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types5.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); + var import_slurpFile2 = require_slurpFile(); + var swallowError2 = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData"); + var mergeConfigFiles = /* @__PURE__ */ __name((...files) => { + const merged = {}; + for (const file of files) { + for (const [key, values] of Object.entries(file)) { + if (merged[key] !== void 0) { + Object.assign(merged[key], values); + } else { + merged[key] = values; + } + } } - const stringified = stringify2(queryParams); - if (stringified) { - url += "?" + stringified; + return merged; + }, "mergeConfigFiles"); + var parseKnownFiles = /* @__PURE__ */ __name(async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); + }, "parseKnownFiles"); + } +}); + +// node_modules/@smithy/node-config-provider/dist-cjs/index.js +var require_dist_cjs14 = __commonJS({ + "node_modules/@smithy/node-config-provider/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, { + loadConfig: () => loadConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_property_provider2 = require_dist_cjs12(); + function getSelectorName(functionString) { + try { + const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); + constants.delete("CONFIG"); + constants.delete("CONFIG_PREFIX_SEPARATOR"); + constants.delete("ENV"); + return [...constants].join(", "); + } catch (e) { + return functionString; } - return url; - } - function isValidPort(port) { - const value = parseInt(port, 10); - return value === Number(port) && value >= 0 && value <= 65535; - } - 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) { - if (typeof url === "string") { - url = new URL(url); - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + __name(getSelectorName, "getSelectorName"); + var fromEnv = /* @__PURE__ */ __name((envVarSelector, logger) => async () => { + try { + const config = envVarSelector(process.env); + if (config === void 0) { + throw new Error(); } - return url; - } - if (!url || typeof url !== "object") { - throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); + return config; + } catch (e) { + throw new import_property_provider2.CredentialsProviderError( + e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, + { logger } + ); } - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && isValidPort(url.port) === false) { - throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); - } - if (url.path != null && typeof url.path !== "string") { - throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); - } - if (url.pathname != null && typeof url.pathname !== "string") { - throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); - } - if (url.hostname != null && typeof url.hostname !== "string") { - throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); - } - if (url.origin != null && typeof url.origin !== "string") { - throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); - } - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); - } - 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 path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; - if (origin[origin.length - 1] === "/") { - origin = origin.slice(0, origin.length - 1); - } - if (path && path[0] !== "/") { - path = `/${path}`; + }, "fromEnv"); + var import_shared_ini_file_loader = require_dist_cjs13(); + var fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = (0, import_shared_ini_file_loader.getProfileName)(init); + const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.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 new URL(`${origin}${path}`); + return configValue; + } catch (e) { + throw new import_property_provider2.CredentialsProviderError( + e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, + { logger: init.logger } + ); } - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + }, "fromSharedConfigFiles"); + var isFunction = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction"); + var fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider2.fromStatic)(defaultValue), "fromStatic"); + var loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)( + fromEnv(environmentVariableSelector), + fromSharedConfigFiles(configFileSelector, configuration), + fromStatic(defaultValue) + ) + ), "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_cjs13(); + 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_cjs14(); + 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/querystring-parser/dist-cjs/index.js +var require_dist_cjs15 = __commonJS({ + "node_modules/@smithy/querystring-parser/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, { + parseQueryString: () => parseQueryString + }); + module2.exports = __toCommonJS2(src_exports); + 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 url; + return query; } - function parseOrigin(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { - throw new InvalidArgumentError("invalid url"); + __name(parseQueryString, "parseQueryString"); + } +}); + +// node_modules/@smithy/url-parser/dist-cjs/index.js +var require_dist_cjs16 = __commonJS({ + "node_modules/@smithy/url-parser/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, { + parseUrl: () => parseUrl2 + }); + module2.exports = __toCommonJS2(src_exports); + var import_querystring_parser = require_dist_cjs15(); + var parseUrl2 = /* @__PURE__ */ __name((url) => { + if (typeof url === "string") { + return parseUrl2(new URL(url)); } - return url; - } - function getHostname(host) { - if (host[0] === "[") { - const idx2 = host.indexOf("]"); - assert(idx2 !== -1); - return host.substring(1, idx2); + const { hostname, pathname, port, protocol, search } = url; + let query; + if (search) { + query = (0, import_querystring_parser.parseQueryString)(search); } - const idx = host.indexOf(":"); - if (idx === -1) return host; - return host.substring(0, idx); - } - function getServerName(host) { - if (!host) { - return null; + return { + hostname, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; + }, "parseUrl"); + } +}); + +// node_modules/@smithy/middleware-serde/dist-cjs/index.js +var require_dist_cjs17 = __commonJS({ + "node_modules/@smithy/middleware-serde/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, { + deserializerMiddleware: () => deserializerMiddleware, + deserializerMiddlewareOption: () => deserializerMiddlewareOption, + getSerdePlugin: () => getSerdePlugin, + serializerMiddleware: () => serializerMiddleware, + serializerMiddlewareOption: () => serializerMiddlewareOption2 + }); + module2.exports = __toCommonJS2(src_exports); + var deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + return { + response, + output: parsed + }; + } catch (error) { + Object.defineProperty(error, "$response", { + value: response + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + error.message += "\n " + hint; + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } + } + throw error; } - assert.strictEqual(typeof host, "string"); - const servername = getHostname(host); - if (net.isIP(servername)) { - return ""; + }, "deserializerMiddleware"); + var serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => { + var _a; + const endpoint2 = ((_a = context.endpointV2) == null ? void 0 : _a.url) && options.urlParser ? async () => options.urlParser(context.endpointV2.url) : options.endpoint; + if (!endpoint2) { + throw new Error("No valid endpoint provider available."); } - return servername; - } - function deepClone(obj) { - return JSON.parse(JSON.stringify(obj)); - } - function isAsyncIterable(obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); - } - function isIterable(obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); + const request2 = await serializer(args.input, { ...options, endpoint: endpoint2 }); + return next({ + ...args, + request: request2 + }); + }, "serializerMiddleware"); + var deserializerMiddlewareOption = { + 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), deserializerMiddlewareOption); + commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption2); + } + }; } - function bodyLength(body) { - if (body == null) { - return 0; - } else if (isStream(body)) { - const state = body._readableState; - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null; - } else if (isBuffer(body)) { - return body.byteLength; + __name(getSerdePlugin, "getSerdePlugin"); + } +}); + +// node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +var require_dist_cjs18 = __commonJS({ + "node_modules/@smithy/middleware-endpoint/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, { + endpointMiddleware: () => endpointMiddleware, + endpointMiddlewareOptions: () => endpointMiddlewareOptions2, + getEndpointFromInstructions: () => getEndpointFromInstructions, + getEndpointPlugin: () => getEndpointPlugin, + resolveEndpointConfig: () => resolveEndpointConfig, + resolveParams: () => resolveParams, + toEndpointV1: () => toEndpointV1 + }); + module2.exports = __toCommonJS2(src_exports); + var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { + const bucket = (endpointParams == null ? void 0 : 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; + }, "resolveParamsForS3"); + 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 = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); + var isArnBucketName = /* @__PURE__ */ __name((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; + }, "isArnBucketName"); + var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => { + const configProvider = /* @__PURE__ */ __name(async () => { + const configValue = config[configKey] ?? config[canonicalEndpointParamKey]; + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }, "configProvider"); + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = (credentials == null ? void 0 : credentials.credentialScope) ?? (credentials == null ? void 0 : credentials.CredentialScope); + return configValue; + }; } - return null; - } - function isDestroyed(body) { - return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)); - } - function destroy(stream2, err) { - if (stream2 == null || !isStream(stream2) || isDestroyed(stream2)) { - return; + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = (credentials == null ? void 0 : credentials.accountId) ?? (credentials == null ? void 0 : credentials.AccountId); + return configValue; + }; } - if (typeof stream2.destroy === "function") { - if (Object.getPrototypeOf(stream2).constructor === IncomingMessage) { - stream2.socket = null; + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + const endpoint2 = await configProvider(); + if (endpoint2 && typeof endpoint2 === "object") { + if ("url" in endpoint2) { + return endpoint2.url.href; + } + if ("hostname" in endpoint2) { + const { protocol, hostname, port, path } = endpoint2; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; + } + } + return endpoint2; + }; + } + return configProvider; + }, "createConfigValueProvider"); + var import_getEndpointFromConfig = require_getEndpointFromConfig(); + var import_url_parser = require_dist_cjs16(); + var toEndpointV1 = /* @__PURE__ */ __name((endpoint2) => { + if (typeof endpoint2 === "object") { + if ("url" in endpoint2) { + return (0, import_url_parser.parseUrl)(endpoint2.url); + } + return endpoint2; + } + return (0, import_url_parser.parseUrl)(endpoint2); + }, "toEndpointV1"); + var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.endpoint) { + const endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId || ""); + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint2 = clientConfig.endpointProvider(endpointParams, context); + return endpoint2; + }, "getEndpointFromInstructions"); + var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { + var _a; + const endpointParams = {}; + const instructions = ((_a = instructionsSupplier == null ? void 0 : instructionsSupplier.getEndpointParameterInstructions) == null ? void 0 : _a.call(instructionsSupplier)) || {}; + 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)(); + 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; + }, "resolveParams"); + var import_util_middleware3 = require_dist_cjs10(); + var endpointMiddleware = /* @__PURE__ */ __name(({ + config, + instructions + }) => { + return (next, context) => async (args) => { + var _a, _b, _c; + const endpoint2 = await getEndpointFromInstructions( + args.input, + { + getEndpointParameterInstructions() { + return instructions; + } + }, + { ...config }, + context + ); + context.endpointV2 = endpoint2; + context.authSchemes = (_a = endpoint2.properties) == null ? void 0 : _a.authSchemes; + const authScheme = (_b = context.authSchemes) == null ? void 0 : _b[0]; + if (authScheme) { + context["signing_region"] = authScheme.signingRegion; + context["signing_service"] = authScheme.signingName; + const smithyContext = (0, import_util_middleware3.getSmithyContext)(context); + const httpAuthOption = (_c = smithyContext == null ? void 0 : smithyContext.selectedHttpAuthScheme) == null ? void 0 : _c.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 + ); + } } - stream2.destroy(err); - } else if (err) { - queueMicrotask(() => { - stream2.emit("error", err); + return next({ + ...args }); + }; + }, "endpointMiddleware"); + var import_middleware_serde2 = require_dist_cjs17(); + var endpointMiddlewareOptions2 = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde2.serializerMiddlewareOption.name + }; + var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo( + endpointMiddleware({ + config, + instructions + }), + endpointMiddlewareOptions2 + ); } - if (stream2.destroyed !== true) { - stream2[kDestroyed] = true; + }), "getEndpointPlugin"); + var resolveEndpointConfig = /* @__PURE__ */ __name((input) => { + const tls = input.tls ?? true; + const { endpoint: endpoint2 } = input; + const customEndpointProvider = endpoint2 != null ? async () => toEndpointV1(await (0, import_util_middleware3.normalizeProvider)(endpoint2)()) : void 0; + const isCustomEndpoint = !!endpoint2; + return { + ...input, + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: (0, import_util_middleware3.normalizeProvider)(input.useDualstackEndpoint ?? false), + useFipsEndpoint: (0, import_util_middleware3.normalizeProvider)(input.useFipsEndpoint ?? false) + }; + }, "resolveEndpointConfig"); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +var import_middleware_endpoint, httpAuthSchemeEndpointRuleSetMiddlewareOptions, getHttpAuthSchemeEndpointRuleSetPlugin; +var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() { + import_middleware_endpoint = __toESM(require_dist_cjs18()); + init_httpAuthSchemeMiddleware(); + httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: import_middleware_endpoint.endpointMiddlewareOptions.name + }; + 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 import_middleware_serde, httpAuthSchemeMiddlewareOptions, getHttpAuthSchemePlugin; +var init_getHttpAuthSchemePlugin = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() { + import_middleware_serde = __toESM(require_dist_cjs17()); + init_httpAuthSchemeMiddleware(); + httpAuthSchemeMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde.serializerMiddlewareOption.name + }; + 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_types2, 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_types2 = __toESM(require_dist_cjs()); + import_util_middleware2 = __toESM(require_dist_cjs10()); + defaultErrorHandler = (signingProperties) => (error) => { + throw error; + }; + 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/middleware-retry/node_modules/uuid/dist/esm-node/rng.js +function rng2() { + if (poolPtr2 > rnds8Pool2.length - 16) { + import_crypto4.default.randomFillSync(rnds8Pool2); + poolPtr2 = 0; + } + return rnds8Pool2.slice(poolPtr2, poolPtr2 += 16); +} +var import_crypto4, rnds8Pool2, poolPtr2; +var init_rng2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto4 = __toESM(require("crypto")); + rnds8Pool2 = new Uint8Array(256); + poolPtr2 = rnds8Pool2.length; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/regex.js +var regex_default2; +var init_regex2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/regex.js"() { + regex_default2 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/validate.js +function validate2(uuid) { + return typeof uuid === "string" && regex_default2.test(uuid); +} +var validate_default2; +var init_validate2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/validate.js"() { + init_regex2(); + validate_default2 = validate2; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/stringify.js +function unsafeStringify(arr, offset = 0) { + return byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]; +} +function stringify2(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); + if (!validate_default2(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex2, stringify_default2; +var init_stringify2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate2(); + byteToHex2 = []; + for (let i = 0; i < 256; ++i) { + byteToHex2.push((i + 256).toString(16).slice(1)); } - var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); - return m ? parseInt(m[1], 10) * 1e3 : null; + stringify_default2 = stringify2; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v1.js +function v12(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId2; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq2; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng2)(); + if (node == null) { + node = _nodeId2 = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; } - function headerNameToString(value) { - return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + if (clockseq == null) { + clockseq = _clockseq2 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; } - function bufferToLowerCasedHeaderName(value) { - return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs2 + 1; + const dt = msecs - _lastMSecs2 + (nsecs - _lastNSecs2) / 1e4; + if (dt < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt < 0 || msecs > _lastMSecs2) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs2 = msecs; + _lastNSecs2 = nsecs; + _clockseq2 = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b[i++] = tl >>> 24 & 255; + b[i++] = tl >>> 16 & 255; + b[i++] = tl >>> 8 & 255; + b[i++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b[i++] = tmh >>> 8 & 255; + b[i++] = tmh & 255; + b[i++] = tmh >>> 24 & 15 | 16; + b[i++] = tmh >>> 16 & 255; + b[i++] = clockseq >>> 8 | 128; + b[i++] = clockseq & 255; + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf || unsafeStringify(b); +} +var _nodeId2, _clockseq2, _lastMSecs2, _lastNSecs2, v1_default2; +var init_v12 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v1.js"() { + init_rng2(); + init_stringify2(); + _lastMSecs2 = 0; + _lastNSecs2 = 0; + v1_default2 = v12; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/parse.js +function parse2(uuid) { + if (!validate_default2(uuid)) { + throw TypeError("Invalid UUID"); + } + let v; + const arr = new Uint8Array(16); + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 255; + arr[2] = v >>> 8 & 255; + arr[3] = v & 255; + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 255; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 255; + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 255; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v / 4294967296 & 255; + arr[12] = v >>> 24 & 255; + arr[13] = v >>> 16 & 255; + arr[14] = v >>> 8 & 255; + arr[15] = v & 255; + return arr; +} +var parse_default2; +var init_parse2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/parse.js"() { + init_validate2(); + parse_default2 = parse2; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v35.js +function stringToBytes2(str) { + str = unescape(encodeURIComponent(str)); + const bytes = []; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + return bytes; +} +function v35(name, version3, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + if (typeof value === "string") { + value = stringToBytes2(value); } - function parseHeaders(headers, obj) { - if (obj === void 0) obj = {}; - for (let i = 0; i < headers.length; i += 2) { - const key = headerNameToString(headers[i]); - let val = obj[key]; - if (val) { - if (typeof val === "string") { - val = [val]; - obj[key] = val; - } - val.push(headers[i + 1].toString("utf8")); - } else { - const headersValue = headers[i + 1]; - if (typeof headersValue === "string") { - obj[key] = headersValue; - } else { - obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); - } - } - } - if ("content-length" in obj && "content-disposition" in obj) { - obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); - } - return obj; + if (typeof namespace === "string") { + namespace = parse_default2(namespace); } - function parseRawHeaders(headers) { - const len = headers.length; - const ret = new Array(len); - let hasContentLength = false; - let contentDispositionIdx = -1; - let key; - let val; - let kLen = 0; - for (let n = 0; n < headers.length; n += 2) { - key = headers[n]; - val = headers[n + 1]; - typeof key !== "string" && (key = key.toString()); - typeof val !== "string" && (val = val.toString("utf8")); - kLen = key.length; - if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) { - hasContentLength = true; - } else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = n + 1; - } - ret[n] = key; - ret[n + 1] = val; - } - if (hasContentLength && contentDispositionIdx !== -1) { - ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version3; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; } - return ret; + return buf; } - function isBuffer(buffer) { - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + return unsafeStringify(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS2; + generateUUID.URL = URL3; + return generateUUID; +} +var DNS2, URL3; +var init_v352 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify2(); + init_parse2(); + DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/md5.js +function md52(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto5.default.createHash("md5").update(bytes).digest(); +} +var import_crypto5, md5_default2; +var init_md52 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto5 = __toESM(require("crypto")); + md5_default2 = md52; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v3.js +var v32, v3_default2; +var init_v32 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v3.js"() { + init_v352(); + init_md52(); + v32 = v35("v3", 48, md5_default2); + v3_default2 = v32; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/native.js +var import_crypto6, native_default; +var init_native = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/native.js"() { + import_crypto6 = __toESM(require("crypto")); + native_default = { + randomUUID: import_crypto6.default.randomUUID + }; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v4.js +function v42(options, buf, offset) { + if (native_default.randomUUID && !buf && !options) { + return native_default.randomUUID(); + } + options = options || {}; + const rnds = options.random || (options.rng || rng2)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; } - function validateHandler(handler, method, upgrade) { - if (!handler || typeof handler !== "object") { - throw new InvalidArgumentError("handler must be an object"); - } - if (typeof handler.onConnect !== "function") { - throw new InvalidArgumentError("invalid onConnect method"); - } - if (typeof handler.onError !== "function") { - throw new InvalidArgumentError("invalid onError method"); - } - if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) { - throw new InvalidArgumentError("invalid onBodySent method"); + return buf; + } + return unsafeStringify(rnds); +} +var v4_default2; +var init_v42 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v4.js"() { + init_native(); + init_rng2(); + init_stringify2(); + v4_default2 = v42; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/sha1.js +function sha12(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto7.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto7, sha1_default2; +var init_sha12 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto7 = __toESM(require("crypto")); + sha1_default2 = sha12; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v5.js +var v52, v5_default2; +var init_v52 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v5.js"() { + init_v352(); + init_sha12(); + v52 = v35("v5", 80, sha1_default2); + v5_default2 = v52; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/nil.js +var nil_default2; +var init_nil2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/nil.js"() { + nil_default2 = "00000000-0000-0000-0000-000000000000"; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/version.js +function version2(uuid) { + if (!validate_default2(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.slice(14, 15), 16); +} +var version_default2; +var init_version2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/version.js"() { + init_validate2(); + version_default2 = version2; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/index.js +var esm_node_exports2 = {}; +__export(esm_node_exports2, { + NIL: () => nil_default2, + parse: () => parse_default2, + stringify: () => stringify_default2, + v1: () => v1_default2, + v3: () => v3_default2, + v4: () => v4_default2, + v5: () => v5_default2, + validate: () => validate_default2, + version: () => version_default2 +}); +var init_esm_node2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/index.js"() { + init_v12(); + init_v32(); + init_v42(); + init_v52(); + init_nil2(); + init_version2(); + init_validate2(); + init_stringify2(); + init_parse2(); + } +}); + +// node_modules/@smithy/service-error-classification/dist-cjs/index.js +var require_dist_cjs19 = __commonJS({ + "node_modules/@smithy/service-error-classification/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, { + isClockSkewCorrectedError: () => isClockSkewCorrectedError, + isClockSkewError: () => isClockSkewError, + isRetryableByTrait: () => isRetryableByTrait, + isServerError: () => isServerError, + isThrottlingError: () => isThrottlingError, + isTransientError: () => isTransientError + }); + module2.exports = __toCommonJS2(src_exports); + var CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch" + ]; + var THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException" + // DynamoDB + ]; + 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 isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, "isRetryableByTrait"); + var isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), "isClockSkewError"); + var isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => { + var _a; + return (_a = error.$metadata) == null ? void 0 : _a.clockSkewCorrected; + }, "isClockSkewCorrectedError"); + var isThrottlingError = /* @__PURE__ */ __name((error) => { + var _a, _b; + return ((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) == null ? void 0 : _b.throttling) == true; + }, "isThrottlingError"); + var isTransientError = /* @__PURE__ */ __name((error) => { + var _a; + return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0); + }, "isTransientError"); + var isServerError = /* @__PURE__ */ __name((error) => { + var _a; + if (((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) !== void 0) { + const statusCode = error.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { + return true; + } + return false; } - if (upgrade || method === "CONNECT") { - if (typeof handler.onUpgrade !== "function") { - throw new InvalidArgumentError("invalid onUpgrade method"); + return false; + }, "isServerError"); + } +}); + +// node_modules/@smithy/util-retry/dist-cjs/index.js +var require_dist_cjs20 = __commonJS({ + "node_modules/@smithy/util-retry/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, { + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + ConfiguredRetryStrategy: () => ConfiguredRetryStrategy, + DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS, + DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE, + DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE, + DefaultRateLimiter: () => DefaultRateLimiter, + INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS, + INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER, + MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY, + NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT, + REQUEST_HEADER: () => REQUEST_HEADER, + RETRY_COST: () => RETRY_COST, + RETRY_MODES: () => RETRY_MODES, + StandardRetryStrategy: () => StandardRetryStrategy, + THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE, + TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST + }); + module2.exports = __toCommonJS2(src_exports); + var RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => { + RETRY_MODES2["STANDARD"] = "standard"; + RETRY_MODES2["ADAPTIVE"] = "adaptive"; + return RETRY_MODES2; + })(RETRY_MODES || {}); + var DEFAULT_MAX_ATTEMPTS = 3; + var DEFAULT_RETRY_MODE = "standard"; + var import_service_error_classification = require_dist_cjs19(); + var _DefaultRateLimiter = class _DefaultRateLimiter { + constructor(options) { + this.currentCapacity = 0; + this.enabled = false; + this.lastMaxRate = 0; + this.measuredTxRate = 0; + this.requestCount = 0; + this.lastTimestamp = 0; + this.timeWindow = 0; + this.beta = (options == null ? void 0 : options.beta) ?? 0.7; + this.minCapacity = (options == null ? void 0 : options.minCapacity) ?? 1; + this.minFillRate = (options == null ? void 0 : options.minFillRate) ?? 0.5; + this.scaleConstant = (options == null ? void 0 : options.scaleConstant) ?? 0.4; + this.smooth = (options == null ? void 0 : options.smooth) ?? 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + getCurrentTimeInSeconds() { + return Date.now() / 1e3; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; } - } else { - if (typeof handler.onHeaders !== "function") { - throw new InvalidArgumentError("invalid onHeaders method"); + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay = (amount - this.currentCapacity) / this.fillRate * 1e3; + await new Promise((resolve) => setTimeout(resolve, delay)); } - if (typeof handler.onData !== "function") { - throw new InvalidArgumentError("invalid onData method"); + this.currentCapacity = this.currentCapacity - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; } - if (typeof handler.onComplete !== "function") { - throw new InvalidArgumentError("invalid onComplete method"); + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if ((0, import_service_error_classification.isThrottlingError)(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); } - } - function isDisturbed(body) { - return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); - } - function isErrored(body) { - return !!(body && stream.isErrored(body)); - } - function isReadable(body) { - return !!(body && stream.isReadable(body)); - } - function getSocketInfo(socket) { + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise( + this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate + ); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } + }; + __name(_DefaultRateLimiter, "DefaultRateLimiter"); + var DefaultRateLimiter = _DefaultRateLimiter; + 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 getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => { + let delayBase = DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => { + return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }, "computeNextBackoffDelay"); + const setDelayBase = /* @__PURE__ */ __name((delay) => { + delayBase = delay; + }, "setDelayBase"); return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead + computeNextBackoffDelay, + setDelayBase }; - } - function ReadableStreamFrom(iterable) { - let iterator; - return new ReadableStream( - { - async start() { - iterator = iterable[Symbol.asyncIterator](); - }, - async pull(controller) { - const { done, value } = await iterator.next(); - if (done) { - queueMicrotask(() => { - controller.close(); - controller.byobRequest?.respond(0); - }); - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); - if (buf.byteLength) { - controller.enqueue(new Uint8Array(buf)); - } - } - return controller.desiredSize > 0; - }, - async cancel(reason) { - await iterator.return(); - }, - type: "bytes" + }, "getDefaultRetryBackoffStrategy"); + var createDefaultRetryToken = /* @__PURE__ */ __name(({ + retryDelay, + retryCount, + retryCost + }) => { + const getRetryCount = /* @__PURE__ */ __name(() => retryCount, "getRetryCount"); + const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay"); + const getRetryCost = /* @__PURE__ */ __name(() => retryCost, "getRetryCost"); + return { + getRetryCount, + getRetryDelay, + getRetryCost + }; + }, "createDefaultRetryToken"); + var _StandardRetryStrategy = class _StandardRetryStrategy { + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.mode = "standard"; + this.capacity = INITIAL_RETRY_TOKENS; + this.retryBackoffStrategy = getDefaultRetryBackoffStrategy(); + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + async acquireInitialRetryToken(retryTokenScope) { + return createDefaultRetryToken({ + retryDelay: DEFAULT_RETRY_DELAY_BASE, + retryCount: 0 + }); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase( + errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE + ); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return createDefaultRetryToken({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost + }); } - ); - } - function isFormDataLike(object) { - return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; - } - function addAbortListener(signal, listener) { - if ("addEventListener" in signal) { - signal.addEventListener("abort", listener, { once: true }); - return () => signal.removeEventListener("abort", listener); + throw new Error("No retry token available"); } - signal.addListener("abort", listener); - return () => signal.removeListener("abort", listener); - } - var hasToWellFormed = typeof String.prototype.toWellFormed === "function"; - var hasIsWellFormed = typeof String.prototype.isWellFormed === "function"; - function toUSVString(val) { - return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val); - } - function isUSVString(val) { - return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}`; - } - function isTokenCharCode(c) { - switch (c) { - case 34: - case 40: - case 41: - case 44: - case 47: - case 58: - case 59: - case 60: - case 61: - case 62: - case 63: - case 64: - case 91: - case 92: - case 93: - case 123: - case 125: - return false; - default: - return c >= 33 && c <= 126; + recordSuccess(token) { + this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); } - } - function isValidHTTPToken(characters) { - if (characters.length === 0) { - return false; + /** + * @returns the current available retry capacity. + * + * This number decreases when retries are executed and refills when requests or retries succeed. + */ + getCapacity() { + return this.capacity; } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false; + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } catch (error) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; } } - return true; - } - var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; - function isValidHeaderValue(characters) { - return !headerCharRegex.test(characters); - } - function parseRangeHeader(range) { - if (range == null || range === "") return { start: 0, end: null, size: null }; - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; - return m ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } : null; - } - function addListener(obj, name, listener) { - const listeners = obj[kListeners] ??= []; - listeners.push([name, listener]); - obj.on(name, listener); - return obj; - } - function removeAllListeners(obj) { - for (const [name, listener] of obj[kListeners] ?? []) { - obj.removeListener(name, listener); + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType); } - obj[kListeners] = null; - } - function errorRequest(client, request2, err) { - try { - request2.onError(err); - assert(request2.aborted); - } catch (err2) { - client.emit("error", err2); + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } + }; + __name(_StandardRetryStrategy, "StandardRetryStrategy"); + var StandardRetryStrategy = _StandardRetryStrategy; + var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = "adaptive"; + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); + } + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } + }; + __name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); + var AdaptiveRetryStrategy = _AdaptiveRetryStrategy; + var _ConfiguredRetryStrategy = class _ConfiguredRetryStrategy extends StandardRetryStrategy { + /** + * @param maxAttempts - the maximum number of retry attempts allowed. + * e.g., if set to 3, then 4 total requests are possible. + * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt + * and returns the delay. + * + * @example exponential backoff. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2) + * }); + * ``` + * @example constant delay. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, 2000) + * }); + * ``` + */ + constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) { + 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; } - } - var kEnumerableProperty = /* @__PURE__ */ Object.create(null); - kEnumerableProperty.enumerable = true; - module2.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString, - isUSVString, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - headerNameToString, - bufferToLowerCasedHeaderName, - addListener, - removeAllListeners, - errorRequest, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - addAbortListener, - isValidHTTPToken, - isValidHeaderValue, - isTokenCharCode, - parseRangeHeader, - isValidPort, - isHttpOrHttpsPrefixed, - nodeMajor, - nodeMinor, - safeHTTPMethods: ["GET", "HEAD", "OPTIONS", "TRACE"], - wrapRequestBody }; + __name(_ConfiguredRetryStrategy, "ConfiguredRetryStrategy"); + var ConfiguredRetryStrategy = _ConfiguredRetryStrategy; } }); -// node_modules/undici/lib/core/diagnostics.js -var require_diagnostics = __commonJS({ - "node_modules/undici/lib/core/diagnostics.js"(exports2, module2) { - "use strict"; - var diagnosticsChannel = require("node:diagnostics_channel"); - var util = require("node:util"); - var undiciDebugLog = util.debuglog("undici"); - var fetchDebuglog = util.debuglog("fetch"); - var websocketDebuglog = util.debuglog("websocket"); - var isClientSet = false; - var channels = { - // Client - beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), - connected: diagnosticsChannel.channel("undici:client:connected"), - connectError: diagnosticsChannel.channel("undici:client:connectError"), - sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), - // Request - create: diagnosticsChannel.channel("undici:request:create"), - bodySent: diagnosticsChannel.channel("undici:request:bodySent"), - headers: diagnosticsChannel.channel("undici:request:headers"), - trailers: diagnosticsChannel.channel("undici:request:trailers"), - error: diagnosticsChannel.channel("undici:request:error"), - // WebSocket - open: diagnosticsChannel.channel("undici:websocket:open"), - close: diagnosticsChannel.channel("undici:websocket:close"), - socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), - ping: diagnosticsChannel.channel("undici:websocket:ping"), - pong: diagnosticsChannel.channel("undici:websocket:pong") - }; - if (undiciDebugLog.enabled || fetchDebuglog.enabled) { - const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; - diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host } - } = evt; - debuglog( - "connecting to %s using %s%s", - `${host}${port ? `:${port}` : ""}`, - protocol, - version2 - ); - }); - diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host } - } = evt; - debuglog( - "connected to %s using %s%s", - `${host}${port ? `:${port}` : ""}`, - protocol, - version2 - ); - }); - diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host }, - error - } = evt; - debuglog( - "connection to %s using %s%s errored - %s", - `${host}${port ? `:${port}` : ""}`, - protocol, - version2, - error.message - ); - }); - diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { - const { - request: { method, path, origin } - } = evt; - debuglog("sending request to %s %s/%s", method, origin, path); - }); - diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { - const { - request: { method, path, origin }, - response: { statusCode } - } = evt; - debuglog( - "received response to %s %s/%s - HTTP %d", - method, - origin, - path, - statusCode - ); - }); - diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { - const { - request: { method, path, origin } - } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path); - }); - diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { - const { - request: { method, path, origin }, - error - } = evt; - debuglog( - "request to %s %s/%s errored - %s", - method, - origin, - path, - error.message - ); - }); - isClientSet = true; - } - if (websocketDebuglog.enabled) { - if (!isClientSet) { - const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog; - diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host } - } = evt; - debuglog( - "connecting to %s%s using %s%s", - host, - port ? `:${port}` : "", - protocol, - version2 - ); +// node_modules/@smithy/middleware-stack/dist-cjs/index.js +var require_dist_cjs21 = __commonJS({ + "node_modules/@smithy/middleware-stack/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, { + constructStack: () => constructStack + }); + module2.exports = __toCommonJS2(src_exports); + var getAllAliases = /* @__PURE__ */ __name((name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } + } + return _aliases; + }, "getAllAliases"); + var getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; + }, "getMiddlewareNameWithAliases"); + var constructStack = /* @__PURE__ */ __name(() => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = /* @__PURE__ */ new Set(); + const sort = /* @__PURE__ */ __name((entries) => entries.sort( + (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"] + ), "sort"); + const removeByName = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((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; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByName"); + const removeByReference = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByReference"); + const cloneTo = /* @__PURE__ */ __name((toStack) => { + var _a; + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); }); - diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host } - } = evt; - debuglog( - "connected to %s%s using %s%s", - host, - port ? `:${port}` : "", - protocol, - version2 - ); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); }); - diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { - const { - connectParams: { version: version2, protocol, port, host }, - error - } = evt; - debuglog( - "connection to %s%s using %s%s errored - %s", - host, - port ? `:${port}` : "", - protocol, - version2, - error.message - ); + (_a = toStack.identifyOnResolve) == null ? void 0 : _a.call(toStack, stack.identifyOnResolve()); + return toStack; + }, "cloneTo"); + const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } }); - diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { - const { - request: { method, path, origin } - } = evt; - debuglog("sending request to %s %s/%s", method, origin, path); + 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)); + } }); - } - diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { - const { - address: { address, port } - } = evt; - websocketDebuglog("connection opened %s%s", address, port ? `:${port}` : ""); - }); - diagnosticsChannel.channel("undici:websocket:close").subscribe((evt) => { - const { websocket, code, reason } = evt; - websocketDebuglog( - "closed connection to %s - %s %s", - websocket.url, - code, - reason + return expandedMiddlewareList; + }, "expandRelativeMiddlewareList"); + const getMiddlewareList = /* @__PURE__ */ __name((debug = 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 (debug) { + 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; + }, + [] ); - }); - diagnosticsChannel.channel("undici:websocket:socket_error").subscribe((err) => { - websocketDebuglog("connection errored - %s", err.message); - }); - diagnosticsChannel.channel("undici:websocket:ping").subscribe((evt) => { - websocketDebuglog("ping received"); - }); - diagnosticsChannel.channel("undici:websocket:pong").subscribe((evt) => { - websocketDebuglog("pong received"); - }); - } - module2.exports = { - channels + return mainChain; + }, "getMiddlewareList"); + 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) => { + var _a; + return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === 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) => { + var _a; + return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === 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 = /* @__PURE__ */ __name((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; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + var _a; + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve( + identifyOnResolve || cloned.identifyOnResolve() || (((_a = from.identifyOnResolve) == null ? void 0 : _a.call(from)) ?? 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; + }, "constructStack"); + var stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 + }; + var priorityWeights = { + high: 3, + normal: 2, + low: 1 }; } }); -// node_modules/undici/lib/core/request.js -var require_request3 = __commonJS({ - "node_modules/undici/lib/core/request.js"(exports2, module2) { +// node_modules/@smithy/is-array-buffer/dist-cjs/index.js +var require_dist_cjs22 = __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: () => isArrayBuffer + }); + module2.exports = __toCommonJS2(src_exports); + var isArrayBuffer = /* @__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_cjs23 = __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: () => fromArrayBuffer, + fromString: () => fromString + }); + module2.exports = __toCommonJS2(src_exports); + var import_is_array_buffer = require_dist_cjs22(); + var import_buffer = require("buffer"); + var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { + if (!(0, import_is_array_buffer.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 fromString = /* @__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-base64/dist-cjs/fromBase64.js +var require_fromBase64 = __commonJS({ + "node_modules/@smithy/util-base64/dist-cjs/fromBase64.js"(exports2) { "use strict"; - var { - InvalidArgumentError, - NotSupportedError - } = require_errors2(); - var assert = require("node:assert"); - var { - isValidHTTPToken, - isValidHeaderValue, - isStream, - destroy, - isBuffer, - isFormDataLike, - isIterable, - isBlobLike, - buildURL, - validateHandler, - getServerName - } = require_util8(); - var { channels } = require_diagnostics(); - var { headerNameLowerCasedRecord } = require_constants6(); - var invalidPathRegex = /[^\u0021-\u00ff]/; - var kHandler = Symbol("handler"); - var Request = class { - constructor(origin, { - path, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue, - servername - }, handler) { - if (typeof path !== "string") { - throw new InvalidArgumentError("path must be a string"); - } else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") { - throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path) !== null) { - throw new InvalidArgumentError("invalid request path"); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromBase64 = void 0; + var util_buffer_from_1 = require_dist_cjs23(); + var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; + var fromBase642 = (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 = fromBase642; + } +}); + +// node_modules/@smithy/util-utf8/dist-cjs/index.js +var require_dist_cjs24 = __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: () => fromUtf8, + toUint8Array: () => toUint8Array, + toUtf8: () => toUtf8 + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_buffer_from = require_dist_cjs23(); + var fromUtf8 = /* @__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 toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf8(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + }, "toUint8Array"); + var toUtf8 = /* @__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/@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_cjs23(); + var util_utf8_1 = require_dist_cjs24(); + var toBase642 = (_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"); + }; + exports2.toBase64 = toBase642; + } +}); + +// node_modules/@smithy/util-base64/dist-cjs/index.js +var require_dist_cjs25 = __commonJS({ + "node_modules/@smithy/util-base64/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + 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 __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_fromBase64(), module2.exports); + __reExport(src_exports, require_toBase64(), module2.exports); + } +}); + +// 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 = void 0; + var stream_1 = require("stream"); + var getAwsChunkedEncodingStream2 = (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, readableStream) : void 0; + const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { + } }); + readableStream.on("data", (data) => { + const length = bodyLengthChecker(data) || 0; + awsChunkedEncodingStream.push(`${length.toString(16)}\r +`); + awsChunkedEncodingStream.push(data); + awsChunkedEncodingStream.push("\r\n"); + }); + readableStream.on("end", async () => { + awsChunkedEncodingStream.push(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r +`); + awsChunkedEncodingStream.push(`\r +`); } - if (typeof method !== "string") { - throw new InvalidArgumentError("method must be a string"); - } else if (!isValidHTTPToken(method)) { - throw new InvalidArgumentError("invalid request method"); + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; + }; + exports2.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream2; + } +}); + +// node_modules/@smithy/util-uri-escape/dist-cjs/index.js +var require_dist_cjs26 = __commonJS({ + "node_modules/@smithy/util-uri-escape/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, { + escapeUri: () => escapeUri, + escapeUriPath: () => escapeUriPath + }); + module2.exports = __toCommonJS2(src_exports); + var escapeUri = /* @__PURE__ */ __name((uri) => ( + // AWS percent-encodes some extra non-standard characters in a URI + encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode) + ), "escapeUri"); + var hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); + var escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split("/").map(escapeUri).join("/"), "escapeUriPath"); + } +}); + +// node_modules/@smithy/querystring-builder/dist-cjs/index.js +var require_dist_cjs27 = __commonJS({ + "node_modules/@smithy/querystring-builder/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, { + buildQueryString: () => buildQueryString + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_uri_escape = require_dist_cjs26(); + function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = (0, import_util_uri_escape.escapeUri)(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; + } + parts.push(qsEntry); } - if (upgrade && typeof upgrade !== "string") { - throw new InvalidArgumentError("upgrade must be a string"); + } + return parts.join("&"); + } + __name(buildQueryString, "buildQueryString"); + } +}); + +// node_modules/@smithy/node-http-handler/dist-cjs/index.js +var require_dist_cjs28 = __commonJS({ + "node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2, module2) { + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + 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 __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT, + NodeHttp2Handler: () => NodeHttp2Handler, + NodeHttpHandler: () => NodeHttpHandler, + streamCollector: () => streamCollector + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs2(); + var import_querystring_builder = require_dist_cjs27(); + var import_http = require("http"); + var import_https = require("https"); + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + var getTransformedHeaders = /* @__PURE__ */ __name((headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; + }, "getTransformedHeaders"); + var setConnectionTimeout = /* @__PURE__ */ __name((request2, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return; + } + const timeoutId = setTimeout(() => { + request2.destroy(); + reject( + Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { + name: "TimeoutError" + }) + ); + }, timeoutInMs); + request2.on("socket", (socket) => { + if (socket.connecting) { + socket.on("connect", () => { + clearTimeout(timeoutId); + }); + } else { + clearTimeout(timeoutId); } - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError("invalid headersTimeout"); + }); + }, "setConnectionTimeout"); + var setSocketKeepAlive = /* @__PURE__ */ __name((request2, { keepAlive, keepAliveMsecs }) => { + if (keepAlive !== true) { + return; + } + request2.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + }, "setSocketKeepAlive"); + var setSocketTimeout = /* @__PURE__ */ __name((request2, reject, timeoutInMs = 0) => { + request2.setTimeout(timeoutInMs, () => { + request2.destroy(); + reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); + }); + }, "setSocketTimeout"); + var import_stream = require("stream"); + var MIN_WAIT_TIME = 1e3; + async function writeRequestBody(httpRequest, request2, maxContinueTimeoutMs = MIN_WAIT_TIME) { + const headers = request2.headers ?? {}; + const expect = headers["Expect"] || headers["expect"]; + let timeoutId = -1; + let hasError = false; + if (expect === "100-continue") { + await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + clearTimeout(timeoutId); + resolve(); + }); + httpRequest.on("error", () => { + hasError = true; + clearTimeout(timeoutId); + resolve(); + }); + }) + ]); + } + if (!hasError) { + writeBody(httpRequest, request2.body); + } + } + __name(writeRequestBody, "writeRequestBody"); + function writeBody(httpRequest, body) { + if (body instanceof import_stream.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + if (Buffer.isBuffer(body) || typeof body === "string") { + httpRequest.end(body); + return; } - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError("invalid bodyTimeout"); + 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; } - if (reset != null && typeof reset !== "boolean") { - throw new InvalidArgumentError("invalid reset"); + httpRequest.end(Buffer.from(body)); + return; + } + httpRequest.end(); + } + __name(writeBody, "writeBody"); + var DEFAULT_REQUEST_TIMEOUT = 0; + var _NodeHttpHandler = class _NodeHttpHandler2 { + constructor(options) { + this.socketWarningTimestamp = 0; + this.metadata = { handlerProtocol: "http/1.1" }; + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }).catch(reject); + } else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; } - if (expectContinue != null && typeof expectContinue !== "boolean") { - throw new InvalidArgumentError("invalid expectContinue"); + return new _NodeHttpHandler2(instanceOrOptions); + } + /** + * @internal + * + * @param agent - http(s) agent in use by the NodeHttpHandler instance. + * @param socketWarningTimestamp - last socket usage check timestamp. + * @param logger - channel for the warning. + * @returns timestamp of last emitted warning. + */ + static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { + var _a, _b, _c; + 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 = ((_a = sockets[origin]) == null ? void 0 : _a.length) ?? 0; + const requestsEnqueued = ((_b = requests[origin]) == null ? void 0 : _b.length) ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + (_c = logger == null ? void 0 : logger.warn) == null ? void 0 : _c.call( + logger, + `@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(); + } + } } - this.headersTimeout = headersTimeout; - this.bodyTimeout = bodyTimeout; - this.throwOnError = throwOnError === true; - this.method = method; - this.abort = null; - if (body == null) { - this.body = null; - } else if (isStream(body)) { - this.body = body; - const rState = this.body._readableState; - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy() { - destroy(this); - }; - this.body.on("end", this.endHandler); + return socketWarningTimestamp; + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout: requestTimeout ?? socketTimeout, + httpAgent: (() => { + if (httpAgent instanceof import_http.Agent || typeof (httpAgent == null ? void 0 : httpAgent.destroy) === "function") { + return httpAgent; + } + return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof import_https.Agent || typeof (httpsAgent == null ? void 0 : httpsAgent.destroy) === "function") { + return httpsAgent; + } + return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger: console + }; + } + destroy() { + var _a, _b, _c, _d; + (_b = (_a = this.config) == null ? void 0 : _a.httpAgent) == null ? void 0 : _b.destroy(); + (_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy(); + } + async handle(request2, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + let socketCheckTimeoutId; + return new Promise((_resolve, _reject) => { + let writeRequestBodyPromise = void 0; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + clearTimeout(socketCheckTimeoutId); + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + clearTimeout(socketCheckTimeoutId); + _reject(arg); + }, "reject"); + if (!this.config) { + throw new Error("Node HTTP request handler config is not resolved"); + } + if (abortSignal == null ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; } - this.errorHandler = (err) => { - if (this.abort) { - this.abort(err); + const isSSL = request2.protocol === "https:"; + const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; + socketCheckTimeoutId = setTimeout( + () => { + this.socketWarningTimestamp = _NodeHttpHandler2.checkSocketUsage( + agent, + this.socketWarningTimestamp, + this.config.logger + ); + }, + this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3) + ); + const queryString = (0, import_querystring_builder.buildQueryString)(request2.query || {}); + let auth = void 0; + if (request2.username != null || request2.password != null) { + const username = request2.username ?? ""; + const password = request2.password ?? ""; + auth = `${username}:${password}`; + } + let path = request2.path; + if (queryString) { + path += `?${queryString}`; + } + if (request2.fragment) { + path += `#${request2.fragment}`; + } + const nodeHttpsOptions = { + headers: request2.headers, + host: request2.hostname, + method: request2.method, + path, + port: request2.port, + agent, + auth + }; + const requestFunc = isSSL ? import_https.request : import_http.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new import_protocol_http8.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 { - this.error = err; + reject(err); + } + }); + setConnectionTimeout(req, reject, this.config.connectionTimeout); + setSocketTimeout(req, reject, this.config.requestTimeout); + if (abortSignal) { + const onAbort = /* @__PURE__ */ __name(() => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + 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 httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + setSocketKeepAlive(req, { + // @ts-expect-error keepAlive is not public on httpAgent. + keepAlive: httpAgent.keepAlive, + // @ts-expect-error keepAliveMsecs is not public on httpAgent. + keepAliveMsecs: httpAgent.keepAliveMsecs + }); + } + writeRequestBodyPromise = writeRequestBody(req, request2, this.config.requestTimeout).catch((e) => { + clearTimeout(socketCheckTimeoutId); + return _reject(e); + }); + }); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value }; - this.body.on("error", this.errorHandler); - } else if (isBuffer(body)) { - this.body = body.byteLength ? body : null; - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null; - } else if (typeof body === "string") { - this.body = body.length ? Buffer.from(body) : null; - } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { - this.body = body; - } else { - throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + }; + __name(_NodeHttpHandler, "NodeHttpHandler"); + var NodeHttpHandler = _NodeHttpHandler; + var import_http22 = require("http2"); + var import_http2 = __toESM2(require("http2")); + var _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool { + constructor(sessions) { + this.sessions = []; + this.sessions = sessions ?? []; + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); } - this.completed = false; - this.aborted = false; - this.upgrade = upgrade || null; - this.path = query ? buildURL(path, query) : path; - this.origin = origin; - this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; - this.blocking = blocking == null ? false : blocking; - this.reset = reset == null ? null : reset; - this.host = null; - this.contentLength = null; - this.contentType = null; - this.headers = []; - this.expectContinue = expectContinue != null ? expectContinue : false; - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError("headers array must be even"); - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]); - } - } else if (headers && typeof headers === "object") { - if (headers[Symbol.iterator]) { - for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) { - throw new InvalidArgumentError("headers must be in key-value pair format"); - } - processHeader(this, header[0], header[1]); - } - } else { - const keys = Object.keys(headers); - for (let i = 0; i < keys.length; ++i) { - processHeader(this, keys[i], headers[keys[i]]); + } + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); } } - } else if (headers != null) { - throw new InvalidArgumentError("headers must be an object or an array"); } - validateHandler(handler, method, upgrade); - this.servername = servername || getServerName(this.host); - this[kHandler] = handler; - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }); + } + }; + __name(_NodeHttp2ConnectionPool, "NodeHttp2ConnectionPool"); + var NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool; + var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager { + constructor(config) { + this.sessionCache = /* @__PURE__ */ new Map(); + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); } } - onBodySent(chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk); - } catch (err) { - this.abort(err); + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; } } + const session = import_http2.default.connect(url); + 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() + ); + } + }); + } + session.unref(); + const destroySessionCb = /* @__PURE__ */ __name(() => { + session.destroy(); + this.deleteSession(url, session); + }, "destroySessionCb"); + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; } - onRequestSent() { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }); + /** + * Delete a session from the connection pool. + * @param authority The authority of the session to delete. + * @param session The session to delete. + */ + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; } - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent(); - } catch (err) { - this.abort(err); + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + var _a; + const cacheKey = this.getUrlString(requestContext); + (_a = this.sessionCache.get(cacheKey)) == null ? void 0 : _a.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); } + this.sessionCache.delete(key); } } - onConnect(abort) { - assert(!this.aborted); - assert(!this.completed); - if (this.error) { - abort(this.error); - } else { - this.abort = abort; - return this[kHandler].onConnect(abort); + setMaxConcurrentStreams(maxConcurrentStreams) { + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); } + this.config.maxConcurrency = maxConcurrentStreams; } - onResponseStarted() { - return this[kHandler].onResponseStarted?.(); + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; } - onHeaders(statusCode, headers, resume, statusText) { - assert(!this.aborted); - assert(!this.completed); - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); + getUrlString(request2) { + return request2.destination.toString(); + } + }; + __name(_NodeHttp2ConnectionManager, "NodeHttp2ConnectionManager"); + var NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager; + var _NodeHttp2Handler = class _NodeHttp2Handler2 { + constructor(options) { + this.metadata = { handlerProtocol: "h2" }; + this.connectionManager = new NodeHttp2ConnectionManager({}); + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((opts) => { + resolve(opts || {}); + }).catch(reject); + } else { + resolve(options || {}); + } + }); + } + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; } - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText); - } catch (err) { - this.abort(err); + return new _NodeHttp2Handler2(instanceOrOptions); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request2, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout, disableConcurrentStreams } = this.config; + return new Promise((_resolve, _reject) => { + var _a; + let fulfilled = false; + let writeRequestBodyPromise = void 0; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }, "reject"); + if (abortSignal == null ? void 0 : abortSignal.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request2; + let auth = ""; + if (request2.username != null || request2.password != null) { + const username = request2.username ?? ""; + const password = request2.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: (_a = this.config) == null ? void 0 : _a.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false + }); + const rejectWithDestroy = /* @__PURE__ */ __name((err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }, "rejectWithDestroy"); + const queryString = (0, import_querystring_builder.buildQueryString)(query || {}); + let path = request2.path; + if (queryString) { + path += `?${queryString}`; + } + if (request2.fragment) { + path += `#${request2.fragment}`; + } + const req = session.request({ + ...request2.headers, + [import_http22.constants.HTTP2_HEADER_PATH]: path, + [import_http22.constants.HTTP2_HEADER_METHOD]: method + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new import_protocol_http8.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (requestTimeout) { + req.setTimeout(requestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = /* @__PURE__ */ __name(() => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }, "onAbort"); + 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; + } + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy( + new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`) + ); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request2, requestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + /** + * Destroys a session. + * @param session The session to destroy. + */ + destroySession(session) { + if (!session.destroyed) { + session.destroy(); } } - onData(chunk) { - assert(!this.aborted); - assert(!this.completed); - try { - return this[kHandler].onData(chunk); - } catch (err) { - this.abort(err); - return false; + }; + __name(_NodeHttp2Handler, "NodeHttp2Handler"); + var NodeHttp2Handler = _NodeHttp2Handler; + var _Collector = class _Collector extends import_stream.Writable { + constructor() { + super(...arguments); + this.bufferedBytes = []; + } + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } + }; + __name(_Collector, "Collector"); + var Collector = _Collector; + var streamCollector = /* @__PURE__ */ __name((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); + }); + }); + }, "streamCollector"); + var isReadableStreamInstance = /* @__PURE__ */ __name((stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream, "isReadableStreamInstance"); + 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; } - onUpgrade(statusCode, headers, socket) { - assert(!this.aborted); - assert(!this.completed); - return this[kHandler].onUpgrade(statusCode, headers, socket); + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; } - onComplete(trailers) { - this.onFinally(); - assert(!this.aborted); - this.completed = true; - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }); + return collected; + } + __name(collectReadableStream, "collectReadableStream"); + } +}); + +// node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +var require_dist_cjs29 = __commonJS({ + "node_modules/@smithy/fetch-http-handler/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, { + FetchHttpHandler: () => FetchHttpHandler, + keepAliveSupport: () => keepAliveSupport, + streamCollector: () => streamCollector + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs2(); + var import_querystring_builder = require_dist_cjs27(); + 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); } - try { - return this[kHandler].onComplete(trailers); - } catch (err) { - this.onError(err); + }); + } + __name(requestTimeout, "requestTimeout"); + var keepAliveSupport = { + supported: void 0 + }; + var _FetchHttpHandler = class _FetchHttpHandler2 { + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; } + return new _FetchHttpHandler2(instanceOrOptions); } - onError(error) { - this.onFinally(); - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }); + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); } - if (this.aborted) { - return; + if (keepAliveSupport.supported === void 0) { + keepAliveSupport.supported = Boolean( + typeof Request !== "undefined" && "keepalive" in new Request("https://[::1]") + ); } - this.aborted = true; - return this[kHandler].onError(error); } - onFinally() { - if (this.errorHandler) { - this.body.off("error", this.errorHandler); - this.errorHandler = null; - } - if (this.endHandler) { - this.body.off("end", this.endHandler); - this.endHandler = null; + destroy() { + } + async handle(request2, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + const credentials = this.config.credentials; + if (abortSignal == null ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return Promise.reject(abortError); + } + let path = request2.path; + const queryString = (0, import_querystring_builder.buildQueryString)(request2.query || {}); + if (queryString) { + path += `?${queryString}`; + } + if (request2.fragment) { + path += `#${request2.fragment}`; + } + let auth = ""; + if (request2.username != null || request2.password != null) { + const username = request2.username ?? ""; + const password = request2.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request2; + const url = `${request2.protocol}//${auth}${request2.hostname}${port ? `:${port}` : ""}${path}`; + const body = method === "GET" || method === "HEAD" ? void 0 : request2.body; + const requestOptions = { + body, + headers: new Headers(request2.headers), + method, + credentials + }; + if (body) { + requestOptions.duplex = "half"; + } + if (typeof AbortController !== "undefined") { + requestOptions.signal = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions.keepalive = keepAlive; + } + let removeSignalEventListener = /* @__PURE__ */ __name(() => { + }, "removeSignalEventListener"); + const fetchRequest = new Request(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 import_protocol_http8.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: body2 + }) + })); + } + return { + response: new import_protocol_http8.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body + }) + }; + }), + requestTimeout(requestTimeoutInMs) + ]; + if (abortSignal) { + raceOfPromises.push( + new Promise((resolve, reject) => { + const onAbort = /* @__PURE__ */ __name(() => { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); + } else { + abortSignal.onabort = onAbort; + } + }) + ); } + return Promise.race(raceOfPromises).finally(removeSignalEventListener); } - addHeader(key, value) { - processHeader(this, key, value); - return this; + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config) => { + config[key] = value; + return config; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; } }; - function processHeader(request2, key, val) { - if (val && (typeof val === "object" && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val === void 0) { - return; + __name(_FetchHttpHandler, "FetchHttpHandler"); + var FetchHttpHandler = _FetchHttpHandler; + var import_util_base64 = require_dist_cjs25(); + var streamCollector = /* @__PURE__ */ __name((stream) => { + if (typeof Blob === "function" && stream instanceof Blob) { + return collectBlob(stream); } - let headerName = headerNameLowerCasedRecord[key]; - if (headerName === void 0) { - headerName = key.toLowerCase(); - if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) { - throw new InvalidArgumentError("invalid header key"); + return collectStream(stream); + }, "streamCollector"); + async function collectBlob(blob) { + const base64 = await readToBase64(blob); + const arrayBuffer = (0, import_util_base64.fromBase64)(base64); + return new Uint8Array(arrayBuffer); + } + __name(collectBlob, "collectBlob"); + 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; } - if (Array.isArray(val)) { - const arr = []; - for (let i = 0; i < val.length; i++) { - if (typeof val[i] === "string") { - if (!isValidHeaderValue(val[i])) { - throw new InvalidArgumentError(`invalid ${key} header`); - } - arr.push(val[i]); - } else if (val[i] === null) { - arr.push(""); - } else if (typeof val[i] === "object") { - throw new InvalidArgumentError(`invalid ${key} header`); + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; + } + __name(collectStream, "collectStream"); + 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); + }); + } + __name(readToBase64, "readToBase64"); + } +}); + +// node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +var require_dist_cjs30 = __commonJS({ + "node_modules/@smithy/util-hex-encoding/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, { + fromHex: () => fromHex, + toHex: () => toHex + }); + module2.exports = __toCommonJS2(src_exports); + var SHORT_TO_HEX = {}; + var HEX_TO_SHORT = {}; + for (let i = 0; i < 256; i++) { + let encodedByte = i.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i] = encodedByte; + HEX_TO_SHORT[encodedByte] = i; + } + 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 i = 0; i < encoded.length; i += 2) { + const encodedByte = encoded.slice(i, i + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i / 2] = HEX_TO_SHORT[encodedByte]; + } else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; + } + __name(fromHex, "fromHex"); + function toHex(bytes) { + let out = ""; + for (let i = 0; i < bytes.byteLength; i++) { + out += SHORT_TO_HEX[bytes[i]]; + } + return out; + } + __name(toHex, "toHex"); + } +}); + +// 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.isReadableStream = void 0; + var isReadableStream2 = (stream) => { + var _a; + return typeof ReadableStream === "function" && (((_a = stream === null || stream === void 0 ? void 0 : stream.constructor) === null || _a === void 0 ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream); + }; + exports2.isReadableStream = isReadableStream2; + } +}); + +// 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_cjs29(); + var util_base64_1 = require_dist_cjs25(); + var util_hex_encoding_1 = require_dist_cjs30(); + var util_utf8_1 = require_dist_cjs24(); + 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) => { + var _a, _b; + if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) { + const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.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 { - arr.push(`${val[i]}`); + throw new Error(`Cannot transform payload to web stream, got ${stream}`); } } - val = arr; - } else if (typeof val === "string") { - if (!isValidHeaderValue(val)) { - throw new InvalidArgumentError(`invalid ${key} header`); + }); + }; + 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_cjs28(); + var util_buffer_from_1 = require_dist_cjs23(); + var stream_1 = require("stream"); + var util_1 = require("util"); + 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) => { + var _a, _b; + if (!(stream instanceof stream_1.Readable)) { + try { + return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); + } catch (e) { + const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; + throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); } - } else if (val === null) { - val = ""; - } else { - val = `${val}`; } - if (request2.host === null && headerName === "host") { - if (typeof val !== "string") { - throw new InvalidArgumentError("invalid host header"); + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); } - request2.host = val; - } else if (request2.contentLength === null && headerName === "content-length") { - request2.contentLength = parseInt(val, 10); - if (!Number.isFinite(request2.contentLength)) { - throw new InvalidArgumentError("invalid content-length header"); + 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 decoder = new util_1.TextDecoder(encoding); + return decoder.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 make sure you are using Node.js >= 17.0.0, or polyfill is available."); + } + transformed = true; + return stream_1.Readable.toWeb(stream); } - } else if (request2.contentType === null && headerName === "content-type") { - request2.contentType = val; - request2.headers.push(key, val); - } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") { - throw new InvalidArgumentError(`invalid ${headerName} header`); - } else if (headerName === "connection") { - const value = typeof val === "string" ? val.toLowerCase() : null; - if (value !== "close" && value !== "keep-alive") { - throw new InvalidArgumentError("invalid connection header"); + }); + }; + 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 = void 0; + async function splitStream2(stream) { + if (typeof stream.stream === "function") { + stream = stream.stream(); + } + const readableStream = stream; + return readableStream.tee(); + } + exports2.splitStream = splitStream2; + } +}); + +// 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 = void 0; + var stream_1 = require("stream"); + var splitStream_browser_1 = require_splitStream_browser(); + var stream_type_check_1 = require_stream_type_check(); + async function splitStream2(stream) { + if ((0, stream_type_check_1.isReadableStream)(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]; + } + exports2.splitStream = splitStream2; + } +}); + +// 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 = void 0; + async function headStream2(stream, bytes) { + var _a; + 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 += (_a = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a !== void 0 ? _a : 0; + } + if (byteLengthCounter >= bytes) { + break; } - if (value === "close") { - request2.reset = true; + 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); } - } else if (headerName === "expect") { - throw new NotSupportedError("expect header not supported"); - } else { - request2.headers.push(key, val); + offset += chunk.length; } + return collected; } - module2.exports = Request; + exports2.headStream = headStream2; } }); -// node_modules/undici/lib/dispatcher/dispatcher.js -var require_dispatcher2 = __commonJS({ - "node_modules/undici/lib/dispatcher/dispatcher.js"(exports2, module2) { +// 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"; - var EventEmitter = require("node:events"); - var Dispatcher = class extends EventEmitter { - dispatch() { - throw new Error("not implemented"); - } - close() { - throw new Error("not implemented"); + 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 headStream2 = (stream, bytes) => { + if ((0, stream_type_check_1.isReadableStream)(stream)) { + return (0, headStream_browser_1.headStream)(stream, bytes); } - destroy() { - throw new Error("not implemented"); + 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 = headStream2; + var Collector = class extends stream_1.Writable { + constructor() { + super(...arguments); + this.buffers = []; + this.limit = Infinity; + this.bytesBuffered = 0; } - compose(...args) { - const interceptors = Array.isArray(args[0]) ? args[0] : args; - let dispatch = this.dispatch.bind(this); - for (const interceptor of interceptors) { - if (interceptor == null) { - continue; - } - if (typeof interceptor !== "function") { - throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); - } - dispatch = interceptor(dispatch); - if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) { - throw new TypeError("invalid interceptor"); - } + _write(chunk, encoding, callback) { + var _a; + this.buffers.push(chunk); + this.bytesBuffered += (_a = chunk.byteLength) !== null && _a !== void 0 ? _a : 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"); } - return new ComposedDispatcher(this, dispatch); + callback(); } }; - var ComposedDispatcher = class extends Dispatcher { - #dispatcher = null; - #dispatch = null; - constructor(dispatcher, dispatch) { - super(); - this.#dispatcher = dispatcher; - this.#dispatch = dispatch; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/index.js +var require_dist_cjs31 = __commonJS({ + "node_modules/@smithy/util-stream/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 __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_base64 = require_dist_cjs25(); + var import_util_utf8 = require_dist_cjs24(); + function transformToString(payload, encoding = "utf-8") { + if (encoding === "base64") { + return (0, import_util_base64.toBase64)(payload); } - dispatch(...args) { - this.#dispatch(...args); + return (0, import_util_utf8.toUtf8)(payload); + } + __name(transformToString, "transformToString"); + function transformFromString(str, encoding) { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str)); } - close(...args) { - return this.#dispatcher.close(...args); + return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str)); + } + __name(transformFromString, "transformFromString"); + var _Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter2 extends Uint8Array { + /** + * @param source - such as a string or Stream. + * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. + */ + static fromString(source, encoding = "utf-8") { + switch (typeof source) { + case "string": + return transformFromString(source, encoding); + default: + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } } - destroy(...args) { - return this.#dispatcher.destroy(...args); + /** + * @param source - Uint8Array to be mutated. + * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. + */ + static mutate(source) { + Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter2.prototype); + return source; + } + /** + * @param encoding - default 'utf-8'. + * @returns the blob as string. + */ + transformToString(encoding = "utf-8") { + return transformToString(this, encoding); } }; - module2.exports = Dispatcher; + __name(_Uint8ArrayBlobAdapter, "Uint8ArrayBlobAdapter"); + var Uint8ArrayBlobAdapter = _Uint8ArrayBlobAdapter; + __reExport(src_exports, require_getAwsChunkedEncodingStream(), module2.exports); + __reExport(src_exports, require_sdk_stream_mixin(), module2.exports); + __reExport(src_exports, require_splitStream(), module2.exports); + __reExport(src_exports, require_headStream(), module2.exports); + __reExport(src_exports, require_stream_type_check(), module2.exports); } }); -// node_modules/undici/lib/dispatcher/dispatcher-base.js -var require_dispatcher_base2 = __commonJS({ - "node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports2, module2) { - "use strict"; - var Dispatcher = require_dispatcher2(); - var { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError - } = require_errors2(); - var { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require_symbols6(); - var kOnDestroyed = Symbol("onDestroyed"); - var kOnClosed = Symbol("onClosed"); - var kInterceptedDispatch = Symbol("Intercepted Dispatch"); - var DispatcherBase = class extends Dispatcher { - constructor() { - super(); - this[kDestroyed] = false; - this[kOnDestroyed] = null; - this[kClosed] = false; - this[kOnClosed] = []; +// node_modules/@smithy/smithy-client/dist-cjs/index.js +var require_dist_cjs32 = __commonJS({ + "node_modules/@smithy/smithy-client/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, { + Client: () => Client, + Command: () => Command, + LazyJsonString: () => LazyJsonString, + NoOpLogger: () => NoOpLogger, + SENSITIVE_STRING: () => SENSITIVE_STRING, + ServiceException: () => ServiceException, + StringWrapper: () => StringWrapper, + _json: () => _json, + collectBody: () => collectBody2, + convertMap: () => convertMap, + createAggregatedClient: () => createAggregatedClient, + dateToUtcString: () => dateToUtcString, + decorateServiceException: () => decorateServiceException, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion2, + expectBoolean: () => expectBoolean, + expectByte: () => expectByte, + expectFloat32: () => expectFloat32, + expectInt: () => expectInt, + expectInt32: () => expectInt32, + expectLong: () => expectLong, + expectNonNull: () => expectNonNull, + expectNumber: () => expectNumber, + expectObject: () => expectObject, + expectShort: () => expectShort, + expectString: () => expectString, + expectUnion: () => expectUnion2, + extendedEncodeURIComponent: () => extendedEncodeURIComponent, + getArrayIfSingleItem: () => getArrayIfSingleItem, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, + getValueFromTextNode: () => getValueFromTextNode2, + handleFloat: () => handleFloat, + limitedParseDouble: () => limitedParseDouble, + limitedParseFloat: () => limitedParseFloat, + limitedParseFloat32: () => limitedParseFloat32, + loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, + logger: () => logger, + map: () => map, + parseBoolean: () => parseBoolean, + parseEpochTimestamp: () => parseEpochTimestamp, + parseRfc3339DateTime: () => parseRfc3339DateTime, + parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset, + parseRfc7231DateTime: () => parseRfc7231DateTime, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, + resolvedPath: () => resolvedPath2, + serializeDateTime: () => serializeDateTime, + serializeFloat: () => serializeFloat, + splitEvery: () => splitEvery, + strictParseByte: () => strictParseByte, + strictParseDouble: () => strictParseDouble, + strictParseFloat: () => strictParseFloat, + strictParseFloat32: () => strictParseFloat32, + strictParseInt: () => strictParseInt, + strictParseInt32: () => strictParseInt32, + strictParseLong: () => strictParseLong, + strictParseShort: () => strictParseShort, + take: () => take, + throwDefaultError: () => throwDefaultError, + withBaseException: () => withBaseException + }); + module2.exports = __toCommonJS2(src_exports); + var _NoOpLogger = class _NoOpLogger { + trace() { } - get destroyed() { - return this[kDestroyed]; + debug() { } - get closed() { - return this[kClosed]; + info() { } - get interceptors() { - return this[kInterceptors]; + warn() { } - set interceptors(newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i]; - if (typeof interceptor !== "function") { - throw new InvalidArgumentError("interceptor must be an function"); + error() { + } + }; + __name(_NoOpLogger, "NoOpLogger"); + var NoOpLogger = _NoOpLogger; + var import_middleware_stack = require_dist_cjs21(); + var _Client = class _Client { + constructor(config) { + this.middlewareStack = (0, import_middleware_stack.constructStack)(); + this.config = config; + } + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + if (callback) { + handler(command).then( + (result) => callback(null, result.output), + (err) => callback(err) + ).catch( + // prevent any errors thrown in the callback from triggering an + // unhandled promise rejection + () => { } - } + ); + } else { + return handler(command).then((result) => result.output); } - this[kInterceptors] = newInterceptors; } - close(callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)); - return; - } - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback); - } else { - queueMicrotask(() => callback(null, null)); - } - return; - } - this[kClosed] = true; - this[kOnClosed].push(callback); - const onClosed = () => { - const callbacks = this[kOnClosed]; - this[kOnClosed] = null; - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null); - } + destroy() { + if (this.config.requestHandler.destroy) + this.config.requestHandler.destroy(); + } + }; + __name(_Client, "Client"); + var Client = _Client; + var import_util_stream = require_dist_cjs31(); + var collectBody2 = /* @__PURE__ */ __name(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); + }, "collectBody"); + var import_types5 = require_dist_cjs(); + var _Command = class _Command { + constructor() { + this.middlewareStack = (0, import_middleware_stack.constructStack)(); + } + /** + * Factory for Command ClassBuilder. + * @internal + */ + static classBuilder() { + return new ClassBuilder(); + } + /** + * @internal + */ + 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_types5.SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext }; - this[kClose]().then(() => this.destroy()).then(() => { - queueMicrotask(onClosed); - }); + const { requestHandler } = configuration; + return stack.resolve( + (request2) => requestHandler.handle(request2.request, options || {}), + handlerExecutionContext + ); } - destroy(err, callback) { - if (typeof err === "function") { - callback = err; - err = null; - } - if (callback === void 0) { - return new Promise((resolve, reject) => { - this.destroy(err, (err2, data) => { - return err2 ? ( - /* istanbul ignore next: should never error */ - reject(err2) - ) : resolve(data); - }); - }); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback); - } else { - queueMicrotask(() => callback(null, null)); - } - return; - } - if (!err) { - err = new ClientDestroyedError(); - } - this[kDestroyed] = true; - this[kOnDestroyed] = this[kOnDestroyed] || []; - this[kOnDestroyed].push(callback); - const onDestroyed = () => { - const callbacks = this[kOnDestroyed]; - this[kOnDestroyed] = null; - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null); - } + }; + __name(_Command, "Command"); + var Command = _Command; + var _ClassBuilder = class _ClassBuilder { + constructor() { + this._init = () => { }; - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed); - }); + this._ep = {}; + this._middlewareFn = () => []; + this._commandName = ""; + this._clientName = ""; + this._additionalContext = {}; + this._smithyContext = {}; + this._inputFilterSensitiveLog = (_) => _; + this._outputFilterSensitiveLog = (_) => _; + this._serializer = null; + this._deserializer = null; } - [kInterceptedDispatch](opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch]; - return this[kDispatch](opts, handler); - } - let dispatch = this[kDispatch].bind(this); - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch); - } - this[kInterceptedDispatch] = dispatch; - return dispatch(opts, handler); + /** + * Optional init callback. + */ + init(cb) { + this._init = cb; } - dispatch(opts, handler) { - if (!handler || typeof handler !== "object") { - throw new InvalidArgumentError("handler must be an object"); - } - try { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("opts must be an object."); - } - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError(); - } - if (this[kClosed]) { - throw new ClientClosedError(); + /** + * Set the endpoint parameter instructions. + */ + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + /** + * Add any number of middleware. + */ + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + /** + * Set the initial handler execution context Smithy field. + */ + s(service, operation, smithyContext = {}) { + this._smithyContext = { + service, + operation, + ...smithyContext + }; + return this; + } + /** + * Set the initial handler execution context. + */ + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + /** + * Set constant string identifiers for the operation. + */ + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + /** + * Set the input and output sensistive log filters. + */ + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + /** + * Sets the serializer. + */ + ser(serializer) { + this._serializer = serializer; + return this; + } + /** + * Sets the deserializer. + */ + de(deserializer) { + this._deserializer = deserializer; + return this; + } + /** + * @returns a Command class with the classBuilder properties. + */ + build() { + var _a; + const closure = this; + let CommandRef; + return CommandRef = (_a = class extends Command { + /** + * @public + */ + constructor(...[input]) { + super(); + this.serialize = closure._serializer; + this.deserialize = closure._deserializer; + this.input = input ?? {}; + closure._init(this); + } + /** + * @public + */ + static getEndpointParameterInstructions() { + return closure._ep; + } + /** + * @internal + */ + resolveMiddleware(stack, configuration, options) { + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog, + outputFilterSensitiveLog: closure._outputFilterSensitiveLog, + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); } - return this[kInterceptedDispatch](opts, handler); - } catch (err) { - if (typeof handler.onError !== "function") { - throw new InvalidArgumentError("invalid onError method"); + }, __name(_a, "CommandRef"), _a); + } + }; + __name(_ClassBuilder, "ClassBuilder"); + var ClassBuilder = _ClassBuilder; + var SENSITIVE_STRING = "***SensitiveInformation***"; + var createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => { + for (const command of Object.keys(commands)) { + const CommandCtor = commands[command]; + const methodImpl = /* @__PURE__ */ __name(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); } - handler.onError(err); + }, "methodImpl"); + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client2.prototype[methodName] = methodImpl; + } + }, "createAggregatedClient"); + var parseBoolean = /* @__PURE__ */ __name((value) => { + switch (value) { + case "true": + return true; + case "false": + return false; + default: + throw new Error(`Unable to parse boolean value "${value}"`); + } + }, "parseBoolean"); + var expectBoolean = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "number") { + if (value === 0 || value === 1) { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (value === 0) { return false; } + if (value === 1) { + return true; + } } - }; - module2.exports = DispatcherBase; - } -}); - -// node_modules/undici/lib/core/connect.js -var require_connect2 = __commonJS({ - "node_modules/undici/lib/core/connect.js"(exports2, module2) { - "use strict"; - var net = require("node:net"); - var assert = require("node:assert"); - var util = require_util8(); - var { InvalidArgumentError, ConnectTimeoutError } = require_errors2(); - var tls; - var SessionCache; - if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { - SessionCache = class WeakSessionCache { - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = /* @__PURE__ */ new Map(); - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return; - } - const ref = this._sessionCache.get(key); - if (ref !== void 0 && ref.deref() === void 0) { - this._sessionCache.delete(key); - } - }); + if (typeof value === "string") { + const lower = value.toLowerCase(); + if (lower === "false" || lower === "true") { + logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); } - get(sessionKey) { - const ref = this._sessionCache.get(sessionKey); - return ref ? ref.deref() : null; + if (lower === "false") { + return false; } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) { - return; + if (lower === "true") { + return true; + } + } + if (typeof value === "boolean") { + return value; + } + throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); + }, "expectBoolean"); + var expectNumber = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); } - this._sessionCache.set(sessionKey, new WeakRef(session)); - this._sessionRegistry.register(session, sessionKey); + return parsed; + } + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); + }, "expectNumber"); + var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); + var expectFloat32 = /* @__PURE__ */ __name((value) => { + const expected = expectNumber(value); + if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; + }, "expectFloat32"); + var expectLong = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); + }, "expectLong"); + var expectInt = expectLong; + var expectInt32 = /* @__PURE__ */ __name((value) => expectSizedInt(value, 32), "expectInt32"); + var expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), "expectShort"); + var expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), "expectByte"); + var expectSizedInt = /* @__PURE__ */ __name((value, size) => { + const expected = expectLong(value); + if (expected !== void 0 && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; + }, "expectSizedInt"); + var castInt = /* @__PURE__ */ __name((value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } + }, "castInt"); + var expectNonNull = /* @__PURE__ */ __name((value, location) => { + if (value === null || value === void 0) { + if (location) { + throw new TypeError(`Expected a non-null value for ${location}`); + } + throw new TypeError("Expected a non-null value"); + } + return value; + }, "expectNonNull"); + var expectObject = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "object" && !Array.isArray(value)) { + return value; + } + const receivedType = Array.isArray(value) ? "array" : typeof value; + throw new TypeError(`Expected object, got ${receivedType}: ${value}`); + }, "expectObject"); + var expectString = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + return value; + } + if (["boolean", "number", "bigint"].includes(typeof value)) { + logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); + return String(value); + } + throw new TypeError(`Expected string, got ${typeof value}: ${value}`); + }, "expectString"); + var expectUnion2 = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + const asObject = expectObject(value); + const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k); + if (setKeys.length === 0) { + throw new TypeError(`Unions must have exactly one non-null member. None were found.`); + } + if (setKeys.length > 1) { + throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + } + return asObject; + }, "expectUnion"); + var strictParseDouble = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectNumber(parseNumber(value)); + } + return expectNumber(value); + }, "strictParseDouble"); + var strictParseFloat = strictParseDouble; + var strictParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return expectFloat32(parseNumber(value)); + } + return expectFloat32(value); + }, "strictParseFloat32"); + var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; + var parseNumber = /* @__PURE__ */ __name((value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); + }, "parseNumber"); + var limitedParseDouble = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectNumber(value); + }, "limitedParseDouble"); + var handleFloat = limitedParseDouble; + var limitedParseFloat = limitedParseDouble; + var limitedParseFloat32 = /* @__PURE__ */ __name((value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectFloat32(value); + }, "limitedParseFloat32"); + var parseFloatString = /* @__PURE__ */ __name((value) => { + switch (value) { + case "NaN": + return NaN; + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + default: + throw new Error(`Unable to parse float value: ${value}`); + } + }, "parseFloatString"); + var strictParseLong = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectLong(parseNumber(value)); + } + return expectLong(value); + }, "strictParseLong"); + var strictParseInt = strictParseLong; + var strictParseInt32 = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectInt32(parseNumber(value)); + } + return expectInt32(value); + }, "strictParseInt32"); + var strictParseShort = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectShort(parseNumber(value)); + } + return expectShort(value); + }, "strictParseShort"); + var strictParseByte = /* @__PURE__ */ __name((value) => { + if (typeof value === "string") { + return expectByte(parseNumber(value)); + } + return expectByte(value); + }, "strictParseByte"); + var stackTraceWarning = /* @__PURE__ */ __name((message) => { + return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n"); + }, "stackTraceWarning"); + var logger = { + warn: console.warn + }; + var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + function dateToUtcString(date) { + const year = date.getUTCFullYear(); + const month = date.getUTCMonth(); + const dayOfWeek = date.getUTCDay(); + const dayOfMonthInt = date.getUTCDate(); + const hoursInt = date.getUTCHours(); + const minutesInt = date.getUTCMinutes(); + const secondsInt = date.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`; + } + __name(dateToUtcString, "dateToUtcString"); + var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); + var parseRfc3339DateTime = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; + const year = strictParseShort(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + }, "parseRfc3339DateTime"); + var RFC3339_WITH_OFFSET = new RegExp( + /^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/ + ); + var parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339_WITH_OFFSET.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match; + const year = strictParseShort(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + if (offsetStr.toUpperCase() != "Z") { + date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr)); + } + return date; + }, "parseRfc3339DateTimeWithOffset"); + var IMF_FIXDATE = new RegExp( + /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/ + ); + var RFC_850_DATE = new RegExp( + /^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/ + ); + var ASC_TIME = new RegExp( + /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/ + ); + var parseRfc7231DateTime = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match = IMF_FIXDATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return buildDate( + strictParseShort(stripLeadingZeroes(yearStr)), + parseMonthByShortName(monthStr), + parseDateValue(dayStr, "day", 1, 31), + { hours, minutes, seconds, fractionalMilliseconds } + ); + } + match = RFC_850_DATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return adjustRfc850Year( + buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds + }) + ); + } + match = ASC_TIME.exec(value); + if (match) { + const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; + return buildDate( + strictParseShort(stripLeadingZeroes(yearStr)), + parseMonthByShortName(monthStr), + parseDateValue(dayStr.trimLeft(), "day", 1, 31), + { hours, minutes, seconds, fractionalMilliseconds } + ); + } + throw new TypeError("Invalid RFC-7231 date-time value"); + }, "parseRfc7231DateTime"); + var parseEpochTimestamp = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return void 0; + } + let valueAsDouble; + if (typeof value === "number") { + valueAsDouble = value; + } else if (typeof value === "string") { + valueAsDouble = strictParseDouble(value); + } else if (typeof value === "object" && value.tag === 1) { + valueAsDouble = value.value; + } else { + throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); + } + if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { + throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + } + return new Date(Math.round(valueAsDouble * 1e3)); + }, "parseEpochTimestamp"); + var buildDate = /* @__PURE__ */ __name((year, month, day, time) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year, adjustedMonth, day); + return new Date( + Date.UTC( + year, + adjustedMonth, + day, + parseDateValue(time.hours, "hour", 0, 23), + parseDateValue(time.minutes, "minute", 0, 59), + // seconds can go up to 60 for leap seconds + parseDateValue(time.seconds, "seconds", 0, 60), + parseMilliseconds(time.fractionalMilliseconds) + ) + ); + }, "buildDate"); + var parseTwoDigitYear = /* @__PURE__ */ __name((value) => { + const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; + }, "parseTwoDigitYear"); + var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; + var adjustRfc850Year = /* @__PURE__ */ __name((input) => { + if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date( + Date.UTC( + input.getUTCFullYear() - 100, + input.getUTCMonth(), + input.getUTCDate(), + input.getUTCHours(), + input.getUTCMinutes(), + input.getUTCSeconds(), + input.getUTCMilliseconds() + ) + ); + } + return input; + }, "adjustRfc850Year"); + var parseMonthByShortName = /* @__PURE__ */ __name((value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; + }, "parseMonthByShortName"); + var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + var validateDayOfMonth = /* @__PURE__ */ __name((year, month, day) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year)) { + maxDays = 29; + } + if (day > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + } + }, "validateDayOfMonth"); + var isLeapYear = /* @__PURE__ */ __name((year) => { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + }, "isLeapYear"); + var parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => { + const dateVal = strictParseByte(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; + }, "parseDateValue"); + var parseMilliseconds = /* @__PURE__ */ __name((value) => { + if (value === null || value === void 0) { + return 0; + } + return strictParseFloat32("0." + value) * 1e3; + }, "parseMilliseconds"); + var parseOffsetToMilliseconds = /* @__PURE__ */ __name((value) => { + const directionStr = value[0]; + let direction = 1; + if (directionStr == "+") { + direction = 1; + } else if (directionStr == "-") { + direction = -1; + } else { + throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`); + } + const hour = Number(value.substring(1, 3)); + const minute = Number(value.substring(4, 6)); + return direction * (hour * 60 + minute) * 60 * 1e3; + }, "parseOffsetToMilliseconds"); + var stripLeadingZeroes = /* @__PURE__ */ __name((value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); + }, "stripLeadingZeroes"); + var _ServiceException = class _ServiceException2 extends Error { + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, _ServiceException2.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } + }; + __name(_ServiceException, "ServiceException"); + var ServiceException = _ServiceException; + var decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { + Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => { + if (exception[k] == void 0 || exception[k] === "") { + exception[k] = v; } + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; + }, "decorateServiceException"); + var throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; + const response = new exceptionCtor({ + name: (parsedBody == null ? void 0 : parsedBody.code) || (parsedBody == null ? void 0 : parsedBody.Code) || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata + }); + throw decorateServiceException(response, parsedBody); + }, "throwDefaultError"); + var withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); }; - } else { - SessionCache = class SimpleSessionCache { - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = /* @__PURE__ */ new Map(); + }, "withBaseException"); + var deserializeMetadata = /* @__PURE__ */ __name((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"] + }), "deserializeMetadata"); + var loadConfigsForDefaultMode = /* @__PURE__ */ __name((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 {}; + } + }, "loadConfigsForDefaultMode"); + var warningEmitted2 = false; + var emitWarningIfUnsupportedVersion2 = /* @__PURE__ */ __name((version3) => { + if (version3 && !warningEmitted2 && parseInt(version3.substring(1, version3.indexOf("."))) < 16) { + warningEmitted2 = true; + } + }, "emitWarningIfUnsupportedVersion"); + var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in import_types5.AlgorithmId) { + const algorithmId = import_types5.AlgorithmId[id]; + if (runtimeConfig[algorithmId] === void 0) { + continue; } - get(sessionKey) { - return this._sessionCache.get(sessionKey); + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); + } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) { - return; - } - if (this._sessionCache.size >= this._maxCachedSessions) { - const { value: oldestKey } = this._sessionCache.keys().next(); - this._sessionCache.delete(oldestKey); - } - this._sessionCache.set(sessionKey, session); + }; + }, "getChecksumConfiguration"); + var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }, "resolveChecksumRuntimeConfig"); + var getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let _retryStrategy = runtimeConfig.retryStrategy; + return { + setRetryStrategy(retryStrategy) { + _retryStrategy = retryStrategy; + }, + retryStrategy() { + return _retryStrategy; } }; + }, "getRetryConfiguration"); + var resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; + }, "resolveRetryRuntimeConfig"); + var getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + ...getChecksumConfiguration(runtimeConfig), + ...getRetryConfiguration(runtimeConfig) + }; + }, "getDefaultExtensionConfiguration"); + var getDefaultClientConfiguration = getDefaultExtensionConfiguration; + var resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + ...resolveChecksumRuntimeConfig(config), + ...resolveRetryRuntimeConfig(config) + }; + }, "resolveDefaultRuntimeConfig"); + function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); } - function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); + __name(extendedEncodeURIComponent, "extendedEncodeURIComponent"); + var getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], "getArrayIfSingleItem"); + var getValueFromTextNode2 = /* @__PURE__ */ __name((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] = getValueFromTextNode2(obj[key]); + } } - const options = { path: socketPath, ...opts }; - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); - timeout = timeout == null ? 1e4 : timeout; - allowH2 = allowH2 != null ? allowH2 : false; - return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket; - if (protocol === "https:") { - if (!tls) { - tls = require("node:tls"); - } - servername = servername || options.servername || util.getServerName(host) || null; - const sessionKey = servername || hostname; - const session = sessionCache.get(sessionKey) || null; - assert(sessionKey); - socket = tls.connect({ - highWaterMark: 16384, - // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], - socket: httpSocket, - // upgrade socket connection - port: port || 443, - host: hostname - }); - socket.on("session", function(session2) { - sessionCache.set(sessionKey, session2); - }); + return obj; + }, "getValueFromTextNode"); + var StringWrapper = /* @__PURE__ */ __name(function() { + const Class = Object.getPrototypeOf(this).constructor; + const Constructor = Function.bind.apply(String, [null, ...arguments]); + const instance = new Constructor(); + Object.setPrototypeOf(instance, Class.prototype); + return instance; + }, "StringWrapper"); + StringWrapper.prototype = Object.create(String.prototype, { + constructor: { + value: StringWrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + Object.setPrototypeOf(StringWrapper, String); + var _LazyJsonString = class _LazyJsonString2 extends StringWrapper { + deserializeJSON() { + return JSON.parse(super.toString()); + } + toJSON() { + return super.toString(); + } + static fromObject(object) { + if (object instanceof _LazyJsonString2) { + return object; + } else if (object instanceof String || typeof object === "string") { + return new _LazyJsonString2(object); + } + return new _LazyJsonString2(JSON.stringify(object)); + } + }; + __name(_LazyJsonString, "LazyJsonString"); + var LazyJsonString = _LazyJsonString; + function map(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 { - assert(!httpSocket, "httpSocket can only be sent on TLS update"); - socket = net.connect({ - highWaterMark: 64 * 1024, - // Same as nodejs fs streams. - ...options, - localAddress, - port: port || 80, - host: hostname - }); + instructions = arg1; } - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; - socket.setKeepAlive(true, keepAliveInitialDelay); + } + for (const key of Object.keys(instructions)) { + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; } - const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout); - socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { - cancelTimeout(); - if (callback) { - const cb = callback; - callback = null; - cb(null, this); - } - }).on("error", function(err) { - cancelTimeout(); - if (callback) { - const cb = callback; - callback = null; - cb(err); - } - }); - return socket; - }; - } - function setupTimeout(onConnectTimeout2, timeout) { - if (!timeout) { - return () => { - }; + applyInstruction(target, null, instructions, key); } - let s1 = null; - let s2 = null; - const timeoutId = setTimeout(() => { - s1 = setImmediate(() => { - if (process.platform === "win32") { - s2 = setImmediate(() => onConnectTimeout2()); - } else { - onConnectTimeout2(); - } - }); - }, timeout); - return () => { - clearTimeout(timeoutId); - clearImmediate(s1); - clearImmediate(s2); - }; + return target; } - function onConnectTimeout(socket) { - let message = "Connect Timeout Error"; - if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { - message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")})`; + __name(map, "map"); + var convertMap = /* @__PURE__ */ __name((target) => { + const output = {}; + for (const [k, v] of Object.entries(target || {})) { + output[k] = [, v]; } - util.destroy(socket, new ConnectTimeoutError(message)); - } - module2.exports = buildConnector; - } -}); - -// node_modules/undici/lib/util/timers.js -var require_timers2 = __commonJS({ - "node_modules/undici/lib/util/timers.js"(exports2, module2) { - "use strict"; - var TICK_MS = 499; - var fastNow = Date.now(); - var fastNowTimeout; - var fastTimers = []; - function onTimeout() { - fastNow = Date.now(); - let len = fastTimers.length; - let idx = 0; - while (idx < len) { - const timer = fastTimers[idx]; - if (timer.state === 0) { - timer.state = fastNow + timer.delay - TICK_MS; - } else if (timer.state > 0 && fastNow >= timer.state) { - timer.state = -1; - timer.callback(timer.opaque); + return output; + }, "convertMap"); + var take = /* @__PURE__ */ __name((source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; + }, "take"); + var mapWithFilter = /* @__PURE__ */ __name((target, filter, instructions) => { + return map( + 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; + }, + {} + ) + ); + }, "mapWithFilter"); + var applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; } - if (timer.state === -1) { - timer.state = -2; - if (idx !== len - 1) { - fastTimers[idx] = fastTimers.pop(); - } else { - fastTimers.pop(); - } - len -= 1; - } else { - idx += 1; + 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; } - if (fastTimers.length > 0) { - refreshTimeout(); - } - } - function refreshTimeout() { - if (fastNowTimeout?.refresh) { - fastNowTimeout.refresh(); - } else { - clearTimeout(fastNowTimeout); - fastNowTimeout = setTimeout(onTimeout, TICK_MS); - if (fastNowTimeout.unref) { - fastNowTimeout.unref(); + 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; + } + } + }, "applyInstruction"); + var nonNullish = /* @__PURE__ */ __name((_) => _ != null, "nonNullish"); + var pass = /* @__PURE__ */ __name((_) => _, "pass"); + var resolvedPath2 = /* @__PURE__ */ __name((resolvedPath22, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { + if (input != null && input[memberName] !== void 0) { + const labelValue = labelValueProvider(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: " + memberName + "."); + } + resolvedPath22 = resolvedPath22.replace( + uriLabel, + isGreedyLabel ? labelValue.split("/").map((segment) => extendedEncodeURIComponent(segment)).join("/") : extendedEncodeURIComponent(labelValue) + ); + } else { + throw new Error("No value provided for input HTTP label: " + memberName + "."); + } + return resolvedPath22; + }, "resolvedPath"); + var serializeFloat = /* @__PURE__ */ __name((value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; } - } - var Timeout = class { - constructor(callback, delay, opaque) { - this.callback = callback; - this.delay = delay; - this.opaque = opaque; - this.state = -2; - this.refresh(); + }, "serializeFloat"); + var serializeDateTime = /* @__PURE__ */ __name((date) => date.toISOString().replace(".000Z", "Z"), "serializeDateTime"); + var _json = /* @__PURE__ */ __name((obj) => { + if (obj == null) { + return {}; } - refresh() { - if (this.state === -2) { - fastTimers.push(this); - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout(); + 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]); } - this.state = 0; - } - clear() { - this.state = -1; + return target; } - }; - module2.exports = { - setTimeout(callback, delay, opaque) { - return delay <= 1e3 ? setTimeout(callback, delay, opaque) : new Timeout(callback, delay, opaque); - }, - clearTimeout(timeout) { - if (timeout instanceof Timeout) { - timeout.clear(); + return obj; + }, "_json"); + 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 i = 0; i < segments.length; i++) { + if (currentSegment === "") { + currentSegment = segments[i]; } else { - clearTimeout(timeout); + currentSegment += delimiter + segments[i]; + } + if ((i + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; } } - }; + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; + } + __name(splitEvery, "splitEvery"); } }); -// node_modules/undici/lib/llhttp/utils.js -var require_utils3 = __commonJS({ - "node_modules/undici/lib/llhttp/utils.js"(exports2) { +// 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.enumToMap = void 0; - function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === "number") { - res[key] = value; - } - }); - return res; - } - exports2.enumToMap = enumToMap; + exports2.isStreamingPayload = void 0; + var stream_1 = require("stream"); + var isStreamingPayload = (request2) => (request2 === null || request2 === void 0 ? void 0 : request2.body) instanceof stream_1.Readable || typeof ReadableStream !== "undefined" && (request2 === null || request2 === void 0 ? void 0 : request2.body) instanceof ReadableStream; + exports2.isStreamingPayload = isStreamingPayload; } }); -// node_modules/undici/lib/llhttp/constants.js -var require_constants7 = __commonJS({ - "node_modules/undici/lib/llhttp/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SPECIAL_HEADERS = exports2.HEADER_STATE = exports2.MINOR = exports2.MAJOR = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.STRICT_TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.STRICT_URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.FINISH = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; - var utils_1 = require_utils3(); - var ERROR; - (function(ERROR2) { - ERROR2[ERROR2["OK"] = 0] = "OK"; - ERROR2[ERROR2["INTERNAL"] = 1] = "INTERNAL"; - ERROR2[ERROR2["STRICT"] = 2] = "STRICT"; - ERROR2[ERROR2["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR2[ERROR2["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR2[ERROR2["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR2[ERROR2["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR2[ERROR2["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR2[ERROR2["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR2[ERROR2["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR2[ERROR2["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR2[ERROR2["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR2[ERROR2["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR2[ERROR2["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR2[ERROR2["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR2[ERROR2["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR2[ERROR2["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR2[ERROR2["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR2[ERROR2["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR2[ERROR2["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR2[ERROR2["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR2[ERROR2["PAUSED"] = 21] = "PAUSED"; - ERROR2[ERROR2["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR2[ERROR2["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR2[ERROR2["USER"] = 24] = "USER"; - })(ERROR = exports2.ERROR || (exports2.ERROR = {})); - var TYPE2; - (function(TYPE3) { - TYPE3[TYPE3["BOTH"] = 0] = "BOTH"; - TYPE3[TYPE3["REQUEST"] = 1] = "REQUEST"; - TYPE3[TYPE3["RESPONSE"] = 2] = "RESPONSE"; - })(TYPE2 = exports2.TYPE || (exports2.TYPE = {})); - var FLAGS; - (function(FLAGS2) { - FLAGS2[FLAGS2["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS2[FLAGS2["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS2[FLAGS2["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS2[FLAGS2["CHUNKED"] = 8] = "CHUNKED"; - FLAGS2[FLAGS2["UPGRADE"] = 16] = "UPGRADE"; - FLAGS2[FLAGS2["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS2[FLAGS2["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS2[FLAGS2["TRAILING"] = 128] = "TRAILING"; - FLAGS2[FLAGS2["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; - })(FLAGS = exports2.FLAGS || (exports2.FLAGS = {})); - var LENIENT_FLAGS; - (function(LENIENT_FLAGS2) { - LENIENT_FLAGS2[LENIENT_FLAGS2["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS2[LENIENT_FLAGS2["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS2[LENIENT_FLAGS2["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; - })(LENIENT_FLAGS = exports2.LENIENT_FLAGS || (exports2.LENIENT_FLAGS = {})); - var METHODS; - (function(METHODS2) { - METHODS2[METHODS2["DELETE"] = 0] = "DELETE"; - METHODS2[METHODS2["GET"] = 1] = "GET"; - METHODS2[METHODS2["HEAD"] = 2] = "HEAD"; - METHODS2[METHODS2["POST"] = 3] = "POST"; - METHODS2[METHODS2["PUT"] = 4] = "PUT"; - METHODS2[METHODS2["CONNECT"] = 5] = "CONNECT"; - METHODS2[METHODS2["OPTIONS"] = 6] = "OPTIONS"; - METHODS2[METHODS2["TRACE"] = 7] = "TRACE"; - METHODS2[METHODS2["COPY"] = 8] = "COPY"; - METHODS2[METHODS2["LOCK"] = 9] = "LOCK"; - METHODS2[METHODS2["MKCOL"] = 10] = "MKCOL"; - METHODS2[METHODS2["MOVE"] = 11] = "MOVE"; - METHODS2[METHODS2["PROPFIND"] = 12] = "PROPFIND"; - METHODS2[METHODS2["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS2[METHODS2["SEARCH"] = 14] = "SEARCH"; - METHODS2[METHODS2["UNLOCK"] = 15] = "UNLOCK"; - METHODS2[METHODS2["BIND"] = 16] = "BIND"; - METHODS2[METHODS2["REBIND"] = 17] = "REBIND"; - METHODS2[METHODS2["UNBIND"] = 18] = "UNBIND"; - METHODS2[METHODS2["ACL"] = 19] = "ACL"; - METHODS2[METHODS2["REPORT"] = 20] = "REPORT"; - METHODS2[METHODS2["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS2[METHODS2["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS2[METHODS2["MERGE"] = 23] = "MERGE"; - METHODS2[METHODS2["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS2[METHODS2["NOTIFY"] = 25] = "NOTIFY"; - METHODS2[METHODS2["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS2[METHODS2["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - METHODS2[METHODS2["PATCH"] = 28] = "PATCH"; - METHODS2[METHODS2["PURGE"] = 29] = "PURGE"; - METHODS2[METHODS2["MKCALENDAR"] = 30] = "MKCALENDAR"; - METHODS2[METHODS2["LINK"] = 31] = "LINK"; - METHODS2[METHODS2["UNLINK"] = 32] = "UNLINK"; - METHODS2[METHODS2["SOURCE"] = 33] = "SOURCE"; - METHODS2[METHODS2["PRI"] = 34] = "PRI"; - METHODS2[METHODS2["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS2[METHODS2["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS2[METHODS2["SETUP"] = 37] = "SETUP"; - METHODS2[METHODS2["PLAY"] = 38] = "PLAY"; - METHODS2[METHODS2["PAUSE"] = 39] = "PAUSE"; - METHODS2[METHODS2["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS2[METHODS2["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS2[METHODS2["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS2[METHODS2["REDIRECT"] = 43] = "REDIRECT"; - METHODS2[METHODS2["RECORD"] = 44] = "RECORD"; - METHODS2[METHODS2["FLUSH"] = 45] = "FLUSH"; - })(METHODS = exports2.METHODS || (exports2.METHODS = {})); - exports2.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS["M-SEARCH"], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE - ]; - exports2.METHODS_ICE = [ - METHODS.SOURCE - ]; - exports2.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - // For AirPlay - METHODS.GET, - METHODS.POST - ]; - exports2.METHOD_MAP = utils_1.enumToMap(METHODS); - exports2.H_METHOD_MAP = {}; - Object.keys(exports2.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports2.H_METHOD_MAP[key] = exports2.METHOD_MAP[key]; - } +// node_modules/@smithy/middleware-retry/dist-cjs/index.js +var require_dist_cjs33 = __commonJS({ + "node_modules/@smithy/middleware-retry/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, { + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, + CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, + ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS, + ENV_RETRY_MODE: () => ENV_RETRY_MODE, + NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS, + NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS, + StandardRetryStrategy: () => StandardRetryStrategy, + defaultDelayDecider: () => defaultDelayDecider, + defaultRetryDecider: () => defaultRetryDecider, + getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin, + getRetryAfterHint: () => getRetryAfterHint, + getRetryPlugin: () => getRetryPlugin, + omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware, + omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions, + resolveRetryConfig: () => resolveRetryConfig, + retryMiddleware: () => retryMiddleware, + retryMiddlewareOptions: () => retryMiddlewareOptions2 }); - var FINISH; - (function(FINISH2) { - FINISH2[FINISH2["SAFE"] = 0] = "SAFE"; - FINISH2[FINISH2["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH2[FINISH2["UNSAFE"] = 2] = "UNSAFE"; - })(FINISH = exports2.FINISH || (exports2.FINISH = {})); - exports2.ALPHA = []; - for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { - exports2.ALPHA.push(String.fromCharCode(i)); - exports2.ALPHA.push(String.fromCharCode(i + 32)); - } - exports2.NUM_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9 - }; - exports2.HEX_MAP = { - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - 6: 6, - 7: 7, - 8: 8, - 9: 9, - A: 10, - B: 11, - C: 12, - D: 13, - E: 14, - F: 15, - a: 10, - b: 11, - c: 12, - d: 13, - e: 14, - f: 15 + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs2(); + var import_uuid = (init_esm_node2(), __toCommonJS(esm_node_exports2)); + var import_util_retry = require_dist_cjs20(); + var getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => { + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = (options == null ? void 0 : options.noRetryIncrement) ?? import_util_retry.NO_RETRY_INCREMENT; + const retryCost = (options == null ? void 0 : options.retryCost) ?? import_util_retry.RETRY_COST; + const timeoutRetryCost = (options == null ? void 0 : options.timeoutRetryCost) ?? import_util_retry.TIMEOUT_RETRY_COST; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount"); + const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens"); + const retrieveRetryTokens = /* @__PURE__ */ __name((error) => { + if (!hasRetryTokens(error)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error); + availableCapacity -= capacityAmount; + return capacityAmount; + }, "retrieveRetryTokens"); + const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount ?? noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }, "releaseRetryTokens"); + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens + }); + }, "getDefaultRetryQuota"); + var defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider"); + var import_service_error_classification = require_dist_cjs19(); + var defaultRetryDecider = /* @__PURE__ */ __name((error) => { + if (!error) { + return false; + } + return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error); + }, "defaultRetryDecider"); + var asSdkError = /* @__PURE__ */ __name((error) => { + if (error instanceof Error) + return error; + if (error instanceof Object) + return Object.assign(new Error(), error); + if (typeof error === "string") + return new Error(error); + return new Error(`AWS SDK error wrapper for ${error}`); + }, "asSdkError"); + var _StandardRetryStrategy = class _StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = import_util_retry.RETRY_MODES.STANDARD; + this.retryDecider = (options == null ? void 0 : options.retryDecider) ?? defaultRetryDecider; + this.delayDecider = (options == null ? void 0 : options.delayDecider) ?? defaultDelayDecider; + this.retryQuota = (options == null ? void 0 : options.retryQuota) ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS); + } + shouldRetry(error, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); + } + async getMaxAttempts() { + let maxAttempts; + try { + maxAttempts = await this.maxAttemptsProvider(); + } catch (error) { + maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS; + } + return maxAttempts; + } + async retry(next, args, options) { + let retryTokenAmount; + let attempts = 0; + let totalDelay = 0; + const maxAttempts = await this.getMaxAttempts(); + const { request: request2 } = args; + if (import_protocol_http8.HttpRequest.isInstance(request2)) { + request2.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); + } + while (true) { + try { + if (import_protocol_http8.HttpRequest.isInstance(request2)) { + request2.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + if (options == null ? void 0 : options.beforeRequest) { + await options.beforeRequest(); + } + const { response, output } = await next(args); + if (options == null ? void 0 : options.afterRequest) { + options.afterRequest(response); + } + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } catch (e) { + const err = asSdkError(e); + attempts++; + if (this.shouldRetry(err, attempts, maxAttempts)) { + retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); + const delayFromDecider = this.delayDecider( + (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE, + attempts + ); + const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); + const delay = Math.max(delayFromResponse || 0, delayFromDecider); + totalDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + continue; + } + if (!err.$metadata) { + err.$metadata = {}; + } + err.$metadata.attempts = attempts; + err.$metadata.totalRetryDelay = totalDelay; + throw err; + } + } + } }; - exports2.NUM = [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9" - ]; - exports2.ALPHANUM = exports2.ALPHA.concat(exports2.NUM); - exports2.MARK = ["-", "_", ".", "!", "~", "*", "'", "(", ")"]; - exports2.USERINFO_CHARS = exports2.ALPHANUM.concat(exports2.MARK).concat(["%", ";", ":", "&", "=", "+", "$", ","]); - exports2.STRICT_URL_CHAR = [ - "!", - '"', - "$", - "%", - "&", - "'", - "(", - ")", - "*", - "+", - ",", - "-", - ".", - "/", - ":", - ";", - "<", - "=", - ">", - "@", - "[", - "\\", - "]", - "^", - "_", - "`", - "{", - "|", - "}", - "~" - ].concat(exports2.ALPHANUM); - exports2.URL_CHAR = exports2.STRICT_URL_CHAR.concat([" ", "\f"]); - for (let i = 128; i <= 255; i++) { - exports2.URL_CHAR.push(i); - } - exports2.HEX = exports2.NUM.concat(["a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); - exports2.STRICT_TOKEN = [ - "!", - "#", - "$", - "%", - "&", - "'", - "*", - "+", - "-", - ".", - "^", - "_", - "`", - "|", - "~" - ].concat(exports2.ALPHANUM); - exports2.TOKEN = exports2.STRICT_TOKEN.concat([" "]); - exports2.HEADER_CHARS = [" "]; - for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports2.HEADER_CHARS.push(i); + __name(_StandardRetryStrategy, "StandardRetryStrategy"); + var StandardRetryStrategy = _StandardRetryStrategy; + var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http8.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return retryAfterSeconds * 1e3; + const retryAfterDate = new Date(retryAfter); + return retryAfterDate.getTime() - Date.now(); + }, "getDelayFromRetryAfterHeader"); + var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy extends StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options ?? {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter(); + this.mode = import_util_retry.RETRY_MODES.ADAPTIVE; + } + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + } + }); } - } - exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS.filter((c) => c !== 44); - exports2.MAJOR = exports2.NUM_MAP; - exports2.MINOR = exports2.MAJOR; - var HEADER_STATE; - (function(HEADER_STATE2) { - HEADER_STATE2[HEADER_STATE2["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE2[HEADER_STATE2["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE2[HEADER_STATE2["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE2[HEADER_STATE2["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE2[HEADER_STATE2["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE2[HEADER_STATE2["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE2[HEADER_STATE2["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; - })(HEADER_STATE = exports2.HEADER_STATE || (exports2.HEADER_STATE = {})); - exports2.SPECIAL_HEADERS = { - "connection": HEADER_STATE.CONNECTION, - "content-length": HEADER_STATE.CONTENT_LENGTH, - "proxy-connection": HEADER_STATE.CONNECTION, - "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, - "upgrade": HEADER_STATE.UPGRADE }; + __name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); + var AdaptiveRetryStrategy = _AdaptiveRetryStrategy; + var import_util_middleware3 = require_dist_cjs10(); + var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; + var CONFIG_MAX_ATTEMPTS = "max_attempts"; + var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + const value = env[ENV_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[CONFIG_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + default: import_util_retry.DEFAULT_MAX_ATTEMPTS + }; + var resolveRetryConfig = /* @__PURE__ */ __name((input) => { + const { retryStrategy } = input; + const maxAttempts = (0, import_util_middleware3.normalizeProvider)(input.maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS); + return { + ...input, + maxAttempts, + retryStrategy: async () => { + if (retryStrategy) { + return retryStrategy; + } + const retryMode = await (0, import_util_middleware3.normalizeProvider)(input.retryMode)(); + if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) { + return new import_util_retry.AdaptiveRetryStrategy(maxAttempts); + } + return new import_util_retry.StandardRetryStrategy(maxAttempts); + } + }; + }, "resolveRetryConfig"); + var ENV_RETRY_MODE = "AWS_RETRY_MODE"; + var CONFIG_RETRY_MODE = "retry_mode"; + var NODE_RETRY_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_RETRY_MODE], + configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + default: import_util_retry.DEFAULT_RETRY_MODE + }; + var omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => { + const { request: request2 } = args; + if (import_protocol_http8.HttpRequest.isInstance(request2)) { + delete request2.headers[import_util_retry.INVOCATION_ID_HEADER]; + delete request2.headers[import_util_retry.REQUEST_HEADER]; + } + return next(args); + }, "omitRetryHeadersMiddleware"); + var omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true + }; + var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); + } + }), "getOmitRetryHeadersPlugin"); + var import_smithy_client5 = require_dist_cjs32(); + var import_isStreamingPayload = require_isStreamingPayload(); + var retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { + var _a; + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request: request2 } = args; + const isRequest = import_protocol_http8.HttpRequest.isInstance(request2); + if (isRequest) { + request2.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); + } + while (true) { + try { + if (isRequest) { + request2.headers[import_util_retry.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 (e) { + const retryErrorInfo = getRetryErrorInfo(e); + lastError = asSdkError(e); + if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request2)) { + (_a = context.logger instanceof import_smithy_client5.NoOpLogger ? console : context.logger) == null ? void 0 : _a.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 += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + } + } + } else { + retryStrategy = retryStrategy; + if (retryStrategy == null ? void 0 : retryStrategy.mode) + context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); + } + }, "retryMiddleware"); + var isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); + var getRetryErrorInfo = /* @__PURE__ */ __name((error) => { + const errorInfo = { + error, + errorType: getRetryErrorType(error) + }; + const retryAfterHint = getRetryAfterHint(error.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; + }, "getRetryErrorInfo"); + var getRetryErrorType = /* @__PURE__ */ __name((error) => { + if ((0, import_service_error_classification.isThrottlingError)(error)) + return "THROTTLING"; + if ((0, import_service_error_classification.isTransientError)(error)) + return "TRANSIENT"; + if ((0, import_service_error_classification.isServerError)(error)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; + }, "getRetryErrorType"); + var retryMiddlewareOptions2 = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true + }; + var getRetryPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions2); + } + }), "getRetryPlugin"); + var getRetryAfterHint = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http8.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1e3); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; + }, "getRetryAfterHint"); } }); -// node_modules/undici/lib/llhttp/llhttp-wasm.js -var require_llhttp_wasm2 = __commonJS({ - "node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports2, module2) { - "use strict"; - var { Buffer: Buffer2 } = require("node:buffer"); - module2.exports = Buffer2.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIA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ACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJB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AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv", "base64"); +// node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +var import_middleware_retry, httpSigningMiddlewareOptions, getHttpSigningPlugin; +var init_getHttpSigningMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() { + import_middleware_retry = __toESM(require_dist_cjs33()); + init_httpSigningMiddleware(); + httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: import_middleware_retry.retryMiddlewareOptions.name + }; + getHttpSigningPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); + } + }); } }); -// node_modules/undici/lib/llhttp/llhttp_simd-wasm.js -var require_llhttp_simd_wasm2 = __commonJS({ - "node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports2, module2) { - "use strict"; - var { Buffer: Buffer2 } = require("node:buffer"); - module2.exports = Buffer2.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASD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CyAFQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJA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GgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQ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BCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASEDDJoCCyABLQAAQcwARw1bIAF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wMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==", "base64"); +// 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/undici/lib/web/fetch/constants.js -var require_constants8 = __commonJS({ - "node_modules/undici/lib/web/fetch/constants.js"(exports2, module2) { - "use strict"; - var corsSafeListedMethods = ["GET", "HEAD", "POST"]; - var corsSafeListedMethodsSet = new Set(corsSafeListedMethods); - var nullBodyStatus = [101, 204, 205, 304]; - var redirectStatus = [301, 302, 303, 307, 308]; - var redirectStatusSet = new Set(redirectStatus); - var badPorts = [ - "1", - "7", - "9", - "11", - "13", - "15", - "17", - "19", - "20", - "21", - "22", - "23", - "25", - "37", - "42", - "43", - "53", - "69", - "77", - "79", - "87", - "95", - "101", - "102", - "103", - "104", - "109", - "110", - "111", - "113", - "115", - "117", - "119", - "123", - "135", - "137", - "139", - "143", - "161", - "179", - "389", - "427", - "465", - "512", - "513", - "514", - "515", - "526", - "530", - "531", - "532", - "540", - "548", - "554", - "556", - "563", - "587", - "601", - "636", - "989", - "990", - "993", - "995", - "1719", - "1720", - "1723", - "2049", - "3659", - "4045", - "4190", - "5060", - "5061", - "6000", - "6566", - "6665", - "6666", - "6667", - "6668", - "6669", - "6679", - "6697", - "10080" - ]; - var badPortsSet = new Set(badPorts); - var referrerPolicy = [ - "", - "no-referrer", - "no-referrer-when-downgrade", - "same-origin", - "origin", - "strict-origin", - "origin-when-cross-origin", - "strict-origin-when-cross-origin", - "unsafe-url" - ]; - var referrerPolicySet = new Set(referrerPolicy); - var requestRedirect = ["follow", "manual", "error"]; - var safeMethods = ["GET", "HEAD", "OPTIONS", "TRACE"]; - var safeMethodsSet = new Set(safeMethods); - var requestMode = ["navigate", "same-origin", "no-cors", "cors"]; - var requestCredentials = ["omit", "same-origin", "include"]; - var requestCache = [ - "default", - "no-store", - "reload", - "no-cache", - "force-cache", - "only-if-cached" - ]; - var requestBodyHeader = [ - "content-encoding", - "content-language", - "content-location", - "content-type", - // See https://github.com/nodejs/undici/issues/2021 - // 'Content-Length' is a forbidden header name, which is typically - // removed in the Headers implementation. However, undici doesn't - // filter out headers, so we add it here. - "content-length" - ]; - var requestDuplex = [ - "half" - ]; - var forbiddenMethods = ["CONNECT", "TRACE", "TRACK"]; - var forbiddenMethodsSet = new Set(forbiddenMethods); - var subresource = [ - "audio", - "audioworklet", - "font", - "image", - "manifest", - "paintworklet", - "script", - "style", - "track", - "video", - "xslt", - "" - ]; - var subresourceSet = new Set(subresource); - module2.exports = { - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods, - badPorts, - requestDuplex, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet +// 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 { + constructor(config) { + this.authSchemes = /* @__PURE__ */ new Map(); + for (const [key, value] of Object.entries(config)) { + if (value !== void 0) { + this.authSchemes.set(key, value); + } + } + } + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); + } }; } }); -// node_modules/undici/lib/web/fetch/global.js -var require_global3 = __commonJS({ - "node_modules/undici/lib/web/fetch/global.js"(exports2, module2) { - "use strict"; - var globalOrigin = Symbol.for("undici.globalOrigin.1"); - function getGlobalOrigin() { - return globalThis[globalOrigin]; - } - function setGlobalOrigin(newOrigin) { - if (newOrigin === void 0) { - Object.defineProperty(globalThis, globalOrigin, { - value: void 0, - writable: true, - enumerable: false, - configurable: false - }); - return; +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +var import_protocol_http2, import_types3, HttpApiKeyAuthSigner; +var init_httpApiKeyAuth = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { + import_protocol_http2 = __toESM(require_dist_cjs2()); + import_types3 = __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_http2.HttpRequest.clone(httpRequest); + if (signingProperties.in === import_types3.HttpApiKeyAuthLocation.QUERY) { + clonedRequest.query[signingProperties.name] = identity.apiKey; + } else if (signingProperties.in === import_types3.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; } - const parsedURL = new URL(newOrigin); - if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + }; + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +var import_protocol_http3, HttpBearerAuthSigner; +var init_httpBearerAuth = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { + import_protocol_http3 = __toESM(require_dist_cjs2()); + HttpBearerAuthSigner = class { + async sign(httpRequest, identity, signingProperties) { + const clonedRequest = import_protocol_http3.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; } - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }); - } - module2.exports = { - getGlobalOrigin, - setGlobalOrigin }; } }); -// node_modules/undici/lib/web/fetch/data-url.js -var require_data_url = __commonJS({ - "node_modules/undici/lib/web/fetch/data-url.js"(exports2, module2) { - "use strict"; - var assert = require("node:assert"); - var encoder = new TextEncoder(); - var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; - var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; - var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; - var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; - function dataURLProcessor(dataURL) { - assert(dataURL.protocol === "data:"); - let input = URLSerializer(dataURL, true); - input = input.slice(5); - const position = { position: 0 }; - let mimeType = collectASequenceOfCodePointsFast( - ",", - input, - position - ); - const mimeTypeLength = mimeType.length; - mimeType = removeASCIIWhitespace(mimeType, true, true); - if (position.position >= input.length) { - return "failure"; +// 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; } - position.position++; - const encodedBody = input.slice(mimeTypeLength + 1); - let body = stringPercentDecode(encodedBody); - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - const stringBody = isomorphicDecode(body); - body = forgivingBase64(stringBody); - if (body === "failure") { - return "failure"; + }; + } +}); + +// 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) => (identity) => 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); } - mimeType = mimeType.slice(0, -6); - mimeType = mimeType.replace(/(\u0020)+$/, ""); - mimeType = mimeType.slice(0, -1); + 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; + }; } - if (mimeType.startsWith(";")) { - mimeType = "text/plain" + mimeType; + 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/getSmithyContext.js +var import_types4, getSmithyContext3; +var init_getSmithyContext = __esm({ + "node_modules/@smithy/core/dist-es/getSmithyContext.js"() { + import_types4 = __toESM(require_dist_cjs()); + getSmithyContext3 = (context) => context[import_types4.SMITHY_CONTEXT_KEY] || (context[import_types4.SMITHY_CONTEXT_KEY] = {}); + } +}); + +// node_modules/@smithy/core/dist-es/normalizeProvider.js +var normalizeProvider; +var init_normalizeProvider = __esm({ + "node_modules/@smithy/core/dist-es/normalizeProvider.js"() { + normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }; + } +}); + +// node_modules/@smithy/core/dist-es/protocols/requestBuilder.js +function requestBuilder(input, context) { + return new RequestBuilder(input, context); +} +var import_protocol_http4, import_smithy_client, RequestBuilder; +var init_requestBuilder = __esm({ + "node_modules/@smithy/core/dist-es/protocols/requestBuilder.js"() { + import_protocol_http4 = __toESM(require_dist_cjs2()); + import_smithy_client = __toESM(require_dist_cjs32()); + RequestBuilder = class { + constructor(input, context) { + this.input = input; + this.context = context; + this.query = {}; + this.method = ""; + this.headers = {}; + this.path = ""; + this.body = null; + this.hostname = ""; + this.resolvePathStack = []; + } + async build() { + const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint(); + this.path = basePath; + for (const resolvePath of this.resolvePathStack) { + resolvePath(this.path); + } + return new import_protocol_http4.HttpRequest({ + protocol, + hostname: this.hostname || hostname, + port, + method: this.method, + path: this.path, + query: this.query, + body: this.body, + headers: this.headers + }); } - let mimeTypeRecord = parseMIMEType(mimeType); - if (mimeTypeRecord === "failure") { - mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); + hn(hostname) { + this.hostname = hostname; + return this; } - return { mimeType: mimeTypeRecord, body }; - } - function URLSerializer(url, excludeFragment = false) { - if (!excludeFragment) { - return url.href; + bp(uriLabel) { + this.resolvePathStack.push((basePath) => { + this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; + }); + return this; } - const href = url.href; - const hashLength = url.hash.length; - const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); - if (!hashLength && href.endsWith("#")) { - return serialized.slice(0, -1); + p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { + this.resolvePathStack.push((path) => { + this.path = (0, import_smithy_client.resolvedPath)(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + }); + return this; } - return serialized; - } - function collectASequenceOfCodePoints(condition, input, position) { - let result = ""; - while (position.position < input.length && condition(input[position.position])) { - result += input[position.position]; - position.position++; + h(headers) { + this.headers = headers; + return this; } - return result; - } - function collectASequenceOfCodePointsFast(char, input, position) { - const idx = input.indexOf(char, position.position); - const start = position.position; - if (idx === -1) { - position.position = input.length; - return input.slice(start); + q(query) { + this.query = query; + return this; } - position.position = idx; - return input.slice(start, position.position); - } - function stringPercentDecode(input) { - const bytes = encoder.encode(input); - return percentDecode(bytes); - } - function isHexCharByte(byte) { - return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; - } - function hexByteToNumber(byte) { - return ( - // 0-9 - byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55 - ); + b(body) { + this.body = body; + return this; + } + m(method) { + this.method = method; + return this; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/pagination/createPaginator.js +function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return async function* paginateOperation(config, input, ...additionalArguments) { + let token = config.startingToken || void 0; + 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, ...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)); } - function percentDecode(input) { - const length = input.length; - const output = new Uint8Array(length); - let j = 0; - for (let i = 0; i < length; ++i) { - const byte = input[i]; - if (byte !== 37) { - output[j++] = byte; - } else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) { - output[j++] = 37; - } else { - output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); - i += 2; + return void 0; + }; +} +var makePagedClientRequest, get; +var init_createPaginator = __esm({ + "node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() { + makePagedClientRequest = async (CommandCtor, client, input, ...args) => { + return await client.send(new CommandCtor(input), ...args); + }; + get = (fromObject, path) => { + let cursor = fromObject; + const pathComponents = path.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return void 0; } + cursor = cursor[step]; } - return length === j ? output : output.subarray(0, j); + return cursor; + }; + } +}); + +// 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, + RequestBuilder: () => RequestBuilder, + createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction, + createPaginator: () => createPaginator, + doesIdentityRequireRefresh: () => doesIdentityRequireRefresh, + getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, + getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, + getHttpSigningPlugin: () => getHttpSigningPlugin, + getSmithyContext: () => getSmithyContext3, + httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, + httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, + httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, + httpSigningMiddleware: () => httpSigningMiddleware, + httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions, + isIdentityExpired: () => isIdentityExpired, + memoizeIdentityProvider: () => memoizeIdentityProvider, + normalizeProvider: () => normalizeProvider, + requestBuilder: () => requestBuilder +}); +var init_dist_es = __esm({ + "node_modules/@smithy/core/dist-es/index.js"() { + init_middleware_http_auth_scheme(); + init_middleware_http_signing(); + init_util_identity_and_auth(); + init_getSmithyContext(); + init_normalizeProvider(); + init_requestBuilder(); + init_createPaginator(); + } +}); + +// node_modules/@smithy/middleware-content-length/dist-cjs/index.js +var require_dist_cjs34 = __commonJS({ + "node_modules/@smithy/middleware-content-length/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, { + contentLengthMiddleware: () => contentLengthMiddleware, + contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, + getContentLengthPlugin: () => getContentLengthPlugin + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http8 = require_dist_cjs2(); + var CONTENT_LENGTH_HEADER = "content-length"; + function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request2 = args.request; + if (import_protocol_http8.HttpRequest.isInstance(request2)) { + const { body, headers } = request2; + if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { + try { + const length = bodyLengthChecker(body); + request2.headers = { + ...request2.headers, + [CONTENT_LENGTH_HEADER]: String(length) + }; + } catch (error) { + } + } + } + return next({ + ...args, + request: request2 + }); + }; } - function parseMIMEType(input) { - input = removeHTTPWhitespace(input, true, true); - const position = { position: 0 }; - const type = collectASequenceOfCodePointsFast( - "/", - input, - position - ); - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { - return "failure"; + __name(contentLengthMiddleware, "contentLengthMiddleware"); + var contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true + }; + var getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); } - if (position.position > input.length) { - return "failure"; + }), "getContentLengthPlugin"); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js +var warningEmitted, emitWarningIfUnsupportedVersion; +var init_emitWarningIfUnsupportedVersion = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"() { + warningEmitted = false; + emitWarningIfUnsupportedVersion = (version3) => { + if (version3 && !warningEmitted && parseInt(version3.substring(1, version3.indexOf("."))) < 18) { + warningEmitted = true; + process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 16.x on January 6, 2025. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to a supported Node.js LTS version. + +More information can be found at: https://a.co/74kJMmI`); } - position.position++; - let subtype = collectASequenceOfCodePointsFast( - ";", - input, - position - ); - subtype = removeHTTPWhitespace(subtype, false, true); - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { - return "failure"; + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +var init_client = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/index.js"() { + init_emitWarningIfUnsupportedVersion(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +var import_protocol_http5, getDateHeader; +var init_getDateHeader = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js"() { + import_protocol_http5 = __toESM(require_dist_cjs2()); + getDateHeader = (response) => import_protocol_http5.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js +var getSkewCorrectedDate; +var init_getSkewCorrectedDate = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js"() { + getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js +var isClockSkewed; +var init_isClockSkewed = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js"() { + init_getSkewCorrectedDate(); + isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +var getUpdatedSystemClockOffset; +var init_getUpdatedSystemClockOffset = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js"() { + init_isClockSkewed(); + getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); } - const typeLowercase = type.toLowerCase(); - const subtypeLowercase = subtype.toLowerCase(); - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - /** @type {Map} */ - parameters: /* @__PURE__ */ new Map(), - // https://mimesniff.spec.whatwg.org/#mime-type-essence - essence: `${typeLowercase}/${subtypeLowercase}` + return currentSystemClockOffset; + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js +var init_utils = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js"() { + init_getDateHeader(); + init_getSkewCorrectedDate(); + init_getUpdatedSystemClockOffset(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +var import_protocol_http6, throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer, AWSSDKSigV4Signer; +var init_AwsSdkSigV4Signer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js"() { + import_protocol_http6 = __toESM(require_dist_cjs2()); + init_utils(); + throwSigningPropertyError = (name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; + }; + validateSigningProperties = async (signingProperties) => { + const context = throwSigningPropertyError("context", signingProperties.context); + const config = throwSigningPropertyError("config", signingProperties.config); + const authScheme = context.endpointV2?.properties?.authSchemes?.[0]; + const signerFunction = throwSigningPropertyError("signer", config.signer); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties?.signingRegion; + const signingRegionSet = signingProperties?.signingRegionSet; + const signingName = signingProperties?.signingName; + return { + config, + signer, + signingRegion, + signingRegionSet, + signingName }; - while (position.position < input.length) { - position.position++; - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - (char) => HTTP_WHITESPACE_REGEX.test(char), - input, - position - ); - let parameterName = collectASequenceOfCodePoints( - (char) => char !== ";" && char !== "=", - input, - position - ); - parameterName = parameterName.toLowerCase(); - if (position.position < input.length) { - if (input[position.position] === ";") { - continue; + }; + AwsSdkSigV4Signer = class { + async sign(httpRequest, identity, signingProperties) { + if (!import_protocol_http6.HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const validatedProps = await validateSigningProperties(signingProperties); + const { config, signer } = validatedProps; + let { signingRegion, signingName } = validatedProps; + const handlerExecutionContext = signingProperties.context; + if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) { + const [first, second] = handlerExecutionContext.authSchemes; + if (first?.name === "sigv4a" && second?.name === "sigv4") { + signingRegion = second?.signingRegion ?? signingRegion; + signingName = second?.signingName ?? signingName; + } + } + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion, + signingService: signingName + }); + return signedRequest; + } + errorHandler(signingProperties) { + return (error) => { + const serverTime = error.ServerTime ?? getDateHeader(error.$response); + if (serverTime) { + const config = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config.systemClockOffset; + config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); + const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error.$metadata) { + error.$metadata.clockSkewCorrected = true; + } } - position.position++; + throw error; + }; + } + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config = throwSigningPropertyError("config", signingProperties.config); + config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); } - if (position.position > input.length) { - break; + } + }; + AWSSDKSigV4Signer = AwsSdkSigV4Signer; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +var import_protocol_http7, AwsSdkSigV4ASigner; +var init_AwsSdkSigV4ASigner = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js"() { + import_protocol_http7 = __toESM(require_dist_cjs2()); + init_utils(); + init_AwsSdkSigV4Signer(); + AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!import_protocol_http7.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); + const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.(); + const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(","); + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion: multiRegionOverride, + signingService: signingName + }); + return signedRequest; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js +var import_property_provider, resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS; +var init_resolveAwsSdkSigV4AConfig = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js"() { + init_dist_es(); + import_property_provider = __toESM(require_dist_cjs12()); + resolveAwsSdkSigV4AConfig = (config) => { + config.sigv4aSigningRegionSet = normalizeProvider(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()); + } + throw new import_property_provider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", { + tryNextLink: true + }); + }, + configFileSelector(profile) { + if (profile.sigv4a_signing_region_set) { + return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim()); } - let parameterValue = null; - if (input[position.position] === '"') { - parameterValue = collectAnHTTPQuotedString(input, position, true); - collectASequenceOfCodePointsFast( - ";", - input, - position - ); - } else { - parameterValue = collectASequenceOfCodePointsFast( - ";", - input, - position - ); - parameterValue = removeHTTPWhitespace(parameterValue, false, true); - if (parameterValue.length === 0) { + throw new import_property_provider.ProviderError("sigv4a_signing_region_set not set in profile.", { + tryNextLink: true + }); + }, + default: void 0 + }; + } +}); + +// node_modules/@smithy/signature-v4/dist-cjs/index.js +var require_dist_cjs35 = __commonJS({ + "node_modules/@smithy/signature-v4/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, { + SignatureV4: () => SignatureV42, + clearCredentialCache: () => clearCredentialCache, + createScope: () => createScope, + getCanonicalHeaders: () => getCanonicalHeaders, + getCanonicalQuery: () => getCanonicalQuery, + getPayloadHash: () => getPayloadHash, + getSigningKey: () => getSigningKey, + moveHeadersToQuery: () => moveHeadersToQuery, + prepareRequest: () => prepareRequest + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_middleware3 = require_dist_cjs10(); + var import_util_utf84 = require_dist_cjs24(); + var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; + var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; + var AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; + var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; + var EXPIRES_QUERY_PARAM = "X-Amz-Expires"; + var SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; + var TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; + var AUTH_HEADER = "authorization"; + var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); + var DATE_HEADER = "date"; + var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; + var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); + var SHA256_HEADER = "x-amz-content-sha256"; + var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); + var ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true + }; + var PROXY_HEADER_PATTERN = /^proxy-/; + var SEC_HEADER_PATTERN = /^sec-/; + var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; + var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; + var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; + var MAX_CACHE_SIZE = 50; + var KEY_TYPE_IDENTIFIER = "aws4_request"; + var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + var import_util_hex_encoding = require_dist_cjs30(); + var import_util_utf8 = require_dist_cjs24(); + var signingKeyCache = {}; + var cacheQueue = []; + var createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope"); + var getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.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; + }, "getSigningKey"); + var clearCredentialCache = /* @__PURE__ */ __name(() => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); + }, "clearCredentialCache"); + var hmac = /* @__PURE__ */ __name((ctor, secret, data) => { + const hash = new ctor(secret); + hash.update((0, import_util_utf8.toUint8Array)(data)); + return hash.digest(); + }, "hmac"); + var getCanonicalHeaders = /* @__PURE__ */ __name(({ 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 == null ? void 0 : unsignableHeaders.has(canonicalHeaderName)) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { continue; } } - if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) { - mimeType.parameters.set(parameterName, parameterValue); + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; + }, "getCanonicalHeaders"); + var import_util_uri_escape = require_dist_cjs26(); + var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query).sort()) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + keys.push(key); + const value = query[key]; + if (typeof value === "string") { + serialized[key] = `${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value)}`; + } else if (Array.isArray(value)) { + serialized[key] = value.slice(0).reduce( + (encoded, value2) => encoded.concat([`${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value2)}`]), + [] + ).sort().join("&"); + } + } + return keys.map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); + }, "getCanonicalQuery"); + var import_is_array_buffer = require_dist_cjs22(); + var import_util_utf82 = require_dist_cjs24(); + var getPayloadHash = /* @__PURE__ */ __name(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) || (0, import_is_array_buffer.isArrayBuffer)(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update((0, import_util_utf82.toUint8Array)(body)); + return (0, import_util_hex_encoding.toHex)(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; + }, "getPayloadHash"); + var import_util_utf83 = require_dist_cjs24(); + var _HeaderFormatter = class _HeaderFormatter { + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = (0, import_util_utf83.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; } - return mimeType; - } - function forgivingBase64(data) { - data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); - let dataLength = data.length; - if (dataLength % 4 === 0) { - if (data.charCodeAt(dataLength - 1) === 61) { - --dataLength; - if (data.charCodeAt(dataLength - 1) === 61) { - --dataLength; - } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([ + header.value ? 0 : 1 + /* boolFalse */ + ]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8( + 0, + 3 + /* short */ + ); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8( + 0, + 4 + /* integer */ + ); + 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 + /* byteArray */ + ); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = (0, import_util_utf83.fromUtf8)(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8( + 0, + 7 + /* string */ + ); + 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((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); + return uuidBytes; } } - if (dataLength % 4 === 1) { - return "failure"; + }; + __name(_HeaderFormatter, "HeaderFormatter"); + var HeaderFormatter = _HeaderFormatter; + 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 _Int642 { + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } } - if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { - return "failure"; + 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 i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { + bytes[i] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new _Int642(bytes); } - const buffer = Buffer.from(data, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); - } - function collectAnHTTPQuotedString(input, position, extractValue) { - const positionStart = position.position; - let value = ""; - assert(input[position.position] === '"'); - position.position++; - while (true) { - value += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== "\\", - input, - position - ); - if (position.position >= input.length) { - break; + /** + * Called implicitly by infix arithmetic operators. + */ + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); } - const quoteOrBackslash = input[position.position]; - position.position++; - if (quoteOrBackslash === "\\") { - if (position.position >= input.length) { - value += "\\"; - break; - } - value += input[position.position]; - position.position++; - } else { - assert(quoteOrBackslash === '"'); + return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + __name(_Int64, "Int64"); + var Int64 = _Int64; + function negate(bytes) { + for (let i = 0; i < 8; i++) { + bytes[i] ^= 255; + } + for (let i = 7; i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) break; + } + } + __name(negate, "negate"); + var hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; } } - if (extractValue) { - return value; + return false; + }, "hasHeader"); + var import_protocol_http8 = require_dist_cjs2(); + var moveHeadersToQuery = /* @__PURE__ */ __name((request2, options = {}) => { + var _a; + const { headers, query = {} } = import_protocol_http8.HttpRequest.clone(request2); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !((_a = options.unhoistableHeaders) == null ? void 0 : _a.has(lname))) { + query[name] = headers[name]; + delete headers[name]; + } } - return input.slice(positionStart, position.position); - } - function serializeAMimeType(mimeType) { - assert(mimeType !== "failure"); - const { parameters, essence } = mimeType; - let serialization = essence; - for (let [name, value] of parameters.entries()) { - serialization += ";"; - serialization += name; - serialization += "="; - if (!HTTP_TOKEN_CODEPOINTS.test(value)) { - value = value.replace(/(\\|")/g, "\\$1"); - value = '"' + value; - value += '"'; + return { + ...request2, + headers, + query + }; + }, "moveHeadersToQuery"); + var prepareRequest = /* @__PURE__ */ __name((request2) => { + request2 = import_protocol_http8.HttpRequest.clone(request2); + for (const headerName of Object.keys(request2.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request2.headers[headerName]; } - serialization += value; } - return serialization; - } - function isHTTPWhiteSpace(char) { - return char === 13 || char === 10 || char === 9 || char === 32; - } - function removeHTTPWhitespace(str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isHTTPWhiteSpace); - } - function isASCIIWhitespace(char) { - return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; - } - function removeASCIIWhitespace(str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isASCIIWhitespace); - } - function removeChars(str, leading, trailing, predicate) { - let lead = 0; - let trail = str.length - 1; - if (leading) { - while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + return request2; + }, "prepareRequest"); + var iso8601 = /* @__PURE__ */ __name((time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601"); + var toDate = /* @__PURE__ */ __name((time) => { + if (typeof time === "number") { + return new Date(time * 1e3); } - if (trailing) { - while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; + if (typeof time === "string") { + if (Number(time)) { + return new Date(Number(time) * 1e3); + } + return new Date(time); } - return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); - } - function isomorphicDecode(input) { - const length = input.length; - if ((2 << 15) - 1 > length) { - return String.fromCharCode.apply(null, input); + return time; + }, "toDate"); + var _SignatureV4 = class _SignatureV4 { + constructor({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath = true + }) { + this.headerFormatter = new HeaderFormatter(); + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = (0, import_util_middleware3.normalizeProvider)(region); + this.credentialProvider = (0, import_util_middleware3.normalizeProvider)(credentials); + } + async presign(originalRequest, options = {}) { + const { + signingDate = /* @__PURE__ */ new Date(), + expiresIn = 3600, + unsignableHeaders, + unhoistableHeaders, + signableHeaders, + signingRegion, + signingService + } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { longDate, shortDate } = formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject( + "Signature version 4 presigned URLs must have an expiration date less than one week in the future" + ); + } + const scope = createScope(shortDate, region, signingService ?? this.service); + const request2 = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders }); + if (credentials.sessionToken) { + request2.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request2.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request2.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request2.query[AMZ_DATE_QUERY_PARAM] = longDate; + request2.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request2, unsignableHeaders, signableHeaders); + request2.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders); + request2.query[SIGNATURE_QUERY_PARAM] = await this.getSignature( + longDate, + scope, + this.getSigningKey(credentials, region, shortDate, signingService), + this.createCanonicalRequest(request2, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)) + ); + return request2; } - let result = ""; - let i = 0; - let addition = (2 << 15) - 1; - while (i < length) { - if (i + addition > length) { - addition = length - i; + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } else if (toSign.message) { + return this.signMessage(toSign, options); + } else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion ?? await this.regionProvider(); + const { shortDate, longDate } = formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash = new this.sha256(); + hash.update(headers); + const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) { + const promise = this.signEvent( + { + headers: this.headerFormatter.format(signableMessage.message.headers), + payload: signableMessage.message.body + }, + { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature + } + ); + return promise.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { shortDate } = formatDate(signingDate); + const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash.update((0, import_util_utf84.toUint8Array)(stringToSign)); + return (0, import_util_hex_encoding.toHex)(await hash.digest()); + } + async signRequest(requestToSign, { + signingDate = /* @__PURE__ */ new Date(), + signableHeaders, + unsignableHeaders, + signingRegion, + signingService + } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const request2 = prepareRequest(requestToSign); + const { longDate, shortDate } = formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request2.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request2.headers[TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash(request2, this.sha256); + if (!hasHeader(SHA256_HEADER, request2.headers) && this.applyChecksum) { + request2.headers[SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders(request2, unsignableHeaders, signableHeaders); + const signature = await this.getSignature( + longDate, + scope, + this.getSigningKey(credentials, region, shortDate, signingService), + this.createCanonicalRequest(request2, canonicalHeaders, payloadHash) + ); + request2.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`; + return request2; + } + createCanonicalRequest(request2, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request2.method} +${this.getCanonicalPath(request2)} +${getCanonicalQuery(request2)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} + +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest) { + const hash = new this.sha256(); + hash.update((0, import_util_utf84.toUint8Array)(canonicalRequest)); + const hashedRequest = await hash.digest(); + return `${ALGORITHM_IDENTIFIER} +${longDate} +${credentialScope} +${(0, import_util_hex_encoding.toHex)(hashedRequest)}`; + } + getCanonicalPath({ path }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path.split("/")) { + if ((pathSegment == null ? void 0 : pathSegment.length) === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } else { + normalizedPathSegments.push(pathSegment); + } + } + const normalizedPath = `${(path == null ? void 0 : path.startsWith("/")) ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && (path == null ? void 0 : path.endsWith("/")) ? "/" : ""}`; + const doubleEncoded = (0, import_util_uri_escape.escapeUri)(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); } - result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); + return path; } - return result; - } - function minimizeSupportedMimeType(mimeType) { - switch (mimeType.essence) { - case "application/ecmascript": - case "application/javascript": - case "application/x-ecmascript": - case "application/x-javascript": - case "text/ecmascript": - case "text/javascript": - case "text/javascript1.0": - case "text/javascript1.1": - case "text/javascript1.2": - case "text/javascript1.3": - case "text/javascript1.4": - case "text/javascript1.5": - case "text/jscript": - case "text/livescript": - case "text/x-ecmascript": - case "text/x-javascript": - return "text/javascript"; - case "application/json": - case "text/json": - return "application/json"; - case "image/svg+xml": - return "image/svg+xml"; - case "text/xml": - case "application/xml": - return "application/xml"; + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest); + const hash = new this.sha256(await keyPromise); + hash.update((0, import_util_utf84.toUint8Array)(stringToSign)); + return (0, import_util_hex_encoding.toHex)(await hash.digest()); } - if (mimeType.subtype.endsWith("+json")) { - return "application/json"; + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); } - if (mimeType.subtype.endsWith("+xml")) { - return "application/xml"; + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || // @ts-expect-error: Property 'accessKeyId' does not exist on type 'object'.ts(2339) + typeof credentials.accessKeyId !== "string" || // @ts-expect-error: Property 'secretAccessKey' does not exist on type 'object'.ts(2339) + typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } } - return ""; - } - module2.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType, - removeChars, - removeHTTPWhitespace, - minimizeSupportedMimeType, - HTTP_TOKEN_CODEPOINTS, - isomorphicDecode }; + __name(_SignatureV4, "SignatureV4"); + var SignatureV42 = _SignatureV4; + var formatDate = /* @__PURE__ */ __name((now) => { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8) + }; + }, "formatDate"); + var getCanonicalHeaderList = /* @__PURE__ */ __name((headers) => Object.keys(headers).sort().join(";"), "getCanonicalHeaderList"); } }); -// node_modules/undici/lib/web/fetch/webidl.js -var require_webidl2 = __commonJS({ - "node_modules/undici/lib/web/fetch/webidl.js"(exports2, module2) { - "use strict"; - var { types, inspect } = require("node:util"); - var { toUSVString } = require_util8(); - var webidl = {}; - webidl.converters = {}; - webidl.util = {}; - webidl.errors = {}; - webidl.errors.exception = function(message) { - return new TypeError(`${message.header}: ${message.message}`); - }; - webidl.errors.conversionFailed = function(context) { - const plural = context.types.length === 1 ? "" : " one of"; - const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; - return webidl.errors.exception({ - header: context.prefix, - message - }); - }; - webidl.errors.invalidArgument = function(context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }); - }; - webidl.brandCheck = function(V, I, opts) { - if (opts?.strict !== false) { - if (!(V instanceof I)) { - const err = new TypeError("Illegal invocation"); - err.code = "ERR_INVALID_THIS"; - throw err; +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +var import_signature_v4, resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config; +var init_resolveAwsSdkSigV4Config = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"() { + init_dist_es(); + import_signature_v4 = __toESM(require_dist_cjs35()); + resolveAwsSdkSigV4Config = (config) => { + let normalizedCreds; + if (config.credentials) { + normalizedCreds = memoizeIdentityProvider(config.credentials, isIdentityExpired, doesIdentityRequireRefresh); + } + if (!normalizedCreds) { + if (config.credentialDefaultProvider) { + normalizedCreds = normalizeProvider(config.credentialDefaultProvider(Object.assign({}, config, { + parentClientConfig: config + }))); + } else { + normalizedCreds = async () => { + throw new Error("`credentials` is missing"); + }; } + } + const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config; + let signer; + if (config.signer) { + signer = normalizeProvider(config.signer); + } else if (config.regionInfoProvider) { + signer = () => normalizeProvider(config.region)().then(async (region) => [ + await config.regionInfoProvider(region, { + useFipsEndpoint: await config.useFipsEndpoint(), + useDualstackEndpoint: await config.useDualstackEndpoint() + }) || {}, + region + ]).then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config.signingRegion = config.signingRegion || signingRegion || region; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); + }); } else { - if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { - const err = new TypeError("Illegal invocation"); - err.code = "ERR_INVALID_THIS"; - throw err; + signer = async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config.signingName || config.defaultSigningName, + signingRegion: await normalizeProvider(config.region)(), + properties: {} + }, authScheme); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config.signingRegion = config.signingRegion || signingRegion; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); + }; + } + return { + ...config, + systemClockOffset, + signingEscapePath, + credentials: normalizedCreds, + signer + }; + }; + resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +var init_aws_sdk = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js"() { + init_AwsSdkSigV4Signer(); + init_AwsSdkSigV4ASigner(); + init_resolveAwsSdkSigV4AConfig(); + init_resolveAwsSdkSigV4Config(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js +var init_httpAuthSchemes2 = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js"() { + init_aws_sdk(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js +var _toStr, _toBool, _toNum; +var init_coercing_serializers = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js"() { + _toStr = (val2) => { + if (val2 == null) { + return val2; + } + if (typeof val2 === "number" || typeof val2 === "bigint") { + const warning = new Error(`Received number ${val2} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val2); + } + if (typeof val2 === "boolean") { + const warning = new Error(`Received boolean ${val2} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val2); + } + return val2; + }; + _toBool = (val2) => { + if (val2 == null) { + return val2; + } + if (typeof val2 === "number") { + } + if (typeof val2 === "string") { + const lowercase = val2.toLowerCase(); + if (val2 !== "" && lowercase !== "false" && lowercase !== "true") { + const warning = new Error(`Received string "${val2}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); } + return val2 !== "" && lowercase !== "false"; } + return val2; }; - webidl.argumentLengthCheck = function({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, - header: ctx - }); + _toNum = (val2) => { + if (val2 == null) { + return val2; } + if (typeof val2 === "boolean") { + } + if (typeof val2 === "string") { + const num = Number(val2); + if (num.toString() !== val2) { + const warning = new Error(`Received string "${val2}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); + return val2; + } + return num; + } + return val2; }; - webidl.illegalConstructor = function() { - throw webidl.errors.exception({ - header: "TypeError", - message: "Illegal constructor" - }); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js +var import_smithy_client2, awsExpectUnion; +var init_awsExpectUnion = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"() { + import_smithy_client2 = __toESM(require_dist_cjs32()); + awsExpectUnion = (value) => { + if (value == null) { + return void 0; + } + if (typeof value === "object" && "__type" in value) { + delete value.__type; + } + return (0, import_smithy_client2.expectUnion)(value); }; - webidl.util.Type = function(V) { - switch (typeof V) { - case "undefined": - return "Undefined"; - case "boolean": - return "Boolean"; - case "string": - return "String"; - case "symbol": - return "Symbol"; - case "number": - return "Number"; - case "bigint": - return "BigInt"; - case "function": - case "object": { - if (V === null) { - return "Null"; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js +var import_smithy_client3, collectBodyString; +var init_common = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() { + import_smithy_client3 = __toESM(require_dist_cjs32()); + collectBodyString = (streamBody, context) => (0, import_smithy_client3.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +var parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode; +var init_parseJsonBody = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() { + init_common(); + parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + try { + return JSON.parse(encoded); + } catch (e) { + if (e?.name === "SyntaxError") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded + }); } - return "Object"; + throw e; } } + return {}; + }); + parseJsonErrorBody = async (errorBody, context) => { + const value = await parseJsonBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; }; - webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { - let upperBound; - let lowerBound; - if (bitLength === 64) { - upperBound = Math.pow(2, 53) - 1; - if (signedness === "unsigned") { - lowerBound = 0; - } else { - lowerBound = Math.pow(-2, 53) + 1; + loadRestJsonErrorCode = (output, data) => { + const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); } - } else if (signedness === "unsigned") { - lowerBound = 0; - upperBound = Math.pow(2, bitLength) - 1; - } else { - lowerBound = Math.pow(-2, bitLength) - 1; - upperBound = Math.pow(2, bitLength - 1) - 1; - } - let x = Number(V); - if (x === 0) { - x = 0; - } - if (opts?.enforceRange === true) { - if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { - throw webidl.errors.exception({ - header: "Integer conversion", - message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` - }); + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; } - x = webidl.util.IntegerPart(x); - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: "Integer conversion", - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }); + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; } - return x; - } - if (!Number.isNaN(x) && opts?.clamp === true) { - x = Math.min(Math.max(x, lowerBound), upperBound); - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x); - } else { - x = Math.ceil(x); + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; } - return x; + return cleanValue; + }; + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== void 0) { + return sanitizeErrorCode(output.headers[headerKey]); } - if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { - return 0; + if (data.code !== void 0) { + return sanitizeErrorCode(data.code); } - x = webidl.util.IntegerPart(x); - x = x % Math.pow(2, bitLength); - if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength); + if (data["__type"] !== void 0) { + return sanitizeErrorCode(data["__type"]); } - return x; }; - webidl.util.IntegerPart = function(n) { - const r = Math.floor(Math.abs(n)); - if (n < 0) { - return -1 * r; + } +}); + +// node_modules/fast-xml-parser/src/util.js +var require_util8 = __commonJS({ + "node_modules/fast-xml-parser/src/util.js"(exports2) { + "use strict"; + var nameStartChar = ":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"; + var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; + var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; + var regexName = new RegExp("^" + nameRegexp + "$"); + var getAllMatches = function(string, regex) { + const matches = []; + let match = regex.exec(string); + while (match) { + const allmatches = []; + allmatches.startIndex = regex.lastIndex - match[0].length; + const len = match.length; + for (let index = 0; index < len; index++) { + allmatches.push(match[index]); + } + matches.push(allmatches); + match = regex.exec(string); + } + return matches; + }; + var isName = function(string) { + const match = regexName.exec(string); + return !(match === null || typeof match === "undefined"); + }; + exports2.isExist = function(v) { + return typeof v !== "undefined"; + }; + exports2.isEmptyObject = function(obj) { + return Object.keys(obj).length === 0; + }; + exports2.merge = function(target, a, arrayMode) { + if (a) { + const keys = Object.keys(a); + const len = keys.length; + for (let i = 0; i < len; i++) { + if (arrayMode === "strict") { + target[keys[i]] = [a[keys[i]]]; + } else { + target[keys[i]] = a[keys[i]]; + } + } } - return r; }; - webidl.util.Stringify = function(V) { - const type = webidl.util.Type(V); - switch (type) { - case "Symbol": - return `Symbol(${V.description})`; - case "Object": - return inspect(V); - case "String": - return `"${V}"`; - default: - return `${V}`; + exports2.getValue = function(v) { + if (exports2.isExist(v)) { + return v; + } else { + return ""; } }; - webidl.sequenceConverter = function(converter) { - return (V, prefix, argument, Iterable) => { - if (webidl.util.Type(V) !== "Object") { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` - }); + exports2.isName = isName; + exports2.getAllMatches = getAllMatches; + exports2.nameRegexp = nameRegexp; + } +}); + +// node_modules/fast-xml-parser/src/validator.js +var require_validator = __commonJS({ + "node_modules/fast-xml-parser/src/validator.js"(exports2) { + "use strict"; + var util = require_util8(); + var defaultOptions = { + allowBooleanAttributes: false, + //A tag can have attributes without any value + unpairedTags: [] + }; + exports2.validate = function(xmlData, options) { + options = Object.assign({}, defaultOptions, options); + const tags = []; + let tagFound = false; + let reachedRoot = false; + if (xmlData[0] === "\uFEFF") { + xmlData = xmlData.substr(1); + } + for (let i = 0; i < xmlData.length; i++) { + if (xmlData[i] === "<" && xmlData[i + 1] === "?") { + i += 2; + i = readPI(xmlData, i); + if (i.err) return i; + } else if (xmlData[i] === "<") { + let tagStartPos = i; + i++; + if (xmlData[i] === "!") { + i = readCommentAndCDATA(xmlData, i); + continue; + } else { + let closingTag = false; + if (xmlData[i] === "/") { + closingTag = true; + i++; + } + let tagName = ""; + for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { + tagName += xmlData[i]; + } + tagName = tagName.trim(); + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substring(0, tagName.length - 1); + i--; + } + if (!validateTagName(tagName)) { + let msg; + if (tagName.trim().length === 0) { + msg = "Invalid space after '<'."; + } else { + msg = "Tag '" + tagName + "' is an invalid name."; + } + return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); + } + const result = readAttributeStr(xmlData, i); + if (result === false) { + return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); + } + let attrStr = result.value; + i = result.index; + if (attrStr[attrStr.length - 1] === "/") { + const attrStrStart = i - attrStr.length; + attrStr = attrStr.substring(0, attrStr.length - 1); + const isValid = validateAttributeString(attrStr, options); + if (isValid === true) { + tagFound = true; + } else { + return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); + } + } else if (closingTag) { + if (!result.tagClosed) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); + } else if (attrStr.trim().length > 0) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); + } else if (tags.length === 0) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); + } else { + const otg = tags.pop(); + if (tagName !== otg.tagName) { + let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); + return getErrorObject( + "InvalidTag", + "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", + getLineNumberForPosition(xmlData, tagStartPos) + ); + } + if (tags.length == 0) { + reachedRoot = true; + } + } + } else { + const isValid = validateAttributeString(attrStr, options); + if (isValid !== true) { + return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); + } + if (reachedRoot === true) { + return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); + } else if (options.unpairedTags.indexOf(tagName) !== -1) { + } else { + tags.push({ tagName, tagStartPos }); + } + tagFound = true; + } + for (i++; i < xmlData.length; i++) { + if (xmlData[i] === "<") { + if (xmlData[i + 1] === "!") { + i++; + i = readCommentAndCDATA(xmlData, i); + continue; + } else if (xmlData[i + 1] === "?") { + i = readPI(xmlData, ++i); + if (i.err) return i; + } else { + break; + } + } else if (xmlData[i] === "&") { + const afterAmp = validateAmpersand(xmlData, i); + if (afterAmp == -1) + return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); + i = afterAmp; + } else { + if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { + return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); + } + } + } + if (xmlData[i] === "<") { + i--; + } + } + } else { + if (isWhiteSpace(xmlData[i])) { + continue; + } + return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); } - const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); - const seq = []; - let index = 0; - if (method === void 0 || typeof method.next !== "function") { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is not iterable.` - }); + } + if (!tagFound) { + return getErrorObject("InvalidXml", "Start tag expected.", 1); + } else if (tags.length == 1) { + return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); + } else if (tags.length > 0) { + return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); + } + return true; + }; + function isWhiteSpace(char) { + return char === " " || char === " " || char === "\n" || char === "\r"; + } + function readPI(xmlData, i) { + const start = i; + for (; i < xmlData.length; i++) { + if (xmlData[i] == "?" || xmlData[i] == " ") { + const tagname = xmlData.substr(start, i - start); + if (i > 5 && tagname === "xml") { + return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); + } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { + i++; + break; + } else { + continue; + } } - while (true) { - const { done, value } = method.next(); - if (done) { + } + return i; + } + function readCommentAndCDATA(xmlData, i) { + if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { + for (i += 3; i < xmlData.length; i++) { + if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { + i += 2; break; } - seq.push(converter(value, prefix, `${argument}[${index++}]`)); } - return seq; - }; - }; - webidl.recordConverter = function(keyConverter, valueConverter) { - return (O, prefix, argument) => { - if (webidl.util.Type(O) !== "Object") { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` - }); + } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { + let angleBracketsCount = 1; + for (i += 8; i < xmlData.length; i++) { + if (xmlData[i] === "<") { + angleBracketsCount++; + } else if (xmlData[i] === ">") { + angleBracketsCount--; + if (angleBracketsCount === 0) { + break; + } + } } - const result = {}; - if (!types.isProxy(O)) { - const keys2 = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; - for (const key of keys2) { - const typedKey = keyConverter(key, prefix, argument); - const typedValue = valueConverter(O[key], prefix, argument); - result[typedKey] = typedValue; + } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { + for (i += 8; i < xmlData.length; i++) { + if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { + i += 2; + break; } - return result; } - const keys = Reflect.ownKeys(O); - for (const key of keys) { - const desc = Reflect.getOwnPropertyDescriptor(O, key); - if (desc?.enumerable) { - const typedKey = keyConverter(key, prefix, argument); - const typedValue = valueConverter(O[key], prefix, argument); - result[typedKey] = typedValue; + } + return i; + } + var doubleQuote = '"'; + var singleQuote = "'"; + function readAttributeStr(xmlData, i) { + let attrStr = ""; + let startChar = ""; + let tagClosed = false; + for (; i < xmlData.length; i++) { + if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { + if (startChar === "") { + startChar = xmlData[i]; + } else if (startChar !== xmlData[i]) { + } else { + startChar = ""; + } + } else if (xmlData[i] === ">") { + if (startChar === "") { + tagClosed = true; + break; } } - return result; + attrStr += xmlData[i]; + } + if (startChar !== "") { + return false; + } + return { + value: attrStr, + index: i, + tagClosed }; - }; - webidl.interfaceConverter = function(i) { - return (V, prefix, argument, opts) => { - if (opts?.strict !== false && !(V instanceof i)) { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` - }); + } + var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function validateAttributeString(attrStr, options) { + const matches = util.getAllMatches(attrStr, validAttrStrRegxp); + const attrNames = {}; + for (let i = 0; i < matches.length; i++) { + if (matches[i][1].length === 0) { + return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); + } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { + return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); + } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { + return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); + } + const attrName = matches[i][2]; + if (!validateAttrName(attrName)) { + return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); + } + if (!attrNames.hasOwnProperty(attrName)) { + attrNames[attrName] = 1; + } else { + return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); + } + } + return true; + } + function validateNumberAmpersand(xmlData, i) { + let re = /\d/; + if (xmlData[i] === "x") { + i++; + re = /[\da-fA-F]/; + } + for (; i < xmlData.length; i++) { + if (xmlData[i] === ";") + return i; + if (!xmlData[i].match(re)) + break; + } + return -1; + } + function validateAmpersand(xmlData, i) { + i++; + if (xmlData[i] === ";") + return -1; + if (xmlData[i] === "#") { + i++; + return validateNumberAmpersand(xmlData, i); + } + let count = 0; + for (; i < xmlData.length; i++, count++) { + if (xmlData[i].match(/\w/) && count < 20) + continue; + if (xmlData[i] === ";") + break; + return -1; + } + return i; + } + function getErrorObject(code, message, lineNumber) { + return { + err: { + code, + msg: message, + line: lineNumber.line || lineNumber, + col: lineNumber.col } - return V; }; - }; - webidl.dictionaryConverter = function(converters) { - return (dictionary, prefix, argument) => { - const type = webidl.util.Type(dictionary); - const dict = {}; - if (type === "Null" || type === "Undefined") { - return dict; - } else if (type !== "Object") { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }); + } + function validateAttrName(attrName) { + return util.isName(attrName); + } + function validateTagName(tagname) { + return util.isName(tagname); + } + function getLineNumberForPosition(xmlData, index) { + const lines = xmlData.substring(0, index).split(/\r?\n/); + return { + line: lines.length, + // column number is last line's length + 1, because column numbering starts at 1: + col: lines[lines.length - 1].length + 1 + }; + } + function getPositionFromMatch(match) { + return match.startIndex + match[1].length; + } + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +var require_OptionsBuilder = __commonJS({ + "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { + var defaultOptions = { + preserveOrder: false, + attributeNamePrefix: "@_", + attributesGroupName: false, + textNodeName: "#text", + ignoreAttributes: true, + removeNSPrefix: false, + // remove NS from tag name or attribute name if true + allowBooleanAttributes: false, + //a tag can have attributes without any value + //ignoreRootElement : false, + parseTagValue: true, + parseAttributeValue: false, + trimValues: true, + //Trim string values of tag and attributes + cdataPropName: false, + numberParseOptions: { + hex: true, + leadingZeros: true, + eNotation: true + }, + tagValueProcessor: function(tagName, val2) { + return val2; + }, + attributeValueProcessor: function(attrName, val2) { + return val2; + }, + stopNodes: [], + //nested tags will not be parsed even for errors + alwaysCreateTextNode: false, + isArray: () => false, + commentPropName: false, + unpairedTags: [], + processEntities: true, + htmlEntities: false, + ignoreDeclaration: false, + ignorePiTags: false, + transformTagName: false, + transformAttributeName: false, + updateTag: function(tagName, jPath, attrs) { + return tagName; + } + // skipEmptyListItem: false + }; + var buildOptions = function(options) { + return Object.assign({}, defaultOptions, options); + }; + exports2.buildOptions = buildOptions; + exports2.defaultOptions = defaultOptions; + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +var require_xmlNode = __commonJS({ + "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { + "use strict"; + var XmlNode = class { + constructor(tagname) { + this.tagname = tagname; + this.child = []; + this[":@"] = {}; + } + add(key, val2) { + if (key === "__proto__") key = "#__proto__"; + this.child.push({ [key]: val2 }); + } + addChild(node) { + if (node.tagname === "__proto__") node.tagname = "#__proto__"; + if (node[":@"] && Object.keys(node[":@"]).length > 0) { + this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); + } else { + this.child.push({ [node.tagname]: node.child }); } - for (const options of converters) { - const { key, defaultValue, required, converter } = options; - if (required === true) { - if (!Object.hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: prefix, - message: `Missing required key "${key}".` - }); + } + }; + module2.exports = XmlNode; + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +var require_DocTypeReader = __commonJS({ + "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { + var util = require_util8(); + function readDocType(xmlData, i) { + const entities = {}; + if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { + i = i + 9; + let angleBracketsCount = 1; + let hasBody = false, comment = false; + let exp = ""; + for (; i < xmlData.length; i++) { + if (xmlData[i] === "<" && !comment) { + if (hasBody && isEntity(xmlData, i)) { + i += 7; + [entityName, val, i] = readEntityExp(xmlData, i + 1); + if (val.indexOf("&") === -1) + entities[validateEntityName(entityName)] = { + regx: RegExp(`&${entityName};`, "g"), + val + }; + } else if (hasBody && isElement(xmlData, i)) i += 8; + else if (hasBody && isAttlist(xmlData, i)) i += 8; + else if (hasBody && isNotation(xmlData, i)) i += 9; + else if (isComment) comment = true; + else throw new Error("Invalid DOCTYPE"); + angleBracketsCount++; + exp = ""; + } else if (xmlData[i] === ">") { + if (comment) { + if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { + comment = false; + angleBracketsCount--; + } + } else { + angleBracketsCount--; } - } - let value = dictionary[key]; - const hasDefault = Object.hasOwn(options, "defaultValue"); - if (hasDefault && value !== null) { - value ??= defaultValue(); - } - if (required || hasDefault || value !== void 0) { - value = converter(value, prefix, `${argument}.${key}`); - if (options.allowedValues && !options.allowedValues.includes(value)) { - throw webidl.errors.exception({ - header: prefix, - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` - }); + if (angleBracketsCount === 0) { + break; } - dict[key] = value; + } else if (xmlData[i] === "[") { + hasBody = true; + } else { + exp += xmlData[i]; } } - return dict; - }; - }; - webidl.nullableConverter = function(converter) { - return (V, prefix, argument) => { - if (V === null) { - return V; + if (angleBracketsCount !== 0) { + throw new Error(`Unclosed DOCTYPE`); } - return converter(V, prefix, argument); - }; - }; - webidl.converters.DOMString = function(V, prefix, argument, opts) { - if (V === null && opts?.legacyNullToEmptyString) { - return ""; + } else { + throw new Error(`Invalid Tag instead of DOCTYPE`); } - if (typeof V === "symbol") { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a DOMString.` - }); + return { entities, i }; + } + function readEntityExp(xmlData, i) { + let entityName2 = ""; + for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { + entityName2 += xmlData[i]; } - return String(V); - }; - webidl.converters.ByteString = function(V, prefix, argument) { - const x = webidl.converters.DOMString(V, prefix, argument); - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError( - `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` - ); + entityName2 = entityName2.trim(); + if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); + const startChar = xmlData[i++]; + let val2 = ""; + for (; i < xmlData.length && xmlData[i] !== startChar; i++) { + val2 += xmlData[i]; + } + return [entityName2, val2, i]; + } + function isComment(xmlData, i) { + if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; + return false; + } + function isEntity(xmlData, i) { + if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; + return false; + } + function isElement(xmlData, i) { + if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; + return false; + } + function isAttlist(xmlData, i) { + if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; + return false; + } + function isNotation(xmlData, i) { + if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; + return false; + } + function validateEntityName(name) { + if (util.isName(name)) + return name; + else + throw new Error(`Invalid entity name ${name}`); + } + module2.exports = readDocType; + } +}); + +// node_modules/strnum/strnum.js +var require_strnum = __commonJS({ + "node_modules/strnum/strnum.js"(exports2, module2) { + var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; + var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; + if (!Number.parseInt && window.parseInt) { + Number.parseInt = window.parseInt; + } + if (!Number.parseFloat && window.parseFloat) { + Number.parseFloat = window.parseFloat; + } + var consider = { + hex: true, + leadingZeros: true, + decimalPoint: ".", + eNotation: true + //skipLike: /regex/ + }; + function toNumber(str, options = {}) { + options = Object.assign({}, consider, options); + if (!str || typeof str !== "string") return str; + let trimmedStr = str.trim(); + if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str; + else if (options.hex && hexRegex.test(trimmedStr)) { + return Number.parseInt(trimmedStr, 16); + } else { + const match = numRegex.exec(trimmedStr); + if (match) { + const sign = match[1]; + const leadingZeros = match[2]; + let numTrimmedByZeros = trimZeros(match[3]); + const eNotation = match[4] || match[6]; + if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str; + else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str; + else { + const num = Number(trimmedStr); + const numStr = "" + num; + if (numStr.search(/[eE]/) !== -1) { + if (options.eNotation) return num; + else return str; + } else if (eNotation) { + if (options.eNotation) return num; + else return str; + } else if (trimmedStr.indexOf(".") !== -1) { + if (numStr === "0" && numTrimmedByZeros === "") return num; + else if (numStr === numTrimmedByZeros) return num; + else if (sign && numStr === "-" + numTrimmedByZeros) return num; + else return str; + } + if (leadingZeros) { + if (numTrimmedByZeros === numStr) return num; + else if (sign + numTrimmedByZeros === numStr) return num; + else return str; + } + if (trimmedStr === numStr) return num; + else if (trimmedStr === sign + numStr) return num; + return str; + } + } else { + return str; } } - return x; - }; - webidl.converters.USVString = toUSVString; - webidl.converters.boolean = function(V) { - const x = Boolean(V); - return x; - }; - webidl.converters.any = function(V) { - return V; - }; - webidl.converters["long long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); - return x; - }; - webidl.converters["unsigned long long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); - return x; - }; - webidl.converters["unsigned long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); - return x; - }; - webidl.converters["unsigned short"] = function(V, prefix, argument, opts) { - const x = webidl.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); - return x; - }; - webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isAnyArrayBuffer(V)) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ["ArrayBuffer"] - }); + } + function trimZeros(numStr) { + if (numStr && numStr.indexOf(".") !== -1) { + numStr = numStr.replace(/0+$/, ""); + if (numStr === ".") numStr = "0"; + else if (numStr[0] === ".") numStr = "0" + numStr; + else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); + return numStr; } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); + return numStr; + } + module2.exports = toNumber; + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +var require_OrderedObjParser = __commonJS({ + "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { + "use strict"; + var util = require_util8(); + var xmlNode = require_xmlNode(); + var readDocType = require_DocTypeReader(); + var toNumber = require_strnum(); + var OrderedObjParser = class { + constructor(options) { + this.options = options; + this.currentNode = null; + this.tagsNodeStack = []; + this.docTypeEntities = {}; + this.lastEntities = { + "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, + "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, + "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, + "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } + }; + this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; + this.htmlEntities = { + "space": { regex: /&(nbsp|#160);/g, val: " " }, + // "lt" : { regex: /&(lt|#60);/g, val: "<" }, + // "gt" : { regex: /&(gt|#62);/g, val: ">" }, + // "amp" : { regex: /&(amp|#38);/g, val: "&" }, + // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, + // "apos" : { regex: /&(apos|#39);/g, val: "'" }, + "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, + "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, + "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, + "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, + "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, + "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, + "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, + "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 10)) }, + "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 16)) } + }; + this.addExternalEntities = addExternalEntities; + this.parseXml = parseXml; + this.parseTextData = parseTextData; + this.resolveNameSpace = resolveNameSpace; + this.buildAttributesMap = buildAttributesMap; + this.isItStopNode = isItStopNode; + this.replaceEntitiesValue = replaceEntitiesValue; + this.readStopNodeData = readStopNodeData; + this.saveTextToParentTag = saveTextToParentTag; + this.addChild = addChild; + } + }; + function addExternalEntities(externalEntities) { + const entKeys = Object.keys(externalEntities); + for (let i = 0; i < entKeys.length; i++) { + const ent = entKeys[i]; + this.lastEntities[ent] = { + regex: new RegExp("&" + ent + ";", "g"), + val: externalEntities[ent] + }; } - if (V.resizable || V.growable) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "Received a resizable ArrayBuffer." - }); + } + function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { + if (val2 !== void 0) { + if (this.options.trimValues && !dontTrim) { + val2 = val2.trim(); + } + if (val2.length > 0) { + if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); + const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); + if (newval === null || newval === void 0) { + return val2; + } else if (typeof newval !== typeof val2 || newval !== val2) { + return newval; + } else if (this.options.trimValues) { + return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); + } else { + const trimmedVal = val2.trim(); + if (trimmedVal === val2) { + return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); + } else { + return val2; + } + } + } } - return V; - }; - webidl.converters.TypedArray = function(V, T, prefix, name, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isTypedArray(V) || V.constructor.name !== T.name) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: [T.name] - }); - } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); - } - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "Received a resizable ArrayBuffer." - }); + } + function resolveNameSpace(tagname) { + if (this.options.removeNSPrefix) { + const tags = tagname.split(":"); + const prefix = tagname.charAt(0) === "/" ? "/" : ""; + if (tags[0] === "xmlns") { + return ""; + } + if (tags.length === 2) { + tagname = prefix + tags[1]; + } + } + return tagname; + } + var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function buildAttributesMap(attrStr, jPath, tagName) { + if (!this.options.ignoreAttributes && typeof attrStr === "string") { + const matches = util.getAllMatches(attrStr, attrsRegx); + const len = matches.length; + const attrs = {}; + for (let i = 0; i < len; i++) { + const attrName = this.resolveNameSpace(matches[i][1]); + let oldVal = matches[i][4]; + let aName = this.options.attributeNamePrefix + attrName; + if (attrName.length) { + if (this.options.transformAttributeName) { + aName = this.options.transformAttributeName(aName); + } + if (aName === "__proto__") aName = "#__proto__"; + if (oldVal !== void 0) { + if (this.options.trimValues) { + oldVal = oldVal.trim(); + } + oldVal = this.replaceEntitiesValue(oldVal); + const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); + if (newVal === null || newVal === void 0) { + attrs[aName] = oldVal; + } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { + attrs[aName] = newVal; + } else { + attrs[aName] = parseValue( + oldVal, + this.options.parseAttributeValue, + this.options.numberParseOptions + ); + } + } else if (this.options.allowBooleanAttributes) { + attrs[aName] = true; + } + } + } + if (!Object.keys(attrs).length) { + return; + } + if (this.options.attributesGroupName) { + const attrCollection = {}; + attrCollection[this.options.attributesGroupName] = attrs; + return attrCollection; + } + return attrs; + } + } + var parseXml = function(xmlData) { + xmlData = xmlData.replace(/\r\n?/g, "\n"); + const xmlObj = new xmlNode("!xml"); + let currentNode = xmlObj; + let textData = ""; + let jPath = ""; + for (let i = 0; i < xmlData.length; i++) { + const ch = xmlData[i]; + if (ch === "<") { + if (xmlData[i + 1] === "/") { + const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); + let tagName = xmlData.substring(i + 2, closeIndex).trim(); + if (this.options.removeNSPrefix) { + const colonIndex = tagName.indexOf(":"); + if (colonIndex !== -1) { + tagName = tagName.substr(colonIndex + 1); + } + } + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + if (currentNode) { + textData = this.saveTextToParentTag(textData, currentNode, jPath); + } + const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); + if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { + throw new Error(`Unpaired tag can not be used as closing tag: `); + } + let propIndex = 0; + if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { + propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); + this.tagsNodeStack.pop(); + } else { + propIndex = jPath.lastIndexOf("."); + } + jPath = jPath.substring(0, propIndex); + currentNode = this.tagsNodeStack.pop(); + textData = ""; + i = closeIndex; + } else if (xmlData[i + 1] === "?") { + let tagData = readTagExp(xmlData, i, false, "?>"); + if (!tagData) throw new Error("Pi Tag is not closed."); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { + } else { + const childNode = new xmlNode(tagData.tagName); + childNode.add(this.options.textNodeName, ""); + if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); + } + this.addChild(currentNode, childNode, jPath); + } + i = tagData.closeIndex + 1; + } else if (xmlData.substr(i + 1, 3) === "!--") { + const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const comment = xmlData.substring(i + 4, endIndex - 2); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); + } + i = endIndex; + } else if (xmlData.substr(i + 1, 2) === "!D") { + const result = readDocType(xmlData, i); + this.docTypeEntities = result.entities; + i = result.i; + } else if (xmlData.substr(i + 1, 2) === "![") { + const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; + const tagExp = xmlData.substring(i + 9, closeIndex); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); + if (val2 == void 0) val2 = ""; + if (this.options.cdataPropName) { + currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); + } else { + currentNode.add(this.options.textNodeName, val2); + } + i = closeIndex + 2; + } else { + let result = readTagExp(xmlData, i, this.options.removeNSPrefix); + let tagName = result.tagName; + const rawTagName = result.rawTagName; + let tagExp = result.tagExp; + let attrExpPresent = result.attrExpPresent; + let closeIndex = result.closeIndex; + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + if (currentNode && textData) { + if (currentNode.tagname !== "!xml") { + textData = this.saveTextToParentTag(textData, currentNode, jPath, false); + } + } + const lastTag = currentNode; + if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { + currentNode = this.tagsNodeStack.pop(); + jPath = jPath.substring(0, jPath.lastIndexOf(".")); + } + if (tagName !== xmlObj.tagname) { + jPath += jPath ? "." + tagName : tagName; + } + if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { + let tagContent = ""; + if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substr(0, tagName.length - 1); + jPath = jPath.substr(0, jPath.length - 1); + tagExp = tagName; + } else { + tagExp = tagExp.substr(0, tagExp.length - 1); + } + i = result.closeIndex; + } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { + i = result.closeIndex; + } else { + const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); + if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); + i = result2.i; + tagContent = result2.tagContent; + } + const childNode = new xmlNode(tagName); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + if (tagContent) { + tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); + } + jPath = jPath.substr(0, jPath.lastIndexOf(".")); + childNode.add(this.options.textNodeName, tagContent); + this.addChild(currentNode, childNode, jPath); + } else { + if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substr(0, tagName.length - 1); + jPath = jPath.substr(0, jPath.length - 1); + tagExp = tagName; + } else { + tagExp = tagExp.substr(0, tagExp.length - 1); + } + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + const childNode = new xmlNode(tagName); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + this.addChild(currentNode, childNode, jPath); + jPath = jPath.substr(0, jPath.lastIndexOf(".")); + } else { + const childNode = new xmlNode(tagName); + this.tagsNodeStack.push(currentNode); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + this.addChild(currentNode, childNode, jPath); + currentNode = childNode; + } + textData = ""; + i = closeIndex; + } + } + } else { + textData += xmlData[i]; + } } - return V; + return xmlObj.child; }; - webidl.converters.DataView = function(V, prefix, name, opts) { - if (webidl.util.Type(V) !== "Object" || !types.isDataView(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${name} is not a DataView.` - }); - } - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "SharedArrayBuffer is not allowed." - }); + function addChild(currentNode, childNode, jPath) { + const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); + if (result === false) { + } else if (typeof result === "string") { + childNode.tagname = result; + currentNode.addChild(childNode); + } else { + currentNode.addChild(childNode); } - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: "ArrayBuffer", - message: "Received a resizable ArrayBuffer." - }); + } + var replaceEntitiesValue = function(val2) { + if (this.options.processEntities) { + for (let entityName2 in this.docTypeEntities) { + const entity = this.docTypeEntities[entityName2]; + val2 = val2.replace(entity.regx, entity.val); + } + for (let entityName2 in this.lastEntities) { + const entity = this.lastEntities[entityName2]; + val2 = val2.replace(entity.regex, entity.val); + } + if (this.options.htmlEntities) { + for (let entityName2 in this.htmlEntities) { + const entity = this.htmlEntities[entityName2]; + val2 = val2.replace(entity.regex, entity.val); + } + } + val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); } - return V; + return val2; }; - webidl.converters.BufferSource = function(V, prefix, name, opts) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }); + function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { + if (textData) { + if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; + textData = this.parseTextData( + textData, + currentNode.tagname, + jPath, + false, + currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, + isLeafNode + ); + if (textData !== void 0 && textData !== "") + currentNode.add(this.options.textNodeName, textData); + textData = ""; } - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }); + return textData; + } + function isItStopNode(stopNodes, jPath, currentTagName) { + const allNodesExp = "*." + currentTagName; + for (const stopNodePath in stopNodes) { + const stopNodeExp = stopNodes[stopNodePath]; + if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; } - if (types.isDataView(V)) { - return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }); + return false; + } + function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { + let attrBoundary; + let tagExp = ""; + for (let index = i; index < xmlData.length; index++) { + let ch = xmlData[index]; + if (attrBoundary) { + if (ch === attrBoundary) attrBoundary = ""; + } else if (ch === '"' || ch === "'") { + attrBoundary = ch; + } else if (ch === closingChar[0]) { + if (closingChar[1]) { + if (xmlData[index + 1] === closingChar[1]) { + return { + data: tagExp, + index + }; + } + } else { + return { + data: tagExp, + index + }; + } + } else if (ch === " ") { + ch = " "; + } + tagExp += ch; } - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: ["BufferSource"] - }); - }; - webidl.converters["sequence"] = webidl.sequenceConverter( - webidl.converters.ByteString - ); - webidl.converters["sequence>"] = webidl.sequenceConverter( - webidl.converters["sequence"] - ); - webidl.converters["record"] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString - ); - module2.exports = { - webidl - }; - } -}); - -// node_modules/undici/lib/web/fetch/util.js -var require_util9 = __commonJS({ - "node_modules/undici/lib/web/fetch/util.js"(exports2, module2) { - "use strict"; - var { Transform } = require("node:stream"); - var zlib = require("node:zlib"); - var { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants8(); - var { getGlobalOrigin } = require_global3(); - var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); - var { performance: performance2 } = require("node:perf_hooks"); - var { isBlobLike, ReadableStreamFrom, isValidHTTPToken } = require_util8(); - var assert = require("node:assert"); - var { isUint8Array } = require("node:util/types"); - var { webidl } = require_webidl2(); - var supportedHashes = []; - var crypto4; - try { - crypto4 = require("node:crypto"); - const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto4.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); - } catch { } - function responseURL(response) { - const urlList = response.urlList; - const length = urlList.length; - return length === 0 ? null : urlList[length - 1].toString(); + function findClosingIndex(xmlData, str, i, errMsg) { + const closingIndex = xmlData.indexOf(str, i); + if (closingIndex === -1) { + throw new Error(errMsg); + } else { + return closingIndex + str.length - 1; + } } - function responseLocationURL(response, requestFragment) { - if (!redirectStatusSet.has(response.status)) { - return null; + function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { + const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); + if (!result) return; + let tagExp = result.data; + const closeIndex = result.index; + const separatorIndex = tagExp.search(/\s/); + let tagName = tagExp; + let attrExpPresent = true; + if (separatorIndex !== -1) { + tagName = tagExp.substring(0, separatorIndex); + tagExp = tagExp.substring(separatorIndex + 1).trimStart(); } - let location = response.headersList.get("location", true); - if (location !== null && isValidHeaderValue(location)) { - if (!isValidEncodedURL(location)) { - location = normalizeBinaryStringToUtf8(location); + const rawTagName = tagName; + if (removeNSPrefix) { + const colonIndex = tagName.indexOf(":"); + if (colonIndex !== -1) { + tagName = tagName.substr(colonIndex + 1); + attrExpPresent = tagName !== result.data.substr(colonIndex + 1); } - location = new URL(location, responseURL(response)); - } - if (location && !location.hash) { - location.hash = requestFragment; } - return location; + return { + tagName, + tagExp, + closeIndex, + attrExpPresent, + rawTagName + }; } - function isValidEncodedURL(url) { - for (let i = 0; i < url.length; ++i) { - const code = url.charCodeAt(i); - if (code > 126 || // Non-US-ASCII + DEL - code < 32) { - return false; + function readStopNodeData(xmlData, tagName, i) { + const startIndex = i; + let openTagCount = 1; + for (; i < xmlData.length; i++) { + if (xmlData[i] === "<") { + if (xmlData[i + 1] === "/") { + const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); + let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); + if (closeTagName === tagName) { + openTagCount--; + if (openTagCount === 0) { + return { + tagContent: xmlData.substring(startIndex, i), + i: closeIndex + }; + } + } + i = closeIndex; + } else if (xmlData[i + 1] === "?") { + const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); + i = closeIndex; + } else if (xmlData.substr(i + 1, 3) === "!--") { + const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); + i = closeIndex; + } else if (xmlData.substr(i + 1, 2) === "![") { + const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; + i = closeIndex; + } else { + const tagData = readTagExp(xmlData, i, ">"); + if (tagData) { + const openTagName = tagData && tagData.tagName; + if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { + openTagCount++; + } + i = tagData.closeIndex; + } + } } } - return true; - } - function normalizeBinaryStringToUtf8(value) { - return Buffer.from(value, "binary").toString("utf8"); - } - function requestCurrentURL(request2) { - return request2.urlList[request2.urlList.length - 1]; } - function requestBadPort(request2) { - const url = requestCurrentURL(request2); - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return "blocked"; + function parseValue(val2, shouldParse, options) { + if (shouldParse && typeof val2 === "string") { + const newval = val2.trim(); + if (newval === "true") return true; + else if (newval === "false") return false; + else return toNumber(val2, options); + } else { + if (util.isExist(val2)) { + return val2; + } else { + return ""; + } } - return "allowed"; - } - function isErrorLike(object) { - return object instanceof Error || (object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"); } - function isValidReasonPhrase(statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i); - if (!(c === 9 || // HTAB - c >= 32 && c <= 126 || // SP / VCHAR - c >= 128 && c <= 255)) { - return false; + module2.exports = OrderedObjParser; + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/node2json.js +var require_node2json = __commonJS({ + "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { + "use strict"; + function prettify(node, options) { + return compress(node, options); + } + function compress(arr, options, jPath) { + let text; + const compressedObj = {}; + for (let i = 0; i < arr.length; i++) { + const tagObj = arr[i]; + const property = propName(tagObj); + let newJpath = ""; + if (jPath === void 0) newJpath = property; + else newJpath = jPath + "." + property; + if (property === options.textNodeName) { + if (text === void 0) text = tagObj[property]; + else text += "" + tagObj[property]; + } else if (property === void 0) { + continue; + } else if (tagObj[property]) { + let val2 = compress(tagObj[property], options, newJpath); + const isLeaf = isLeafTag(val2, options); + if (tagObj[":@"]) { + assignAttributes(val2, tagObj[":@"], newJpath, options); + } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { + val2 = val2[options.textNodeName]; + } else if (Object.keys(val2).length === 0) { + if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; + else val2 = ""; + } + if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { + if (!Array.isArray(compressedObj[property])) { + compressedObj[property] = [compressedObj[property]]; + } + compressedObj[property].push(val2); + } else { + if (options.isArray(property, newJpath, isLeaf)) { + compressedObj[property] = [val2]; + } else { + compressedObj[property] = val2; + } + } } } - return true; + if (typeof text === "string") { + if (text.length > 0) compressedObj[options.textNodeName] = text; + } else if (text !== void 0) compressedObj[options.textNodeName] = text; + return compressedObj; } - var isValidHeaderName = isValidHTTPToken; - function isValidHeaderValue(potentialValue) { - return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; + function propName(obj) { + const keys = Object.keys(obj); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (key !== ":@") return key; + } } - function setRequestReferrerPolicyOnRedirect(request2, actualResponse) { - const { headersList } = actualResponse; - const policyHeader = (headersList.get("referrer-policy", true) ?? "").split(","); - let policy = ""; - if (policyHeader.length > 0) { - for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim(); - if (referrerPolicyTokens.has(token)) { - policy = token; - break; + function assignAttributes(obj, attrMap, jpath, options) { + if (attrMap) { + const keys = Object.keys(attrMap); + const len = keys.length; + for (let i = 0; i < len; i++) { + const atrrName = keys[i]; + if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { + obj[atrrName] = [attrMap[atrrName]]; + } else { + obj[atrrName] = attrMap[atrrName]; } } } - if (policy !== "") { - request2.referrerPolicy = policy; - } } - function crossOriginResourcePolicyCheck() { - return "allowed"; - } - function corsCheck() { - return "success"; - } - function TAOCheck() { - return "success"; - } - function appendFetchMetadata(httpRequest) { - let header = null; - header = httpRequest.mode; - httpRequest.headersList.set("sec-fetch-mode", header, true); - } - function appendRequestOriginHeader(request2) { - let serializedOrigin = request2.origin; - if (serializedOrigin === "client") { - return; + function isLeafTag(obj, options) { + const { textNodeName } = options; + const propCount = Object.keys(obj).length; + if (propCount === 0) { + return true; } - if (request2.responseTainting === "cors" || request2.mode === "websocket") { - request2.headersList.append("origin", serializedOrigin, true); - } else if (request2.method !== "GET" && request2.method !== "HEAD") { - switch (request2.referrerPolicy) { - case "no-referrer": - serializedOrigin = null; - break; - case "no-referrer-when-downgrade": - case "strict-origin": - case "strict-origin-when-cross-origin": - if (request2.origin && urlHasHttpsScheme(request2.origin) && !urlHasHttpsScheme(requestCurrentURL(request2))) { - serializedOrigin = null; - } - break; - case "same-origin": - if (!sameOrigin(request2, requestCurrentURL(request2))) { - serializedOrigin = null; - } - break; - default: - } - request2.headersList.append("origin", serializedOrigin, true); + if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { + return true; } + return false; } - function coarsenTime(timestamp, crossOriginIsolatedCapability) { - return timestamp; - } - function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { - if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { - return { - domainLookupStartTime: defaultStartTime, - domainLookupEndTime: defaultStartTime, - connectionStartTime: defaultStartTime, - connectionEndTime: defaultStartTime, - secureConnectionStartTime: defaultStartTime, - ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol - }; + exports2.prettify = prettify; + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +var require_XMLParser = __commonJS({ + "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { + var { buildOptions } = require_OptionsBuilder(); + var OrderedObjParser = require_OrderedObjParser(); + var { prettify } = require_node2json(); + var validator = require_validator(); + var XMLParser2 = class { + constructor(options) { + this.externalEntities = {}; + this.options = buildOptions(options); } - return { - domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), - domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), - connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), - connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), - secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), - ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol - }; - } - function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { - return coarsenTime(performance2.now(), crossOriginIsolatedCapability); - } - function createOpaqueTimingInfo(timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - }; - } - function makePolicyContainer() { - return { - referrerPolicy: "strict-origin-when-cross-origin" - }; - } - function clonePolicyContainer(policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy - }; - } - function determineRequestsReferrer(request2) { - const policy = request2.referrerPolicy; - assert(policy); - let referrerSource = null; - if (request2.referrer === "client") { - const globalOrigin = getGlobalOrigin(); - if (!globalOrigin || globalOrigin.origin === "null") { - return "no-referrer"; + /** + * Parse XML dats to JS object + * @param {string|Buffer} xmlData + * @param {boolean|Object} validationOption + */ + parse(xmlData, validationOption) { + if (typeof xmlData === "string") { + } else if (xmlData.toString) { + xmlData = xmlData.toString(); + } else { + throw new Error("XML data is accepted in String or Bytes[] form."); } - referrerSource = new URL(globalOrigin); - } else if (request2.referrer instanceof URL) { - referrerSource = request2.referrer; + if (validationOption) { + if (validationOption === true) validationOption = {}; + const result = validator.validate(xmlData, validationOption); + if (result !== true) { + throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); + } + } + const orderedObjParser = new OrderedObjParser(this.options); + orderedObjParser.addExternalEntities(this.externalEntities); + const orderedResult = orderedObjParser.parseXml(xmlData); + if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; + else return prettify(orderedResult, this.options); } - let referrerURL = stripURLForReferrer(referrerSource); - const referrerOrigin = stripURLForReferrer(referrerSource, true); - if (referrerURL.toString().length > 4096) { - referrerURL = referrerOrigin; + /** + * Add Entity which is not by default supported by this library + * @param {string} key + * @param {string} value + */ + addEntity(key, value) { + if (value.indexOf("&") !== -1) { + throw new Error("Entity value can't have '&'"); + } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { + throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + } else if (value === "&") { + throw new Error("An entity with value '&' is not permitted"); + } else { + this.externalEntities[key] = value; + } } - const areSameOrigin = sameOrigin(request2, referrerURL); - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request2.url); - switch (policy) { - case "origin": - return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); - case "unsafe-url": - return referrerURL; - case "same-origin": - return areSameOrigin ? referrerOrigin : "no-referrer"; - case "origin-when-cross-origin": - return areSameOrigin ? referrerURL : referrerOrigin; - case "strict-origin-when-cross-origin": { - const currentURL = requestCurrentURL(request2); - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL; + }; + module2.exports = XMLParser2; + } +}); + +// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +var require_orderedJs2Xml = __commonJS({ + "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { + var EOL = "\n"; + function toXml(jArray, options) { + let indentation = ""; + if (options.format && options.indentBy.length > 0) { + indentation = EOL; + } + return arrToStr(jArray, options, "", indentation); + } + function arrToStr(arr, options, jPath, indentation) { + let xmlStr = ""; + let isPreviousElementTag = false; + for (let i = 0; i < arr.length; i++) { + const tagObj = arr[i]; + const tagName = propName(tagObj); + if (tagName === void 0) continue; + let newJPath = ""; + if (jPath.length === 0) newJPath = tagName; + else newJPath = `${jPath}.${tagName}`; + if (tagName === options.textNodeName) { + let tagText = tagObj[tagName]; + if (!isStopNode(newJPath, options)) { + tagText = options.tagValueProcessor(tagName, tagText); + tagText = replaceEntitiesValue(tagText, options); + } + if (isPreviousElementTag) { + xmlStr += indentation; + } + xmlStr += tagText; + isPreviousElementTag = false; + continue; + } else if (tagName === options.cdataPropName) { + if (isPreviousElementTag) { + xmlStr += indentation; } - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return "no-referrer"; + xmlStr += ``; + isPreviousElementTag = false; + continue; + } else if (tagName === options.commentPropName) { + xmlStr += indentation + ``; + isPreviousElementTag = true; + continue; + } else if (tagName[0] === "?") { + const attStr2 = attr_to_str(tagObj[":@"], options); + const tempInd = tagName === "?xml" ? "" : indentation; + let piTextNodeName = tagObj[tagName][0][options.textNodeName]; + piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; + xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; + isPreviousElementTag = true; + continue; + } + let newIdentation = indentation; + if (newIdentation !== "") { + newIdentation += options.indentBy; + } + const attStr = attr_to_str(tagObj[":@"], options); + const tagStart = indentation + `<${tagName}${attStr}`; + const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); + if (options.unpairedTags.indexOf(tagName) !== -1) { + if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; + else xmlStr += tagStart + "/>"; + } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { + xmlStr += tagStart + "/>"; + } else if (tagValue && tagValue.endsWith(">")) { + xmlStr += tagStart + `>${tagValue}${indentation}`; + } else { + xmlStr += tagStart + ">"; + if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; } - case "strict-origin": - case "no-referrer-when-downgrade": - default: - return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; + isPreviousElementTag = true; } + return xmlStr; } - function stripURLForReferrer(url, originOnly) { - assert(url instanceof URL); - url = new URL(url); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { - return "no-referrer"; - } - url.username = ""; - url.password = ""; - url.hash = ""; - if (originOnly) { - url.pathname = ""; - url.search = ""; + function propName(obj) { + const keys = Object.keys(obj); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (!obj.hasOwnProperty(key)) continue; + if (key !== ":@") return key; + } + } + function attr_to_str(attrMap, options) { + let attrStr = ""; + if (attrMap && !options.ignoreAttributes) { + for (let attr in attrMap) { + if (!attrMap.hasOwnProperty(attr)) continue; + let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); + attrVal = replaceEntitiesValue(attrVal, options); + if (attrVal === true && options.suppressBooleanAttributes) { + attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; + } else { + attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; + } + } } - return url; + return attrStr; } - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) { - return false; + function isStopNode(jPath, options) { + jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); + let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); + for (let index in options.stopNodes) { + if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; } - if (url.href === "about:blank" || url.href === "about:srcdoc") { - return true; - } - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); - function isOriginPotentiallyTrustworthy(origin) { - if (origin == null || origin === "null") return false; - const originAsURL = new URL(origin); - if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") { - return true; - } - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || (originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.")) || originAsURL.hostname.endsWith(".localhost")) { - return true; + return false; + } + function replaceEntitiesValue(textValue, options) { + if (textValue && textValue.length > 0 && options.processEntities) { + for (let i = 0; i < options.entities.length; i++) { + const entity = options.entities[i]; + textValue = textValue.replace(entity.regex, entity.val); } - return false; } + return textValue; } - function bytesMatch(bytes, metadataList) { - if (crypto4 === void 0) { - return true; - } - const parsedMetadata = parseMetadata(metadataList); - if (parsedMetadata === "no metadata") { - return true; + module2.exports = toXml; + } +}); + +// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +var require_json2xml = __commonJS({ + "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { + "use strict"; + var buildFromOrderedJs = require_orderedJs2Xml(); + var defaultOptions = { + attributeNamePrefix: "@_", + attributesGroupName: false, + textNodeName: "#text", + ignoreAttributes: true, + cdataPropName: false, + format: false, + indentBy: " ", + suppressEmptyNode: false, + suppressUnpairedNode: true, + suppressBooleanAttributes: true, + tagValueProcessor: function(key, a) { + return a; + }, + attributeValueProcessor: function(attrName, a) { + return a; + }, + preserveOrder: false, + commentPropName: false, + unpairedTags: [], + entities: [ + { regex: new RegExp("&", "g"), val: "&" }, + //it must be on top + { regex: new RegExp(">", "g"), val: ">" }, + { regex: new RegExp("<", "g"), val: "<" }, + { regex: new RegExp("'", "g"), val: "'" }, + { regex: new RegExp('"', "g"), val: """ } + ], + processEntities: true, + stopNodes: [], + // transformTagName: false, + // transformAttributeName: false, + oneListGroup: false + }; + function Builder(options) { + this.options = Object.assign({}, defaultOptions, options); + if (this.options.ignoreAttributes || this.options.attributesGroupName) { + this.isAttribute = function() { + return false; + }; + } else { + this.attrPrefixLen = this.options.attributeNamePrefix.length; + this.isAttribute = isAttribute; + } + this.processTextOrObjNode = processTextOrObjNode; + if (this.options.format) { + this.indentate = indentate; + this.tagEndChar = ">\n"; + this.newLine = "\n"; + } else { + this.indentate = function() { + return ""; + }; + this.tagEndChar = ">"; + this.newLine = ""; } - if (parsedMetadata.length === 0) { - return true; + } + Builder.prototype.build = function(jObj) { + if (this.options.preserveOrder) { + return buildFromOrderedJs(jObj, this.options); + } else { + if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { + jObj = { + [this.options.arrayNodeName]: jObj + }; + } + return this.j2x(jObj, 0).val; } - const strongest = getStrongestMetadata(parsedMetadata); - const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest); - for (const item of metadata) { - const algorithm = item.algo; - const expectedValue = item.hash; - let actualValue = crypto4.createHash(algorithm).update(bytes).digest("base64"); - if (actualValue[actualValue.length - 1] === "=") { - if (actualValue[actualValue.length - 2] === "=") { - actualValue = actualValue.slice(0, -2); + }; + Builder.prototype.j2x = function(jObj, level) { + let attrStr = ""; + let val2 = ""; + for (let key in jObj) { + if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; + if (typeof jObj[key] === "undefined") { + if (this.isAttribute(key)) { + val2 += ""; + } + } else if (jObj[key] === null) { + if (this.isAttribute(key)) { + val2 += ""; + } else if (key[0] === "?") { + val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; } else { - actualValue = actualValue.slice(0, -1); + val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; + } + } else if (jObj[key] instanceof Date) { + val2 += this.buildTextValNode(jObj[key], key, "", level); + } else if (typeof jObj[key] !== "object") { + const attr = this.isAttribute(key); + if (attr) { + attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); + } else { + if (key === this.options.textNodeName) { + let newval = this.options.tagValueProcessor(key, "" + jObj[key]); + val2 += this.replaceEntitiesValue(newval); + } else { + val2 += this.buildTextValNode(jObj[key], key, "", level); + } + } + } else if (Array.isArray(jObj[key])) { + const arrLen = jObj[key].length; + let listTagVal = ""; + let listTagAttr = ""; + for (let j = 0; j < arrLen; j++) { + const item = jObj[key][j]; + if (typeof item === "undefined") { + } else if (item === null) { + if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; + else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; + } else if (typeof item === "object") { + if (this.options.oneListGroup) { + const result = this.j2x(item, level + 1); + listTagVal += result.val; + if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { + listTagAttr += result.attrStr; + } + } else { + listTagVal += this.processTextOrObjNode(item, key, level); + } + } else { + if (this.options.oneListGroup) { + let textValue = this.options.tagValueProcessor(key, item); + textValue = this.replaceEntitiesValue(textValue); + listTagVal += textValue; + } else { + listTagVal += this.buildTextValNode(item, key, "", level); + } + } + } + if (this.options.oneListGroup) { + listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); + } + val2 += listTagVal; + } else { + if (this.options.attributesGroupName && key === this.options.attributesGroupName) { + const Ks = Object.keys(jObj[key]); + const L = Ks.length; + for (let j = 0; j < L; j++) { + attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); + } + } else { + val2 += this.processTextOrObjNode(jObj[key], key, level); } - } - if (compareBase64Mixed(actualValue, expectedValue)) { - return true; } } - return false; + return { attrStr, val: val2 }; + }; + Builder.prototype.buildAttrPairStr = function(attrName, val2) { + val2 = this.options.attributeValueProcessor(attrName, "" + val2); + val2 = this.replaceEntitiesValue(val2); + if (this.options.suppressBooleanAttributes && val2 === "true") { + return " " + attrName; + } else return " " + attrName + '="' + val2 + '"'; + }; + function processTextOrObjNode(object, key, level) { + const result = this.j2x(object, level + 1); + if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { + return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); + } else { + return this.buildObjectNode(result.val, key, result.attrStr, level); + } } - var parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; - function parseMetadata(metadata) { - const result = []; - let empty = true; - for (const token of metadata.split(" ")) { - empty = false; - const parsedToken = parseHashWithOptions.exec(token); - if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) { - continue; + Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { + if (val2 === "") { + if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; + else { + return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; } - const algorithm = parsedToken.groups.algo.toLowerCase(); - if (supportedHashes.includes(algorithm)) { - result.push(parsedToken.groups); + } else { + let tagEndExp = "" + val2 + tagEndExp; + } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { + return this.indentate(level) + `` + this.newLine; + } else { + return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; } } - if (empty === true) { - return "no metadata"; + }; + Builder.prototype.closeTag = function(key) { + let closeTag = ""; + if (this.options.unpairedTags.indexOf(key) !== -1) { + if (!this.options.suppressUnpairedNode) closeTag = "/"; + } else if (this.options.suppressEmptyNode) { + closeTag = "/"; + } else { + closeTag = `>` + this.newLine; + } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { + return this.indentate(level) + `` + this.newLine; + } else if (key[0] === "?") { + return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; + } else { + let textValue = this.options.tagValueProcessor(key, val2); + textValue = this.replaceEntitiesValue(textValue); + if (textValue === "") { + return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; + } else { + return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { + for (let i = 0; i < this.options.entities.length; i++) { + const entity = this.options.entities[i]; + textValue = textValue.replace(entity.regex, entity.val); } } - return algorithm; + return textValue; + }; + function indentate(level) { + return this.options.indentBy.repeat(level); } - function filterMetadataListByAlgorithm(metadataList, algorithm) { - if (metadataList.length === 1) { - return metadataList; + function isAttribute(name) { + if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { + return name.substr(this.attrPrefixLen); + } else { + return false; } - let pos = 0; - for (let i = 0; i < metadataList.length; ++i) { - if (metadataList[i].algo === algorithm) { - metadataList[pos++] = metadataList[i]; + } + module2.exports = Builder; + } +}); + +// node_modules/fast-xml-parser/src/fxp.js +var require_fxp = __commonJS({ + "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { + "use strict"; + var validator = require_validator(); + var XMLParser2 = require_XMLParser(); + var XMLBuilder = require_json2xml(); + module2.exports = { + XMLParser: XMLParser2, + XMLValidator: validator, + XMLBuilder + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js +var import_smithy_client4, import_fast_xml_parser, parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode; +var init_parseXmlBody = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"() { + import_smithy_client4 = __toESM(require_dist_cjs32()); + import_fast_xml_parser = __toESM(require_fxp()); + init_common(); + parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + const parser = new import_fast_xml_parser.XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_, val2) => val2.trim() === "" && val2.includes("\n") ? "" : void 0 + }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + let parsedObj; + try { + parsedObj = parser.parse(encoded, true); + } catch (e) { + if (e && typeof e === "object") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded + }); + } + throw e; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; } + return (0, import_smithy_client4.getValueFromTextNode)(parsedObjToReturn); } - metadataList.length = pos; - return metadataList; - } - function compareBase64Mixed(actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) { - return false; + return {}; + }); + parseXmlErrorBody = async (errorBody, context) => { + const value = await parseXmlBody(errorBody, context); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; } - for (let i = 0; i < actualValue.length; ++i) { - if (actualValue[i] !== expectedValue[i]) { - if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") { - continue; + return value; + }; + loadRestXmlErrorCode = (output, data) => { + if (data?.Error?.Code !== void 0) { + return data.Error.Code; + } + if (data?.Code !== void 0) { + return data.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +var init_protocols = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js"() { + init_coercing_serializers(); + init_awsExpectUnion(); + init_parseJsonBody(); + init_parseXmlBody(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/index.js +var dist_es_exports2 = {}; +__export(dist_es_exports2, { + AWSSDKSigV4Signer: () => AWSSDKSigV4Signer, + AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner, + AwsSdkSigV4Signer: () => AwsSdkSigV4Signer, + NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS, + _toBool: () => _toBool, + _toNum: () => _toNum, + _toStr: () => _toStr, + awsExpectUnion: () => awsExpectUnion, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, + loadRestJsonErrorCode: () => loadRestJsonErrorCode, + loadRestXmlErrorCode: () => loadRestXmlErrorCode, + parseJsonBody: () => parseJsonBody, + parseJsonErrorBody: () => parseJsonErrorBody, + parseXmlBody: () => parseXmlBody, + parseXmlErrorBody: () => parseXmlErrorBody, + resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config, + resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig, + resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config, + validateSigningProperties: () => validateSigningProperties +}); +var init_dist_es2 = __esm({ + "node_modules/@aws-sdk/core/dist-es/index.js"() { + init_client(); + init_httpAuthSchemes2(); + init_protocols(); + } +}); + +// node_modules/@aws-sdk/client-kms/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider = __commonJS({ + "node_modules/@aws-sdk/client-kms/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.defaultKMSHttpAuthSchemeProvider = exports2.defaultKMSHttpAuthSchemeParametersProvider = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_middleware_1 = require_dist_cjs10(); + var defaultKMSHttpAuthSchemeParametersProvider = 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.defaultKMSHttpAuthSchemeParametersProvider = defaultKMSHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "kms", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context } - return false; + }) + }; + } + var defaultKMSHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); } } - return true; - } - function tryUpgradeRequestToAPotentiallyTrustworthyURL(request2) { + return options; + }; + exports2.defaultKMSHttpAuthSchemeProvider = defaultKMSHttpAuthSchemeProvider; + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0 + }; + }; + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + } +}); + +// node_modules/tslib/tslib.es6.mjs +var tslib_es6_exports = {}; +__export(tslib_es6_exports, { + __addDisposableResource: () => __addDisposableResource, + __assign: () => __assign, + __asyncDelegator: () => __asyncDelegator, + __asyncGenerator: () => __asyncGenerator, + __asyncValues: () => __asyncValues, + __await: () => __await, + __awaiter: () => __awaiter, + __classPrivateFieldGet: () => __classPrivateFieldGet, + __classPrivateFieldIn: () => __classPrivateFieldIn, + __classPrivateFieldSet: () => __classPrivateFieldSet, + __createBinding: () => __createBinding, + __decorate: () => __decorate, + __disposeResources: () => __disposeResources, + __esDecorate: () => __esDecorate, + __exportStar: () => __exportStar, + __extends: () => __extends, + __generator: () => __generator, + __importDefault: () => __importDefault, + __importStar: () => __importStar, + __makeTemplateObject: () => __makeTemplateObject, + __metadata: () => __metadata, + __param: () => __param, + __propKey: () => __propKey, + __read: () => __read, + __rest: () => __rest, + __runInitializers: () => __runInitializers, + __setFunctionName: () => __setFunctionName, + __spread: () => __spread, + __spreadArray: () => __spreadArray, + __spreadArrays: () => __spreadArrays, + __values: () => __values, + default: () => tslib_es6_default +}); +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} +function __param(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; +} +function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { + if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); + return f; + } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function(f) { + if (done) throw new TypeError("Cannot add initializers after decoration has completed"); + extraInitializers.push(accept(f || null)); + }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +} +function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +} +function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +} +function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +} +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } } - function sameOrigin(A, B) { - if (A.origin === B.origin && A.origin === "null") { - return true; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { - return true; + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; } - return false; + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; } - function createDeferredPromise() { - let res; - let rej; - const promise = new Promise((resolve, reject) => { - res = resolve; - rej = reject; - }); - return { promise, resolve: res, reject: rej }; + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +} +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; } - function isAborted(fetchParams) { - return fetchParams.controller.state === "aborted"; + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; } - function isCancelled(fetchParams) { - return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + return ar; +} +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; } - var normalizeMethodRecordBase = { - delete: "DELETE", - DELETE: "DELETE", - get: "GET", - GET: "GET", - head: "HEAD", - HEAD: "HEAD", - options: "OPTIONS", - OPTIONS: "OPTIONS", - post: "POST", - POST: "POST", - put: "PUT", - PUT: "PUT" - }; - var normalizeMethodRecord = { - ...normalizeMethodRecordBase, - patch: "patch", - PATCH: "PATCH" + } + return to.concat(ar || Array.prototype.slice.call(from)); +} +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function awaitReturn(f) { + return function(v) { + return Promise.resolve(v).then(f, reject); }; - Object.setPrototypeOf(normalizeMethodRecordBase, null); - Object.setPrototypeOf(normalizeMethodRecord, null); - function normalizeMethod(method) { - return normalizeMethodRecordBase[method.toLowerCase()] ?? method; + } + function verb(n, f) { + if (g[n]) { + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + if (f) i[n] = f(i[n]); } - function serializeJavascriptValueToJSONString(value) { - const result = JSON.stringify(value); - if (result === void 0) { - throw new TypeError("Value is not JSON serializable"); + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } +} +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function(e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function() { + return this; + }, i; + function verb(n, f) { + i[n] = o[n] ? function(v) { + return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; + } : f; + } +} +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); + } +} +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; + } + return cooked; +} +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { default: mod }; +} +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; +} +function __classPrivateFieldIn(state, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); +} +function __addDisposableResource(env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { + try { + inner.call(this); + } catch (e) { + return Promise.reject(e); + } + }; + env.stack.push({ value, dispose, async }); + } else if (async) { + env.stack.push({ async: true }); + } + return value; +} +function __disposeResources(env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { + fail(e); + return next(); + }); + } catch (e) { + fail(e); } - assert(typeof result === "string"); - return result; } - var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); - function createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { - class FastIterableIterator { - /** @type {any} */ - #target; - /** @type {'key' | 'value' | 'key+value'} */ - #kind; - /** @type {number} */ - #index; - /** - * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - */ - constructor(target, kind) { - this.#target = target; - this.#kind = kind; - this.#index = 0; + if (env.hasError) throw env.error; + } + return next(); +} +var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +var init_tslib_es6 = __esm({ + "node_modules/tslib/tslib.es6.mjs"() { + extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + __assign = function() { + __assign = Object.assign || function __assign2(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } - next() { - if (typeof this !== "object" || this === null || !(#target in this)) { - throw new TypeError( - `'next' called on an object that does not implement interface ${name} Iterator.` + return t; + }; + return __assign.apply(this, arguments); + }; + __createBinding = Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }; + __setModuleDefault = Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }; + _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; + tslib_es6_default = { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources + }; + } +}); + +// node_modules/@aws-sdk/client-kms/package.json +var require_package = __commonJS({ + "node_modules/@aws-sdk/client-kms/package.json"(exports2, module2) { + module2.exports = { + name: "@aws-sdk/client-kms", + description: "AWS SDK for JavaScript Kms Client for Node.js, Browser and React Native", + version: "3.635.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-kms", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo kms" + }, + 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/client-sso-oidc": "3.635.0", + "@aws-sdk/client-sts": "3.635.0", + "@aws-sdk/core": "3.635.0", + "@aws-sdk/credential-provider-node": "3.635.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + tslib: "^2.6.2" + }, + devDependencies: { + "@tsconfig/node16": "16.1.3", + "@types/node": "^16.18.96", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~4.9.5" + }, + engines: { + node: ">=16.0.0" + }, + typesVersions: { + "<4.0": { + "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-kms", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-kms" + } + }; + } +}); + +// node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +var require_dist_cjs36 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js"(exports2, module2) { + "use strict"; + 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, { + ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, + ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, + ENV_EXPIRATION: () => ENV_EXPIRATION, + ENV_KEY: () => ENV_KEY, + ENV_SECRET: () => ENV_SECRET, + ENV_SESSION: () => ENV_SESSION, + fromEnv: () => fromEnv + }); + module2.exports = __toCommonJS2(src_exports); + var import_property_provider2 = require_dist_cjs12(); + 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 = /* @__PURE__ */ __name((init) => async () => { + var _a; + (_a = init == null ? void 0 : init.logger) == null ? void 0 : _a.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) { + return { + accessKeyId, + secretAccessKey, + ...sessionToken && { sessionToken }, + ...expiry && { expiration: new Date(expiry) }, + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + } + throw new import_property_provider2.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init == null ? void 0 : init.logger }); + }, "fromEnv"); + } +}); + +// node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +var require_dist_cjs37 = __commonJS({ + "node_modules/@smithy/credential-provider-imds/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, { + DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, + DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, + ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, + ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI, + ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI, + Endpoint: () => Endpoint, + fromContainerMetadata: () => fromContainerMetadata, + fromInstanceMetadata: () => fromInstanceMetadata, + getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint, + httpRequest: () => httpRequest, + providerConfigFromInit: () => providerConfigFromInit + }); + module2.exports = __toCommonJS2(src_exports); + var import_url = require("url"); + var import_property_provider2 = require_dist_cjs12(); + var import_buffer = require("buffer"); + var import_http = require("http"); + function httpRequest(options) { + return new Promise((resolve, reject) => { + var _a; + const req = (0, import_http.request)({ + method: "GET", + ...options, + // Node.js http module doesn't accept hostname with square brackets + // Refs: https://github.com/nodejs/node/issues/39738 + hostname: (_a = options.hostname) == null ? void 0 : _a.replace(/^\[(.+)\]$/, "$1") + }); + req.on("error", (err) => { + reject(Object.assign(new import_property_provider2.ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new import_property_provider2.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 import_property_provider2.ProviderError("Error response received from instance metadata service"), { statusCode }) ); + req.destroy(); } - const index = this.#index; - const values = this.#target[kInternalIterator]; - const len = values.length; - if (index >= len) { - return { - value: void 0, - done: true - }; - } - const { [keyIndex]: key, [valueIndex]: value } = values[index]; - this.#index = index + 1; - let result; - switch (this.#kind) { - case "key": - result = key; - break; - case "value": - result = value; - break; - case "key+value": - result = [key, value]; - break; - } - return { - value: result, - done: false - }; + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(import_buffer.Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); + } + __name(httpRequest, "httpRequest"); + var isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", "isImdsCredentials"); + var fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration), + ...creds.AccountId && { accountId: creds.AccountId } + }), "fromImdsCredentials"); + var DEFAULT_TIMEOUT = 1e3; + var DEFAULT_MAX_RETRIES = 0; + var providerConfigFromInit = /* @__PURE__ */ __name(({ + maxRetries = DEFAULT_MAX_RETRIES, + timeout = DEFAULT_TIMEOUT + }) => ({ maxRetries, timeout }), "providerConfigFromInit"); + var retry2 = /* @__PURE__ */ __name((toRetry, maxRetries) => { + let promise = toRetry(); + for (let i = 0; i < maxRetries; i++) { + promise = promise.catch(toRetry); + } + return promise; + }, "retry"); + 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 = /* @__PURE__ */ __name((init = {}) => { + const { timeout, maxRetries } = providerConfigFromInit(init); + return () => retry2(async () => { + const requestOptions = await getCmdsUri({ logger: init.logger }); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!isImdsCredentials(credsResponse)) { + throw new import_property_provider2.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); } + return fromImdsCredentials(credsResponse); + }, maxRetries); + }, "fromContainerMetadata"); + var requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => { + if (process.env[ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[ENV_CMDS_AUTH_TOKEN] + }; } - delete FastIterableIterator.prototype.constructor; - Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); - Object.defineProperties(FastIterableIterator.prototype, { - [Symbol.toStringTag]: { - writable: false, - enumerable: false, - configurable: true, - value: `${name} Iterator` - }, - next: { writable: true, enumerable: true, configurable: true } + const buffer = await httpRequest({ + ...options, + timeout }); - return function(target, kind) { - return new FastIterableIterator(target, kind); + return buffer.toString(); + }, "requestFromEcsImds"); + 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 = /* @__PURE__ */ __name(async ({ logger }) => { + 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 = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new import_property_provider2.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { + tryNextLink: false, + logger + }); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new import_property_provider2.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { + tryNextLink: false, + logger + }); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : void 0 + }; + } + throw new import_property_provider2.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 + } + ); + }, "getCmdsUri"); + var _InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError2 extends import_property_provider2.CredentialsProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "InstanceMetadataV1FallbackError"; + Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError2.prototype); + } + }; + __name(_InstanceMetadataV1FallbackError, "InstanceMetadataV1FallbackError"); + var InstanceMetadataV1FallbackError = _InstanceMetadataV1FallbackError; + var import_node_config_provider = require_dist_cjs14(); + var import_url_parser = require_dist_cjs16(); + var Endpoint = /* @__PURE__ */ ((Endpoint2) => { + Endpoint2["IPv4"] = "http://169.254.169.254"; + Endpoint2["IPv6"] = "http://[fd00:ec2::254]"; + return Endpoint2; + })(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 = /* @__PURE__ */ ((EndpointMode2) => { + EndpointMode2["IPv4"] = "IPv4"; + EndpointMode2["IPv6"] = "IPv6"; + return EndpointMode2; + })(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: "IPv4" + /* IPv4 */ + }; + var getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), "getInstanceMetadataEndpoint"); + var getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), "getFromEndpointConfig"); + var getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => { + const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case "IPv4": + return "http://169.254.169.254"; + case "IPv6": + return "http://[fd00:ec2::254]"; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); + } + }, "getFromEndpointModeConfig"); + 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 = /* @__PURE__ */ __name((credentials, logger) => { + 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); + logger.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 }; - } - function iteratorMixin(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { - const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); - const properties = { - keys: { - writable: true, - enumerable: true, - configurable: true, - value: function keys() { - webidl.brandCheck(this, object); - return makeIterator(this, "key"); + }, "getExtendedInstanceMetadataCredentials"); + var staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => { + const logger = (options == null ? void 0 : options.logger) || console; + let pastCredentials; + return async () => { + let credentials; + try { + credentials = await provider(); + if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { + credentials = getExtendedInstanceMetadataCredentials(credentials, logger); } - }, - values: { - writable: true, - enumerable: true, - configurable: true, - value: function values() { - webidl.brandCheck(this, object); - return makeIterator(this, "value"); + } catch (e) { + if (pastCredentials) { + logger.warn("Credential renew failed: ", e); + credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger); + } else { + throw e; } - }, - entries: { - writable: true, - enumerable: true, - configurable: true, - value: function entries() { - webidl.brandCheck(this, object); - return makeIterator(this, "key+value"); + } + pastCredentials = credentials; + return credentials; + }; + }, "staticStabilityProvider"); + 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 = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), "fromInstanceMetadata"); + var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { + let disableFetchToken = false; + const { logger, profile } = init; + const { timeout, maxRetries } = providerConfigFromInit(init); + const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => { + var _a; + const isImdsV1Fallback = disableFetchToken || ((_a = options.headers) == null ? void 0 : _a[X_AWS_EC2_METADATA_TOKEN]) == null; + if (isImdsV1Fallback) { + let fallbackBlockedFromProfile = false; + let fallbackBlockedFromProcessEnv = false; + const configValue = await (0, import_node_config_provider.loadConfig)( + { + environmentVariableSelector: (env) => { + const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === void 0) { + throw new import_property_provider2.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( + ", " + )}].` + ); } - }, - forEach: { - writable: true, - enumerable: true, - configurable: true, - value: function forEach(callbackfn, thisArg = globalThis) { - webidl.brandCheck(this, object); - webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); - if (typeof callbackfn !== "function") { - throw new TypeError( - `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.` - ); + } + const imdsProfile = (await retry2(async () => { + let profile2; + try { + profile2 = await getProfile(options); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; } - for (const { 0: key, 1: value } of makeIterator(this, "key+value")) { - callbackfn.call(thisArg, value, key, this); + throw err; + } + return profile2; + }, maxRetries2)).trim(); + return retry2(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(imdsProfile, options, init); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return creds; + }, maxRetries2); + }, "getCredentials"); + return async () => { + const endpoint2 = await getInstanceMetadataEndpoint(); + if (disableFetchToken) { + logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); + return getCredentials(maxRetries, { ...endpoint2, timeout }); + } else { + let token; + try { + token = (await getMetadataToken({ ...endpoint2, timeout })).toString(); + } catch (error) { + if ((error == null ? void 0 : error.statusCode) === 400) { + throw Object.assign(error, { + message: "EC2 Metadata token request returned error" + }); + } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { + disableFetchToken = true; } + logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); + return getCredentials(maxRetries, { ...endpoint2, timeout }); } + return getCredentials(maxRetries, { + ...endpoint2, + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token + }, + timeout + }); } }; - return Object.defineProperties(object.prototype, { - ...properties, - [Symbol.iterator]: { - writable: true, - enumerable: false, - configurable: true, - value: properties.entries.value - } - }); - } - async function fullyReadBody(body, processBody, processBodyError, shouldClone) { - const successSteps = processBody; - const errorSteps = processBodyError; - let reader; - try { - reader = body.stream.getReader(); - } catch (e) { - errorSteps(e); + }, "getInstanceMetadataProvider"); + var getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600" + } + }), "getMetadataToken"); + var getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), "getProfile"); + var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options, init) => { + const credentialsResponse = JSON.parse( + (await httpRequest({ + ...options, + path: IMDS_PATH + profile + })).toString() + ); + if (!isImdsCredentials(credentialsResponse)) { + throw new import_property_provider2.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); + } + return fromImdsCredentials(credentialsResponse); + }, "getCredentialsFromProfile"); + } +}); + +// 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_cjs12(); + 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, logger) => { + if (url.protocol === "https:") { return; } - try { - successSteps(await readAllBytes(reader, shouldClone)); - } catch (e) { - errorSteps(e); + if (url.hostname === ECS_CONTAINER_HOST || url.hostname === EKS_CONTAINER_HOST_IPv4 || url.hostname === EKS_CONTAINER_HOST_IPv6) { + return; } - } - function isReadableStreamLike(stream) { - return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; - } - function readableStreamClose(controller) { - try { - controller.close(); - controller.byobRequest?.respond(0); - } catch (err) { - if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) { - throw err; + 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 }); + }; + 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.getCredentials = exports2.createGetRequest = void 0; + var property_provider_1 = require_dist_cjs12(); + var protocol_http_1 = require_dist_cjs2(); + var smithy_client_1 = require_dist_cjs32(); + var util_stream_1 = require_dist_cjs31(); + 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, [k, v]) => { + acc[k] = v; + return acc; + }, {}), + fragment: url.hash + }); } - var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; - function isomorphicEncode(input) { - assert(!invalidIsomorphicEncodeValueRegex.test(input)); - return input; - } - async function readAllBytes(reader, shouldClone) { - const bytes = []; - let byteLength = 0; - while (true) { - const { done, value: chunk } = await reader.read(); - if (done) { - if (bytes.length === 1) { - const { buffer, byteOffset, byteLength: byteLength2 } = bytes[0]; - if (shouldClone === false) { - return Buffer.from(buffer, byteOffset, byteLength2); - } - return Buffer.from(buffer.slice(byteOffset, byteOffset + byteLength2), 0, byteLength2); - } - return Buffer.concat(bytes, byteLength); + exports2.createGetRequest = createGetRequest; + async function getCredentials(response, logger) { + 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 }); } - if (!isUint8Array(chunk)) { - throw new TypeError("Received non-Uint8Array chunk"); + 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 (e) { } - bytes.push(chunk); - byteLength += chunk.length; + throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), { + Code: parsedBody.Code, + Message: parsedBody.Message + }); } + throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }); } - function urlIsLocal(url) { - assert("protocol" in url); - const protocol = url.protocol; - return protocol === "about:" || protocol === "blob:" || protocol === "data:"; - } - function urlHasHttpsScheme(url) { - return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; - } - function urlIsHttpHttpsScheme(url) { - assert("protocol" in url); - const protocol = url.protocol; - return protocol === "http:" || protocol === "https:"; - } - function simpleRangeHeaderValue(value, allowWhitespace) { - const data = value; - if (!data.startsWith("bytes")) { - return "failure"; - } - const position = { position: 5 }; - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === " " || char === " ", - data, - position - ); - } - if (data.charCodeAt(position.position) !== 61) { - return "failure"; - } - position.position++; - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === " " || char === " ", - data, - position - ); - } - const rangeStart = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0); - return code >= 48 && code <= 57; - }, - data, - position - ); - const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === " " || char === " ", - data, - position - ); - } - if (data.charCodeAt(position.position) !== 45) { - return "failure"; - } - position.position++; - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === " " || char === " ", - data, - position - ); - } - const rangeEnd = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0); - return code >= 48 && code <= 57; - }, - data, - position - ); - const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; - if (position.position < data.length) { - return "failure"; - } - if (rangeEndValue === null && rangeStartValue === null) { - return "failure"; - } - if (rangeStartValue > rangeEndValue) { - return "failure"; - } - return { rangeStartValue, rangeEndValue }; - } - function buildContentRange(rangeStart, rangeEnd, fullLength) { - let contentRange = "bytes "; - contentRange += isomorphicEncode(`${rangeStart}`); - contentRange += "-"; - contentRange += isomorphicEncode(`${rangeEnd}`); - contentRange += "/"; - contentRange += isomorphicEncode(`${fullLength}`); - return contentRange; - } - var InflateStream = class extends Transform { - _transform(chunk, encoding, callback) { - if (!this._inflateStream) { - if (chunk.length === 0) { - callback(); - return; + exports2.getCredentials = getCredentials; + } +}); + +// 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 i = 0; i < maxRetries; ++i) { + try { + return await toRetry(); + } catch (e) { + await new Promise((resolve) => setTimeout(resolve, delayMs)); } - this._inflateStream = (chunk[0] & 15) === 8 ? zlib.createInflate() : zlib.createInflateRaw(); - this._inflateStream.on("data", this.push.bind(this)); - this._inflateStream.on("end", () => this.push(null)); - this._inflateStream.on("error", (err) => this.destroy(err)); } - this._inflateStream.write(chunk, encoding, callback); - } - _final(callback) { - if (this._inflateStream) { - this._inflateStream.end(); - this._inflateStream = null; - } - callback(); - } + return await toRetry(); + }; }; - function createInflate() { - return new InflateStream(); - } - function extractMimeType(headers) { - let charset = null; - let essence = null; - let mimeType = null; - const values = getDecodeSplit("content-type", headers); - if (values === null) { - return "failure"; - } - for (const value of values) { - const temporaryMimeType = parseMIMEType(value); - if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") { - continue; + 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 node_http_handler_1 = require_dist_cjs28(); + var property_provider_1 = require_dist_cjs12(); + var promises_1 = tslib_1.__importDefault(require("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 warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger ? console.warn : options.logger.warn; + if (relative && full) { + warn("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); + warn("awsContainerCredentialsFullUri will take precedence."); + } + if (token && tokenFile) { + warn("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); + warn("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 = new node_http_handler_1.NodeHttpHandler({ + requestTimeout: options.timeout ?? 1e3, + connectionTimeout: options.timeout ?? 1e3 + }); + return (0, retry_wrapper_1.retryWrapper)(async () => { + const request2 = (0, requestHelpers_1.createGetRequest)(url); + if (token) { + request2.headers.Authorization = token; + } else if (tokenFile) { + request2.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); } - mimeType = temporaryMimeType; - if (mimeType.essence !== essence) { - charset = null; - if (mimeType.parameters.has("charset")) { - charset = mimeType.parameters.get("charset"); - } - essence = mimeType.essence; - } else if (!mimeType.parameters.has("charset") && charset !== null) { - mimeType.parameters.set("charset", charset); + try { + const result = await requestHandler.handle(request2); + return (0, requestHelpers_1.getCredentials)(result.response); + } catch (e) { + throw new property_provider_1.CredentialsProviderError(String(e), { logger: options.logger }); } - } - if (mimeType == null) { - return "failure"; - } - return mimeType; - } - function gettingDecodingSplitting(value) { - const input = value; - const position = { position: 0 }; - const values = []; - let temporaryValue = ""; - while (position.position < input.length) { - temporaryValue += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== ",", - input, - position - ); - if (position.position < input.length) { - if (input.charCodeAt(position.position) === 34) { - temporaryValue += collectAnHTTPQuotedString( - input, - position - ); - if (position.position < input.length) { - continue; - } - } else { - assert(input.charCodeAt(position.position) === 44); - position.position++; + }, options.maxRetries ?? 3, options.timeout ?? 1e3); + }; + exports2.fromHttp = fromHttp; + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +var require_dist_cjs38 = __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/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider2 = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOHttpAuthSchemeProvider = exports2.defaultSSOHttpAuthSchemeParametersProvider = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_middleware_1 = require_dist_cjs10(); + var defaultSSOHttpAuthSchemeParametersProvider = 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.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "awsssoportal", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context } - } - temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); - values.push(temporaryValue); - temporaryValue = ""; - } - return values; - } - function getDecodeSplit(name, list) { - const value = list.get(name, true); - if (value === null) { - return null; - } - return gettingDecodingSplitting(value); + }) + }; } - var textDecoder = new TextDecoder(); - function utf8DecodeBytes(buffer) { - if (buffer.length === 0) { - return ""; - } - if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { - buffer = buffer.subarray(3); - } - const output = textDecoder.decode(buffer); - return output; + function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; } - var EnvironmentSettingsObjectBase = class { - get baseUrl() { - return getGlobalOrigin(); - } - get origin() { - return this.baseUrl?.origin; + var defaultSSOHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "GetRoleCredentials": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccountRoles": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccounts": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "Logout": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } } - policyContainer = makePolicyContainer(); - }; - var EnvironmentSettingsObject = class { - settingsObject = new EnvironmentSettingsObjectBase(); + return options; }; - var environmentSettingsObject = new EnvironmentSettingsObject(); - module2.exports = { - isAborted, - isCancelled, - isValidEncodedURL, - createDeferredPromise, - ReadableStreamFrom, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - clampAndCoarsenConnectionTimingInfo, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - iteratorMixin, - createIterator, - isValidHeaderName, - isValidHeaderValue, - isErrorLike, - fullyReadBody, - bytesMatch, - isReadableStreamLike, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - normalizeMethodRecord, - simpleRangeHeaderValue, - buildContentRange, - parseMetadata, - createInflate, - extractMimeType, - getDecodeSplit, - utf8DecodeBytes, - environmentSettingsObject + exports2.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider; + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0 + }; }; + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; } }); -// node_modules/undici/lib/web/fetch/symbols.js -var require_symbols7 = __commonJS({ - "node_modules/undici/lib/web/fetch/symbols.js"(exports2, module2) { - "use strict"; +// node_modules/@aws-sdk/client-sso/package.json +var require_package2 = __commonJS({ + "node_modules/@aws-sdk/client-sso/package.json"(exports2, module2) { module2.exports = { - kUrl: Symbol("url"), - kHeaders: Symbol("headers"), - kSignal: Symbol("signal"), - kState: Symbol("state"), - kDispatcher: Symbol("dispatcher") + name: "@aws-sdk/client-sso", + description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native", + version: "3.635.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-sso", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo sso" + }, + 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.635.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + tslib: "^2.6.2" + }, + devDependencies: { + "@tsconfig/node16": "16.1.3", + "@types/node": "^16.18.96", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~4.9.5" + }, + engines: { + node: ">=16.0.0" + }, + typesVersions: { + "<4.0": { + "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-sso", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-sso" + } }; } }); -// node_modules/undici/lib/web/fetch/file.js -var require_file2 = __commonJS({ - "node_modules/undici/lib/web/fetch/file.js"(exports2, module2) { +// node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +var require_dist_cjs39 = __commonJS({ + "node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js"(exports2, module2) { "use strict"; - var { Blob: Blob2, File } = require("node:buffer"); - var { kState } = require_symbols7(); - var { webidl } = require_webidl2(); - var FileLike = class _FileLike { - constructor(blobLike, fileName, options = {}) { - const n = fileName; - const t = options.type; - const d = options.lastModified ?? Date.now(); - this[kState] = { - blobLike, - name: n, - type: t, - lastModified: d - }; + 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, { + UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME, + UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME, + crtAvailability: () => crtAvailability, + defaultUserAgent: () => defaultUserAgent + }); + module2.exports = __toCommonJS2(src_exports); + var import_node_config_provider = require_dist_cjs14(); + var import_os = require("os"); + var import_process = require("process"); + var crtAvailability = { + isCrtAvailable: false + }; + var isCrtAvailable = /* @__PURE__ */ __name(() => { + if (crtAvailability.isCrtAvailable) { + return ["md/crt-avail"]; } - stream(...args) { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.stream(...args); + return null; + }, "isCrtAvailable"); + var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; + var UA_APP_ID_INI_NAME = "sdk-ua-app-id"; + var defaultUserAgent = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => { + const sections = [ + // sdk-metadata + ["aws-sdk-js", clientVersion], + // ua-metadata + ["ua", "2.0"], + // os-metadata + [`os/${(0, import_os.platform)()}`, (0, import_os.release)()], + // language-metadata + // ECMAScript edition doesn't matter in JS, so no version needed. + ["lang/js"], + ["md/nodejs", `${import_process.versions.node}`] + ]; + const crtAvailable = isCrtAvailable(); + if (crtAvailable) { + sections.push(crtAvailable); } - arrayBuffer(...args) { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.arrayBuffer(...args); + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); } - slice(...args) { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.slice(...args); + if (import_process.env.AWS_EXECUTION_ENV) { + sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]); } - text(...args) { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.text(...args); + const appIdPromise = (0, import_node_config_provider.loadConfig)({ + environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME], + configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME], + default: void 0 + })(); + let resolvedUserAgent = void 0; + return async () => { + if (!resolvedUserAgent) { + const appId2 = await appIdPromise; + resolvedUserAgent = appId2 ? [...sections, [`app/${appId2}`]] : [...sections]; + } + return resolvedUserAgent; + }; + }, "defaultUserAgent"); + } +}); + +// node_modules/@smithy/hash-node/dist-cjs/index.js +var require_dist_cjs40 = __commonJS({ + "node_modules/@smithy/hash-node/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, { + Hash: () => Hash + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_buffer_from = require_dist_cjs23(); + var import_util_utf8 = require_dist_cjs24(); + var import_buffer = require("buffer"); + var import_crypto8 = require("crypto"); + var _Hash = class _Hash { + constructor(algorithmIdentifier, secret) { + this.algorithmIdentifier = algorithmIdentifier; + this.secret = secret; + this.reset(); } - get size() { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.size; + update(toHash, encoding) { + this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding))); } - get type() { - webidl.brandCheck(this, _FileLike); - return this[kState].blobLike.type; + digest() { + return Promise.resolve(this.hash.digest()); } - get name() { - webidl.brandCheck(this, _FileLike); - return this[kState].name; + reset() { + this.hash = this.secret ? (0, import_crypto8.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto8.createHash)(this.algorithmIdentifier); } - get lastModified() { - webidl.brandCheck(this, _FileLike); - return this[kState].lastModified; + }; + __name(_Hash, "Hash"); + var Hash = _Hash; + function castSourceData(toCast, encoding) { + if (import_buffer.Buffer.isBuffer(toCast)) { + return toCast; } - get [Symbol.toStringTag]() { - return "File"; + if (typeof toCast === "string") { + return (0, import_util_buffer_from.fromString)(toCast, encoding); } - }; - webidl.converters.Blob = webidl.interfaceConverter(Blob2); - function isFileLike(object) { - return object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + if (ArrayBuffer.isView(toCast)) { + return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + return (0, import_util_buffer_from.fromArrayBuffer)(toCast); } - module2.exports = { FileLike, isFileLike }; + __name(castSourceData, "castSourceData"); } }); -// node_modules/undici/lib/web/fetch/formdata.js -var require_formdata2 = __commonJS({ - "node_modules/undici/lib/web/fetch/formdata.js"(exports2, module2) { - "use strict"; - var { isBlobLike, iteratorMixin } = require_util9(); - var { kState } = require_symbols7(); - var { kEnumerableProperty } = require_util8(); - var { FileLike, isFileLike } = require_file2(); - var { webidl } = require_webidl2(); - var { File: NativeFile } = require("node:buffer"); - var nodeUtil = require("node:util"); - var File = globalThis.File ?? NativeFile; - var FormData = class _FormData { - constructor(form) { - if (form !== void 0) { - throw webidl.errors.conversionFailed({ - prefix: "FormData constructor", - argument: "Argument 1", - types: ["undefined"] - }); - } - this[kState] = []; +// node_modules/@smithy/util-body-length-node/dist-cjs/index.js +var require_dist_cjs41 = __commonJS({ + "node_modules/@smithy/util-body-length-node/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, { + calculateBodyLength: () => calculateBodyLength + }); + module2.exports = __toCommonJS2(src_exports); + var import_fs = require("fs"); + var calculateBodyLength = /* @__PURE__ */ __name((body) => { + if (!body) { + return 0; } - append(name, value, filename = void 0) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.append"; - webidl.argumentLengthCheck(arguments, 2, prefix); - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" + 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 (typeof body.path === "string" || Buffer.isBuffer(body.path)) { + return (0, import_fs.lstatSync)(body.path).size; + } else if (typeof body.fd === "number") { + return (0, import_fs.fstatSync)(body.fd).size; + } + throw new Error(`Body Length computation failed for ${body}`); + }, "calculateBodyLength"); + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js +var require_ruleset = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ruleSet = void 0; + var u = "required"; + var v = "fn"; + var w = "argv"; + var x = "ref"; + var a = true; + var b = "isSet"; + var c = "booleanEquals"; + var d = "error"; + var e = "endpoint"; + var f = "tree"; + var g = "PartitionResult"; + var h = "getAttr"; + var i = { [u]: false, "type": "String" }; + var j = { [u]: true, "default": false, "type": "Boolean" }; + var k = { [x]: "Endpoint" }; + var l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }; + var m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }; + var n = {}; + var o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }; + var p = { [x]: g }; + var q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }; + var r = [l]; + var s = [m]; + var t = [{ [x]: "Region" }]; + var _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; + exports2.ruleSet = _data; + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs7(); + var util_endpoints_2 = require_dist_cjs6(); + var ruleset_1 = require_ruleset(); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context.logger + }); + }; + exports2.defaultEndpointResolver = defaultEndpointResolver; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var smithy_client_1 = require_dist_cjs32(); + var url_parser_1 = require_dist_cjs16(); + var util_base64_1 = require_dist_cjs25(); + var util_utf8_1 = require_dist_cjs24(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider2(); + var endpointResolver_1 = require_endpointResolver(); + var getRuntimeConfig = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner() + } + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SSO", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +var require_dist_cjs42 = __commonJS({ + "node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js"(exports2, module2) { + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + 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 __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + resolveDefaultsModeConfig: () => resolveDefaultsModeConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_config_resolver = require_dist_cjs11(); + var import_node_config_provider = require_dist_cjs14(); + var import_property_provider2 = require_dist_cjs12(); + 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 resolveDefaultsModeConfig = /* @__PURE__ */ __name(({ + region = (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS), + defaultsMode = (0, import_node_config_provider.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) + } = {}) => (0, import_property_provider2.memoize)(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode == null ? void 0 : mode.toLowerCase()) { + case "auto": + return resolveNodeDefaultsModeAuto(region); + case "in-region": + case "cross-region": + case "mobile": + case "standard": + case "legacy": + return Promise.resolve(mode == null ? void 0 : mode.toLocaleLowerCase()); + case void 0: + return Promise.resolve("legacy"); + default: + throw new Error( + `Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}` ); - } - name = webidl.converters.USVString(name, prefix, "name"); - value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "value", { strict: false }) : webidl.converters.USVString(value, prefix, "value"); - filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "filename") : void 0; - const entry = makeEntry(name, value, filename); - this[kState].push(entry); - } - delete(name) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.delete"; - webidl.argumentLengthCheck(arguments, 1, prefix); - name = webidl.converters.USVString(name, prefix, "name"); - this[kState] = this[kState].filter((entry) => entry.name !== name); } - get(name) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.get"; - webidl.argumentLengthCheck(arguments, 1, prefix); - name = webidl.converters.USVString(name, prefix, "name"); - const idx = this[kState].findIndex((entry) => entry.name === name); - if (idx === -1) { - return null; + }), "resolveDefaultsModeConfig"); + var resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(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 this[kState][idx].value; - } - getAll(name) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.getAll"; - webidl.argumentLengthCheck(arguments, 1, prefix); - name = webidl.converters.USVString(name, prefix, "name"); - return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); } - has(name) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.has"; - webidl.argumentLengthCheck(arguments, 1, prefix); - name = webidl.converters.USVString(name, prefix, "name"); - return this[kState].findIndex((entry) => entry.name === name) !== -1; + return "standard"; + }, "resolveNodeDefaultsModeAuto"); + var inferPhysicalRegion = /* @__PURE__ */ __name(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]; } - set(name, value, filename = void 0) { - webidl.brandCheck(this, _FormData); - const prefix = "FormData.set"; - webidl.argumentLengthCheck(arguments, 2, prefix); - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ); + if (!process.env[ENV_IMDS_DISABLED]) { + try { + const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM2(require_dist_cjs37())); + const endpoint2 = await getInstanceMetadataEndpoint(); + return (await httpRequest({ ...endpoint2, path: IMDS_REGION_PATH })).toString(); + } catch (e) { } - name = webidl.converters.USVString(name, prefix, "name"); - value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "name", { strict: false }) : webidl.converters.USVString(value, prefix, "name"); - filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "name") : void 0; - const entry = makeEntry(name, value, filename); - const idx = this[kState].findIndex((entry2) => entry2.name === name); - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry2) => entry2.name !== name) - ]; - } else { - this[kState].push(entry); + } + }, "inferPhysicalRegion"); + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js +var require_runtimeConfig = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package2()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_user_agent_node_1 = require_dist_cjs39(); + var config_resolver_1 = require_dist_cjs11(); + var hash_node_1 = require_dist_cjs40(); + var middleware_retry_1 = require_dist_cjs33(); + var node_config_provider_1 = require_dist_cjs14(); + var node_http_handler_1 = require_dist_cjs28(); + var util_body_length_node_1 = require_dist_cjs41(); + var util_retry_1 = require_dist_cjs20(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared(); + var smithy_client_1 = require_dist_cjs32(); + var util_defaults_mode_node_1 = require_dist_cjs42(); + var smithy_client_2 = require_dist_cjs32(); + var getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + 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 + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + 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), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +var require_dist_cjs43 = __commonJS({ + "node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js"(exports2, module2) { + "use strict"; + 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, { + 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, + getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration, + resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration, + resolveRegionConfig: () => resolveRegionConfig + }); + module2.exports = __toCommonJS2(src_exports); + var getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let runtimeConfigRegion = /* @__PURE__ */ __name(async () => { + if (runtimeConfig.region === void 0) { + throw new Error("Region is missing from runtimeConfig"); + } + const region = runtimeConfig.region; + if (typeof region === "string") { + return region; + } + return region(); + }, "runtimeConfigRegion"); + return { + setRegion(region) { + runtimeConfigRegion = region; + }, + region() { + return runtimeConfigRegion; } + }; + }, "getAwsRegionExtensionConfiguration"); + var resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region() + }; + }, "resolveAwsRegionExtensionConfiguration"); + var REGION_ENV_NAME = "AWS_REGION"; + var REGION_INI_NAME = "region"; + var NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + } + }; + var NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials" + }; + var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + var resolveRegionConfig = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); } - [nodeUtil.inspect.custom](depth, options) { - const state = this[kState].reduce((a, b) => { - if (a[b.name]) { - if (Array.isArray(a[b.name])) { - a[b.name].push(b.value); - } else { - a[b.name] = [a[b.name], b.value]; - } - } else { - a[b.name] = b.value; + return { + ...input, + region: async () => { + if (typeof region === "string") { + return getRealRegion(region); } - return a; - }, { __proto__: null }); - options.depth ??= depth; - options.colors ??= true; - const output = nodeUtil.formatWithOptions(options, state); - return `FormData ${output.slice(output.indexOf("]") + 2)}`; - } - }; - iteratorMixin("FormData", FormData, kState, "name", "value"); - Object.defineProperties(FormData.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - getAll: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - [Symbol.toStringTag]: { - value: "FormData", - configurable: true - } - }); - function makeEntry(name, value, filename) { - if (typeof value === "string") { - } else { - if (!isFileLike(value)) { - value = value instanceof Blob ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); - } - if (filename !== void 0) { - const options = { - type: value.type, - lastModified: value.lastModified - }; - value = value instanceof NativeFile ? new File([value], filename, options) : new FileLike(value, filename, options); + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); } - } - return { name, value }; - } - module2.exports = { FormData, makeEntry }; + }; + }, "resolveRegionConfig"); } }); -// node_modules/undici/lib/web/fetch/formdata-parser.js -var require_formdata_parser = __commonJS({ - "node_modules/undici/lib/web/fetch/formdata-parser.js"(exports2, module2) { +// node_modules/@aws-sdk/client-sso/dist-cjs/index.js +var require_dist_cjs44 = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/index.js"(exports2, module2) { "use strict"; - var { isUSVString, bufferToLowerCasedHeaderName } = require_util8(); - var { utf8DecodeBytes } = require_util9(); - var { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); - var { isFileLike } = require_file2(); - var { makeEntry } = require_formdata2(); - var assert = require("node:assert"); - var { File: NodeFile } = require("node:buffer"); - var File = globalThis.File ?? NodeFile; - var formDataNameBuffer = Buffer.from('form-data; name="'); - var filenameBuffer = Buffer.from("; filename"); - var dd = Buffer.from("--"); - var ddcrlf = Buffer.from("--\r\n"); - function isAsciiString(chars) { - for (let i = 0; i < chars.length; ++i) { - if ((chars.charCodeAt(i) & ~127) !== 0) { - return false; + 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, { + GetRoleCredentialsCommand: () => GetRoleCredentialsCommand, + GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog, + GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog, + InvalidRequestException: () => InvalidRequestException, + ListAccountRolesCommand: () => ListAccountRolesCommand, + ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog, + ListAccountsCommand: () => ListAccountsCommand, + ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog, + LogoutCommand: () => LogoutCommand, + LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog, + ResourceNotFoundException: () => ResourceNotFoundException, + RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog, + SSO: () => SSO, + SSOClient: () => SSOClient, + SSOServiceException: () => SSOServiceException, + TooManyRequestsException: () => TooManyRequestsException, + UnauthorizedException: () => UnauthorizedException, + __Client: () => import_smithy_client5.Client, + paginateListAccountRoles: () => paginateListAccountRoles, + paginateListAccounts: () => paginateListAccounts + }); + module2.exports = __toCommonJS2(src_exports); + var import_middleware_host_header = require_dist_cjs3(); + var import_middleware_logger = require_dist_cjs4(); + var import_middleware_recursion_detection = require_dist_cjs5(); + var import_middleware_user_agent = require_dist_cjs8(); + var import_config_resolver = require_dist_cjs11(); + var import_core5 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_middleware_content_length = require_dist_cjs34(); + var import_middleware_endpoint2 = require_dist_cjs18(); + var import_middleware_retry2 = require_dist_cjs33(); + var import_httpAuthSchemeProvider = require_httpAuthSchemeProvider2(); + var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "awsssoportal" + }; + }, "resolveClientEndpointParameters"); + var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var import_runtimeConfig = require_runtimeConfig(); + var import_region_config_resolver = require_dist_cjs43(); + var import_protocol_http8 = require_dist_cjs2(); + var import_smithy_client5 = require_dist_cjs32(); + var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; } + }; + }, "getHttpAuthExtensionConfiguration"); + var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; + }, "resolveHttpAuthRuntimeConfig"); + var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); + var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_smithy_client5.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_protocol_http8.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, import_smithy_client5.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, import_protocol_http8.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) + }; + }, "resolveRuntimeExtensions"); + var _SSOClient = class _SSOClient extends import_smithy_client5.Client { + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); + 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_resolver.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint2.resolveEndpointConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); + super(_config_8); + this.config = _config_8; + 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( + (0, import_core5.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new import_core5.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }) + }) + ); + this.middlewareStack.use((0, import_core5.getHttpSigningPlugin)(this.config)); } - return true; - } - function validateBoundary(boundary) { - const length = boundary.length; - if (length < 27 || length > 70) { - return false; + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); } - for (let i = 0; i < length; ++i) { - const cp = boundary.charCodeAt(i); - if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) { - return false; - } + }; + __name(_SSOClient, "SSOClient"); + var SSOClient = _SSOClient; + var import_middleware_serde2 = require_dist_cjs17(); + var _SSOServiceException = class _SSOServiceException2 extends import_smithy_client5.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOServiceException2.prototype); } - return true; - } - function multipartFormDataParser(input, mimeType) { - assert(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); - const boundaryString = mimeType.parameters.get("boundary"); - if (boundaryString === void 0) { - return "failure"; + }; + __name(_SSOServiceException, "SSOServiceException"); + var SSOServiceException = _SSOServiceException; + var _InvalidRequestException = class _InvalidRequestException2 extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + this.name = "InvalidRequestException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRequestException2.prototype); } - const boundary = Buffer.from(`--${boundaryString}`, "utf8"); - const entryList = []; - const position = { position: 0 }; - if (input[0] === 13 && input[1] === 10) { - position.position += 2; + }; + __name(_InvalidRequestException, "InvalidRequestException"); + var InvalidRequestException = _InvalidRequestException; + var _ResourceNotFoundException = class _ResourceNotFoundException2 extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts + }); + this.name = "ResourceNotFoundException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ResourceNotFoundException2.prototype); } - while (true) { - if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { - position.position += boundary.length; - } else { - return "failure"; - } - if (position.position === input.length - 2 && bufferStartsWith(input, dd, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) { - return entryList; - } - if (input[position.position] !== 13 || input[position.position + 1] !== 10) { - return "failure"; - } - position.position += 2; - const result = parseMultipartFormDataHeaders(input, position); - if (result === "failure") { - return "failure"; - } - let { name, filename, contentType, encoding } = result; - position.position += 2; - let body; - { - const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); - if (boundaryIndex === -1) { - return "failure"; - } - body = input.subarray(position.position, boundaryIndex - 4); - position.position += body.length; - if (encoding === "base64") { - body = Buffer.from(body.toString(), "base64"); - } - } - if (input[position.position] !== 13 || input[position.position + 1] !== 10) { - return "failure"; - } else { - position.position += 2; - } - let value; - if (filename !== null) { - contentType ??= "text/plain"; - if (!isAsciiString(contentType)) { - contentType = ""; - } - value = new File([body], filename, { type: contentType }); - } else { - value = utf8DecodeBytes(Buffer.from(body)); - } - assert(isUSVString(name)); - assert(typeof value === "string" && isUSVString(value) || isFileLike(value)); - entryList.push(makeEntry(name, value, filename)); + }; + __name(_ResourceNotFoundException, "ResourceNotFoundException"); + var ResourceNotFoundException = _ResourceNotFoundException; + var _TooManyRequestsException = class _TooManyRequestsException2 extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "TooManyRequestsException", + $fault: "client", + ...opts + }); + this.name = "TooManyRequestsException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _TooManyRequestsException2.prototype); } - } - function parseMultipartFormDataHeaders(input, position) { - let name = null; - let filename = null; - let contentType = null; - let encoding = null; - while (true) { - if (input[position.position] === 13 && input[position.position + 1] === 10) { - if (name === null) { - return "failure"; + }; + __name(_TooManyRequestsException, "TooManyRequestsException"); + var TooManyRequestsException = _TooManyRequestsException; + var _UnauthorizedException = class _UnauthorizedException2 extends SSOServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnauthorizedException", + $fault: "client", + ...opts + }); + this.name = "UnauthorizedException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnauthorizedException2.prototype); + } + }; + __name(_UnauthorizedException, "UnauthorizedException"); + var UnauthorizedException = _UnauthorizedException; + var GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING } + }), "GetRoleCredentialsRequestFilterSensitiveLog"); + var RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.secretAccessKey && { secretAccessKey: import_smithy_client5.SENSITIVE_STRING }, + ...obj.sessionToken && { sessionToken: import_smithy_client5.SENSITIVE_STRING } + }), "RoleCredentialsFilterSensitiveLog"); + var GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) } + }), "GetRoleCredentialsResponseFilterSensitiveLog"); + var ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING } + }), "ListAccountRolesRequestFilterSensitiveLog"); + var ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING } + }), "ListAccountsRequestFilterSensitiveLog"); + var LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING } + }), "LogoutRequestFilterSensitiveLog"); + var import_core22 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core5.requestBuilder)(input, context); + const headers = (0, import_smithy_client5.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/federation/credentials"); + const query = (0, import_smithy_client5.map)({ + [_rn]: [, (0, import_smithy_client5.expectNonNull)(input[_rN], `roleName`)], + [_ai]: [, (0, import_smithy_client5.expectNonNull)(input[_aI], `accountId`)] + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); + }, "se_GetRoleCredentialsCommand"); + var se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core5.requestBuilder)(input, context); + const headers = (0, import_smithy_client5.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/assignment/roles"); + const query = (0, import_smithy_client5.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + [_ai]: [, (0, import_smithy_client5.expectNonNull)(input[_aI], `accountId`)] + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); + }, "se_ListAccountRolesCommand"); + var se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core5.requestBuilder)(input, context); + const headers = (0, import_smithy_client5.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/assignment/accounts"); + const query = (0, import_smithy_client5.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()] + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); + }, "se_ListAccountsCommand"); + var se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core5.requestBuilder)(input, context); + const headers = (0, import_smithy_client5.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b.bp("/logout"); + let body; + b.m("POST").h(headers).b(body); + return b.build(); + }, "se_LogoutCommand"); + var de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + roleCredentials: import_smithy_client5._json + }); + Object.assign(contents, doc); + return contents; + }, "de_GetRoleCredentialsCommand"); + var de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + nextToken: import_smithy_client5.expectString, + roleList: import_smithy_client5._json + }); + Object.assign(contents, doc); + return contents; + }, "de_ListAccountRolesCommand"); + var de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + accountList: import_smithy_client5._json, + nextToken: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_ListAccountsCommand"); + var de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + await (0, import_smithy_client5.collectBody)(output.body, context); + return contents; + }, "de_LogoutCommand"); + var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core22.parseJsonErrorBody)(output.body, context) + }; + const errorCode = (0, import_core22.loadRestJsonErrorCode)(output, parsedOutput.body); + switch (errorCode) { + case "InvalidRequestException": + case "com.amazonaws.sso#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.sso#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "TooManyRequestsException": + case "com.amazonaws.sso#TooManyRequestsException": + throw await de_TooManyRequestsExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.sso#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode + }); + } + }, "de_CommandError"); + var throwDefaultError = (0, import_smithy_client5.withBaseException)(SSOServiceException); + var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + message: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidRequestExceptionRes"); + var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + message: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_ResourceNotFoundExceptionRes"); + var de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + message: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new TooManyRequestsException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_TooManyRequestsExceptionRes"); + var de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + message: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new UnauthorizedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_UnauthorizedExceptionRes"); + var deserializeMetadata = /* @__PURE__ */ __name((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"] + }), "deserializeMetadata"); + var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0), "isSerializableHeaderValue"); + var _aI = "accountId"; + var _aT = "accessToken"; + var _ai = "account_id"; + var _mR = "maxResults"; + var _mr = "max_result"; + var _nT = "nextToken"; + var _nt = "next_token"; + var _rN = "roleName"; + var _rn = "role_name"; + var _xasbt = "x-amz-sso_bearer_token"; + var _GetRoleCredentialsCommand = class _GetRoleCredentialsCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() { + }; + __name(_GetRoleCredentialsCommand, "GetRoleCredentialsCommand"); + var GetRoleCredentialsCommand = _GetRoleCredentialsCommand; + var _ListAccountRolesCommand = class _ListAccountRolesCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() { + }; + __name(_ListAccountRolesCommand, "ListAccountRolesCommand"); + var ListAccountRolesCommand = _ListAccountRolesCommand; + var _ListAccountsCommand = class _ListAccountsCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() { + }; + __name(_ListAccountsCommand, "ListAccountsCommand"); + var ListAccountsCommand = _ListAccountsCommand; + var _LogoutCommand = class _LogoutCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() { + }; + __name(_LogoutCommand, "LogoutCommand"); + var LogoutCommand = _LogoutCommand; + var commands = { + GetRoleCredentialsCommand, + ListAccountRolesCommand, + ListAccountsCommand, + LogoutCommand + }; + var _SSO = class _SSO extends SSOClient { + }; + __name(_SSO, "SSO"); + var SSO = _SSO; + (0, import_smithy_client5.createAggregatedClient)(commands, SSO); + var paginateListAccountRoles = (0, import_core5.createPaginator)(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); + var paginateListAccounts = (0, import_core5.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); + } +}); + +// node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider3 = __commonJS({ + "node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOOIDCHttpAuthSchemeProvider = exports2.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_middleware_1 = require_dist_cjs10(); + var defaultSSOOIDCHttpAuthSchemeParametersProvider = 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.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sso-oauth", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context } - return { name, filename, contentType, encoding }; - } - let headerName = collectASequenceOfBytes( - (char) => char !== 10 && char !== 13 && char !== 58, - input, - position - ); - headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); - if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { - return "failure"; + }) + }; + } + function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; + } + var defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateToken": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; } - if (input[position.position] !== 58) { - return "failure"; + case "RegisterClient": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; } - position.position++; - collectASequenceOfBytes( - (char) => char === 32 || char === 9, - input, - position - ); - switch (bufferToLowerCasedHeaderName(headerName)) { - case "content-disposition": { - name = filename = null; - if (!bufferStartsWith(input, formDataNameBuffer, position)) { - return "failure"; - } - position.position += 17; - name = parseMultipartFormDataName(input, position); - if (name === null) { - return "failure"; - } - if (bufferStartsWith(input, filenameBuffer, position)) { - let check = position.position + filenameBuffer.length; - if (input[check] === 42) { - position.position += 1; - check += 1; - } - if (input[check] !== 61 || input[check + 1] !== 34) { - return "failure"; - } - position.position += 12; - filename = parseMultipartFormDataName(input, position); - if (filename === null) { - return "failure"; - } - } - break; - } - case "content-type": { - let headerValue = collectASequenceOfBytes( - (char) => char !== 10 && char !== 13, - input, - position - ); - headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); - contentType = isomorphicDecode(headerValue); - break; - } - case "content-transfer-encoding": { - let headerValue = collectASequenceOfBytes( - (char) => char !== 10 && char !== 13, - input, - position - ); - headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); - encoding = isomorphicDecode(headerValue); - break; - } - default: { - collectASequenceOfBytes( - (char) => char !== 10 && char !== 13, - input, - position - ); - } + case "StartDeviceAuthorization": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; } - if (input[position.position] !== 13 && input[position.position + 1] !== 10) { - return "failure"; - } else { - position.position += 2; + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); } } - } - function parseMultipartFormDataName(input, position) { - assert(input[position.position - 1] === 34); - let name = collectASequenceOfBytes( - (char) => char !== 10 && char !== 13 && char !== 34, - input, - position - ); - if (input[position.position] !== 34) { - return null; - } else { - position.position++; - } - name = new TextDecoder().decode(name).replace(/%0A/ig, "\n").replace(/%0D/ig, "\r").replace(/%22/g, '"'); - return name; - } - function collectASequenceOfBytes(condition, input, position) { - let start = position.position; - while (start < input.length && condition(input[start])) { - ++start; - } - return input.subarray(position.position, position.position = start); - } - function removeChars(buf, leading, trailing, predicate) { - let lead = 0; - let trail = buf.length - 1; - if (leading) { - while (lead < buf.length && predicate(buf[lead])) lead++; - } - if (trailing) { - while (trail > 0 && predicate(buf[trail])) trail--; - } - return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); - } - function bufferStartsWith(buffer, start, position) { - if (buffer.length < start.length) { - return false; - } - for (let i = 0; i < start.length; i++) { - if (start[i] !== buffer[position.position + i]) { - return false; + return options; + }; + exports2.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider; + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0 + }; + }; + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + } +}); + +// node_modules/@aws-sdk/client-sso-oidc/package.json +var require_package3 = __commonJS({ + "node_modules/@aws-sdk/client-sso-oidc/package.json"(exports2, module2) { + module2.exports = { + name: "@aws-sdk/client-sso-oidc", + description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native", + version: "3.635.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-sso-oidc", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo sso-oidc" + }, + 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.635.0", + "@aws-sdk/credential-provider-node": "3.635.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + tslib: "^2.6.2" + }, + devDependencies: { + "@tsconfig/node16": "16.1.3", + "@types/node": "^16.18.96", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~4.9.5" + }, + engines: { + node: ">=16.0.0" + }, + typesVersions: { + "<4.0": { + "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", + peerDependencies: { + "@aws-sdk/client-sts": "^3.635.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-sso-oidc", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-sso-oidc" } - return true; - } - module2.exports = { - multipartFormDataParser, - validateBoundary }; } }); -// node_modules/undici/lib/web/fetch/body.js -var require_body2 = __commonJS({ - "node_modules/undici/lib/web/fetch/body.js"(exports2, module2) { +// node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js +var require_ruleset2 = __commonJS({ + "node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js"(exports2) { "use strict"; - var util = require_util8(); - var { - ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, - readableStreamClose, - createDeferredPromise, - fullyReadBody, - extractMimeType, - utf8DecodeBytes - } = require_util9(); - var { FormData } = require_formdata2(); - var { kState } = require_symbols7(); - var { webidl } = require_webidl2(); - var { Blob: Blob2 } = require("node:buffer"); - var assert = require("node:assert"); - var { isErrored } = require_util8(); - var { isArrayBuffer } = require("node:util/types"); - var { serializeAMimeType } = require_data_url(); - var { multipartFormDataParser } = require_formdata_parser(); - var textEncoder = new TextEncoder(); - function extractBody(object, keepalive = false) { - let stream = null; - if (object instanceof ReadableStream) { - stream = object; - } else if (isBlobLike(object)) { - stream = object.stream(); - } else { - stream = new ReadableStream({ - async pull(controller) { - const buffer = typeof source === "string" ? textEncoder.encode(source) : source; - if (buffer.byteLength) { - controller.enqueue(buffer); - } - queueMicrotask(() => readableStreamClose(controller)); - }, - start() { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ruleSet = void 0; + var u = "required"; + var v = "fn"; + var w = "argv"; + var x = "ref"; + var a = true; + var b = "isSet"; + var c = "booleanEquals"; + var d = "error"; + var e = "endpoint"; + var f = "tree"; + var g = "PartitionResult"; + var h = "getAttr"; + var i = { [u]: false, "type": "String" }; + var j = { [u]: true, "default": false, "type": "Boolean" }; + var k = { [x]: "Endpoint" }; + var l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }; + var m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }; + var n = {}; + var o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }; + var p = { [x]: g }; + var q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }; + var r = [l]; + var s = [m]; + var t = [{ [x]: "Region" }]; + var _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; + exports2.ruleSet = _data; + } +}); + +// node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver2 = __commonJS({ + "node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs7(); + var util_endpoints_2 = require_dist_cjs6(); + var ruleset_1 = require_ruleset2(); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context.logger + }); + }; + exports2.defaultEndpointResolver = defaultEndpointResolver; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared2 = __commonJS({ + "node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var smithy_client_1 = require_dist_cjs32(); + var url_parser_1 = require_dist_cjs16(); + var util_base64_1 = require_dist_cjs25(); + var util_utf8_1 = require_dist_cjs24(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider3(); + var endpointResolver_1 = require_endpointResolver2(); + var getRuntimeConfig = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() }, - type: "bytes" + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner() + } + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SSO OIDC", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js +var require_runtimeConfig2 = __commonJS({ + "node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package3()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var credential_provider_node_1 = require_dist_cjs52(); + var util_user_agent_node_1 = require_dist_cjs39(); + var config_resolver_1 = require_dist_cjs11(); + var hash_node_1 = require_dist_cjs40(); + var middleware_retry_1 = require_dist_cjs33(); + var node_config_provider_1 = require_dist_cjs14(); + var node_http_handler_1 = require_dist_cjs28(); + var util_body_length_node_1 = require_dist_cjs41(); + var util_retry_1 = require_dist_cjs20(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared2(); + var smithy_client_1 = require_dist_cjs32(); + var util_defaults_mode_node_1 = require_dist_cjs42(); + var smithy_client_2 = require_dist_cjs32(); + var getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + 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 + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + 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), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +var require_dist_cjs45 = __commonJS({ + "node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js"(exports2, module2) { + "use strict"; + 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, { + AccessDeniedException: () => AccessDeniedException, + AuthorizationPendingException: () => AuthorizationPendingException, + CreateTokenCommand: () => CreateTokenCommand, + CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog, + CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog, + CreateTokenWithIAMCommand: () => CreateTokenWithIAMCommand, + CreateTokenWithIAMRequestFilterSensitiveLog: () => CreateTokenWithIAMRequestFilterSensitiveLog, + CreateTokenWithIAMResponseFilterSensitiveLog: () => CreateTokenWithIAMResponseFilterSensitiveLog, + ExpiredTokenException: () => ExpiredTokenException, + InternalServerException: () => InternalServerException, + InvalidClientException: () => InvalidClientException, + InvalidClientMetadataException: () => InvalidClientMetadataException, + InvalidGrantException: () => InvalidGrantException, + InvalidRedirectUriException: () => InvalidRedirectUriException, + InvalidRequestException: () => InvalidRequestException, + InvalidRequestRegionException: () => InvalidRequestRegionException, + InvalidScopeException: () => InvalidScopeException, + RegisterClientCommand: () => RegisterClientCommand, + RegisterClientResponseFilterSensitiveLog: () => RegisterClientResponseFilterSensitiveLog, + SSOOIDC: () => SSOOIDC, + SSOOIDCClient: () => SSOOIDCClient, + SSOOIDCServiceException: () => SSOOIDCServiceException, + SlowDownException: () => SlowDownException, + StartDeviceAuthorizationCommand: () => StartDeviceAuthorizationCommand, + StartDeviceAuthorizationRequestFilterSensitiveLog: () => StartDeviceAuthorizationRequestFilterSensitiveLog, + UnauthorizedClientException: () => UnauthorizedClientException, + UnsupportedGrantTypeException: () => UnsupportedGrantTypeException, + __Client: () => import_smithy_client5.Client + }); + module2.exports = __toCommonJS2(src_exports); + var import_middleware_host_header = require_dist_cjs3(); + var import_middleware_logger = require_dist_cjs4(); + var import_middleware_recursion_detection = require_dist_cjs5(); + var import_middleware_user_agent = require_dist_cjs8(); + var import_config_resolver = require_dist_cjs11(); + var import_core5 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_middleware_content_length = require_dist_cjs34(); + var import_middleware_endpoint2 = require_dist_cjs18(); + var import_middleware_retry2 = require_dist_cjs33(); + var import_httpAuthSchemeProvider = require_httpAuthSchemeProvider3(); + var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "sso-oauth" + }; + }, "resolveClientEndpointParameters"); + var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var import_runtimeConfig = require_runtimeConfig2(); + var import_region_config_resolver = require_dist_cjs43(); + var import_protocol_http8 = require_dist_cjs2(); + var import_smithy_client5 = require_dist_cjs32(); + var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }, "getHttpAuthExtensionConfiguration"); + var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; + }, "resolveHttpAuthRuntimeConfig"); + var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); + var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_smithy_client5.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_protocol_http8.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, import_smithy_client5.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, import_protocol_http8.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) + }; + }, "resolveRuntimeExtensions"); + var _SSOOIDCClient = class _SSOOIDCClient extends import_smithy_client5.Client { + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); + 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_resolver.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint2.resolveEndpointConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); + super(_config_8); + this.config = _config_8; + 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( + (0, import_core5.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new import_core5.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }) + }) + ); + this.middlewareStack.use((0, import_core5.getHttpSigningPlugin)(this.config)); + } + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); + } + }; + __name(_SSOOIDCClient, "SSOOIDCClient"); + var SSOOIDCClient = _SSOOIDCClient; + var import_middleware_serde2 = require_dist_cjs17(); + var _SSOOIDCServiceException = class _SSOOIDCServiceException2 extends import_smithy_client5.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOOIDCServiceException2.prototype); + } + }; + __name(_SSOOIDCServiceException, "SSOOIDCServiceException"); + var SSOOIDCServiceException = _SSOOIDCServiceException; + var _AccessDeniedException = class _AccessDeniedException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts }); + this.name = "AccessDeniedException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _AccessDeniedException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; } - assert(isReadableStreamLike(stream)); - let action = null; - let source = null; - let length = null; - let type = null; - if (typeof object === "string") { - source = object; - type = "text/plain;charset=UTF-8"; - } else if (object instanceof URLSearchParams) { - source = object.toString(); - type = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isArrayBuffer(object)) { - source = new Uint8Array(object.slice()); - } else if (ArrayBuffer.isView(object)) { - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); - } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, "0")}`; - const prefix = `--${boundary}\r -Content-Disposition: form-data`; - const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); - const blobParts = []; - const rn = new Uint8Array([13, 10]); - length = 0; - let hasUnknownSizeValue = false; - for (const [name, value] of object) { - if (typeof value === "string") { - const chunk2 = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r -\r -${normalizeLinefeeds(value)}\r -`); - blobParts.push(chunk2); - length += chunk2.byteLength; - } else { - const chunk2 = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r -Content-Type: ${value.type || "application/octet-stream"}\r -\r -`); - blobParts.push(chunk2, value, rn); - if (typeof value.size === "number") { - length += chunk2.byteLength + value.size + rn.byteLength; - } else { - hasUnknownSizeValue = true; - } - } + }; + __name(_AccessDeniedException, "AccessDeniedException"); + var AccessDeniedException = _AccessDeniedException; + var _AuthorizationPendingException = class _AuthorizationPendingException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "AuthorizationPendingException", + $fault: "client", + ...opts + }); + this.name = "AuthorizationPendingException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _AuthorizationPendingException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_AuthorizationPendingException, "AuthorizationPendingException"); + var AuthorizationPendingException = _AuthorizationPendingException; + var _ExpiredTokenException = class _ExpiredTokenException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + this.name = "ExpiredTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExpiredTokenException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_ExpiredTokenException, "ExpiredTokenException"); + var ExpiredTokenException = _ExpiredTokenException; + var _InternalServerException = class _InternalServerException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts + }); + this.name = "InternalServerException"; + this.$fault = "server"; + Object.setPrototypeOf(this, _InternalServerException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_InternalServerException, "InternalServerException"); + var InternalServerException = _InternalServerException; + var _InvalidClientException = class _InvalidClientException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidClientException", + $fault: "client", + ...opts + }); + this.name = "InvalidClientException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidClientException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_InvalidClientException, "InvalidClientException"); + var InvalidClientException = _InvalidClientException; + var _InvalidGrantException = class _InvalidGrantException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidGrantException", + $fault: "client", + ...opts + }); + this.name = "InvalidGrantException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidGrantException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_InvalidGrantException, "InvalidGrantException"); + var InvalidGrantException = _InvalidGrantException; + var _InvalidRequestException = class _InvalidRequestException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + this.name = "InvalidRequestException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRequestException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_InvalidRequestException, "InvalidRequestException"); + var InvalidRequestException = _InvalidRequestException; + var _InvalidScopeException = class _InvalidScopeException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidScopeException", + $fault: "client", + ...opts + }); + this.name = "InvalidScopeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidScopeException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_InvalidScopeException, "InvalidScopeException"); + var InvalidScopeException = _InvalidScopeException; + var _SlowDownException = class _SlowDownException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "SlowDownException", + $fault: "client", + ...opts + }); + this.name = "SlowDownException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _SlowDownException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_SlowDownException, "SlowDownException"); + var SlowDownException = _SlowDownException; + var _UnauthorizedClientException = class _UnauthorizedClientException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnauthorizedClientException", + $fault: "client", + ...opts + }); + this.name = "UnauthorizedClientException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnauthorizedClientException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_UnauthorizedClientException, "UnauthorizedClientException"); + var UnauthorizedClientException = _UnauthorizedClientException; + var _UnsupportedGrantTypeException = class _UnsupportedGrantTypeException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnsupportedGrantTypeException", + $fault: "client", + ...opts + }); + this.name = "UnsupportedGrantTypeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnsupportedGrantTypeException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_UnsupportedGrantTypeException, "UnsupportedGrantTypeException"); + var UnsupportedGrantTypeException = _UnsupportedGrantTypeException; + var _InvalidRequestRegionException = class _InvalidRequestRegionException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestRegionException", + $fault: "client", + ...opts + }); + this.name = "InvalidRequestRegionException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRequestRegionException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + this.endpoint = opts.endpoint; + this.region = opts.region; + } + }; + __name(_InvalidRequestRegionException, "InvalidRequestRegionException"); + var InvalidRequestRegionException = _InvalidRequestRegionException; + var _InvalidClientMetadataException = class _InvalidClientMetadataException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidClientMetadataException", + $fault: "client", + ...opts + }); + this.name = "InvalidClientMetadataException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidClientMetadataException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_InvalidClientMetadataException, "InvalidClientMetadataException"); + var InvalidClientMetadataException = _InvalidClientMetadataException; + var _InvalidRedirectUriException = class _InvalidRedirectUriException2 extends SSOOIDCServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRedirectUriException", + $fault: "client", + ...opts + }); + this.name = "InvalidRedirectUriException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRedirectUriException2.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + __name(_InvalidRedirectUriException, "InvalidRedirectUriException"); + var InvalidRedirectUriException = _InvalidRedirectUriException; + var CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.clientSecret && { clientSecret: import_smithy_client5.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.codeVerifier && { codeVerifier: import_smithy_client5.SENSITIVE_STRING } + }), "CreateTokenRequestFilterSensitiveLog"); + var CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.idToken && { idToken: import_smithy_client5.SENSITIVE_STRING } + }), "CreateTokenResponseFilterSensitiveLog"); + var CreateTokenWithIAMRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.refreshToken && { refreshToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.assertion && { assertion: import_smithy_client5.SENSITIVE_STRING }, + ...obj.subjectToken && { subjectToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.codeVerifier && { codeVerifier: import_smithy_client5.SENSITIVE_STRING } + }), "CreateTokenWithIAMRequestFilterSensitiveLog"); + var CreateTokenWithIAMResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client5.SENSITIVE_STRING }, + ...obj.idToken && { idToken: import_smithy_client5.SENSITIVE_STRING } + }), "CreateTokenWithIAMResponseFilterSensitiveLog"); + var RegisterClientResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.clientSecret && { clientSecret: import_smithy_client5.SENSITIVE_STRING } + }), "RegisterClientResponseFilterSensitiveLog"); + var StartDeviceAuthorizationRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.clientSecret && { clientSecret: import_smithy_client5.SENSITIVE_STRING } + }), "StartDeviceAuthorizationRequestFilterSensitiveLog"); + var import_core22 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core5.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b.bp("/token"); + let body; + body = JSON.stringify( + (0, import_smithy_client5.take)(input, { + clientId: [], + clientSecret: [], + code: [], + codeVerifier: [], + deviceCode: [], + grantType: [], + redirectUri: [], + refreshToken: [], + scope: (_) => (0, import_smithy_client5._json)(_) + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); + }, "se_CreateTokenCommand"); + var se_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core5.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b.bp("/token"); + const query = (0, import_smithy_client5.map)({ + [_ai]: [, "t"] + }); + let body; + body = JSON.stringify( + (0, import_smithy_client5.take)(input, { + assertion: [], + clientId: [], + code: [], + codeVerifier: [], + grantType: [], + redirectUri: [], + refreshToken: [], + requestedTokenType: [], + scope: (_) => (0, import_smithy_client5._json)(_), + subjectToken: [], + subjectTokenType: [] + }) + ); + b.m("POST").h(headers).q(query).b(body); + return b.build(); + }, "se_CreateTokenWithIAMCommand"); + var se_RegisterClientCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core5.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b.bp("/client/register"); + let body; + body = JSON.stringify( + (0, import_smithy_client5.take)(input, { + clientName: [], + clientType: [], + entitledApplicationArn: [], + grantTypes: (_) => (0, import_smithy_client5._json)(_), + issuerUrl: [], + redirectUris: (_) => (0, import_smithy_client5._json)(_), + scopes: (_) => (0, import_smithy_client5._json)(_) + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); + }, "se_RegisterClientCommand"); + var se_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (input, context) => { + const b = (0, import_core5.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b.bp("/device_authorization"); + let body; + body = JSON.stringify( + (0, import_smithy_client5.take)(input, { + clientId: [], + clientSecret: [], + startUrl: [] + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); + }, "se_StartDeviceAuthorizationCommand"); + var de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + accessToken: import_smithy_client5.expectString, + expiresIn: import_smithy_client5.expectInt32, + idToken: import_smithy_client5.expectString, + refreshToken: import_smithy_client5.expectString, + tokenType: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_CreateTokenCommand"); + var de_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + accessToken: import_smithy_client5.expectString, + expiresIn: import_smithy_client5.expectInt32, + idToken: import_smithy_client5.expectString, + issuedTokenType: import_smithy_client5.expectString, + refreshToken: import_smithy_client5.expectString, + scope: import_smithy_client5._json, + tokenType: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_CreateTokenWithIAMCommand"); + var de_RegisterClientCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + authorizationEndpoint: import_smithy_client5.expectString, + clientId: import_smithy_client5.expectString, + clientIdIssuedAt: import_smithy_client5.expectLong, + clientSecret: import_smithy_client5.expectString, + clientSecretExpiresAt: import_smithy_client5.expectLong, + tokenEndpoint: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_RegisterClientCommand"); + var de_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client5.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core22.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client5.take)(data, { + deviceCode: import_smithy_client5.expectString, + expiresIn: import_smithy_client5.expectInt32, + interval: import_smithy_client5.expectInt32, + userCode: import_smithy_client5.expectString, + verificationUri: import_smithy_client5.expectString, + verificationUriComplete: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_StartDeviceAuthorizationCommand"); + var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core22.parseJsonErrorBody)(output.body, context) + }; + const errorCode = (0, import_core22.loadRestJsonErrorCode)(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.ssooidc#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "AuthorizationPendingException": + case "com.amazonaws.ssooidc#AuthorizationPendingException": + throw await de_AuthorizationPendingExceptionRes(parsedOutput, context); + case "ExpiredTokenException": + case "com.amazonaws.ssooidc#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.ssooidc#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "InvalidClientException": + case "com.amazonaws.ssooidc#InvalidClientException": + throw await de_InvalidClientExceptionRes(parsedOutput, context); + case "InvalidGrantException": + case "com.amazonaws.ssooidc#InvalidGrantException": + throw await de_InvalidGrantExceptionRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.ssooidc#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "InvalidScopeException": + case "com.amazonaws.ssooidc#InvalidScopeException": + throw await de_InvalidScopeExceptionRes(parsedOutput, context); + case "SlowDownException": + case "com.amazonaws.ssooidc#SlowDownException": + throw await de_SlowDownExceptionRes(parsedOutput, context); + case "UnauthorizedClientException": + case "com.amazonaws.ssooidc#UnauthorizedClientException": + throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); + case "UnsupportedGrantTypeException": + case "com.amazonaws.ssooidc#UnsupportedGrantTypeException": + throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context); + case "InvalidRequestRegionException": + case "com.amazonaws.ssooidc#InvalidRequestRegionException": + throw await de_InvalidRequestRegionExceptionRes(parsedOutput, context); + case "InvalidClientMetadataException": + case "com.amazonaws.ssooidc#InvalidClientMetadataException": + throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context); + case "InvalidRedirectUriException": + case "com.amazonaws.ssooidc#InvalidRedirectUriException": + throw await de_InvalidRedirectUriExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode + }); + } + }, "de_CommandError"); + var throwDefaultError = (0, import_smithy_client5.withBaseException)(SSOOIDCServiceException); + var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_AccessDeniedExceptionRes"); + var de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new AuthorizationPendingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_AuthorizationPendingExceptionRes"); + var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_ExpiredTokenExceptionRes"); + var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InternalServerExceptionRes"); + var de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidClientExceptionRes"); + var de_InvalidClientMetadataExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidClientMetadataException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidClientMetadataExceptionRes"); + var de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidGrantException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidGrantExceptionRes"); + var de_InvalidRedirectUriExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRedirectUriException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidRedirectUriExceptionRes"); + var de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidRequestExceptionRes"); + var de_InvalidRequestRegionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + endpoint: import_smithy_client5.expectString, + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString, + region: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestRegionException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidRequestRegionExceptionRes"); + var de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidScopeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidScopeExceptionRes"); + var de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new SlowDownException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_SlowDownExceptionRes"); + var de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new UnauthorizedClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_UnauthorizedClientExceptionRes"); + var de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client5.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client5.take)(data, { + error: import_smithy_client5.expectString, + error_description: import_smithy_client5.expectString + }); + Object.assign(contents, doc); + const exception = new UnsupportedGrantTypeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body); + }, "de_UnsupportedGrantTypeExceptionRes"); + var deserializeMetadata = /* @__PURE__ */ __name((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"] + }), "deserializeMetadata"); + var _ai = "aws_iam"; + var _CreateTokenCommand = class _CreateTokenCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() { + }; + __name(_CreateTokenCommand, "CreateTokenCommand"); + var CreateTokenCommand = _CreateTokenCommand; + var _CreateTokenWithIAMCommand = class _CreateTokenWithIAMCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSSOOIDCService", "CreateTokenWithIAM", {}).n("SSOOIDCClient", "CreateTokenWithIAMCommand").f(CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog).ser(se_CreateTokenWithIAMCommand).de(de_CreateTokenWithIAMCommand).build() { + }; + __name(_CreateTokenWithIAMCommand, "CreateTokenWithIAMCommand"); + var CreateTokenWithIAMCommand = _CreateTokenWithIAMCommand; + var _RegisterClientCommand = class _RegisterClientCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSSOOIDCService", "RegisterClient", {}).n("SSOOIDCClient", "RegisterClientCommand").f(void 0, RegisterClientResponseFilterSensitiveLog).ser(se_RegisterClientCommand).de(de_RegisterClientCommand).build() { + }; + __name(_RegisterClientCommand, "RegisterClientCommand"); + var RegisterClientCommand = _RegisterClientCommand; + var _StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSSOOIDCService", "StartDeviceAuthorization", {}).n("SSOOIDCClient", "StartDeviceAuthorizationCommand").f(StartDeviceAuthorizationRequestFilterSensitiveLog, void 0).ser(se_StartDeviceAuthorizationCommand).de(de_StartDeviceAuthorizationCommand).build() { + }; + __name(_StartDeviceAuthorizationCommand, "StartDeviceAuthorizationCommand"); + var StartDeviceAuthorizationCommand = _StartDeviceAuthorizationCommand; + var commands = { + CreateTokenCommand, + CreateTokenWithIAMCommand, + RegisterClientCommand, + StartDeviceAuthorizationCommand + }; + var _SSOOIDC = class _SSOOIDC extends SSOOIDCClient { + }; + __name(_SSOOIDC, "SSOOIDC"); + var SSOOIDC = _SSOOIDC; + (0, import_smithy_client5.createAggregatedClient)(commands, SSOOIDC); + } +}); + +// node_modules/@aws-sdk/token-providers/dist-cjs/index.js +var require_dist_cjs46 = __commonJS({ + "node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + 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 __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromSso: () => fromSso, + fromStatic: () => fromStatic, + nodeProvider: () => nodeProvider + }); + module2.exports = __toCommonJS2(src_exports); + var EXPIRE_WINDOW_MS = 5 * 60 * 1e3; + var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; + var ssoOidcClientsHash = {}; + var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion) => { + const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM2(require_dist_cjs45())); + if (ssoOidcClientsHash[ssoRegion]) { + return ssoOidcClientsHash[ssoRegion]; + } + const ssoOidcClient = new SSOOIDCClient({ region: ssoRegion }); + ssoOidcClientsHash[ssoRegion] = ssoOidcClient; + return ssoOidcClient; + }, "getSsoOidcClient"); + var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion) => { + const { CreateTokenCommand } = await Promise.resolve().then(() => __toESM2(require_dist_cjs45())); + const ssoOidcClient = await getSsoOidcClient(ssoRegion); + return ssoOidcClient.send( + new CreateTokenCommand({ + clientId: ssoToken.clientId, + clientSecret: ssoToken.clientSecret, + refreshToken: ssoToken.refreshToken, + grantType: "refresh_token" + }) + ); + }, "getNewSsoOidcToken"); + var import_property_provider2 = require_dist_cjs12(); + var validateTokenExpiry = /* @__PURE__ */ __name((token) => { + if (token.expiration && token.expiration.getTime() < Date.now()) { + throw new import_property_provider2.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); + } + }, "validateTokenExpiry"); + var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => { + if (typeof value === "undefined") { + throw new import_property_provider2.TokenProviderError( + `Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, + false + ); + } + }, "validateTokenKey"); + var import_shared_ini_file_loader = require_dist_cjs13(); + var import_fs = require("fs"); + var { writeFile } = import_fs.promises; + var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => { + const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id); + const tokenString = JSON.stringify(ssoToken, null, 2); + return writeFile(tokenFilepath, tokenString); + }, "writeSSOTokenToFile"); + var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); + var fromSso = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/token-providers - fromSso"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profileName = (0, import_shared_ini_file_loader.getProfileName)(init); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider2.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); + } else if (!profile["sso_session"]) { + throw new import_property_provider2.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); + } + const ssoSessionName = profile["sso_session"]; + const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); + const ssoSession = ssoSessions[ssoSessionName]; + if (!ssoSession) { + throw new import_property_provider2.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 import_property_provider2.TokenProviderError( + `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, + false + ); } - const chunk = textEncoder.encode(`--${boundary}--`); - blobParts.push(chunk); - length += chunk.byteLength; - if (hasUnknownSizeValue) { - length = null; + } + const ssoStartUrl = ssoSession["sso_start_url"]; + const ssoRegion = ssoSession["sso_region"]; + let ssoToken; + try { + ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName); + } catch (e) { + throw new import_property_provider2.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); + const { accessToken, expiresAt } = ssoToken; + const existingToken = { token: accessToken, expiration: new Date(expiresAt) }; + if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) { + return existingToken; + } + if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) { + validateTokenExpiry(existingToken); + return existingToken; + } + validateTokenKey("clientId", ssoToken.clientId, true); + validateTokenKey("clientSecret", ssoToken.clientSecret, true); + validateTokenKey("refreshToken", ssoToken.refreshToken, true); + try { + lastRefreshAttemptTime.setTime(Date.now()); + const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion); + validateTokenKey("accessToken", newSsoOidcToken.accessToken); + validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); + const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3); + try { + await writeSSOTokenToFile(ssoSessionName, { + ...ssoToken, + accessToken: newSsoOidcToken.accessToken, + expiresAt: newTokenExpiration.toISOString(), + refreshToken: newSsoOidcToken.refreshToken + }); + } catch (error) { } - source = object; - action = async function* () { - for (const part of blobParts) { - if (part.stream) { - yield* part.stream(); - } else { - yield part; - } - } + return { + token: newSsoOidcToken.accessToken, + expiration: newTokenExpiration }; - type = `multipart/form-data; boundary=${boundary}`; - } else if (isBlobLike(object)) { - source = object; - length = object.size; - if (object.type) { - type = object.type; - } - } else if (typeof object[Symbol.asyncIterator] === "function") { - if (keepalive) { - throw new TypeError("keepalive"); + } catch (error) { + validateTokenExpiry(existingToken); + return existingToken; + } + }, "fromSso"); + var fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => { + logger == null ? void 0 : logger.debug("@aws-sdk/token-providers - fromStatic"); + if (!token || !token.token) { + throw new import_property_provider2.TokenProviderError(`Please pass a valid token to fromStatic`, false); + } + return token; + }, "fromStatic"); + var nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)(fromSso(init), async () => { + throw new import_property_provider2.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 + ), "nodeProvider"); + } +}); + +// node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +var require_dist_cjs47 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports2, module2) { + "use strict"; + 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 __esm2 = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res; + }; + 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 loadSso_exports = {}; + __export2(loadSso_exports, { + GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand, + SSOClient: () => import_client_sso.SSOClient + }); + var import_client_sso; + var init_loadSso = __esm2({ + "src/loadSso.ts"() { + "use strict"; + import_client_sso = require_dist_cjs44(); + } + }); + var src_exports = {}; + __export2(src_exports, { + fromSSO: () => fromSSO, + isSsoProfile: () => isSsoProfile, + validateSsoProfile: () => validateSsoProfile + }); + module2.exports = __toCommonJS2(src_exports); + var isSsoProfile = /* @__PURE__ */ __name((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"), "isSsoProfile"); + var import_token_providers = require_dist_cjs46(); + var import_property_provider2 = require_dist_cjs12(); + var import_shared_ini_file_loader = require_dist_cjs13(); + var SHOULD_FAIL_CREDENTIAL_CHAIN = false; + var resolveSSOCredentials = /* @__PURE__ */ __name(async ({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig, + profile, + logger + }) => { + let token; + const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; + if (ssoSession) { + try { + const _token = await (0, import_token_providers.fromSso)({ profile })(); + token = { + accessToken: _token.token, + expiresAt: new Date(_token.expiration).toISOString() + }; + } catch (e) { + throw new import_property_provider2.CredentialsProviderError(e.message, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); } - if (util.isDisturbed(object) || object.locked) { - throw new TypeError( - "Response body object should not be disturbed or locked" - ); + } else { + try { + token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl); + } catch (e) { + throw new import_property_provider2.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); } - stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); } - if (typeof source === "string" || util.isBuffer(source)) { - length = Buffer.byteLength(source); + if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { + throw new import_property_provider2.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); } - if (action != null) { - let iterator; - stream = new ReadableStream({ - async start() { - iterator = action(object)[Symbol.asyncIterator](); - }, - async pull(controller) { - const { value, done } = await iterator.next(); - if (done) { - queueMicrotask(() => { - controller.close(); - controller.byobRequest?.respond(0); - }); - } else { - if (!isErrored(stream)) { - const buffer = new Uint8Array(value); - if (buffer.byteLength) { - controller.enqueue(buffer); - } - } - } - return controller.desiredSize > 0; - }, - async cancel(reason) { - await iterator.return(); - }, - type: "bytes" + const { accessToken } = token; + const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports)); + const sso = ssoClient || new SSOClient2( + Object.assign({}, clientConfig ?? {}, { + region: (clientConfig == null ? void 0 : clientConfig.region) ?? ssoRegion + }) + ); + let ssoResp; + try { + ssoResp = await sso.send( + new GetRoleCredentialsCommand2({ + accountId: ssoAccountId, + roleName: ssoRoleName, + accessToken + }) + ); + } catch (e) { + throw new import_property_provider2.CredentialsProviderError(e, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger }); } - const body = { stream, source, length }; - return [body, type]; - } - function safelyExtractBody(object, keepalive = false) { - if (object instanceof ReadableStream) { - assert(!util.isDisturbed(object), "The body has already been consumed."); - assert(!object.locked, "The stream is locked."); + const { + roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} + } = ssoResp; + if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { + throw new import_property_provider2.CredentialsProviderError("SSO returns an invalid temporary credential.", { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger + }); } - return extractBody(object, keepalive); + return { + accessKeyId, + secretAccessKey, + sessionToken, + expiration: new Date(expiration), + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + }, "resolveSSOCredentials"); + var validateSsoProfile = /* @__PURE__ */ __name((profile, logger) => { + 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 import_property_provider2.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 } + ); + } + return profile; + }, "validateSsoProfile"); + var fromSSO = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-sso - fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + const { ssoClient } = init; + const profileName = (0, import_shared_ini_file_loader.getProfileName)(init); + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger }); + } + if (!isSsoProfile(profile)) { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { + logger: init.logger + }); + } + if (profile == null ? void 0 : profile.sso_session) { + const ssoSessions = await (0, import_shared_ini_file_loader.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 import_property_provider2.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, { + tryNextLink: false, + logger: init.logger + }); + } + if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { + throw new import_property_provider2.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, { + tryNextLink: false, + logger: init.logger + }); + } + profile.sso_region = session.sso_region; + profile.sso_start_url = session.sso_start_url; + } + const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile( + profile, + init.logger + ); + return resolveSSOCredentials({ + ssoStartUrl: sso_start_url, + ssoSession: sso_session, + ssoAccountId: sso_account_id, + ssoRegion: sso_region, + ssoRoleName: sso_role_name, + ssoClient, + clientConfig: init.clientConfig, + profile: profileName + }); + } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { + throw new import_property_provider2.CredentialsProviderError( + 'Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', + { tryNextLink: false, logger: init.logger } + ); + } else { + return resolveSSOCredentials({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig: init.clientConfig, + profile: profileName + }); + } + }, "fromSSO"); + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider4 = __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 core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_middleware_1 = require_dist_cjs10(); + var STSClient_1 = require_STSClient(); + var defaultSTSHttpAuthSchemeParametersProvider = 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 = defaultSTSHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sts", + region: authParameters.region + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context + } + }) + }; } - function cloneBody(body) { - const [out1, out2] = body.stream.tee(); - body.stream = out1; + function createSmithyApiNoAuthHttpAuthOption(authParameters) { return { - stream: out2, - length: body.length, - source: body.source + schemeId: "smithy.api#noAuth" }; } - function throwIfAborted(state) { - if (state.aborted) { - throw new DOMException("The operation was aborted.", "AbortError"); + var defaultSTSHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "AssumeRoleWithSAML": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "AssumeRoleWithWebIdentity": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } } - } - function bodyMixinMethods(instance) { - const methods = { - blob() { - return consumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this); - if (mimeType === null) { - mimeType = ""; - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType); - } - return new Blob2([bytes], { type: mimeType }); - }, instance, false); + return options; + }; + exports2.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider; + var resolveStsAuthConfig = (input) => ({ + ...input, + stsClientCtor: STSClient_1.STSClient + }); + exports2.resolveStsAuthConfig = resolveStsAuthConfig; + var resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, exports2.resolveStsAuthConfig)(config); + const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0); + return { + ...config_1 + }; + }; + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + } +}); + +// 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 resolveClientEndpointParameters = (options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + defaultSigningName: "sts" + }; + }; + exports2.resolveClientEndpointParameters = resolveClientEndpointParameters; + 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_package4 = __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.635.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-sts", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo sts", + test: "yarn test:unit", + "test:unit": "jest" + }, + 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/client-sso-oidc": "3.635.0", + "@aws-sdk/core": "3.635.0", + "@aws-sdk/credential-provider-node": "3.635.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.632.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.632.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.4.0", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.15", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.2.0", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.15", + "@smithy/util-defaults-mode-node": "^3.0.15", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + tslib: "^2.6.2" + }, + devDependencies: { + "@tsconfig/node16": "16.1.3", + "@types/node": "^16.18.96", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~4.9.5" + }, + engines: { + node: ">=16.0.0" + }, + typesVersions: { + "<4.0": { + "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/client-sts/dist-cjs/endpoint/ruleset.js +var require_ruleset3 = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ruleSet = void 0; + var F = "required"; + var G = "type"; + var H = "fn"; + var I = "argv"; + var J = "ref"; + var a = false; + var b = true; + var c = "booleanEquals"; + var d = "stringEquals"; + var e = "sigv4"; + var f = "sts"; + var g = "us-east-1"; + var h = "endpoint"; + var i = "https://sts.{Region}.{PartitionResult#dnsSuffix}"; + var j = "tree"; + var k = "error"; + var l = "getAttr"; + var m = { [F]: false, [G]: "String" }; + var n = { [F]: true, "default": false, [G]: "Boolean" }; + var o = { [J]: "Endpoint" }; + var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }; + var q = { [J]: "Region" }; + var r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }; + var s = { [J]: "UseFIPS" }; + var t = { [J]: "UseDualStack" }; + var u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }; + var v = {}; + var w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }; + var x = { [H]: c, [I]: [s, true] }; + var y = { [H]: c, [I]: [t, true] }; + var z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }; + var A = { [J]: "PartitionResult" }; + var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }; + var C = [{ [H]: "isSet", [I]: [o] }]; + var D = [x]; + var E = [y]; + var _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] }; + exports2.ruleSet = _data; + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver3 = __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_cjs7(); + var util_endpoints_2 = require_dist_cjs6(); + var ruleset_1 = require_ruleset3(); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context.logger + }); + }; + exports2.defaultEndpointResolver = defaultEndpointResolver; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared3 = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var smithy_client_1 = require_dist_cjs32(); + var url_parser_1 = require_dist_cjs16(); + var util_base64_1 = require_dist_cjs25(); + var util_utf8_1 = require_dist_cjs24(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4(); + var endpointResolver_1 = require_endpointResolver3(); + var getRuntimeConfig = (config) => { + return { + apiVersion: "2011-06-15", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner() + } + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "STS", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js +var require_runtimeConfig3 = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package4()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var credential_provider_node_1 = require_dist_cjs52(); + var util_user_agent_node_1 = require_dist_cjs39(); + var config_resolver_1 = require_dist_cjs11(); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var hash_node_1 = require_dist_cjs40(); + var middleware_retry_1 = require_dist_cjs33(); + var node_config_provider_1 = require_dist_cjs14(); + var node_http_handler_1 = require_dist_cjs28(); + var util_body_length_node_1 = require_dist_cjs41(); + var util_retry_1 = require_dist_cjs20(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared3(); + var smithy_client_1 = require_dist_cjs32(); + var util_defaults_mode_node_1 = require_dist_cjs42(); + var smithy_client_2 = require_dist_cjs32(); + var getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await (0, credential_provider_node_1.defaultProvider)(idProps?.__config || {})()), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner() + } + ], + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + 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 + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + 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), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js +var require_httpAuthExtensionConfiguration = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthRuntimeConfig = exports2.getHttpAuthExtensionConfiguration = void 0; + var getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } }, - arrayBuffer() { - return consumeBody(this, (bytes) => { - return bytes.buffer; - }, instance, true); + httpAuthSchemes() { + return _httpAuthSchemes; }, - text() { - return consumeBody(this, utf8DecodeBytes, instance, false); + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; }, - json() { - return consumeBody(this, parseJSONFromBytes, instance, false); + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; }, - formData() { - return consumeBody(this, (value) => { - const mimeType = bodyMimeType(this); - if (mimeType !== null) { - switch (mimeType.essence) { - case "multipart/form-data": { - const parsed = multipartFormDataParser(value, mimeType); - if (parsed === "failure") { - throw new TypeError("Failed to parse body as FormData."); - } - const fd = new FormData(); - fd[kState] = parsed; - return fd; - } - case "application/x-www-form-urlencoded": { - const entries = new URLSearchParams(value.toString()); - const fd = new FormData(); - for (const [name, value2] of entries) { - fd.append(name, value2); - } - return fd; - } - } - } - throw new TypeError( - 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' - ); - }, instance, false); + setCredentials(credentials) { + _credentials = credentials; }, - bytes() { - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes.buffer, 0, bytes.byteLength); - }, instance, true); + credentials() { + return _credentials; } }; - return methods; - } - function mixinBody(prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)); - } - async function consumeBody(object, convertBytesToJSValue, instance, shouldClone) { - webidl.brandCheck(object, instance); - if (bodyUnusable(object[kState].body)) { - throw new TypeError("Body is unusable: Body has already been read"); - } - throwIfAborted(object[kState]); - const promise = createDeferredPromise(); - const errorSteps = (error) => promise.reject(error); - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)); - } catch (e) { - errorSteps(e); - } + }; + exports2.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration; + var resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() }; - if (object[kState].body == null) { - successSteps(Buffer.allocUnsafe(0)); - return promise.promise; - } - await fullyReadBody(object[kState].body, successSteps, errorSteps, shouldClone); - return promise.promise; - } - function bodyUnusable(body) { - return body != null && (body.stream.locked || util.isDisturbed(body.stream)); - } - function parseJSONFromBytes(bytes) { - return JSON.parse(utf8DecodeBytes(bytes)); - } - function bodyMimeType(requestOrResponse) { - const headers = requestOrResponse[kState].headersList; - const mimeType = extractMimeType(headers); - if (mimeType === "failure") { - return null; - } - return mimeType; - } - module2.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody }; + exports2.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig; } }); -// node_modules/undici/lib/dispatcher/client-h1.js -var require_client_h1 = __commonJS({ - "node_modules/undici/lib/dispatcher/client-h1.js"(exports2, module2) { +// 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"; - var assert = require("node:assert"); - var util = require_util8(); - var { channels } = require_diagnostics(); - var timers = require_timers2(); - var { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError - } = require_errors2(); - var { - kUrl, - kReset, - kClient, - kParser, - kBlocking, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kMaxRequests, - kCounter, - kMaxResponseSize, - kOnError, - kResume, - kHTTPContext - } = require_symbols6(); - var constants = require_constants7(); - var EMPTY_BUF = Buffer.alloc(0); - var FastBuffer = Buffer[Symbol.species]; - var addListener = util.addListener; - var removeAllListeners = util.removeAllListeners; - var extractBody; - async function lazyllhttp() { - const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm2() : void 0; - let mod; - try { - mod = await WebAssembly.compile(require_llhttp_simd_wasm2()); - } catch (e) { - mod = await WebAssembly.compile(llhttpWasmData || require_llhttp_wasm2()); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveRuntimeExtensions = void 0; + var region_config_resolver_1 = require_dist_cjs43(); + var protocol_http_1 = require_dist_cjs2(); + var smithy_client_1 = require_dist_cjs32(); + var httpAuthExtensionConfiguration_1 = require_httpAuthExtensionConfiguration(); + var asPartial = (t) => t; + var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...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) + }; + }; + exports2.resolveRuntimeExtensions = resolveRuntimeExtensions; + } +}); + +// 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_cjs8(); + var config_resolver_1 = require_dist_cjs11(); + var core_1 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var middleware_content_length_1 = require_dist_cjs34(); + var middleware_endpoint_1 = require_dist_cjs18(); + var middleware_retry_1 = require_dist_cjs33(); + var smithy_client_1 = require_dist_cjs32(); + Object.defineProperty(exports2, "__Client", { enumerable: true, get: function() { + return smithy_client_1.Client; + } }); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4(); + var EndpointParameters_1 = require_EndpointParameters(); + var runtimeConfig_1 = require_runtimeConfig3(); + var runtimeExtensions_1 = require_runtimeExtensions(); + var STSClient2 = class extends smithy_client_1.Client { + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); + 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 || []); + super(_config_8); + this.config = _config_8; + 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 + }) + })); + this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config)); } - return await WebAssembly.instantiate(mod, { - env: { - /* eslint-disable camelcase */ - wasm_on_url: (p, at, len) => { - return 0; - }, - wasm_on_status: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_message_begin: (p) => { - assert.strictEqual(currentParser.ptr, p); - return currentParser.onMessageBegin() || 0; - }, - wasm_on_header_field: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_header_value: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert.strictEqual(currentParser.ptr, p); - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; - }, - wasm_on_body: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p); - const start = at - currentBufferPtr + currentBufferRef.byteOffset; - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; - }, - wasm_on_message_complete: (p) => { - assert.strictEqual(currentParser.ptr, p); - return currentParser.onMessageComplete() || 0; - } - /* eslint-enable camelcase */ - } + destroy() { + super.destroy(); + } + }; + exports2.STSClient = STSClient2; + } +}); + +// node_modules/@aws-sdk/client-sts/dist-cjs/index.js +var require_dist_cjs48 = __commonJS({ + "node_modules/@aws-sdk/client-sts/dist-cjs/index.js"(exports2, module2) { + "use strict"; + 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 __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AssumeRoleCommand: () => AssumeRoleCommand, + AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog, + AssumeRoleWithSAMLCommand: () => AssumeRoleWithSAMLCommand, + AssumeRoleWithSAMLRequestFilterSensitiveLog: () => AssumeRoleWithSAMLRequestFilterSensitiveLog, + AssumeRoleWithSAMLResponseFilterSensitiveLog: () => AssumeRoleWithSAMLResponseFilterSensitiveLog, + AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand, + AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog, + AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog, + ClientInputEndpointParameters: () => import_EndpointParameters9.ClientInputEndpointParameters, + CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog, + DecodeAuthorizationMessageCommand: () => DecodeAuthorizationMessageCommand, + ExpiredTokenException: () => ExpiredTokenException, + GetAccessKeyInfoCommand: () => GetAccessKeyInfoCommand, + GetCallerIdentityCommand: () => GetCallerIdentityCommand, + GetFederationTokenCommand: () => GetFederationTokenCommand, + GetFederationTokenResponseFilterSensitiveLog: () => GetFederationTokenResponseFilterSensitiveLog, + GetSessionTokenCommand: () => GetSessionTokenCommand, + GetSessionTokenResponseFilterSensitiveLog: () => GetSessionTokenResponseFilterSensitiveLog, + IDPCommunicationErrorException: () => IDPCommunicationErrorException, + IDPRejectedClaimException: () => IDPRejectedClaimException, + InvalidAuthorizationMessageException: () => InvalidAuthorizationMessageException, + InvalidIdentityTokenException: () => InvalidIdentityTokenException, + MalformedPolicyDocumentException: () => MalformedPolicyDocumentException, + PackedPolicyTooLargeException: () => PackedPolicyTooLargeException, + RegionDisabledException: () => RegionDisabledException, + STS: () => STS, + STSServiceException: () => STSServiceException, + decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider, + getDefaultRoleAssumer: () => getDefaultRoleAssumer2, + getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2 + }); + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_STSClient(), module2.exports); + var import_middleware_endpoint2 = require_dist_cjs18(); + var import_middleware_serde2 = require_dist_cjs17(); + var import_EndpointParameters = require_EndpointParameters(); + var import_smithy_client5 = require_dist_cjs32(); + var _STSServiceException = class _STSServiceException2 extends import_smithy_client5.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _STSServiceException2.prototype); + } + }; + __name(_STSServiceException, "STSServiceException"); + var STSServiceException = _STSServiceException; + var _ExpiredTokenException = class _ExpiredTokenException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + this.name = "ExpiredTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExpiredTokenException2.prototype); + } + }; + __name(_ExpiredTokenException, "ExpiredTokenException"); + var ExpiredTokenException = _ExpiredTokenException; + var _MalformedPolicyDocumentException = class _MalformedPolicyDocumentException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts + }); + this.name = "MalformedPolicyDocumentException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _MalformedPolicyDocumentException2.prototype); + } + }; + __name(_MalformedPolicyDocumentException, "MalformedPolicyDocumentException"); + var MalformedPolicyDocumentException = _MalformedPolicyDocumentException; + var _PackedPolicyTooLargeException = class _PackedPolicyTooLargeException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "PackedPolicyTooLargeException", + $fault: "client", + ...opts + }); + this.name = "PackedPolicyTooLargeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _PackedPolicyTooLargeException2.prototype); + } + }; + __name(_PackedPolicyTooLargeException, "PackedPolicyTooLargeException"); + var PackedPolicyTooLargeException = _PackedPolicyTooLargeException; + var _RegionDisabledException = class _RegionDisabledException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "RegionDisabledException", + $fault: "client", + ...opts + }); + this.name = "RegionDisabledException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _RegionDisabledException2.prototype); + } + }; + __name(_RegionDisabledException, "RegionDisabledException"); + var RegionDisabledException = _RegionDisabledException; + var _IDPRejectedClaimException = class _IDPRejectedClaimException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "IDPRejectedClaimException", + $fault: "client", + ...opts + }); + this.name = "IDPRejectedClaimException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _IDPRejectedClaimException2.prototype); + } + }; + __name(_IDPRejectedClaimException, "IDPRejectedClaimException"); + var IDPRejectedClaimException = _IDPRejectedClaimException; + var _InvalidIdentityTokenException = class _InvalidIdentityTokenException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidIdentityTokenException", + $fault: "client", + ...opts + }); + this.name = "InvalidIdentityTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidIdentityTokenException2.prototype); + } + }; + __name(_InvalidIdentityTokenException, "InvalidIdentityTokenException"); + var InvalidIdentityTokenException = _InvalidIdentityTokenException; + var _IDPCommunicationErrorException = class _IDPCommunicationErrorException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "IDPCommunicationErrorException", + $fault: "client", + ...opts + }); + this.name = "IDPCommunicationErrorException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _IDPCommunicationErrorException2.prototype); + } + }; + __name(_IDPCommunicationErrorException, "IDPCommunicationErrorException"); + var IDPCommunicationErrorException = _IDPCommunicationErrorException; + var _InvalidAuthorizationMessageException = class _InvalidAuthorizationMessageException2 extends STSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidAuthorizationMessageException", + $fault: "client", + ...opts + }); + this.name = "InvalidAuthorizationMessageException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidAuthorizationMessageException2.prototype); + } + }; + __name(_InvalidAuthorizationMessageException, "InvalidAuthorizationMessageException"); + var InvalidAuthorizationMessageException = _InvalidAuthorizationMessageException; + var CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client5.SENSITIVE_STRING } + }), "CredentialsFilterSensitiveLog"); + var AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }), "AssumeRoleResponseFilterSensitiveLog"); + var AssumeRoleWithSAMLRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SAMLAssertion && { SAMLAssertion: import_smithy_client5.SENSITIVE_STRING } + }), "AssumeRoleWithSAMLRequestFilterSensitiveLog"); + var AssumeRoleWithSAMLResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }), "AssumeRoleWithSAMLResponseFilterSensitiveLog"); + var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client5.SENSITIVE_STRING } + }), "AssumeRoleWithWebIdentityRequestFilterSensitiveLog"); + var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }), "AssumeRoleWithWebIdentityResponseFilterSensitiveLog"); + var GetFederationTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }), "GetFederationTokenResponseFilterSensitiveLog"); + var GetSessionTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }), "GetSessionTokenResponseFilterSensitiveLog"); + var import_core5 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var import_protocol_http8 = require_dist_cjs2(); + var se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleRequest(input, context), + [_A]: _AR, + [_V]: _ }); - } - var llhttpInstance = null; - var llhttpPromise = lazyllhttp(); - llhttpPromise.catch(); - var currentParser = null; - var currentBufferRef = null; - var currentBufferSize = 0; - var currentBufferPtr = null; - var TIMEOUT_HEADERS = 1; - var TIMEOUT_BODY = 2; - var TIMEOUT_IDLE = 3; - var Parser = class { - constructor(client, socket, { exports: exports3 }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); - this.llhttp = exports3; - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); - this.client = client; - this.socket = socket; - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.statusCode = null; - this.statusText = ""; - this.upgrade = false; - this.headers = []; - this.headersSize = 0; - this.headersMaxSize = client[kMaxHeadersSize]; - this.shouldKeepAlive = false; - this.paused = false; - this.resume = this.resume.bind(this); - this.bytesRead = 0; - this.keepAlive = ""; - this.contentLength = ""; - this.connection = ""; - this.maxResponseSize = client[kMaxResponseSize]; + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_AssumeRoleCommand"); + var se_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleWithSAMLRequest(input, context), + [_A]: _ARWSAML, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_AssumeRoleWithSAMLCommand"); + var se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleWithWebIdentityRequest(input, context), + [_A]: _ARWWI, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_AssumeRoleWithWebIdentityCommand"); + var se_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_DecodeAuthorizationMessageRequest(input, context), + [_A]: _DAM, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DecodeAuthorizationMessageCommand"); + var se_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetAccessKeyInfoRequest(input, context), + [_A]: _GAKI, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetAccessKeyInfoCommand"); + var se_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetCallerIdentityRequest(input, context), + [_A]: _GCI, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetCallerIdentityCommand"); + var se_GetFederationTokenCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetFederationTokenRequest(input, context), + [_A]: _GFT, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetFederationTokenCommand"); + var se_GetSessionTokenCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_GetSessionTokenRequest(input, context), + [_A]: _GST, + [_V]: _ + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetSessionTokenCommand"); + var de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core5.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_AssumeRoleResponse(data.AssumeRoleResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_AssumeRoleCommand"); + var de_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core5.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_AssumeRoleWithSAMLCommand"); + var de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core5.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_AssumeRoleWithWebIdentityCommand"); + var de_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core5.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DecodeAuthorizationMessageCommand"); + var de_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core5.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetAccessKeyInfoCommand"); + var de_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core5.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetCallerIdentityCommand"); + var de_GetFederationTokenCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core5.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetFederationTokenCommand"); + var de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core5.parseXmlBody)(output.body, context); + let contents = {}; + contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetSessionTokenCommand"); + var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core5.parseXmlErrorBody)(output.body, context) + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ExpiredTokenException": + case "com.amazonaws.sts#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "MalformedPolicyDocument": + case "com.amazonaws.sts#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PackedPolicyTooLarge": + case "com.amazonaws.sts#PackedPolicyTooLargeException": + throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + throw await de_RegionDisabledExceptionRes(parsedOutput, context); + case "IDPRejectedClaim": + case "com.amazonaws.sts#IDPRejectedClaimException": + throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context); + case "InvalidIdentityToken": + case "com.amazonaws.sts#InvalidIdentityTokenException": + throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context); + case "IDPCommunicationError": + case "com.amazonaws.sts#IDPCommunicationErrorException": + throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context); + case "InvalidAuthorizationMessageException": + case "com.amazonaws.sts#InvalidAuthorizationMessageException": + throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode + }); } - setTimeout(value, type) { - this.timeoutType = type; - if (value !== this.timeoutValue) { - timers.clearTimeout(this.timeout); - if (value) { - this.timeout = timers.setTimeout(onParserTimeout, value, this); - if (this.timeout.unref) { - this.timeout.unref(); - } - } else { - this.timeout = null; - } - this.timeoutValue = value; - } else if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } - } + }, "de_CommandError"); + var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_ExpiredTokenException(body.Error, context); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ExpiredTokenExceptionRes"); + var de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPCommunicationErrorException(body.Error, context); + const exception = new IDPCommunicationErrorException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_IDPCommunicationErrorExceptionRes"); + var de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPRejectedClaimException(body.Error, context); + const exception = new IDPRejectedClaimException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_IDPRejectedClaimExceptionRes"); + var de_InvalidAuthorizationMessageExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_InvalidAuthorizationMessageException(body.Error, context); + const exception = new InvalidAuthorizationMessageException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidAuthorizationMessageExceptionRes"); + var de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_InvalidIdentityTokenException(body.Error, context); + const exception = new InvalidIdentityTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidIdentityTokenExceptionRes"); + var de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_MalformedPolicyDocumentException(body.Error, context); + const exception = new MalformedPolicyDocumentException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_MalformedPolicyDocumentExceptionRes"); + var de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_PackedPolicyTooLargeException(body.Error, context); + const exception = new PackedPolicyTooLargeException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_PackedPolicyTooLargeExceptionRes"); + var de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_RegionDisabledException(body.Error, context); + const exception = new RegionDisabledException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_RegionDisabledExceptionRes"); + var se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => { + var _a2, _b, _c, _d; + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); } - resume() { - if (this.socket.destroyed || !this.paused) { - return; - } - assert(this.ptr != null); - assert(currentParser == null); - this.llhttp.llhttp_resume(this.ptr); - assert(this.timeoutType === TIMEOUT_BODY); - if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } - } - this.paused = false; - this.execute(this.socket.read() || EMPTY_BUF); - this.readMore(); + if (input[_P] != null) { + entries[_P] = input[_P]; } - readMore() { - while (!this.paused && this.ptr) { - const chunk = this.socket.read(); - if (chunk === null) { - break; - } - this.execute(chunk); + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) { + entries.Tags = []; } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); } - execute(data) { - assert(this.ptr != null); - assert(currentParser == null); - assert(!this.paused); - const { socket, llhttp } = this; - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr); - } - currentBufferSize = Math.ceil(data.length / 4096) * 4096; - currentBufferPtr = llhttp.malloc(currentBufferSize); + if (input[_TTK] != null) { + const memberEntries = se_tagKeyListType(input[_TTK], context); + if (((_c = input[_TTK]) == null ? void 0 : _c.length) === 0) { + entries.TransitiveTagKeys = []; } - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); - try { - let ret; - try { - currentBufferRef = data; - currentParser = this; - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); - } catch (err) { - throw err; - } finally { - currentParser = null; - currentBufferRef = null; - } - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)); - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true; - socket.unshift(data.slice(offset)); - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr); - let message = ""; - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); - message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); - } - } catch (err) { - util.destroy(socket, err); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TransitiveTagKeys.${key}`; + entries[loc] = value; + }); + } + if (input[_EI] != null) { + entries[_EI] = input[_EI]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + if (input[_SI] != null) { + entries[_SI] = input[_SI]; + } + if (input[_PC] != null) { + const memberEntries = se_ProvidedContextsListType(input[_PC], context); + if (((_d = input[_PC]) == null ? void 0 : _d.length) === 0) { + entries.ProvidedContexts = []; } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ProvidedContexts.${key}`; + entries[loc] = value; + }); } - destroy() { - assert(this.ptr != null); - assert(currentParser == null); - this.llhttp.llhttp_free(this.ptr); - this.ptr = null; - timers.clearTimeout(this.timeout); - this.timeout = null; - this.timeoutValue = null; - this.timeoutType = null; - this.paused = false; + return entries; + }, "se_AssumeRoleRequest"); + var se_AssumeRoleWithSAMLRequest = /* @__PURE__ */ __name((input, context) => { + var _a2; + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; } - onStatus(buf) { - this.statusText = buf.toString(); + if (input[_PAr] != null) { + entries[_PAr] = input[_PAr]; } - onMessageBegin() { - const { socket, client } = this; - if (socket.destroyed) { - return -1; + if (input[_SAMLA] != null) { + entries[_SAMLA] = input[_SAMLA]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; } - const request2 = client[kQueue][client[kRunningIdx]]; - if (!request2) { - return -1; + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; + }, "se_AssumeRoleWithSAMLRequest"); + var se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => { + var _a2; + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_WIT] != null) { + entries[_WIT] = input[_WIT]; + } + if (input[_PI] != null) { + entries[_PI] = input[_PI]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; } - request2.onResponseStarted(); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); } - onHeaderField(buf) { - const len = this.headers.length; - if ((len & 1) === 0) { - this.headers.push(buf); - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; + }, "se_AssumeRoleWithWebIdentityRequest"); + var se_DecodeAuthorizationMessageRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_EM] != null) { + entries[_EM] = input[_EM]; + } + return entries; + }, "se_DecodeAuthorizationMessageRequest"); + var se_GetAccessKeyInfoRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_AKI] != null) { + entries[_AKI] = input[_AKI]; + } + return entries; + }, "se_GetAccessKeyInfoRequest"); + var se_GetCallerIdentityRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + return entries; + }, "se_GetCallerIdentityRequest"); + var se_GetFederationTokenRequest = /* @__PURE__ */ __name((input, context) => { + var _a2, _b; + const entries = {}; + if (input[_N] != null) { + entries[_N] = input[_N]; + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) { + entries.Tags = []; } - this.trackHeader(buf.length); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); } - onHeaderValue(buf) { - let len = this.headers.length; - if ((len & 1) === 1) { - this.headers.push(buf); - len += 1; - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + return entries; + }, "se_GetFederationTokenRequest"); + var se_GetSessionTokenRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + return entries; + }, "se_GetSessionTokenRequest"); + var se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; } - const key = this.headers[len - 2]; - if (key.length === 10) { - const headerName = util.bufferToLowerCasedHeaderName(key); - if (headerName === "keep-alive") { - this.keepAlive += buf.toString(); - } else if (headerName === "connection") { - this.connection += buf.toString(); - } - } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") { - this.contentLength += buf.toString(); + const memberEntries = se_PolicyDescriptorType(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }, "se_policyDescriptorListType"); + var se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_a] != null) { + entries[_a] = input[_a]; + } + return entries; + }, "se_PolicyDescriptorType"); + var se_ProvidedContext = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_PAro] != null) { + entries[_PAro] = input[_PAro]; + } + if (input[_CA] != null) { + entries[_CA] = input[_CA]; + } + return entries; + }, "se_ProvidedContext"); + var se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; } - this.trackHeader(buf.length); - } - trackHeader(len) { - this.headersSize += len; - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()); + const memberEntries = se_ProvidedContext(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }, "se_ProvidedContextsListType"); + var se_Tag = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_K] != null) { + entries[_K] = input[_K]; + } + if (input[_Va] != null) { + entries[_Va] = input[_Va]; + } + return entries; + }, "se_Tag"); + var se_tagKeyListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; } + entries[`member.${counter}`] = entry; + counter++; } - onUpgrade(head) { - const { upgrade, client, socket, headers, statusCode } = this; - assert(upgrade); - const request2 = client[kQueue][client[kRunningIdx]]; - assert(request2); - assert(!socket.destroyed); - assert(socket === client[kSocket]); - assert(!this.paused); - assert(request2.upgrade || request2.method === "CONNECT"); - this.statusCode = null; - this.statusText = ""; - this.shouldKeepAlive = null; - assert(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - socket.unshift(head); - socket[kParser].destroy(); - socket[kParser] = null; - socket[kClient] = null; - socket[kError] = null; - removeAllListeners(socket); - client[kSocket] = null; - client[kHTTPContext] = null; - client[kQueue][client[kRunningIdx]++] = null; - client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); - try { - request2.onUpgrade(statusCode, headers, socket); - } catch (err) { - util.destroy(socket, err); + return entries; + }, "se_tagKeyListType"); + var se_tagListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; } - client[kResume](); + const memberEntries = se_Tag(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; } - onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this; - if (socket.destroyed) { - return -1; - } - const request2 = client[kQueue][client[kRunningIdx]]; - if (!request2) { - return -1; - } - assert(!this.upgrade); - assert(this.statusCode < 200); - if (statusCode === 100) { - util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); - return -1; + return entries; + }, "se_tagListType"); + var de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_ARI] != null) { + contents[_ARI] = (0, import_smithy_client5.expectString)(output[_ARI]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client5.expectString)(output[_Ar]); + } + return contents; + }, "de_AssumedRoleUser"); + var de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client5.strictParseInt32)(output[_PPS]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client5.expectString)(output[_SI]); + } + return contents; + }, "de_AssumeRoleResponse"); + var de_AssumeRoleWithSAMLResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client5.strictParseInt32)(output[_PPS]); + } + if (output[_S] != null) { + contents[_S] = (0, import_smithy_client5.expectString)(output[_S]); + } + if (output[_ST] != null) { + contents[_ST] = (0, import_smithy_client5.expectString)(output[_ST]); + } + if (output[_I] != null) { + contents[_I] = (0, import_smithy_client5.expectString)(output[_I]); + } + if (output[_Au] != null) { + contents[_Au] = (0, import_smithy_client5.expectString)(output[_Au]); + } + if (output[_NQ] != null) { + contents[_NQ] = (0, import_smithy_client5.expectString)(output[_NQ]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client5.expectString)(output[_SI]); + } + return contents; + }, "de_AssumeRoleWithSAMLResponse"); + var de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_SFWIT] != null) { + contents[_SFWIT] = (0, import_smithy_client5.expectString)(output[_SFWIT]); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client5.strictParseInt32)(output[_PPS]); + } + if (output[_Pr] != null) { + contents[_Pr] = (0, import_smithy_client5.expectString)(output[_Pr]); + } + if (output[_Au] != null) { + contents[_Au] = (0, import_smithy_client5.expectString)(output[_Au]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client5.expectString)(output[_SI]); + } + return contents; + }, "de_AssumeRoleWithWebIdentityResponse"); + var de_Credentials = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_AKI] != null) { + contents[_AKI] = (0, import_smithy_client5.expectString)(output[_AKI]); + } + if (output[_SAK] != null) { + contents[_SAK] = (0, import_smithy_client5.expectString)(output[_SAK]); + } + if (output[_STe] != null) { + contents[_STe] = (0, import_smithy_client5.expectString)(output[_STe]); + } + if (output[_E] != null) { + contents[_E] = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseRfc3339DateTimeWithOffset)(output[_E])); + } + return contents; + }, "de_Credentials"); + var de_DecodeAuthorizationMessageResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_DM] != null) { + contents[_DM] = (0, import_smithy_client5.expectString)(output[_DM]); + } + return contents; + }, "de_DecodeAuthorizationMessageResponse"); + var de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_ExpiredTokenException"); + var de_FederatedUser = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_FUI] != null) { + contents[_FUI] = (0, import_smithy_client5.expectString)(output[_FUI]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client5.expectString)(output[_Ar]); + } + return contents; + }, "de_FederatedUser"); + var de_GetAccessKeyInfoResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_Ac] != null) { + contents[_Ac] = (0, import_smithy_client5.expectString)(output[_Ac]); + } + return contents; + }, "de_GetAccessKeyInfoResponse"); + var de_GetCallerIdentityResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_UI] != null) { + contents[_UI] = (0, import_smithy_client5.expectString)(output[_UI]); + } + if (output[_Ac] != null) { + contents[_Ac] = (0, import_smithy_client5.expectString)(output[_Ac]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client5.expectString)(output[_Ar]); + } + return contents; + }, "de_GetCallerIdentityResponse"); + var de_GetFederationTokenResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_FU] != null) { + contents[_FU] = de_FederatedUser(output[_FU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client5.strictParseInt32)(output[_PPS]); + } + return contents; + }, "de_GetFederationTokenResponse"); + var de_GetSessionTokenResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + return contents; + }, "de_GetSessionTokenResponse"); + var de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_IDPCommunicationErrorException"); + var de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_IDPRejectedClaimException"); + var de_InvalidAuthorizationMessageException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_InvalidAuthorizationMessageException"); + var de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_InvalidIdentityTokenException"); + var de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_MalformedPolicyDocumentException"); + var de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_PackedPolicyTooLargeException"); + var de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client5.expectString)(output[_m]); + } + return contents; + }, "de_RegionDisabledException"); + var deserializeMetadata = /* @__PURE__ */ __name((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"] + }), "deserializeMetadata"); + var throwDefaultError = (0, import_smithy_client5.withBaseException)(STSServiceException); + var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers + }; + if (resolvedHostname !== void 0) { + contents.hostname = resolvedHostname; + } + if (body !== void 0) { + contents.body = body; + } + return new import_protocol_http8.HttpRequest(contents); + }, "buildHttpRpcRequest"); + var SHARED_HEADERS = { + "content-type": "application/x-www-form-urlencoded" + }; + var _ = "2011-06-15"; + var _A = "Action"; + var _AKI = "AccessKeyId"; + var _AR = "AssumeRole"; + var _ARI = "AssumedRoleId"; + var _ARU = "AssumedRoleUser"; + var _ARWSAML = "AssumeRoleWithSAML"; + var _ARWWI = "AssumeRoleWithWebIdentity"; + var _Ac = "Account"; + var _Ar = "Arn"; + var _Au = "Audience"; + var _C = "Credentials"; + var _CA = "ContextAssertion"; + var _DAM = "DecodeAuthorizationMessage"; + var _DM = "DecodedMessage"; + var _DS = "DurationSeconds"; + var _E = "Expiration"; + var _EI = "ExternalId"; + var _EM = "EncodedMessage"; + var _FU = "FederatedUser"; + var _FUI = "FederatedUserId"; + var _GAKI = "GetAccessKeyInfo"; + var _GCI = "GetCallerIdentity"; + var _GFT = "GetFederationToken"; + var _GST = "GetSessionToken"; + var _I = "Issuer"; + var _K = "Key"; + var _N = "Name"; + var _NQ = "NameQualifier"; + var _P = "Policy"; + var _PA = "PolicyArns"; + var _PAr = "PrincipalArn"; + var _PAro = "ProviderArn"; + var _PC = "ProvidedContexts"; + var _PI = "ProviderId"; + var _PPS = "PackedPolicySize"; + var _Pr = "Provider"; + var _RA = "RoleArn"; + var _RSN = "RoleSessionName"; + var _S = "Subject"; + var _SAK = "SecretAccessKey"; + var _SAMLA = "SAMLAssertion"; + var _SFWIT = "SubjectFromWebIdentityToken"; + var _SI = "SourceIdentity"; + var _SN = "SerialNumber"; + var _ST = "SubjectType"; + var _STe = "SessionToken"; + var _T = "Tags"; + var _TC = "TokenCode"; + var _TTK = "TransitiveTagKeys"; + var _UI = "UserId"; + var _V = "Version"; + var _Va = "Value"; + var _WIT = "WebIdentityToken"; + var _a = "arn"; + var _m = "message"; + var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client5.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client5.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString"); + var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => { + var _a2; + if (((_a2 = data.Error) == null ? void 0 : _a2.Code) !== void 0) { + return data.Error.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + }, "loadQueryErrorCode"); + var _AssumeRoleCommand = class _AssumeRoleCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() { + }; + __name(_AssumeRoleCommand, "AssumeRoleCommand"); + var AssumeRoleCommand = _AssumeRoleCommand; + var import_EndpointParameters2 = require_EndpointParameters(); + var _AssumeRoleWithSAMLCommand = class _AssumeRoleWithSAMLCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters2.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {}).n("STSClient", "AssumeRoleWithSAMLCommand").f(AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog).ser(se_AssumeRoleWithSAMLCommand).de(de_AssumeRoleWithSAMLCommand).build() { + }; + __name(_AssumeRoleWithSAMLCommand, "AssumeRoleWithSAMLCommand"); + var AssumeRoleWithSAMLCommand = _AssumeRoleWithSAMLCommand; + var import_EndpointParameters3 = require_EndpointParameters(); + var _AssumeRoleWithWebIdentityCommand = class _AssumeRoleWithWebIdentityCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters3.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() { + }; + __name(_AssumeRoleWithWebIdentityCommand, "AssumeRoleWithWebIdentityCommand"); + var AssumeRoleWithWebIdentityCommand = _AssumeRoleWithWebIdentityCommand; + var import_EndpointParameters4 = require_EndpointParameters(); + var _DecodeAuthorizationMessageCommand = class _DecodeAuthorizationMessageCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters4.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {}).n("STSClient", "DecodeAuthorizationMessageCommand").f(void 0, void 0).ser(se_DecodeAuthorizationMessageCommand).de(de_DecodeAuthorizationMessageCommand).build() { + }; + __name(_DecodeAuthorizationMessageCommand, "DecodeAuthorizationMessageCommand"); + var DecodeAuthorizationMessageCommand = _DecodeAuthorizationMessageCommand; + var import_EndpointParameters5 = require_EndpointParameters(); + var _GetAccessKeyInfoCommand = class _GetAccessKeyInfoCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters5.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {}).n("STSClient", "GetAccessKeyInfoCommand").f(void 0, void 0).ser(se_GetAccessKeyInfoCommand).de(de_GetAccessKeyInfoCommand).build() { + }; + __name(_GetAccessKeyInfoCommand, "GetAccessKeyInfoCommand"); + var GetAccessKeyInfoCommand = _GetAccessKeyInfoCommand; + var import_EndpointParameters6 = require_EndpointParameters(); + var _GetCallerIdentityCommand = class _GetCallerIdentityCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters6.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {}).n("STSClient", "GetCallerIdentityCommand").f(void 0, void 0).ser(se_GetCallerIdentityCommand).de(de_GetCallerIdentityCommand).build() { + }; + __name(_GetCallerIdentityCommand, "GetCallerIdentityCommand"); + var GetCallerIdentityCommand = _GetCallerIdentityCommand; + var import_EndpointParameters7 = require_EndpointParameters(); + var _GetFederationTokenCommand = class _GetFederationTokenCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters7.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {}).n("STSClient", "GetFederationTokenCommand").f(void 0, GetFederationTokenResponseFilterSensitiveLog).ser(se_GetFederationTokenCommand).de(de_GetFederationTokenCommand).build() { + }; + __name(_GetFederationTokenCommand, "GetFederationTokenCommand"); + var GetFederationTokenCommand = _GetFederationTokenCommand; + var import_EndpointParameters8 = require_EndpointParameters(); + var _GetSessionTokenCommand = class _GetSessionTokenCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...import_EndpointParameters8.commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {}).n("STSClient", "GetSessionTokenCommand").f(void 0, GetSessionTokenResponseFilterSensitiveLog).ser(se_GetSessionTokenCommand).de(de_GetSessionTokenCommand).build() { + }; + __name(_GetSessionTokenCommand, "GetSessionTokenCommand"); + var GetSessionTokenCommand = _GetSessionTokenCommand; + var import_STSClient = require_STSClient(); + var commands = { + AssumeRoleCommand, + AssumeRoleWithSAMLCommand, + AssumeRoleWithWebIdentityCommand, + DecodeAuthorizationMessageCommand, + GetAccessKeyInfoCommand, + GetCallerIdentityCommand, + GetFederationTokenCommand, + GetSessionTokenCommand + }; + var _STS = class _STS extends import_STSClient.STSClient { + }; + __name(_STS, "STS"); + var STS = _STS; + (0, import_smithy_client5.createAggregatedClient)(commands, STS); + var import_EndpointParameters9 = require_EndpointParameters(); + var ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; + var getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => { + if (typeof (assumedRoleUser == null ? void 0 : assumedRoleUser.Arn) === "string") { + const arnComponents = assumedRoleUser.Arn.split(":"); + if (arnComponents.length > 4 && arnComponents[4] !== "") { + return arnComponents[4]; } - if (upgrade && !request2.upgrade) { - util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); - return -1; + } + return void 0; + }, "getAccountIdFromAssumedRoleUser"); + var resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => { + var _a2; + const region = typeof _region === "function" ? await _region() : _region; + const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; + (_a2 = credentialProviderLogger == null ? void 0 : credentialProviderLogger.debug) == null ? void 0 : _a2.call( + credentialProviderLogger, + "@aws-sdk/client-sts::resolveRegion", + "accepting first of:", + `${region} (provider)`, + `${parentRegion} (parent client)`, + `${ASSUME_ROLE_DEFAULT_REGION} (STS default)` + ); + return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION; + }, "resolveRegion"); + var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => { + let stsClient; + let closureSourceCreds; + return async (sourceCreds, params) => { + var _a2, _b, _c; + closureSourceCreds = sourceCreds; + if (!stsClient) { + const { + logger = (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.logger, + region, + requestHandler = (_b = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _b.requestHandler, + credentialProviderLogger + } = stsOptions; + const resolvedRegion = await resolveRegion( + region, + (_c = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _c.region, + credentialProviderLogger + ); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new stsClientCtor({ + // A hack to make sts client uses the credential in current closure. + credentialDefaultProvider: () => async () => closureSourceCreds, + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, + logger + }); } - assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS); - this.statusCode = statusCode; - this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. - request2.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; - if (this.statusCode >= 200) { - const bodyTimeout = request2.bodyTimeout != null ? request2.bodyTimeout : client[kBodyTimeout]; - this.setTimeout(bodyTimeout, TIMEOUT_BODY); - } else if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } + const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params)); + if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); } - if (request2.method === "CONNECT") { - assert(client[kRunning] === 1); - this.upgrade = true; - return 2; + const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2); + return { + accessKeyId: Credentials2.AccessKeyId, + secretAccessKey: Credentials2.SecretAccessKey, + sessionToken: Credentials2.SessionToken, + expiration: Credentials2.Expiration, + // TODO(credentialScope): access normally when shape is updated. + ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope }, + ...accountId && { accountId } + }; + }; + }, "getDefaultRoleAssumer"); + var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => { + let stsClient; + return async (params) => { + var _a2, _b, _c; + if (!stsClient) { + const { + logger = (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.logger, + region, + requestHandler = (_b = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _b.requestHandler, + credentialProviderLogger + } = stsOptions; + const resolvedRegion = await resolveRegion( + region, + (_c = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _c.region, + credentialProviderLogger + ); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new stsClientCtor({ + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, + logger + }); } - if (upgrade) { - assert(client[kRunning] === 1); - this.upgrade = true; - return 2; + const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params)); + if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); } - assert(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] - ); - if (timeout <= 0) { - socket[kReset] = true; - } else { - client[kKeepAliveTimeoutValue] = timeout; + const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2); + return { + accessKeyId: Credentials2.AccessKeyId, + secretAccessKey: Credentials2.SecretAccessKey, + sessionToken: Credentials2.SessionToken, + expiration: Credentials2.Expiration, + // TODO(credentialScope): access normally when shape is updated. + ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope }, + ...accountId && { accountId } + }; + }; + }, "getDefaultRoleAssumerWithWebIdentity"); + var isH2 = /* @__PURE__ */ __name((requestHandler) => { + var _a2; + return ((_a2 = requestHandler == null ? void 0 : requestHandler.metadata) == null ? void 0 : _a2.handlerProtocol) === "h2"; + }, "isH2"); + var import_STSClient2 = require_STSClient(); + var getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => { + var _a2; + if (!customizations) + return baseCtor; + else + return _a2 = class extends baseCtor { + constructor(config) { + super(config); + for (const customization of customizations) { + this.middlewareStack.use(customization); + } + } + }, __name(_a2, "CustomizableSTSClient"), _a2; + }, "getCustomizableStsClientCtor"); + var getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumer"); + var getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumerWithWebIdentity"); + var decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({ + roleAssumer: getDefaultRoleAssumer2(input), + roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input), + ...input + }), "decorateDefaultCredentialProvider"); + } +}); + +// node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +var require_dist_cjs49 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2, module2) { + "use strict"; + 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, { + fromProcess: () => fromProcess + }); + module2.exports = __toCommonJS2(src_exports); + var import_shared_ini_file_loader = require_dist_cjs13(); + var import_property_provider2 = require_dist_cjs12(); + var import_child_process = require("child_process"); + var import_util = require("util"); + var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => { + var _a; + if (data.Version !== 1) { + throw Error(`Profile ${profileName} credential_process did not return Version 1.`); + } + if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) { + throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); + } + if (data.Expiration) { + const currentTime = /* @__PURE__ */ new Date(); + const expireTime = new Date(data.Expiration); + if (expireTime < currentTime) { + throw Error(`Profile ${profileName} credential_process returned expired credentials.`); + } + } + let accountId = data.AccountId; + if (!accountId && ((_a = profiles == null ? void 0 : profiles[profileName]) == null ? void 0 : _a.aws_account_id)) { + accountId = profiles[profileName].aws_account_id; + } + return { + accessKeyId: data.AccessKeyId, + secretAccessKey: data.SecretAccessKey, + ...data.SessionToken && { sessionToken: data.SessionToken }, + ...data.Expiration && { expiration: new Date(data.Expiration) }, + ...data.CredentialScope && { credentialScope: data.CredentialScope }, + ...accountId && { accountId } + }; + }, "getValidatedProcessCredentials"); + var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger) => { + const profile = profiles[profileName]; + if (profiles[profileName]) { + const credentialProcess = profile["credential_process"]; + if (credentialProcess !== void 0) { + const execPromise = (0, import_util.promisify)(import_child_process.exec); + try { + const { stdout } = await execPromise(credentialProcess); + let data; + try { + data = JSON.parse(stdout.trim()); + } catch { + throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + return getValidatedProcessCredentials(profileName, data, profiles); + } catch (error) { + throw new import_property_provider2.CredentialsProviderError(error.message, { logger }); } } else { - socket[kReset] = true; - } - const pause = request2.onHeaders(statusCode, headers, this.resume, statusText) === false; - if (request2.aborted) { - return -1; - } - if (request2.method === "HEAD") { - return 1; - } - if (statusCode < 200) { - return 1; - } - if (socket[kBlocking]) { - socket[kBlocking] = false; - client[kResume](); + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger }); } - return pause ? constants.ERROR.PAUSED : 0; + } else { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, { + logger + }); } - onBody(buf) { - const { client, socket, statusCode, maxResponseSize } = this; - if (socket.destroyed) { - return -1; - } - const request2 = client[kQueue][client[kRunningIdx]]; - assert(request2); - assert.strictEqual(this.timeoutType, TIMEOUT_BODY); - if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } - } - assert(statusCode >= 200); - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()); - return -1; - } - this.bytesRead += buf.length; - if (request2.onData(buf) === false) { - return constants.ERROR.PAUSED; - } + }, "resolveProcessCredentials"); + var fromProcess = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process - fromProcess"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init.logger); + }, "fromProcess"); + } +}); + +// node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +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(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; } - onMessageComplete() { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1; - } - if (upgrade) { - return; - } - const request2 = client[kQueue][client[kRunningIdx]]; - assert(request2); - assert(statusCode >= 100); - this.statusCode = null; - this.statusText = ""; - this.bytesRead = 0; - this.contentLength = ""; - this.keepAlive = ""; - this.connection = ""; - assert(this.headers.length % 2 === 0); - this.headers = []; - this.headersSize = 0; - if (statusCode < 200) { - return; - } - if (request2.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util.destroy(socket, new ResponseContentLengthMismatchError()); - return -1; - } - request2.onComplete(headers); - client[kQueue][client[kRunningIdx]++] = null; - if (socket[kWriting]) { - assert.strictEqual(client[kRunning], 0); - util.destroy(socket, new InformationalError("reset")); - return constants.ERROR.PAUSED; - } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError("reset")); - return constants.ERROR.PAUSED; - } else if (socket[kReset] && client[kRunning] === 0) { - util.destroy(socket, new InformationalError("reset")); - return constants.ERROR.PAUSED; - } else if (client[kPipelining] == null || client[kPipelining] === 1) { - setImmediate(() => client[kResume]()); - } else { - client[kResume](); - } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } + __setModuleDefault2(result, mod); + return result; }; - function onParserTimeout(parser) { - const { socket, timeoutType, client } = parser; - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!parser.paused, "cannot be paused while waiting for headers"); - util.destroy(socket, new HeadersTimeoutError()); - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!parser.paused) { - util.destroy(socket, new BodyTimeoutError()); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromWebToken = void 0; + var fromWebToken2 = (init) => async () => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken"); + const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init; + let { roleAssumerWithWebIdentity } = init; + if (!roleAssumerWithWebIdentity) { + const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar2(require_dist_cjs48())); + roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({ + ...init.clientConfig, + credentialProviderLogger: init.logger, + parentClientConfig: init.parentClientConfig + }, init.clientPlugins); + } + return roleAssumerWithWebIdentity({ + RoleArn: roleArn, + RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`, + WebIdentityToken: webIdentityToken, + ProviderId: providerId, + PolicyArns: policyArns, + Policy: policy, + DurationSeconds: durationSeconds + }); + }; + exports2.fromWebToken = fromWebToken2; + } +}); + +// node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +var require_fromTokenFile = __commonJS({ + "node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromTokenFile = void 0; + var property_provider_1 = require_dist_cjs12(); + var fs_1 = require("fs"); + var fromWebToken_1 = require_fromWebToken(); + var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; + var ENV_ROLE_ARN = "AWS_ROLE_ARN"; + var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; + var fromTokenFile2 = (init = {}) => async () => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile"); + const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE]; + 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", { + logger: init.logger + }); + } + return (0, fromWebToken_1.fromWebToken)({ + ...init, + webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), + roleArn, + roleSessionName + })(); + }; + exports2.fromTokenFile = fromTokenFile2; + } +}); + +// node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +var require_dist_cjs50 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + 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 __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_fromTokenFile(), module2.exports); + __reExport(src_exports, require_fromWebToken(), module2.exports); + } +}); + +// node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +var require_dist_cjs51 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + 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 __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromIni: () => fromIni + }); + module2.exports = __toCommonJS2(src_exports); + var import_shared_ini_file_loader = require_dist_cjs13(); + var import_property_provider2 = require_dist_cjs12(); + var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger) => { + const sourceProvidersMap = { + EcsContainer: async (options) => { + const { fromHttp } = await Promise.resolve().then(() => __toESM2(require_dist_cjs38())); + const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs37())); + logger == null ? void 0 : logger.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"); + return (0, import_property_provider2.chain)(fromHttp(options ?? {}), fromContainerMetadata(options)); + }, + Ec2InstanceMetadata: async (options) => { + logger == null ? void 0 : logger.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata"); + const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs37())); + return fromInstanceMetadata(options); + }, + Environment: async (options) => { + logger == null ? void 0 : logger.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); + const { fromEnv } = await Promise.resolve().then(() => __toESM2(require_dist_cjs36())); + return fromEnv(options); } - } else if (timeoutType === TIMEOUT_IDLE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); - util.destroy(socket, new InformationalError("socket idle timeout")); + }; + if (credentialSource in sourceProvidersMap) { + return sourceProvidersMap[credentialSource]; + } else { + throw new import_property_provider2.CredentialsProviderError( + `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, + { logger } + ); } - } - async function connectH1(client, socket) { - client[kSocket] = socket; - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise; - llhttpPromise = null; + }, "resolveCredentialSource"); + var isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = "default", logger } = {}) => { + return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })); + }, "isAssumeRoleProfile"); + var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => { + var _a; + const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; + if (withSourceProfile) { + (_a = logger == null ? void 0 : logger.debug) == null ? void 0 : _a.call(logger, ` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`); + } + return withSourceProfile; + }, "isAssumeRoleWithSourceProfile"); + var isCredentialSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => { + var _a; + const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; + if (withProviderProfile) { + (_a = logger == null ? void 0 : logger.debug) == null ? void 0 : _a.call(logger, ` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`); + } + return withProviderProfile; + }, "isCredentialSourceProfile"); + var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { + var _a, _b; + (_a = options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)"); + const data = profiles[profileName]; + if (!options.roleAssumer) { + const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM2(require_dist_cjs48())); + options.roleAssumer = getDefaultRoleAssumer( + { + ...options.clientConfig, + credentialProviderLogger: options.logger, + parentClientConfig: options == null ? void 0 : options.parentClientConfig + }, + options.clientPlugins + ); } - socket[kNoRef] = false; - socket[kWriting] = false; - socket[kReset] = false; - socket[kBlocking] = false; - socket[kParser] = new Parser(client, socket, llhttpInstance); - addListener(socket, "error", function(err) { - const parser = this[kParser]; - assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - return; - } - this[kError] = err; - this[kClient][kOnError](err); - }); - addListener(socket, "readable", function() { - const parser = this[kParser]; - if (parser) { - parser.readMore(); - } - }); - addListener(socket, "end", function() { - const parser = this[kParser]; - if (parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - return; + const { source_profile } = data; + if (source_profile && source_profile in visitedProfiles) { + throw new import_property_provider2.CredentialsProviderError( + `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), + { logger: options.logger } + ); + } + (_b = options.logger) == null ? void 0 : _b.debug( + `@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}` + ); + const sourceCredsProvider = source_profile ? resolveProfileData( + source_profile, + { + ...profiles, + [source_profile]: { + ...profiles[source_profile], + // This assigns the role_arn of the "root" profile + // to the credential_source profile so this recursive call knows + // what role to assume. + role_arn: data.role_arn ?? profiles[source_profile].role_arn + } + }, + options, + { + ...visitedProfiles, + [source_profile]: true + } + ) : (await resolveCredentialSource(data.credential_source, profileName, options.logger)(options))(); + const params = { + RoleArn: data.role_arn, + RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`, + ExternalId: data.external_id, + DurationSeconds: parseInt(data.duration_seconds || "3600", 10) + }; + const { mfa_serial } = data; + if (mfa_serial) { + if (!options.mfaCodeProvider) { + throw new import_property_provider2.CredentialsProviderError( + `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, + { logger: options.logger, tryNextLink: false } + ); } - util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + params.SerialNumber = mfa_serial; + params.TokenCode = await options.mfaCodeProvider(mfa_serial); + } + const sourceCreds = await sourceCredsProvider; + return options.roleAssumer(sourceCreds, params); + }, "resolveAssumeRoleCredentials"); + var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile"); + var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM2(require_dist_cjs49())).then( + ({ fromProcess }) => fromProcess({ + ...options, + profile + })() + ), "resolveProcessCredentials"); + var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => { + const { fromSSO } = await Promise.resolve().then(() => __toESM2(require_dist_cjs47())); + return fromSSO({ + profile, + logger: options.logger + })(); + }, "resolveSsoCredentials"); + var isSsoProfile = /* @__PURE__ */ __name((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"), "isSsoProfile"); + var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile"); + var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => { + var _a; + (_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"); + return Promise.resolve({ + accessKeyId: profile.aws_access_key_id, + secretAccessKey: profile.aws_secret_access_key, + sessionToken: profile.aws_session_token, + ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }, + ...profile.aws_account_id && { accountId: profile.aws_account_id } }); - addListener(socket, "close", function() { - const client2 = this[kClient]; - const parser = this[kParser]; - if (parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); + }, "resolveStaticCredentials"); + var isWebIdentityProfile = /* @__PURE__ */ __name((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, "isWebIdentityProfile"); + var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM2(require_dist_cjs50())).then( + ({ fromTokenFile: fromTokenFile2 }) => fromTokenFile2({ + webIdentityTokenFile: profile.web_identity_token_file, + roleArn: profile.role_arn, + roleSessionName: profile.role_session_name, + roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, + logger: options.logger, + parentClientConfig: options.parentClientConfig + })() + ), "resolveWebIdentityCredentials"); + var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { + const data = profiles[profileName]; + if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) { + return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles); + } + if (isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isWebIdentityProfile(data)) { + return resolveWebIdentityCredentials(data, options); + } + if (isProcessProfile(data)) { + return resolveProcessCredentials(options, profileName); + } + if (isSsoProfile(data)) { + return await resolveSsoCredentials(profileName, options); + } + throw new import_property_provider2.CredentialsProviderError( + `Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, + { logger: options.logger } + ); + }, "resolveProfileData"); + var fromIni = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - fromIni"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProfileData((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init); + }, "fromIni"); + } +}); + +// node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +var require_dist_cjs52 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + 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 __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + credentialsTreatedAsExpired: () => credentialsTreatedAsExpired, + credentialsWillNeedRefresh: () => credentialsWillNeedRefresh, + defaultProvider: () => defaultProvider + }); + module2.exports = __toCommonJS2(src_exports); + var import_credential_provider_env = require_dist_cjs36(); + var import_shared_ini_file_loader = require_dist_cjs13(); + var import_property_provider2 = require_dist_cjs12(); + var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; + var remoteProvider = /* @__PURE__ */ __name(async (init) => { + var _a, _b; + const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs37())); + if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) { + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata"); + const { fromHttp } = await Promise.resolve().then(() => __toESM2(require_dist_cjs38())); + return (0, import_property_provider2.chain)(fromHttp(init), fromContainerMetadata(init)); + } + if (process.env[ENV_IMDS_DISABLED]) { + return async () => { + throw new import_property_provider2.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger }); + }; + } + (_b = init.logger) == null ? void 0 : _b.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"); + return fromInstanceMetadata(init); + }, "remoteProvider"); + var multipleCredentialSourceWarningEmitted = false; + var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)( + async () => { + var _a, _b, _c, _d; + const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE]; + if (profile) { + const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET]; + if (envStaticCredentialsAreSet) { + if (!multipleCredentialSourceWarningEmitted) { + const warnFn = ((_a = init.logger) == null ? void 0 : _a.warn) && ((_c = (_b = init.logger) == null ? void 0 : _b.constructor) == null ? void 0 : _c.name) !== "NoOpLogger" ? init.logger.warn : console.warn; + warnFn( + `@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING: + Multiple credential sources detected: + Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set. + This SDK will proceed with the AWS_PROFILE value. + + However, a future version may change this behavior to prefer the ENV static credentials. + Please ensure that your environment only sets either the AWS_PROFILE or the + AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair. +` + ); + multipleCredentialSourceWarningEmitted = true; + } + } + throw new import_property_provider2.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", { + logger: init.logger, + tryNextLink: true + }); } - this[kParser].destroy(); - this[kParser] = null; - } - const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); - client2[kSocket] = null; - client2[kHTTPContext] = null; - if (client2.destroyed) { - assert(client2[kPending] === 0); - const requests = client2[kQueue].splice(client2[kRunningIdx]); - for (let i = 0; i < requests.length; i++) { - const request2 = requests[i]; - util.errorRequest(client2, request2, err); + (_d = init.logger) == null ? void 0 : _d.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"); + return (0, import_credential_provider_env.fromEnv)(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + throw new import_property_provider2.CredentialsProviderError( + "Skipping SSO provider in default chain (inputs do not include SSO fields).", + { logger: init.logger } + ); } - } else if (client2[kRunning] > 0 && err.code !== "UND_ERR_INFO") { - const request2 = client2[kQueue][client2[kRunningIdx]]; - client2[kQueue][client2[kRunningIdx]++] = null; - util.errorRequest(client2, request2, err); + const { fromSSO } = await Promise.resolve().then(() => __toESM2(require_dist_cjs47())); + return fromSSO(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni"); + const { fromIni } = await Promise.resolve().then(() => __toESM2(require_dist_cjs51())); + return fromIni(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess"); + const { fromProcess } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + return fromProcess(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile"); + const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM2(require_dist_cjs50())); + return fromTokenFile2(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"); + return (await remoteProvider(init))(); + }, + async () => { + throw new import_property_provider2.CredentialsProviderError("Could not load credentials from any providers", { + tryNextLink: false, + logger: init.logger + }); } - client2[kPendingIdx] = client2[kRunningIdx]; - assert(client2[kRunning] === 0); - client2.emit("disconnect", client2[kUrl], [client2], err); - client2[kResume](); - }); - let closed = false; - socket.on("close", () => { - closed = true; + ), + credentialsTreatedAsExpired, + credentialsWillNeedRefresh + ), "defaultProvider"); + var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0, "credentialsWillNeedRefresh"); + var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired"); + } +}); + +// node_modules/@aws-sdk/client-kms/dist-cjs/endpoint/ruleset.js +var require_ruleset4 = __commonJS({ + "node_modules/@aws-sdk/client-kms/dist-cjs/endpoint/ruleset.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ruleSet = void 0; + var s = "required"; + var t = "fn"; + var u = "argv"; + var v = "ref"; + var a = true; + var b = "isSet"; + var c = "booleanEquals"; + var d = "error"; + var e = "endpoint"; + var f = "tree"; + var g = "PartitionResult"; + var h = { [s]: false, "type": "String" }; + var i = { [s]: true, "default": false, "type": "Boolean" }; + var j = { [v]: "Endpoint" }; + var k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }; + var l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }; + var m = {}; + var n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }; + var o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }; + var p = [k]; + var q = [l]; + var r = [{ [v]: "Region" }]; + var _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }, { conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ endpoint: { url: "https://kms-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ endpoint: { url: "https://kms-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ endpoint: { url: "https://kms.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://kms.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; + exports2.ruleSet = _data; + } +}); + +// node_modules/@aws-sdk/client-kms/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver4 = __commonJS({ + "node_modules/@aws-sdk/client-kms/dist-cjs/endpoint/endpointResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs7(); + var util_endpoints_2 = require_dist_cjs6(); + var ruleset_1 = require_ruleset4(); + var defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context.logger }); + }; + exports2.defaultEndpointResolver = defaultEndpointResolver; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/client-kms/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared4 = __commonJS({ + "node_modules/@aws-sdk/client-kms/dist-cjs/runtimeConfig.shared.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var smithy_client_1 = require_dist_cjs32(); + var url_parser_1 = require_dist_cjs16(); + var util_base64_1 = require_dist_cjs25(); + var util_utf8_1 = require_dist_cjs24(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider(); + var endpointResolver_1 = require_endpointResolver4(); + var getRuntimeConfig = (config) => { return { - version: "h1", - defaultPipelining: 1, - write(...args) { - return writeH1(client, ...args); - }, - resume() { - resumeH1(client); - }, - destroy(err, callback) { - if (closed) { - queueMicrotask(callback); + apiVersion: "2014-11-01", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultKMSHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + } + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "KMS", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8 + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// node_modules/@aws-sdk/client-kms/dist-cjs/runtimeConfig.js +var require_runtimeConfig4 = __commonJS({ + "node_modules/@aws-sdk/client-kms/dist-cjs/runtimeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var credential_provider_node_1 = require_dist_cjs52(); + var util_user_agent_node_1 = require_dist_cjs39(); + var config_resolver_1 = require_dist_cjs11(); + var hash_node_1 = require_dist_cjs40(); + var middleware_retry_1 = require_dist_cjs33(); + var node_config_provider_1 = require_dist_cjs14(); + var node_http_handler_1 = require_dist_cjs28(); + var util_body_length_node_1 = require_dist_cjs41(); + var util_retry_1 = require_dist_cjs20(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared4(); + var smithy_client_1 = require_dist_cjs32(); + var util_defaults_mode_node_1 = require_dist_cjs42(); + var smithy_client_2 = require_dist_cjs32(); + var getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + 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 + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + 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), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS) + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig; + } +}); + +// node_modules/@aws-sdk/client-kms/dist-cjs/index.js +var require_dist_cjs53 = __commonJS({ + "node_modules/@aws-sdk/client-kms/dist-cjs/index.js"(exports2, module2) { + "use strict"; + 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, { + AlgorithmSpec: () => AlgorithmSpec, + AlreadyExistsException: () => AlreadyExistsException, + CancelKeyDeletionCommand: () => CancelKeyDeletionCommand, + CloudHsmClusterInUseException: () => CloudHsmClusterInUseException, + CloudHsmClusterInvalidConfigurationException: () => CloudHsmClusterInvalidConfigurationException, + CloudHsmClusterNotActiveException: () => CloudHsmClusterNotActiveException, + CloudHsmClusterNotFoundException: () => CloudHsmClusterNotFoundException, + CloudHsmClusterNotRelatedException: () => CloudHsmClusterNotRelatedException, + ConflictException: () => ConflictException, + ConnectCustomKeyStoreCommand: () => ConnectCustomKeyStoreCommand, + ConnectionErrorCodeType: () => ConnectionErrorCodeType, + ConnectionStateType: () => ConnectionStateType, + CreateAliasCommand: () => CreateAliasCommand, + CreateCustomKeyStoreCommand: () => CreateCustomKeyStoreCommand, + CreateCustomKeyStoreRequestFilterSensitiveLog: () => CreateCustomKeyStoreRequestFilterSensitiveLog, + CreateGrantCommand: () => CreateGrantCommand, + CreateKeyCommand: () => CreateKeyCommand, + CustomKeyStoreHasCMKsException: () => CustomKeyStoreHasCMKsException, + CustomKeyStoreInvalidStateException: () => CustomKeyStoreInvalidStateException, + CustomKeyStoreNameInUseException: () => CustomKeyStoreNameInUseException, + CustomKeyStoreNotFoundException: () => CustomKeyStoreNotFoundException, + CustomKeyStoreType: () => CustomKeyStoreType, + CustomKeyStoresListEntryFilterSensitiveLog: () => CustomKeyStoresListEntryFilterSensitiveLog, + CustomerMasterKeySpec: () => CustomerMasterKeySpec, + DataKeyPairSpec: () => DataKeyPairSpec, + DataKeySpec: () => DataKeySpec, + DecryptCommand: () => DecryptCommand, + DecryptResponseFilterSensitiveLog: () => DecryptResponseFilterSensitiveLog, + DeleteAliasCommand: () => DeleteAliasCommand, + DeleteCustomKeyStoreCommand: () => DeleteCustomKeyStoreCommand, + DeleteImportedKeyMaterialCommand: () => DeleteImportedKeyMaterialCommand, + DependencyTimeoutException: () => DependencyTimeoutException, + DeriveSharedSecretCommand: () => DeriveSharedSecretCommand, + DeriveSharedSecretResponseFilterSensitiveLog: () => DeriveSharedSecretResponseFilterSensitiveLog, + DescribeCustomKeyStoresCommand: () => DescribeCustomKeyStoresCommand, + DescribeCustomKeyStoresResponseFilterSensitiveLog: () => DescribeCustomKeyStoresResponseFilterSensitiveLog, + DescribeKeyCommand: () => DescribeKeyCommand, + DisableKeyCommand: () => DisableKeyCommand, + DisableKeyRotationCommand: () => DisableKeyRotationCommand, + DisabledException: () => DisabledException, + DisconnectCustomKeyStoreCommand: () => DisconnectCustomKeyStoreCommand, + DryRunOperationException: () => DryRunOperationException, + EnableKeyCommand: () => EnableKeyCommand, + EnableKeyRotationCommand: () => EnableKeyRotationCommand, + EncryptCommand: () => EncryptCommand, + EncryptRequestFilterSensitiveLog: () => EncryptRequestFilterSensitiveLog, + EncryptionAlgorithmSpec: () => EncryptionAlgorithmSpec, + ExpirationModelType: () => ExpirationModelType, + ExpiredImportTokenException: () => ExpiredImportTokenException, + GenerateDataKeyCommand: () => GenerateDataKeyCommand, + GenerateDataKeyPairCommand: () => GenerateDataKeyPairCommand, + GenerateDataKeyPairResponseFilterSensitiveLog: () => GenerateDataKeyPairResponseFilterSensitiveLog, + GenerateDataKeyPairWithoutPlaintextCommand: () => GenerateDataKeyPairWithoutPlaintextCommand, + GenerateDataKeyResponseFilterSensitiveLog: () => GenerateDataKeyResponseFilterSensitiveLog, + GenerateDataKeyWithoutPlaintextCommand: () => GenerateDataKeyWithoutPlaintextCommand, + GenerateMacCommand: () => GenerateMacCommand, + GenerateMacRequestFilterSensitiveLog: () => GenerateMacRequestFilterSensitiveLog, + GenerateRandomCommand: () => GenerateRandomCommand, + GenerateRandomResponseFilterSensitiveLog: () => GenerateRandomResponseFilterSensitiveLog, + GetKeyPolicyCommand: () => GetKeyPolicyCommand, + GetKeyRotationStatusCommand: () => GetKeyRotationStatusCommand, + GetParametersForImportCommand: () => GetParametersForImportCommand, + GetParametersForImportResponseFilterSensitiveLog: () => GetParametersForImportResponseFilterSensitiveLog, + GetPublicKeyCommand: () => GetPublicKeyCommand, + GrantOperation: () => GrantOperation, + ImportKeyMaterialCommand: () => ImportKeyMaterialCommand, + IncorrectKeyException: () => IncorrectKeyException, + IncorrectKeyMaterialException: () => IncorrectKeyMaterialException, + IncorrectTrustAnchorException: () => IncorrectTrustAnchorException, + InvalidAliasNameException: () => InvalidAliasNameException, + InvalidArnException: () => InvalidArnException, + InvalidCiphertextException: () => InvalidCiphertextException, + InvalidGrantIdException: () => InvalidGrantIdException, + InvalidGrantTokenException: () => InvalidGrantTokenException, + InvalidImportTokenException: () => InvalidImportTokenException, + InvalidKeyUsageException: () => InvalidKeyUsageException, + InvalidMarkerException: () => InvalidMarkerException, + KMS: () => KMS, + KMSClient: () => KMSClient2, + KMSInternalException: () => KMSInternalException, + KMSInvalidMacException: () => KMSInvalidMacException, + KMSInvalidSignatureException: () => KMSInvalidSignatureException, + KMSInvalidStateException: () => KMSInvalidStateException, + KMSServiceException: () => KMSServiceException, + KeyAgreementAlgorithmSpec: () => KeyAgreementAlgorithmSpec, + KeyEncryptionMechanism: () => KeyEncryptionMechanism, + KeyManagerType: () => KeyManagerType, + KeySpec: () => KeySpec, + KeyState: () => KeyState, + KeyUnavailableException: () => KeyUnavailableException, + KeyUsageType: () => KeyUsageType, + LimitExceededException: () => LimitExceededException, + ListAliasesCommand: () => ListAliasesCommand, + ListGrantsCommand: () => ListGrantsCommand, + ListKeyPoliciesCommand: () => ListKeyPoliciesCommand, + ListKeyRotationsCommand: () => ListKeyRotationsCommand, + ListKeysCommand: () => ListKeysCommand, + ListResourceTagsCommand: () => ListResourceTagsCommand, + ListRetirableGrantsCommand: () => ListRetirableGrantsCommand, + MacAlgorithmSpec: () => MacAlgorithmSpec, + MalformedPolicyDocumentException: () => MalformedPolicyDocumentException, + MessageType: () => MessageType, + MultiRegionKeyType: () => MultiRegionKeyType, + NotFoundException: () => NotFoundException, + OriginType: () => OriginType, + PutKeyPolicyCommand: () => PutKeyPolicyCommand, + ReEncryptCommand: () => ReEncryptCommand, + ReplicateKeyCommand: () => ReplicateKeyCommand, + RetireGrantCommand: () => RetireGrantCommand, + RevokeGrantCommand: () => RevokeGrantCommand, + RotateKeyOnDemandCommand: () => RotateKeyOnDemandCommand, + RotationType: () => RotationType, + ScheduleKeyDeletionCommand: () => ScheduleKeyDeletionCommand, + SignCommand: () => SignCommand2, + SignRequestFilterSensitiveLog: () => SignRequestFilterSensitiveLog, + SigningAlgorithmSpec: () => SigningAlgorithmSpec, + TagException: () => TagException, + TagResourceCommand: () => TagResourceCommand, + UnsupportedOperationException: () => UnsupportedOperationException, + UntagResourceCommand: () => UntagResourceCommand, + UpdateAliasCommand: () => UpdateAliasCommand, + UpdateCustomKeyStoreCommand: () => UpdateCustomKeyStoreCommand, + UpdateCustomKeyStoreRequestFilterSensitiveLog: () => UpdateCustomKeyStoreRequestFilterSensitiveLog, + UpdateKeyDescriptionCommand: () => UpdateKeyDescriptionCommand, + UpdatePrimaryRegionCommand: () => UpdatePrimaryRegionCommand, + VerifyCommand: () => VerifyCommand, + VerifyMacCommand: () => VerifyMacCommand, + VerifyMacRequestFilterSensitiveLog: () => VerifyMacRequestFilterSensitiveLog, + VerifyRequestFilterSensitiveLog: () => VerifyRequestFilterSensitiveLog, + WrappingKeySpec: () => WrappingKeySpec, + XksKeyAlreadyInUseException: () => XksKeyAlreadyInUseException, + XksKeyInvalidConfigurationException: () => XksKeyInvalidConfigurationException, + XksKeyNotFoundException: () => XksKeyNotFoundException, + XksProxyAuthenticationCredentialTypeFilterSensitiveLog: () => XksProxyAuthenticationCredentialTypeFilterSensitiveLog, + XksProxyConfigurationTypeFilterSensitiveLog: () => XksProxyConfigurationTypeFilterSensitiveLog, + XksProxyConnectivityType: () => XksProxyConnectivityType, + XksProxyIncorrectAuthenticationCredentialException: () => XksProxyIncorrectAuthenticationCredentialException, + XksProxyInvalidConfigurationException: () => XksProxyInvalidConfigurationException, + XksProxyInvalidResponseException: () => XksProxyInvalidResponseException, + XksProxyUriEndpointInUseException: () => XksProxyUriEndpointInUseException, + XksProxyUriInUseException: () => XksProxyUriInUseException, + XksProxyUriUnreachableException: () => XksProxyUriUnreachableException, + XksProxyVpcEndpointServiceInUseException: () => XksProxyVpcEndpointServiceInUseException, + XksProxyVpcEndpointServiceInvalidConfigurationException: () => XksProxyVpcEndpointServiceInvalidConfigurationException, + XksProxyVpcEndpointServiceNotFoundException: () => XksProxyVpcEndpointServiceNotFoundException, + __Client: () => import_smithy_client5.Client, + paginateDescribeCustomKeyStores: () => paginateDescribeCustomKeyStores, + paginateListAliases: () => paginateListAliases, + paginateListGrants: () => paginateListGrants, + paginateListKeyPolicies: () => paginateListKeyPolicies, + paginateListKeyRotations: () => paginateListKeyRotations, + paginateListKeys: () => paginateListKeys, + paginateListResourceTags: () => paginateListResourceTags, + paginateListRetirableGrants: () => paginateListRetirableGrants + }); + module2.exports = __toCommonJS2(src_exports); + var import_middleware_host_header = require_dist_cjs3(); + var import_middleware_logger = require_dist_cjs4(); + var import_middleware_recursion_detection = require_dist_cjs5(); + var import_middleware_user_agent = require_dist_cjs8(); + var import_config_resolver = require_dist_cjs11(); + var import_core5 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_middleware_content_length = require_dist_cjs34(); + var import_middleware_endpoint2 = require_dist_cjs18(); + var import_middleware_retry2 = require_dist_cjs33(); + var import_httpAuthSchemeProvider = require_httpAuthSchemeProvider(); + var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "kms" + }; + }, "resolveClientEndpointParameters"); + var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var import_runtimeConfig = require_runtimeConfig4(); + var import_region_config_resolver = require_dist_cjs43(); + var import_protocol_http8 = require_dist_cjs2(); + var import_smithy_client5 = require_dist_cjs32(); + var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); } else { - socket.destroy(err).on("close", callback); + _httpAuthSchemes.splice(index, 1, httpAuthScheme); } }, - get destroyed() { - return socket.destroyed; + httpAuthSchemes() { + return _httpAuthSchemes; }, - busy(request2) { - if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return true; - } - if (request2) { - if (client[kRunning] > 0 && !request2.idempotent) { - return true; - } - if (client[kRunning] > 0 && (request2.upgrade || request2.method === "CONNECT")) { - return true; - } - if (client[kRunning] > 0 && util.bodyLength(request2.body) !== 0 && (util.isStream(request2.body) || util.isAsyncIterable(request2.body) || util.isFormDataLike(request2.body))) { - return true; - } - } - return false; + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; } }; - } - function resumeH1(client) { - const socket = client[kSocket]; - if (socket && !socket.destroyed) { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref(); - socket[kNoRef] = true; - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref(); - socket[kNoRef] = false; - } - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_IDLE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE); - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request2 = client[kQueue][client[kRunningIdx]]; - const headersTimeout = request2.headersTimeout != null ? request2.headersTimeout : client[kHeadersTimeout]; - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); - } - } - } - } - function shouldSendContentLength(method) { - return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; - } - function writeH1(client, request2) { - const { method, path, host, upgrade, blocking, reset } = request2; - let { body, headers, contentLength } = request2; - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (util.isFormDataLike(body)) { - if (!extractBody) { - extractBody = require_body2().extractBody; - } - const [bodyStream, contentType] = extractBody(body); - if (request2.contentType == null) { - headers.push("content-type", contentType); - } - body = bodyStream.stream; - contentLength = bodyStream.length; - } else if (util.isBlobLike(body) && request2.contentType == null && body.type) { - headers.push("content-type", body.type); + }, "getHttpAuthExtensionConfiguration"); + var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; + }, "resolveHttpAuthRuntimeConfig"); + var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); + var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_smithy_client5.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_protocol_http8.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, import_smithy_client5.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, import_protocol_http8.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) + }; + }, "resolveRuntimeExtensions"); + var _KMSClient = class _KMSClient extends import_smithy_client5.Client { + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); + 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_resolver.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint2.resolveEndpointConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); + super(_config_8); + this.config = _config_8; + 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( + (0, import_core5.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultKMSHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new import_core5.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }) + }) + ); + this.middlewareStack.use((0, import_core5.getHttpSigningPlugin)(this.config)); } - if (body && typeof body.read === "function") { - body.read(0); + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); } - const bodyLength = util.bodyLength(body); - contentLength = bodyLength ?? contentLength; - if (contentLength === null) { - contentLength = request2.contentLength; + }; + __name(_KMSClient, "KMSClient"); + var KMSClient2 = _KMSClient; + var import_middleware_serde2 = require_dist_cjs17(); + var import_core22 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var _KMSServiceException = class _KMSServiceException2 extends import_smithy_client5.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _KMSServiceException2.prototype); } - if (contentLength === 0 && !expectsPayload) { - contentLength = null; + }; + __name(_KMSServiceException, "KMSServiceException"); + var KMSServiceException = _KMSServiceException; + var AlgorithmSpec = { + RSAES_OAEP_SHA_1: "RSAES_OAEP_SHA_1", + RSAES_OAEP_SHA_256: "RSAES_OAEP_SHA_256", + RSAES_PKCS1_V1_5: "RSAES_PKCS1_V1_5", + RSA_AES_KEY_WRAP_SHA_1: "RSA_AES_KEY_WRAP_SHA_1", + RSA_AES_KEY_WRAP_SHA_256: "RSA_AES_KEY_WRAP_SHA_256", + SM2PKE: "SM2PKE" + }; + var _AlreadyExistsException = class _AlreadyExistsException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "AlreadyExistsException", + $fault: "client", + ...opts + }); + this.name = "AlreadyExistsException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _AlreadyExistsException2.prototype); } - if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength !== null && request2.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request2, new RequestContentLengthMismatchError()); - return false; - } - process.emitWarning(new RequestContentLengthMismatchError()); + }; + __name(_AlreadyExistsException, "AlreadyExistsException"); + var AlreadyExistsException = _AlreadyExistsException; + var _DependencyTimeoutException = class _DependencyTimeoutException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "DependencyTimeoutException", + $fault: "server", + ...opts + }); + this.name = "DependencyTimeoutException"; + this.$fault = "server"; + Object.setPrototypeOf(this, _DependencyTimeoutException2.prototype); } - const socket = client[kSocket]; - const abort = (err) => { - if (request2.aborted || request2.completed) { - return; - } - util.errorRequest(client, request2, err || new RequestAbortedError()); - util.destroy(body); - util.destroy(socket, new InformationalError("aborted")); - }; - try { - request2.onConnect(abort); - } catch (err) { - util.errorRequest(client, request2, err); + }; + __name(_DependencyTimeoutException, "DependencyTimeoutException"); + var DependencyTimeoutException = _DependencyTimeoutException; + var _InvalidArnException = class _InvalidArnException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidArnException", + $fault: "client", + ...opts + }); + this.name = "InvalidArnException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidArnException2.prototype); } - if (request2.aborted) { - return false; + }; + __name(_InvalidArnException, "InvalidArnException"); + var InvalidArnException = _InvalidArnException; + var _KMSInternalException = class _KMSInternalException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "KMSInternalException", + $fault: "server", + ...opts + }); + this.name = "KMSInternalException"; + this.$fault = "server"; + Object.setPrototypeOf(this, _KMSInternalException2.prototype); } - if (method === "HEAD") { - socket[kReset] = true; + }; + __name(_KMSInternalException, "KMSInternalException"); + var KMSInternalException = _KMSInternalException; + var _KMSInvalidStateException = class _KMSInvalidStateException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "KMSInvalidStateException", + $fault: "client", + ...opts + }); + this.name = "KMSInvalidStateException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _KMSInvalidStateException2.prototype); } - if (upgrade || method === "CONNECT") { - socket[kReset] = true; + }; + __name(_KMSInvalidStateException, "KMSInvalidStateException"); + var KMSInvalidStateException = _KMSInvalidStateException; + var _NotFoundException = class _NotFoundException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "NotFoundException", + $fault: "client", + ...opts + }); + this.name = "NotFoundException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _NotFoundException2.prototype); } - if (reset != null) { - socket[kReset] = reset; + }; + __name(_NotFoundException, "NotFoundException"); + var NotFoundException = _NotFoundException; + var _CloudHsmClusterInUseException = class _CloudHsmClusterInUseException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "CloudHsmClusterInUseException", + $fault: "client", + ...opts + }); + this.name = "CloudHsmClusterInUseException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _CloudHsmClusterInUseException2.prototype); } - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true; + }; + __name(_CloudHsmClusterInUseException, "CloudHsmClusterInUseException"); + var CloudHsmClusterInUseException = _CloudHsmClusterInUseException; + var _CloudHsmClusterInvalidConfigurationException = class _CloudHsmClusterInvalidConfigurationException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "CloudHsmClusterInvalidConfigurationException", + $fault: "client", + ...opts + }); + this.name = "CloudHsmClusterInvalidConfigurationException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _CloudHsmClusterInvalidConfigurationException2.prototype); } - if (blocking) { - socket[kBlocking] = true; + }; + __name(_CloudHsmClusterInvalidConfigurationException, "CloudHsmClusterInvalidConfigurationException"); + var CloudHsmClusterInvalidConfigurationException = _CloudHsmClusterInvalidConfigurationException; + var _CloudHsmClusterNotActiveException = class _CloudHsmClusterNotActiveException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "CloudHsmClusterNotActiveException", + $fault: "client", + ...opts + }); + this.name = "CloudHsmClusterNotActiveException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _CloudHsmClusterNotActiveException2.prototype); } - let header = `${method} ${path} HTTP/1.1\r -`; - if (typeof host === "string") { - header += `host: ${host}\r -`; - } else { - header += client[kHostHeader]; + }; + __name(_CloudHsmClusterNotActiveException, "CloudHsmClusterNotActiveException"); + var CloudHsmClusterNotActiveException = _CloudHsmClusterNotActiveException; + var _CloudHsmClusterNotFoundException = class _CloudHsmClusterNotFoundException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "CloudHsmClusterNotFoundException", + $fault: "client", + ...opts + }); + this.name = "CloudHsmClusterNotFoundException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _CloudHsmClusterNotFoundException2.prototype); } - if (upgrade) { - header += `connection: upgrade\r -upgrade: ${upgrade}\r -`; - } else if (client[kPipelining] && !socket[kReset]) { - header += "connection: keep-alive\r\n"; - } else { - header += "connection: close\r\n"; + }; + __name(_CloudHsmClusterNotFoundException, "CloudHsmClusterNotFoundException"); + var CloudHsmClusterNotFoundException = _CloudHsmClusterNotFoundException; + var _CloudHsmClusterNotRelatedException = class _CloudHsmClusterNotRelatedException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "CloudHsmClusterNotRelatedException", + $fault: "client", + ...opts + }); + this.name = "CloudHsmClusterNotRelatedException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _CloudHsmClusterNotRelatedException2.prototype); } - if (Array.isArray(headers)) { - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0]; - const val = headers[n + 1]; - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - header += `${key}: ${val[i]}\r -`; - } - } else { - header += `${key}: ${val}\r -`; - } - } + }; + __name(_CloudHsmClusterNotRelatedException, "CloudHsmClusterNotRelatedException"); + var CloudHsmClusterNotRelatedException = _CloudHsmClusterNotRelatedException; + var _ConflictException = class _ConflictException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ConflictException", + $fault: "client", + ...opts + }); + this.name = "ConflictException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ConflictException2.prototype); } - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request: request2, headers: header, socket }); + }; + __name(_ConflictException, "ConflictException"); + var ConflictException = _ConflictException; + var _CustomKeyStoreInvalidStateException = class _CustomKeyStoreInvalidStateException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "CustomKeyStoreInvalidStateException", + $fault: "client", + ...opts + }); + this.name = "CustomKeyStoreInvalidStateException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _CustomKeyStoreInvalidStateException2.prototype); } - if (!body || bodyLength === 0) { - writeBuffer({ abort, body: null, client, request: request2, socket, contentLength, header, expectsPayload }); - } else if (util.isBuffer(body)) { - writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); - } else if (util.isBlobLike(body)) { - if (typeof body.stream === "function") { - writeIterable({ abort, body: body.stream(), client, request: request2, socket, contentLength, header, expectsPayload }); - } else { - writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); - } - } else if (util.isStream(body)) { - writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); - } else if (util.isIterable(body)) { - writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); - } else { - assert(false); + }; + __name(_CustomKeyStoreInvalidStateException, "CustomKeyStoreInvalidStateException"); + var CustomKeyStoreInvalidStateException = _CustomKeyStoreInvalidStateException; + var _CustomKeyStoreNotFoundException = class _CustomKeyStoreNotFoundException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "CustomKeyStoreNotFoundException", + $fault: "client", + ...opts + }); + this.name = "CustomKeyStoreNotFoundException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _CustomKeyStoreNotFoundException2.prototype); + } + }; + __name(_CustomKeyStoreNotFoundException, "CustomKeyStoreNotFoundException"); + var CustomKeyStoreNotFoundException = _CustomKeyStoreNotFoundException; + var ConnectionErrorCodeType = { + CLUSTER_NOT_FOUND: "CLUSTER_NOT_FOUND", + INSUFFICIENT_CLOUDHSM_HSMS: "INSUFFICIENT_CLOUDHSM_HSMS", + INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET: "INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET", + INTERNAL_ERROR: "INTERNAL_ERROR", + INVALID_CREDENTIALS: "INVALID_CREDENTIALS", + NETWORK_ERRORS: "NETWORK_ERRORS", + SUBNET_NOT_FOUND: "SUBNET_NOT_FOUND", + USER_LOCKED_OUT: "USER_LOCKED_OUT", + USER_LOGGED_IN: "USER_LOGGED_IN", + USER_NOT_FOUND: "USER_NOT_FOUND", + XKS_PROXY_ACCESS_DENIED: "XKS_PROXY_ACCESS_DENIED", + XKS_PROXY_INVALID_CONFIGURATION: "XKS_PROXY_INVALID_CONFIGURATION", + XKS_PROXY_INVALID_RESPONSE: "XKS_PROXY_INVALID_RESPONSE", + XKS_PROXY_INVALID_TLS_CONFIGURATION: "XKS_PROXY_INVALID_TLS_CONFIGURATION", + XKS_PROXY_NOT_REACHABLE: "XKS_PROXY_NOT_REACHABLE", + XKS_PROXY_TIMED_OUT: "XKS_PROXY_TIMED_OUT", + XKS_VPC_ENDPOINT_SERVICE_INVALID_CONFIGURATION: "XKS_VPC_ENDPOINT_SERVICE_INVALID_CONFIGURATION", + XKS_VPC_ENDPOINT_SERVICE_NOT_FOUND: "XKS_VPC_ENDPOINT_SERVICE_NOT_FOUND" + }; + var ConnectionStateType = { + CONNECTED: "CONNECTED", + CONNECTING: "CONNECTING", + DISCONNECTED: "DISCONNECTED", + DISCONNECTING: "DISCONNECTING", + FAILED: "FAILED" + }; + var _InvalidAliasNameException = class _InvalidAliasNameException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidAliasNameException", + $fault: "client", + ...opts + }); + this.name = "InvalidAliasNameException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidAliasNameException2.prototype); } - return true; - } - function writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); - let finished = false; - const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header }); - const onData = function(chunk) { - if (finished) { - return; - } - try { - if (!writer.write(chunk) && this.pause) { - this.pause(); - } - } catch (err) { - util.destroy(this, err); - } - }; - const onDrain = function() { - if (finished) { - return; - } - if (body.resume) { - body.resume(); - } - }; - const onClose = function() { - queueMicrotask(() => { - body.removeListener("error", onFinished); + }; + __name(_InvalidAliasNameException, "InvalidAliasNameException"); + var InvalidAliasNameException = _InvalidAliasNameException; + var _LimitExceededException = class _LimitExceededException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "LimitExceededException", + $fault: "client", + ...opts }); - if (!finished) { - const err = new RequestAbortedError(); - queueMicrotask(() => onFinished(err)); - } - }; - const onFinished = function(err) { - if (finished) { - return; - } - finished = true; - assert(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); - socket.off("drain", onDrain).off("error", onFinished); - body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); - if (!err) { - try { - writer.end(); - } catch (er) { - err = er; - } - } - writer.destroy(err); - if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) { - util.destroy(body, err); - } else { - util.destroy(body); - } - }; - body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); - if (body.resume) { - body.resume(); + this.name = "LimitExceededException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _LimitExceededException2.prototype); } - socket.on("drain", onDrain).on("error", onFinished); - if (body.errorEmitted ?? body.errored) { - setImmediate(() => onFinished(body.errored)); - } else if (body.endEmitted ?? body.readableEnded) { - setImmediate(() => onFinished(null)); + }; + __name(_LimitExceededException, "LimitExceededException"); + var LimitExceededException = _LimitExceededException; + var CustomKeyStoreType = { + AWS_CLOUDHSM: "AWS_CLOUDHSM", + EXTERNAL_KEY_STORE: "EXTERNAL_KEY_STORE" + }; + var XksProxyConnectivityType = { + PUBLIC_ENDPOINT: "PUBLIC_ENDPOINT", + VPC_ENDPOINT_SERVICE: "VPC_ENDPOINT_SERVICE" + }; + var _CustomKeyStoreNameInUseException = class _CustomKeyStoreNameInUseException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "CustomKeyStoreNameInUseException", + $fault: "client", + ...opts + }); + this.name = "CustomKeyStoreNameInUseException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _CustomKeyStoreNameInUseException2.prototype); } - if (body.closeEmitted ?? body.closed) { - setImmediate(onClose); + }; + __name(_CustomKeyStoreNameInUseException, "CustomKeyStoreNameInUseException"); + var CustomKeyStoreNameInUseException = _CustomKeyStoreNameInUseException; + var _IncorrectTrustAnchorException = class _IncorrectTrustAnchorException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "IncorrectTrustAnchorException", + $fault: "client", + ...opts + }); + this.name = "IncorrectTrustAnchorException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _IncorrectTrustAnchorException2.prototype); } - } - function writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { - try { - if (!body) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r -\r -`, "latin1"); - } else { - assert(contentLength === null, "no body must not have content length"); - socket.write(`${header}\r -`, "latin1"); - } - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, "buffer body must have content length"); - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r -\r -`, "latin1"); - socket.write(body); - socket.uncork(); - request2.onBodySent(body); - if (!expectsPayload) { - socket[kReset] = true; - } - } - request2.onRequestSent(); - client[kResume](); - } catch (err) { - abort(err); + }; + __name(_IncorrectTrustAnchorException, "IncorrectTrustAnchorException"); + var IncorrectTrustAnchorException = _IncorrectTrustAnchorException; + var _XksProxyIncorrectAuthenticationCredentialException = class _XksProxyIncorrectAuthenticationCredentialException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksProxyIncorrectAuthenticationCredentialException", + $fault: "client", + ...opts + }); + this.name = "XksProxyIncorrectAuthenticationCredentialException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksProxyIncorrectAuthenticationCredentialException2.prototype); } - } - async function writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { - assert(contentLength === body.size, "blob body must have content length"); - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError(); - } - const buffer = Buffer.from(await body.arrayBuffer()); - socket.cork(); - socket.write(`${header}content-length: ${contentLength}\r -\r -`, "latin1"); - socket.write(buffer); - socket.uncork(); - request2.onBodySent(buffer); - request2.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } - client[kResume](); - } catch (err) { - abort(err); + }; + __name(_XksProxyIncorrectAuthenticationCredentialException, "XksProxyIncorrectAuthenticationCredentialException"); + var XksProxyIncorrectAuthenticationCredentialException = _XksProxyIncorrectAuthenticationCredentialException; + var _XksProxyInvalidConfigurationException = class _XksProxyInvalidConfigurationException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksProxyInvalidConfigurationException", + $fault: "client", + ...opts + }); + this.name = "XksProxyInvalidConfigurationException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksProxyInvalidConfigurationException2.prototype); } - } - async function writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); - let callback = null; - function onDrain() { - if (callback) { - const cb = callback; - callback = null; - cb(); - } + }; + __name(_XksProxyInvalidConfigurationException, "XksProxyInvalidConfigurationException"); + var XksProxyInvalidConfigurationException = _XksProxyInvalidConfigurationException; + var _XksProxyInvalidResponseException = class _XksProxyInvalidResponseException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksProxyInvalidResponseException", + $fault: "client", + ...opts + }); + this.name = "XksProxyInvalidResponseException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksProxyInvalidResponseException2.prototype); } - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null); - if (socket[kError]) { - reject(socket[kError]); - } else { - callback = resolve; - } - }); - socket.on("close", onDrain).on("drain", onDrain); - const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header }); - try { - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError]; - } - if (!writer.write(chunk)) { - await waitForDrain(); - } - } - writer.end(); - } catch (err) { - writer.destroy(err); - } finally { - socket.off("close", onDrain).off("drain", onDrain); + }; + __name(_XksProxyInvalidResponseException, "XksProxyInvalidResponseException"); + var XksProxyInvalidResponseException = _XksProxyInvalidResponseException; + var _XksProxyUriEndpointInUseException = class _XksProxyUriEndpointInUseException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksProxyUriEndpointInUseException", + $fault: "client", + ...opts + }); + this.name = "XksProxyUriEndpointInUseException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksProxyUriEndpointInUseException2.prototype); } - } - var AsyncWriter = class { - constructor({ abort, socket, request: request2, contentLength, client, expectsPayload, header }) { - this.socket = socket; - this.request = request2; - this.contentLength = contentLength; - this.client = client; - this.bytesWritten = 0; - this.expectsPayload = expectsPayload; - this.header = header; - this.abort = abort; - socket[kWriting] = true; + }; + __name(_XksProxyUriEndpointInUseException, "XksProxyUriEndpointInUseException"); + var XksProxyUriEndpointInUseException = _XksProxyUriEndpointInUseException; + var _XksProxyUriInUseException = class _XksProxyUriInUseException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksProxyUriInUseException", + $fault: "client", + ...opts + }); + this.name = "XksProxyUriInUseException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksProxyUriInUseException2.prototype); } - write(chunk) { - const { socket, request: request2, contentLength, client, bytesWritten, expectsPayload, header } = this; - if (socket[kError]) { - throw socket[kError]; - } - if (socket.destroyed) { - return false; - } - const len = Buffer.byteLength(chunk); - if (!len) { - return true; - } - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError(); - } - process.emitWarning(new RequestContentLengthMismatchError()); - } - socket.cork(); - if (bytesWritten === 0) { - if (!expectsPayload) { - socket[kReset] = true; - } - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r -`, "latin1"); - } else { - socket.write(`${header}content-length: ${contentLength}\r -\r -`, "latin1"); - } - } - if (contentLength === null) { - socket.write(`\r -${len.toString(16)}\r -`, "latin1"); - } - this.bytesWritten += len; - const ret = socket.write(chunk); - socket.uncork(); - request2.onBodySent(chunk); - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh(); - } - } - } - return ret; + }; + __name(_XksProxyUriInUseException, "XksProxyUriInUseException"); + var XksProxyUriInUseException = _XksProxyUriInUseException; + var _XksProxyUriUnreachableException = class _XksProxyUriUnreachableException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksProxyUriUnreachableException", + $fault: "client", + ...opts + }); + this.name = "XksProxyUriUnreachableException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksProxyUriUnreachableException2.prototype); } - end() { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request2 } = this; - request2.onRequestSent(); - socket[kWriting] = false; - if (socket[kError]) { - throw socket[kError]; - } - if (socket.destroyed) { - return; - } - if (bytesWritten === 0) { - if (expectsPayload) { - socket.write(`${header}content-length: 0\r -\r -`, "latin1"); - } else { - socket.write(`${header}\r -`, "latin1"); - } - } else if (contentLength === null) { - socket.write("\r\n0\r\n\r\n", "latin1"); - } - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError(); - } else { - process.emitWarning(new RequestContentLengthMismatchError()); - } - } - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh(); - } - } - client[kResume](); + }; + __name(_XksProxyUriUnreachableException, "XksProxyUriUnreachableException"); + var XksProxyUriUnreachableException = _XksProxyUriUnreachableException; + var _XksProxyVpcEndpointServiceInUseException = class _XksProxyVpcEndpointServiceInUseException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksProxyVpcEndpointServiceInUseException", + $fault: "client", + ...opts + }); + this.name = "XksProxyVpcEndpointServiceInUseException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksProxyVpcEndpointServiceInUseException2.prototype); } - destroy(err) { - const { socket, client, abort } = this; - socket[kWriting] = false; - if (err) { - assert(client[kRunning] <= 1, "pipeline should only contain this request"); - abort(err); - } + }; + __name(_XksProxyVpcEndpointServiceInUseException, "XksProxyVpcEndpointServiceInUseException"); + var XksProxyVpcEndpointServiceInUseException = _XksProxyVpcEndpointServiceInUseException; + var _XksProxyVpcEndpointServiceInvalidConfigurationException = class _XksProxyVpcEndpointServiceInvalidConfigurationException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksProxyVpcEndpointServiceInvalidConfigurationException", + $fault: "client", + ...opts + }); + this.name = "XksProxyVpcEndpointServiceInvalidConfigurationException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksProxyVpcEndpointServiceInvalidConfigurationException2.prototype); } }; - module2.exports = connectH1; - } -}); - -// node_modules/undici/lib/dispatcher/client-h2.js -var require_client_h2 = __commonJS({ - "node_modules/undici/lib/dispatcher/client-h2.js"(exports2, module2) { - "use strict"; - var assert = require("node:assert"); - var { pipeline } = require("node:stream"); - var util = require_util8(); - var { - RequestContentLengthMismatchError, - RequestAbortedError, - SocketError, - InformationalError - } = require_errors2(); - var { - kUrl, - kReset, - kClient, - kRunning, - kPending, - kQueue, - kPendingIdx, - kRunningIdx, - kError, - kSocket, - kStrictContentLength, - kOnError, - kMaxConcurrentStreams, - kHTTP2Session, - kResume - } = require_symbols6(); - var kOpenStreams = Symbol("open streams"); - var h2ExperimentalWarned = false; - var http2; - try { - http2 = require("node:http2"); - } catch { - http2 = { constants: {} }; - } - var { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS + __name(_XksProxyVpcEndpointServiceInvalidConfigurationException, "XksProxyVpcEndpointServiceInvalidConfigurationException"); + var XksProxyVpcEndpointServiceInvalidConfigurationException = _XksProxyVpcEndpointServiceInvalidConfigurationException; + var _XksProxyVpcEndpointServiceNotFoundException = class _XksProxyVpcEndpointServiceNotFoundException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksProxyVpcEndpointServiceNotFoundException", + $fault: "client", + ...opts + }); + this.name = "XksProxyVpcEndpointServiceNotFoundException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksProxyVpcEndpointServiceNotFoundException2.prototype); + } + }; + __name(_XksProxyVpcEndpointServiceNotFoundException, "XksProxyVpcEndpointServiceNotFoundException"); + var XksProxyVpcEndpointServiceNotFoundException = _XksProxyVpcEndpointServiceNotFoundException; + var GrantOperation = { + CreateGrant: "CreateGrant", + Decrypt: "Decrypt", + DeriveSharedSecret: "DeriveSharedSecret", + DescribeKey: "DescribeKey", + Encrypt: "Encrypt", + GenerateDataKey: "GenerateDataKey", + GenerateDataKeyPair: "GenerateDataKeyPair", + GenerateDataKeyPairWithoutPlaintext: "GenerateDataKeyPairWithoutPlaintext", + GenerateDataKeyWithoutPlaintext: "GenerateDataKeyWithoutPlaintext", + GenerateMac: "GenerateMac", + GetPublicKey: "GetPublicKey", + ReEncryptFrom: "ReEncryptFrom", + ReEncryptTo: "ReEncryptTo", + RetireGrant: "RetireGrant", + Sign: "Sign", + Verify: "Verify", + VerifyMac: "VerifyMac" + }; + var _DisabledException = class _DisabledException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "DisabledException", + $fault: "client", + ...opts + }); + this.name = "DisabledException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _DisabledException2.prototype); } - } = http2; - function parseH2Headers(headers) { - const result = []; - for (const [name, value] of Object.entries(headers)) { - if (Array.isArray(value)) { - for (const subvalue of value) { - result.push(Buffer.from(name), Buffer.from(subvalue)); - } - } else { - result.push(Buffer.from(name), Buffer.from(value)); - } + }; + __name(_DisabledException, "DisabledException"); + var DisabledException = _DisabledException; + var _DryRunOperationException = class _DryRunOperationException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "DryRunOperationException", + $fault: "client", + ...opts + }); + this.name = "DryRunOperationException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _DryRunOperationException2.prototype); } - return result; - } - async function connectH2(client, socket) { - client[kSocket] = socket; - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true; - process.emitWarning("H2 support is experimental, expect them to change at any time.", { - code: "UNDICI-H2" + }; + __name(_DryRunOperationException, "DryRunOperationException"); + var DryRunOperationException = _DryRunOperationException; + var _InvalidGrantTokenException = class _InvalidGrantTokenException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidGrantTokenException", + $fault: "client", + ...opts + }); + this.name = "InvalidGrantTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidGrantTokenException2.prototype); + } + }; + __name(_InvalidGrantTokenException, "InvalidGrantTokenException"); + var InvalidGrantTokenException = _InvalidGrantTokenException; + var CustomerMasterKeySpec = { + ECC_NIST_P256: "ECC_NIST_P256", + ECC_NIST_P384: "ECC_NIST_P384", + ECC_NIST_P521: "ECC_NIST_P521", + ECC_SECG_P256K1: "ECC_SECG_P256K1", + HMAC_224: "HMAC_224", + HMAC_256: "HMAC_256", + HMAC_384: "HMAC_384", + HMAC_512: "HMAC_512", + RSA_2048: "RSA_2048", + RSA_3072: "RSA_3072", + RSA_4096: "RSA_4096", + SM2: "SM2", + SYMMETRIC_DEFAULT: "SYMMETRIC_DEFAULT" + }; + var KeySpec = { + ECC_NIST_P256: "ECC_NIST_P256", + ECC_NIST_P384: "ECC_NIST_P384", + ECC_NIST_P521: "ECC_NIST_P521", + ECC_SECG_P256K1: "ECC_SECG_P256K1", + HMAC_224: "HMAC_224", + HMAC_256: "HMAC_256", + HMAC_384: "HMAC_384", + HMAC_512: "HMAC_512", + RSA_2048: "RSA_2048", + RSA_3072: "RSA_3072", + RSA_4096: "RSA_4096", + SM2: "SM2", + SYMMETRIC_DEFAULT: "SYMMETRIC_DEFAULT" + }; + var KeyUsageType = { + ENCRYPT_DECRYPT: "ENCRYPT_DECRYPT", + GENERATE_VERIFY_MAC: "GENERATE_VERIFY_MAC", + KEY_AGREEMENT: "KEY_AGREEMENT", + SIGN_VERIFY: "SIGN_VERIFY" + }; + var OriginType = { + AWS_CLOUDHSM: "AWS_CLOUDHSM", + AWS_KMS: "AWS_KMS", + EXTERNAL: "EXTERNAL", + EXTERNAL_KEY_STORE: "EXTERNAL_KEY_STORE" + }; + var EncryptionAlgorithmSpec = { + RSAES_OAEP_SHA_1: "RSAES_OAEP_SHA_1", + RSAES_OAEP_SHA_256: "RSAES_OAEP_SHA_256", + SM2PKE: "SM2PKE", + SYMMETRIC_DEFAULT: "SYMMETRIC_DEFAULT" + }; + var ExpirationModelType = { + KEY_MATERIAL_DOES_NOT_EXPIRE: "KEY_MATERIAL_DOES_NOT_EXPIRE", + KEY_MATERIAL_EXPIRES: "KEY_MATERIAL_EXPIRES" + }; + var KeyAgreementAlgorithmSpec = { + ECDH: "ECDH" + }; + var KeyManagerType = { + AWS: "AWS", + CUSTOMER: "CUSTOMER" + }; + var KeyState = { + Creating: "Creating", + Disabled: "Disabled", + Enabled: "Enabled", + PendingDeletion: "PendingDeletion", + PendingImport: "PendingImport", + PendingReplicaDeletion: "PendingReplicaDeletion", + Unavailable: "Unavailable", + Updating: "Updating" + }; + var MacAlgorithmSpec = { + HMAC_SHA_224: "HMAC_SHA_224", + HMAC_SHA_256: "HMAC_SHA_256", + HMAC_SHA_384: "HMAC_SHA_384", + HMAC_SHA_512: "HMAC_SHA_512" + }; + var MultiRegionKeyType = { + PRIMARY: "PRIMARY", + REPLICA: "REPLICA" + }; + var SigningAlgorithmSpec = { + ECDSA_SHA_256: "ECDSA_SHA_256", + ECDSA_SHA_384: "ECDSA_SHA_384", + ECDSA_SHA_512: "ECDSA_SHA_512", + RSASSA_PKCS1_V1_5_SHA_256: "RSASSA_PKCS1_V1_5_SHA_256", + RSASSA_PKCS1_V1_5_SHA_384: "RSASSA_PKCS1_V1_5_SHA_384", + RSASSA_PKCS1_V1_5_SHA_512: "RSASSA_PKCS1_V1_5_SHA_512", + RSASSA_PSS_SHA_256: "RSASSA_PSS_SHA_256", + RSASSA_PSS_SHA_384: "RSASSA_PSS_SHA_384", + RSASSA_PSS_SHA_512: "RSASSA_PSS_SHA_512", + SM2DSA: "SM2DSA" + }; + var _MalformedPolicyDocumentException = class _MalformedPolicyDocumentException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts }); + this.name = "MalformedPolicyDocumentException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _MalformedPolicyDocumentException2.prototype); } - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kMaxConcurrentStreams] - }); - session[kOpenStreams] = 0; - session[kClient] = client; - session[kSocket] = socket; - util.addListener(session, "error", onHttp2SessionError); - util.addListener(session, "frameError", onHttp2FrameError); - util.addListener(session, "end", onHttp2SessionEnd); - util.addListener(session, "goaway", onHTTP2GoAway); - util.addListener(session, "close", function() { - const { [kClient]: client2 } = this; - const { [kSocket]: socket2 } = client2; - const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket2)); - client2[kHTTP2Session] = null; - if (client2.destroyed) { - assert(client2[kPending] === 0); - const requests = client2[kQueue].splice(client2[kRunningIdx]); - for (let i = 0; i < requests.length; i++) { - const request2 = requests[i]; - util.errorRequest(client2, request2, err); - } - } - }); - session.unref(); - client[kHTTP2Session] = session; - socket[kHTTP2Session] = session; - util.addListener(socket, "error", function(err) { - assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - this[kError] = err; - this[kClient][kOnError](err); - }); - util.addListener(socket, "end", function() { - util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); - }); - util.addListener(socket, "close", function() { - const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); - client[kSocket] = null; - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err); - } - client[kPendingIdx] = client[kRunningIdx]; - assert(client[kRunning] === 0); - client.emit("disconnect", client[kUrl], [client], err); - client[kResume](); - }); - let closed = false; - socket.on("close", () => { - closed = true; - }); - return { - version: "h2", - defaultPipelining: Infinity, - write(...args) { - writeH2(client, ...args); - }, - resume() { - }, - destroy(err, callback) { - if (closed) { - queueMicrotask(callback); - } else { - socket.destroy(err).on("close", callback); - } - }, - get destroyed() { - return socket.destroyed; - }, - busy() { - return false; - } - }; - } - function onHttp2SessionError(err) { - assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); - this[kSocket][kError] = err; - this[kClient][kOnError](err); - } - function onHttp2FrameError(type, code, id) { - if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); - this[kSocket][kError] = err; - this[kClient][kOnError](err); - } - } - function onHttp2SessionEnd() { - const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); - this.destroy(err); - util.destroy(this[kSocket], err); - } - function onHTTP2GoAway(code) { - const err = new RequestAbortedError(`HTTP/2: "GOAWAY" frame received with code ${code}`); - this[kSocket][kError] = err; - this[kClient][kOnError](err); - this.unref(); - util.destroy(this[kSocket], err); - } - function shouldSendContentLength(method) { - return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; - } - function writeH2(client, request2) { - const session = client[kHTTP2Session]; - const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; - if (upgrade) { - util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); - return false; - } - if (request2.aborted) { - return false; - } - const headers = {}; - for (let n = 0; n < reqHeaders.length; n += 2) { - const key = reqHeaders[n + 0]; - const val = reqHeaders[n + 1]; - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (headers[key]) { - headers[key] += `,${val[i]}`; - } else { - headers[key] = val[i]; - } - } - } else { - headers[key] = val; - } - } - let stream; - const { hostname, port } = client[kUrl]; - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; - headers[HTTP2_HEADER_METHOD] = method; - const abort = (err) => { - if (request2.aborted || request2.completed) { - return; - } - err = err || new RequestAbortedError(); - util.errorRequest(client, request2, err); - if (stream != null) { - util.destroy(stream, err); - } - util.destroy(body, err); - }; - try { - request2.onConnect(abort); - } catch (err) { - util.errorRequest(client, request2, err); - } - if (method === "CONNECT") { - session.ref(); - stream = session.request(headers, { endStream: false, signal }); - if (stream.id && !stream.pending) { - request2.onUpgrade(null, null, stream); - ++session[kOpenStreams]; - } else { - stream.once("ready", () => { - request2.onUpgrade(null, null, stream); - ++session[kOpenStreams]; - }); - } - stream.once("close", () => { - session[kOpenStreams] -= 1; - if (session[kOpenStreams] === 0) session.unref(); + }; + __name(_MalformedPolicyDocumentException, "MalformedPolicyDocumentException"); + var MalformedPolicyDocumentException = _MalformedPolicyDocumentException; + var _TagException = class _TagException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "TagException", + $fault: "client", + ...opts }); - return true; + this.name = "TagException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _TagException2.prototype); } - headers[HTTP2_HEADER_PATH] = path; - headers[HTTP2_HEADER_SCHEME] = "https"; - const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body && typeof body.read === "function") { - body.read(0); + }; + __name(_TagException, "TagException"); + var TagException = _TagException; + var _UnsupportedOperationException = class _UnsupportedOperationException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnsupportedOperationException", + $fault: "client", + ...opts + }); + this.name = "UnsupportedOperationException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnsupportedOperationException2.prototype); } - let contentLength = util.bodyLength(body); - if (contentLength == null) { - contentLength = request2.contentLength; + }; + __name(_UnsupportedOperationException, "UnsupportedOperationException"); + var UnsupportedOperationException = _UnsupportedOperationException; + var _XksKeyAlreadyInUseException = class _XksKeyAlreadyInUseException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksKeyAlreadyInUseException", + $fault: "client", + ...opts + }); + this.name = "XksKeyAlreadyInUseException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksKeyAlreadyInUseException2.prototype); } - if (contentLength === 0 || !expectsPayload) { - contentLength = null; + }; + __name(_XksKeyAlreadyInUseException, "XksKeyAlreadyInUseException"); + var XksKeyAlreadyInUseException = _XksKeyAlreadyInUseException; + var _XksKeyInvalidConfigurationException = class _XksKeyInvalidConfigurationException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksKeyInvalidConfigurationException", + $fault: "client", + ...opts + }); + this.name = "XksKeyInvalidConfigurationException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksKeyInvalidConfigurationException2.prototype); } - if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength != null && request2.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request2, new RequestContentLengthMismatchError()); - return false; - } - process.emitWarning(new RequestContentLengthMismatchError()); + }; + __name(_XksKeyInvalidConfigurationException, "XksKeyInvalidConfigurationException"); + var XksKeyInvalidConfigurationException = _XksKeyInvalidConfigurationException; + var _XksKeyNotFoundException = class _XksKeyNotFoundException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "XksKeyNotFoundException", + $fault: "client", + ...opts + }); + this.name = "XksKeyNotFoundException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _XksKeyNotFoundException2.prototype); } - if (contentLength != null) { - assert(body, "no body must not have content length"); - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + }; + __name(_XksKeyNotFoundException, "XksKeyNotFoundException"); + var XksKeyNotFoundException = _XksKeyNotFoundException; + var _CustomKeyStoreHasCMKsException = class _CustomKeyStoreHasCMKsException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "CustomKeyStoreHasCMKsException", + $fault: "client", + ...opts + }); + this.name = "CustomKeyStoreHasCMKsException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _CustomKeyStoreHasCMKsException2.prototype); + } + }; + __name(_CustomKeyStoreHasCMKsException, "CustomKeyStoreHasCMKsException"); + var CustomKeyStoreHasCMKsException = _CustomKeyStoreHasCMKsException; + var DataKeyPairSpec = { + ECC_NIST_P256: "ECC_NIST_P256", + ECC_NIST_P384: "ECC_NIST_P384", + ECC_NIST_P521: "ECC_NIST_P521", + ECC_SECG_P256K1: "ECC_SECG_P256K1", + RSA_2048: "RSA_2048", + RSA_3072: "RSA_3072", + RSA_4096: "RSA_4096", + SM2: "SM2" + }; + var DataKeySpec = { + AES_128: "AES_128", + AES_256: "AES_256" + }; + var KeyEncryptionMechanism = { + RSAES_OAEP_SHA_256: "RSAES_OAEP_SHA_256" + }; + var _IncorrectKeyException = class _IncorrectKeyException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "IncorrectKeyException", + $fault: "client", + ...opts + }); + this.name = "IncorrectKeyException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _IncorrectKeyException2.prototype); } - session.ref(); - const shouldEndStream = method === "GET" || method === "HEAD" || body === null; - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = "100-continue"; - stream = session.request(headers, { endStream: shouldEndStream, signal }); - stream.once("continue", writeBodyH2); - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal + }; + __name(_IncorrectKeyException, "IncorrectKeyException"); + var IncorrectKeyException = _IncorrectKeyException; + var _InvalidCiphertextException = class _InvalidCiphertextException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidCiphertextException", + $fault: "client", + ...opts }); - writeBodyH2(); + this.name = "InvalidCiphertextException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidCiphertextException2.prototype); } - ++session[kOpenStreams]; - stream.once("response", (headers2) => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; - request2.onResponseStarted(); - if (request2.aborted) { - const err = new RequestAbortedError(); - util.errorRequest(client, request2, err); - util.destroy(stream, err); - return; - } - if (request2.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) { - stream.pause(); - } - stream.on("data", (chunk) => { - if (request2.onData(chunk) === false) { - stream.pause(); - } + }; + __name(_InvalidCiphertextException, "InvalidCiphertextException"); + var InvalidCiphertextException = _InvalidCiphertextException; + var _InvalidKeyUsageException = class _InvalidKeyUsageException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidKeyUsageException", + $fault: "client", + ...opts }); - }); - stream.once("end", () => { - if (stream.state?.state == null || stream.state.state < 6) { - request2.onComplete([]); - return; - } - if (session[kOpenStreams] === 0) { - session.unref(); - } - abort(new InformationalError("HTTP/2: stream half-closed (remote)")); - }); - stream.once("close", () => { - session[kOpenStreams] -= 1; - if (session[kOpenStreams] === 0) { - session.unref(); - } - }); - stream.once("error", function(err) { - abort(err); - }); - stream.once("frameError", (type, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); - }); - return true; - function writeBodyH2() { - if (!body || contentLength === 0) { - writeBuffer({ - abort, - client, - request: request2, - contentLength, - expectsPayload, - h2stream: stream, - body: null, - socket: client[kSocket] - }); - } else if (util.isBuffer(body)) { - writeBuffer({ - abort, - client, - request: request2, - contentLength, - body, - expectsPayload, - h2stream: stream, - socket: client[kSocket] - }); - } else if (util.isBlobLike(body)) { - if (typeof body.stream === "function") { - writeIterable({ - abort, - client, - request: request2, - contentLength, - expectsPayload, - h2stream: stream, - body: body.stream(), - socket: client[kSocket] - }); - } else { - writeBlob({ - abort, - body, - client, - request: request2, - contentLength, - expectsPayload, - h2stream: stream, - socket: client[kSocket] - }); - } - } else if (util.isStream(body)) { - writeStream({ - abort, - body, - client, - request: request2, - contentLength, - expectsPayload, - socket: client[kSocket], - h2stream: stream, - header: "" - }); - } else if (util.isIterable(body)) { - writeIterable({ - abort, - body, - client, - request: request2, - contentLength, - expectsPayload, - header: "", - h2stream: stream, - socket: client[kSocket] - }); - } else { - assert(false); - } + this.name = "InvalidKeyUsageException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidKeyUsageException2.prototype); } - } - function writeBuffer({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { - try { - if (body != null && util.isBuffer(body)) { - assert(contentLength === body.byteLength, "buffer body must have content length"); - h2stream.cork(); - h2stream.write(body); - h2stream.uncork(); - h2stream.end(); - request2.onBodySent(body); - } - if (!expectsPayload) { - socket[kReset] = true; - } - request2.onRequestSent(); - client[kResume](); - } catch (error) { - abort(error); + }; + __name(_InvalidKeyUsageException, "InvalidKeyUsageException"); + var InvalidKeyUsageException = _InvalidKeyUsageException; + var _KeyUnavailableException = class _KeyUnavailableException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "KeyUnavailableException", + $fault: "server", + ...opts + }); + this.name = "KeyUnavailableException"; + this.$fault = "server"; + Object.setPrototypeOf(this, _KeyUnavailableException2.prototype); } - } - function writeStream({ abort, socket, expectsPayload, h2stream, body, client, request: request2, contentLength }) { - assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(pipe, err); - abort(err); - } else { - util.removeAllListeners(pipe); - request2.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } - client[kResume](); - } - } - ); - util.addListener(pipe, "data", onPipeData); - function onPipeData(chunk) { - request2.onBodySent(chunk); + }; + __name(_KeyUnavailableException, "KeyUnavailableException"); + var KeyUnavailableException = _KeyUnavailableException; + var _InvalidMarkerException = class _InvalidMarkerException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidMarkerException", + $fault: "client", + ...opts + }); + this.name = "InvalidMarkerException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidMarkerException2.prototype); } - } - async function writeBlob({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { - assert(contentLength === body.size, "blob body must have content length"); - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError(); - } - const buffer = Buffer.from(await body.arrayBuffer()); - h2stream.cork(); - h2stream.write(buffer); - h2stream.uncork(); - h2stream.end(); - request2.onBodySent(buffer); - request2.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } - client[kResume](); - } catch (err) { - abort(err); + }; + __name(_InvalidMarkerException, "InvalidMarkerException"); + var InvalidMarkerException = _InvalidMarkerException; + var _ExpiredImportTokenException = class _ExpiredImportTokenException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "ExpiredImportTokenException", + $fault: "client", + ...opts + }); + this.name = "ExpiredImportTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExpiredImportTokenException2.prototype); } - } - async function writeIterable({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); - let callback = null; - function onDrain() { - if (callback) { - const cb = callback; - callback = null; - cb(); - } + }; + __name(_ExpiredImportTokenException, "ExpiredImportTokenException"); + var ExpiredImportTokenException = _ExpiredImportTokenException; + var WrappingKeySpec = { + RSA_2048: "RSA_2048", + RSA_3072: "RSA_3072", + RSA_4096: "RSA_4096", + SM2: "SM2" + }; + var _IncorrectKeyMaterialException = class _IncorrectKeyMaterialException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "IncorrectKeyMaterialException", + $fault: "client", + ...opts + }); + this.name = "IncorrectKeyMaterialException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _IncorrectKeyMaterialException2.prototype); } - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null); - if (socket[kError]) { - reject(socket[kError]); - } else { - callback = resolve; - } - }); - h2stream.on("close", onDrain).on("drain", onDrain); - try { - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError]; - } - const res = h2stream.write(chunk); - request2.onBodySent(chunk); - if (!res) { - await waitForDrain(); - } - } - h2stream.end(); - request2.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } - client[kResume](); - } catch (err) { - abort(err); - } finally { - h2stream.off("close", onDrain).off("drain", onDrain); + }; + __name(_IncorrectKeyMaterialException, "IncorrectKeyMaterialException"); + var IncorrectKeyMaterialException = _IncorrectKeyMaterialException; + var _InvalidImportTokenException = class _InvalidImportTokenException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidImportTokenException", + $fault: "client", + ...opts + }); + this.name = "InvalidImportTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidImportTokenException2.prototype); } - } - module2.exports = connectH2; - } -}); - -// node_modules/undici/lib/handler/redirect-handler.js -var require_redirect_handler = __commonJS({ - "node_modules/undici/lib/handler/redirect-handler.js"(exports2, module2) { - "use strict"; - var util = require_util8(); - var { kBodyUsed } = require_symbols6(); - var assert = require("node:assert"); - var { InvalidArgumentError } = require_errors2(); - var EE = require("node:events"); - var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; - var kBody = Symbol("body"); - var BodyAsyncIterable = class { - constructor(body) { - this[kBody] = body; - this[kBodyUsed] = false; + }; + __name(_InvalidImportTokenException, "InvalidImportTokenException"); + var InvalidImportTokenException = _InvalidImportTokenException; + var _InvalidGrantIdException = class _InvalidGrantIdException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidGrantIdException", + $fault: "client", + ...opts + }); + this.name = "InvalidGrantIdException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidGrantIdException2.prototype); } - async *[Symbol.asyncIterator]() { - assert(!this[kBodyUsed], "disturbed"); - this[kBodyUsed] = true; - yield* this[kBody]; + }; + __name(_InvalidGrantIdException, "InvalidGrantIdException"); + var InvalidGrantIdException = _InvalidGrantIdException; + var _KMSInvalidMacException = class _KMSInvalidMacException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "KMSInvalidMacException", + $fault: "client", + ...opts + }); + this.name = "KMSInvalidMacException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _KMSInvalidMacException2.prototype); } }; - var RedirectHandler = class { - constructor(dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError("maxRedirections must be a positive number"); - } - util.validateHandler(handler, opts.method, opts.upgrade); - this.dispatch = dispatch; - this.location = null; - this.abort = null; - this.opts = { ...opts, maxRedirections: 0 }; - this.maxRedirections = maxRedirections; - this.handler = handler; - this.history = []; - this.redirectionLimitReached = false; - if (util.isStream(this.opts.body)) { - if (util.bodyLength(this.opts.body) === 0) { - this.opts.body.on("data", function() { - assert(false); - }); - } - if (typeof this.opts.body.readableDidRead !== "boolean") { - this.opts.body[kBodyUsed] = false; - EE.prototype.on.call(this.opts.body, "data", function() { - this[kBodyUsed] = true; - }); - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") { - this.opts.body = new BodyAsyncIterable(this.opts.body); - } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) { - this.opts.body = new BodyAsyncIterable(this.opts.body); - } + __name(_KMSInvalidMacException, "KMSInvalidMacException"); + var KMSInvalidMacException = _KMSInvalidMacException; + var _KMSInvalidSignatureException = class _KMSInvalidSignatureException2 extends KMSServiceException { + /** + * @internal + */ + constructor(opts) { + super({ + name: "KMSInvalidSignatureException", + $fault: "client", + ...opts + }); + this.name = "KMSInvalidSignatureException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _KMSInvalidSignatureException2.prototype); + } + }; + __name(_KMSInvalidSignatureException, "KMSInvalidSignatureException"); + var KMSInvalidSignatureException = _KMSInvalidSignatureException; + var RotationType = { + AUTOMATIC: "AUTOMATIC", + ON_DEMAND: "ON_DEMAND" + }; + var MessageType = { + DIGEST: "DIGEST", + RAW: "RAW" + }; + var XksProxyAuthenticationCredentialTypeFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.AccessKeyId && { AccessKeyId: import_smithy_client5.SENSITIVE_STRING }, + ...obj.RawSecretAccessKey && { RawSecretAccessKey: import_smithy_client5.SENSITIVE_STRING } + }), "XksProxyAuthenticationCredentialTypeFilterSensitiveLog"); + var CreateCustomKeyStoreRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.KeyStorePassword && { KeyStorePassword: import_smithy_client5.SENSITIVE_STRING }, + ...obj.XksProxyAuthenticationCredential && { + XksProxyAuthenticationCredential: XksProxyAuthenticationCredentialTypeFilterSensitiveLog( + obj.XksProxyAuthenticationCredential + ) } - onConnect(abort) { - this.abort = abort; - this.handler.onConnect(abort, { history: this.history }); + }), "CreateCustomKeyStoreRequestFilterSensitiveLog"); + var XksProxyConfigurationTypeFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.AccessKeyId && { AccessKeyId: import_smithy_client5.SENSITIVE_STRING } + }), "XksProxyConfigurationTypeFilterSensitiveLog"); + var CustomKeyStoresListEntryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.XksProxyConfiguration && { + XksProxyConfiguration: XksProxyConfigurationTypeFilterSensitiveLog(obj.XksProxyConfiguration) + } + }), "CustomKeyStoresListEntryFilterSensitiveLog"); + var DecryptResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Plaintext && { Plaintext: import_smithy_client5.SENSITIVE_STRING } + }), "DecryptResponseFilterSensitiveLog"); + var DeriveSharedSecretResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.SharedSecret && { SharedSecret: import_smithy_client5.SENSITIVE_STRING } + }), "DeriveSharedSecretResponseFilterSensitiveLog"); + var DescribeCustomKeyStoresResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.CustomKeyStores && { + CustomKeyStores: obj.CustomKeyStores.map((item) => CustomKeyStoresListEntryFilterSensitiveLog(item)) + } + }), "DescribeCustomKeyStoresResponseFilterSensitiveLog"); + var EncryptRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Plaintext && { Plaintext: import_smithy_client5.SENSITIVE_STRING } + }), "EncryptRequestFilterSensitiveLog"); + var GenerateDataKeyResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Plaintext && { Plaintext: import_smithy_client5.SENSITIVE_STRING } + }), "GenerateDataKeyResponseFilterSensitiveLog"); + var GenerateDataKeyPairResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.PrivateKeyPlaintext && { PrivateKeyPlaintext: import_smithy_client5.SENSITIVE_STRING } + }), "GenerateDataKeyPairResponseFilterSensitiveLog"); + var GenerateMacRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Message && { Message: import_smithy_client5.SENSITIVE_STRING } + }), "GenerateMacRequestFilterSensitiveLog"); + var GenerateRandomResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Plaintext && { Plaintext: import_smithy_client5.SENSITIVE_STRING } + }), "GenerateRandomResponseFilterSensitiveLog"); + var GetParametersForImportResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.PublicKey && { PublicKey: import_smithy_client5.SENSITIVE_STRING } + }), "GetParametersForImportResponseFilterSensitiveLog"); + var SignRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Message && { Message: import_smithy_client5.SENSITIVE_STRING } + }), "SignRequestFilterSensitiveLog"); + var UpdateCustomKeyStoreRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.KeyStorePassword && { KeyStorePassword: import_smithy_client5.SENSITIVE_STRING }, + ...obj.XksProxyAuthenticationCredential && { + XksProxyAuthenticationCredential: XksProxyAuthenticationCredentialTypeFilterSensitiveLog( + obj.XksProxyAuthenticationCredential + ) } - onUpgrade(statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket); + }), "UpdateCustomKeyStoreRequestFilterSensitiveLog"); + var VerifyRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Message && { Message: import_smithy_client5.SENSITIVE_STRING } + }), "VerifyRequestFilterSensitiveLog"); + var VerifyMacRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.Message && { Message: import_smithy_client5.SENSITIVE_STRING } + }), "VerifyMacRequestFilterSensitiveLog"); + var se_CancelKeyDeletionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("CancelKeyDeletion"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_CancelKeyDeletionCommand"); + var se_ConnectCustomKeyStoreCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ConnectCustomKeyStore"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ConnectCustomKeyStoreCommand"); + var se_CreateAliasCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("CreateAlias"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_CreateAliasCommand"); + var se_CreateCustomKeyStoreCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("CreateCustomKeyStore"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_CreateCustomKeyStoreCommand"); + var se_CreateGrantCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("CreateGrant"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_CreateGrantCommand"); + var se_CreateKeyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("CreateKey"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_CreateKeyCommand"); + var se_DecryptCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("Decrypt"); + let body; + body = JSON.stringify(se_DecryptRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DecryptCommand"); + var se_DeleteAliasCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DeleteAlias"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DeleteAliasCommand"); + var se_DeleteCustomKeyStoreCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DeleteCustomKeyStore"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DeleteCustomKeyStoreCommand"); + var se_DeleteImportedKeyMaterialCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DeleteImportedKeyMaterial"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DeleteImportedKeyMaterialCommand"); + var se_DeriveSharedSecretCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DeriveSharedSecret"); + let body; + body = JSON.stringify(se_DeriveSharedSecretRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DeriveSharedSecretCommand"); + var se_DescribeCustomKeyStoresCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DescribeCustomKeyStores"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DescribeCustomKeyStoresCommand"); + var se_DescribeKeyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DescribeKey"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DescribeKeyCommand"); + var se_DisableKeyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DisableKey"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DisableKeyCommand"); + var se_DisableKeyRotationCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DisableKeyRotation"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DisableKeyRotationCommand"); + var se_DisconnectCustomKeyStoreCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("DisconnectCustomKeyStore"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_DisconnectCustomKeyStoreCommand"); + var se_EnableKeyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("EnableKey"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_EnableKeyCommand"); + var se_EnableKeyRotationCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("EnableKeyRotation"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_EnableKeyRotationCommand"); + var se_EncryptCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("Encrypt"); + let body; + body = JSON.stringify(se_EncryptRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_EncryptCommand"); + var se_GenerateDataKeyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GenerateDataKey"); + let body; + body = JSON.stringify(se_GenerateDataKeyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GenerateDataKeyCommand"); + var se_GenerateDataKeyPairCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GenerateDataKeyPair"); + let body; + body = JSON.stringify(se_GenerateDataKeyPairRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GenerateDataKeyPairCommand"); + var se_GenerateDataKeyPairWithoutPlaintextCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GenerateDataKeyPairWithoutPlaintext"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GenerateDataKeyPairWithoutPlaintextCommand"); + var se_GenerateDataKeyWithoutPlaintextCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GenerateDataKeyWithoutPlaintext"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GenerateDataKeyWithoutPlaintextCommand"); + var se_GenerateMacCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GenerateMac"); + let body; + body = JSON.stringify(se_GenerateMacRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GenerateMacCommand"); + var se_GenerateRandomCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GenerateRandom"); + let body; + body = JSON.stringify(se_GenerateRandomRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GenerateRandomCommand"); + var se_GetKeyPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GetKeyPolicy"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetKeyPolicyCommand"); + var se_GetKeyRotationStatusCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GetKeyRotationStatus"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetKeyRotationStatusCommand"); + var se_GetParametersForImportCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GetParametersForImport"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetParametersForImportCommand"); + var se_GetPublicKeyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("GetPublicKey"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_GetPublicKeyCommand"); + var se_ImportKeyMaterialCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ImportKeyMaterial"); + let body; + body = JSON.stringify(se_ImportKeyMaterialRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ImportKeyMaterialCommand"); + var se_ListAliasesCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListAliases"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListAliasesCommand"); + var se_ListGrantsCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListGrants"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListGrantsCommand"); + var se_ListKeyPoliciesCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListKeyPolicies"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListKeyPoliciesCommand"); + var se_ListKeyRotationsCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListKeyRotations"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListKeyRotationsCommand"); + var se_ListKeysCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListKeys"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListKeysCommand"); + var se_ListResourceTagsCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListResourceTags"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListResourceTagsCommand"); + var se_ListRetirableGrantsCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ListRetirableGrants"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ListRetirableGrantsCommand"); + var se_PutKeyPolicyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("PutKeyPolicy"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_PutKeyPolicyCommand"); + var se_ReEncryptCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ReEncrypt"); + let body; + body = JSON.stringify(se_ReEncryptRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ReEncryptCommand"); + var se_ReplicateKeyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ReplicateKey"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ReplicateKeyCommand"); + var se_RetireGrantCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("RetireGrant"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_RetireGrantCommand"); + var se_RevokeGrantCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("RevokeGrant"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_RevokeGrantCommand"); + var se_RotateKeyOnDemandCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("RotateKeyOnDemand"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_RotateKeyOnDemandCommand"); + var se_ScheduleKeyDeletionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("ScheduleKeyDeletion"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_ScheduleKeyDeletionCommand"); + var se_SignCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("Sign"); + let body; + body = JSON.stringify(se_SignRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_SignCommand"); + var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("TagResource"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_TagResourceCommand"); + var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UntagResource"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_UntagResourceCommand"); + var se_UpdateAliasCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UpdateAlias"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_UpdateAliasCommand"); + var se_UpdateCustomKeyStoreCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UpdateCustomKeyStore"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_UpdateCustomKeyStoreCommand"); + var se_UpdateKeyDescriptionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UpdateKeyDescription"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_UpdateKeyDescriptionCommand"); + var se_UpdatePrimaryRegionCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("UpdatePrimaryRegion"); + let body; + body = JSON.stringify((0, import_smithy_client5._json)(input)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_UpdatePrimaryRegionCommand"); + var se_VerifyCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("Verify"); + let body; + body = JSON.stringify(se_VerifyRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_VerifyCommand"); + var se_VerifyMacCommand = /* @__PURE__ */ __name(async (input, context) => { + const headers = sharedHeaders("VerifyMac"); + let body; + body = JSON.stringify(se_VerifyMacRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }, "se_VerifyMacCommand"); + var de_CancelKeyDeletionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_CancelKeyDeletionCommand"); + var de_ConnectCustomKeyStoreCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ConnectCustomKeyStoreCommand"); + var de_CreateAliasCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_CreateAliasCommand"); + var de_CreateCustomKeyStoreCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_CreateCustomKeyStoreCommand"); + var de_CreateGrantCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_CreateGrantCommand"); + var de_CreateKeyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_CreateKeyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_CreateKeyCommand"); + var de_DecryptCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DecryptResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DecryptCommand"); + var de_DeleteAliasCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_DeleteAliasCommand"); + var de_DeleteCustomKeyStoreCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DeleteCustomKeyStoreCommand"); + var de_DeleteImportedKeyMaterialCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_DeleteImportedKeyMaterialCommand"); + var de_DeriveSharedSecretCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DeriveSharedSecretResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DeriveSharedSecretCommand"); + var de_DescribeCustomKeyStoresCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DescribeCustomKeyStoresResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DescribeCustomKeyStoresCommand"); + var de_DescribeKeyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_DescribeKeyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DescribeKeyCommand"); + var de_DisableKeyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_DisableKeyCommand"); + var de_DisableKeyRotationCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_DisableKeyRotationCommand"); + var de_DisconnectCustomKeyStoreCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_DisconnectCustomKeyStoreCommand"); + var de_EnableKeyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_EnableKeyCommand"); + var de_EnableKeyRotationCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_EnableKeyRotationCommand"); + var de_EncryptCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_EncryptResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_EncryptCommand"); + var de_GenerateDataKeyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_GenerateDataKeyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GenerateDataKeyCommand"); + var de_GenerateDataKeyPairCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_GenerateDataKeyPairResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GenerateDataKeyPairCommand"); + var de_GenerateDataKeyPairWithoutPlaintextCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_GenerateDataKeyPairWithoutPlaintextResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GenerateDataKeyPairWithoutPlaintextCommand"); + var de_GenerateDataKeyWithoutPlaintextCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_GenerateDataKeyWithoutPlaintextResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GenerateDataKeyWithoutPlaintextCommand"); + var de_GenerateMacCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_GenerateMacResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GenerateMacCommand"); + var de_GenerateRandomCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_GenerateRandomResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GenerateRandomCommand"); + var de_GetKeyPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetKeyPolicyCommand"); + var de_GetKeyRotationStatusCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_GetKeyRotationStatusResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetKeyRotationStatusCommand"); + var de_GetParametersForImportCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_GetParametersForImportResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetParametersForImportCommand"); + var de_GetPublicKeyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_GetPublicKeyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_GetPublicKeyCommand"); + var de_ImportKeyMaterialCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ImportKeyMaterialCommand"); + var de_ListAliasesCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListAliasesResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListAliasesCommand"); + var de_ListGrantsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListGrantsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListGrantsCommand"); + var de_ListKeyPoliciesCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListKeyPoliciesCommand"); + var de_ListKeyRotationsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListKeyRotationsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListKeyRotationsCommand"); + var de_ListKeysCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListKeysCommand"); + var de_ListResourceTagsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListResourceTagsCommand"); + var de_ListRetirableGrantsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ListGrantsResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ListRetirableGrantsCommand"); + var de_PutKeyPolicyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_PutKeyPolicyCommand"); + var de_ReEncryptCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ReEncryptResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ReEncryptCommand"); + var de_ReplicateKeyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ReplicateKeyResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ReplicateKeyCommand"); + var de_RetireGrantCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_RetireGrantCommand"); + var de_RevokeGrantCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_RevokeGrantCommand"); + var de_RotateKeyOnDemandCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_RotateKeyOnDemandCommand"); + var de_ScheduleKeyDeletionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_ScheduleKeyDeletionResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_ScheduleKeyDeletionCommand"); + var de_SignCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = de_SignResponse(data, context); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_SignCommand"); + var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_TagResourceCommand"); + var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_UntagResourceCommand"); + var de_UpdateAliasCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_UpdateAliasCommand"); + var de_UpdateCustomKeyStoreCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_UpdateCustomKeyStoreCommand"); + var de_UpdateKeyDescriptionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_UpdateKeyDescriptionCommand"); + var de_UpdatePrimaryRegionCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + await (0, import_smithy_client5.collectBody)(output.body, context); + const response = { + $metadata: deserializeMetadata(output) + }; + return response; + }, "de_UpdatePrimaryRegionCommand"); + var de_VerifyCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_VerifyCommand"); + var de_VerifyMacCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data = await (0, import_core22.parseJsonBody)(output.body, context); + let contents = {}; + contents = (0, import_smithy_client5._json)(data); + const response = { + $metadata: deserializeMetadata(output), + ...contents + }; + return response; + }, "de_VerifyMacCommand"); + var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core22.parseJsonErrorBody)(output.body, context) + }; + const errorCode = (0, import_core22.loadRestJsonErrorCode)(output, parsedOutput.body); + switch (errorCode) { + case "DependencyTimeoutException": + case "com.amazonaws.kms#DependencyTimeoutException": + throw await de_DependencyTimeoutExceptionRes(parsedOutput, context); + case "InvalidArnException": + case "com.amazonaws.kms#InvalidArnException": + throw await de_InvalidArnExceptionRes(parsedOutput, context); + case "KMSInternalException": + case "com.amazonaws.kms#KMSInternalException": + throw await de_KMSInternalExceptionRes(parsedOutput, context); + case "KMSInvalidStateException": + case "com.amazonaws.kms#KMSInvalidStateException": + throw await de_KMSInvalidStateExceptionRes(parsedOutput, context); + case "NotFoundException": + case "com.amazonaws.kms#NotFoundException": + throw await de_NotFoundExceptionRes(parsedOutput, context); + case "CloudHsmClusterInvalidConfigurationException": + case "com.amazonaws.kms#CloudHsmClusterInvalidConfigurationException": + throw await de_CloudHsmClusterInvalidConfigurationExceptionRes(parsedOutput, context); + case "CloudHsmClusterNotActiveException": + case "com.amazonaws.kms#CloudHsmClusterNotActiveException": + throw await de_CloudHsmClusterNotActiveExceptionRes(parsedOutput, context); + case "CustomKeyStoreInvalidStateException": + case "com.amazonaws.kms#CustomKeyStoreInvalidStateException": + throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context); + case "CustomKeyStoreNotFoundException": + case "com.amazonaws.kms#CustomKeyStoreNotFoundException": + throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context); + case "AlreadyExistsException": + case "com.amazonaws.kms#AlreadyExistsException": + throw await de_AlreadyExistsExceptionRes(parsedOutput, context); + case "InvalidAliasNameException": + case "com.amazonaws.kms#InvalidAliasNameException": + throw await de_InvalidAliasNameExceptionRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.kms#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "CloudHsmClusterInUseException": + case "com.amazonaws.kms#CloudHsmClusterInUseException": + throw await de_CloudHsmClusterInUseExceptionRes(parsedOutput, context); + case "CloudHsmClusterNotFoundException": + case "com.amazonaws.kms#CloudHsmClusterNotFoundException": + throw await de_CloudHsmClusterNotFoundExceptionRes(parsedOutput, context); + case "CustomKeyStoreNameInUseException": + case "com.amazonaws.kms#CustomKeyStoreNameInUseException": + throw await de_CustomKeyStoreNameInUseExceptionRes(parsedOutput, context); + case "IncorrectTrustAnchorException": + case "com.amazonaws.kms#IncorrectTrustAnchorException": + throw await de_IncorrectTrustAnchorExceptionRes(parsedOutput, context); + case "XksProxyIncorrectAuthenticationCredentialException": + case "com.amazonaws.kms#XksProxyIncorrectAuthenticationCredentialException": + throw await de_XksProxyIncorrectAuthenticationCredentialExceptionRes(parsedOutput, context); + case "XksProxyInvalidConfigurationException": + case "com.amazonaws.kms#XksProxyInvalidConfigurationException": + throw await de_XksProxyInvalidConfigurationExceptionRes(parsedOutput, context); + case "XksProxyInvalidResponseException": + case "com.amazonaws.kms#XksProxyInvalidResponseException": + throw await de_XksProxyInvalidResponseExceptionRes(parsedOutput, context); + case "XksProxyUriEndpointInUseException": + case "com.amazonaws.kms#XksProxyUriEndpointInUseException": + throw await de_XksProxyUriEndpointInUseExceptionRes(parsedOutput, context); + case "XksProxyUriInUseException": + case "com.amazonaws.kms#XksProxyUriInUseException": + throw await de_XksProxyUriInUseExceptionRes(parsedOutput, context); + case "XksProxyUriUnreachableException": + case "com.amazonaws.kms#XksProxyUriUnreachableException": + throw await de_XksProxyUriUnreachableExceptionRes(parsedOutput, context); + case "XksProxyVpcEndpointServiceInUseException": + case "com.amazonaws.kms#XksProxyVpcEndpointServiceInUseException": + throw await de_XksProxyVpcEndpointServiceInUseExceptionRes(parsedOutput, context); + case "XksProxyVpcEndpointServiceInvalidConfigurationException": + case "com.amazonaws.kms#XksProxyVpcEndpointServiceInvalidConfigurationException": + throw await de_XksProxyVpcEndpointServiceInvalidConfigurationExceptionRes(parsedOutput, context); + case "XksProxyVpcEndpointServiceNotFoundException": + case "com.amazonaws.kms#XksProxyVpcEndpointServiceNotFoundException": + throw await de_XksProxyVpcEndpointServiceNotFoundExceptionRes(parsedOutput, context); + case "DisabledException": + case "com.amazonaws.kms#DisabledException": + throw await de_DisabledExceptionRes(parsedOutput, context); + case "DryRunOperationException": + case "com.amazonaws.kms#DryRunOperationException": + throw await de_DryRunOperationExceptionRes(parsedOutput, context); + case "InvalidGrantTokenException": + case "com.amazonaws.kms#InvalidGrantTokenException": + throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context); + case "MalformedPolicyDocumentException": + case "com.amazonaws.kms#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "TagException": + case "com.amazonaws.kms#TagException": + throw await de_TagExceptionRes(parsedOutput, context); + case "UnsupportedOperationException": + case "com.amazonaws.kms#UnsupportedOperationException": + throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); + case "XksKeyAlreadyInUseException": + case "com.amazonaws.kms#XksKeyAlreadyInUseException": + throw await de_XksKeyAlreadyInUseExceptionRes(parsedOutput, context); + case "XksKeyInvalidConfigurationException": + case "com.amazonaws.kms#XksKeyInvalidConfigurationException": + throw await de_XksKeyInvalidConfigurationExceptionRes(parsedOutput, context); + case "XksKeyNotFoundException": + case "com.amazonaws.kms#XksKeyNotFoundException": + throw await de_XksKeyNotFoundExceptionRes(parsedOutput, context); + case "IncorrectKeyException": + case "com.amazonaws.kms#IncorrectKeyException": + throw await de_IncorrectKeyExceptionRes(parsedOutput, context); + case "InvalidCiphertextException": + case "com.amazonaws.kms#InvalidCiphertextException": + throw await de_InvalidCiphertextExceptionRes(parsedOutput, context); + case "InvalidKeyUsageException": + case "com.amazonaws.kms#InvalidKeyUsageException": + throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context); + case "KeyUnavailableException": + case "com.amazonaws.kms#KeyUnavailableException": + throw await de_KeyUnavailableExceptionRes(parsedOutput, context); + case "CustomKeyStoreHasCMKsException": + case "com.amazonaws.kms#CustomKeyStoreHasCMKsException": + throw await de_CustomKeyStoreHasCMKsExceptionRes(parsedOutput, context); + case "InvalidMarkerException": + case "com.amazonaws.kms#InvalidMarkerException": + throw await de_InvalidMarkerExceptionRes(parsedOutput, context); + case "ExpiredImportTokenException": + case "com.amazonaws.kms#ExpiredImportTokenException": + throw await de_ExpiredImportTokenExceptionRes(parsedOutput, context); + case "IncorrectKeyMaterialException": + case "com.amazonaws.kms#IncorrectKeyMaterialException": + throw await de_IncorrectKeyMaterialExceptionRes(parsedOutput, context); + case "InvalidImportTokenException": + case "com.amazonaws.kms#InvalidImportTokenException": + throw await de_InvalidImportTokenExceptionRes(parsedOutput, context); + case "InvalidGrantIdException": + case "com.amazonaws.kms#InvalidGrantIdException": + throw await de_InvalidGrantIdExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.kms#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "CloudHsmClusterNotRelatedException": + case "com.amazonaws.kms#CloudHsmClusterNotRelatedException": + throw await de_CloudHsmClusterNotRelatedExceptionRes(parsedOutput, context); + case "KMSInvalidSignatureException": + case "com.amazonaws.kms#KMSInvalidSignatureException": + throw await de_KMSInvalidSignatureExceptionRes(parsedOutput, context); + case "KMSInvalidMacException": + case "com.amazonaws.kms#KMSInvalidMacException": + throw await de_KMSInvalidMacExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode + }); } - onError(error) { - this.handler.onError(error); + }, "de_CommandError"); + var de_AlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new AlreadyExistsException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_AlreadyExistsExceptionRes"); + var de_CloudHsmClusterInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new CloudHsmClusterInUseException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_CloudHsmClusterInUseExceptionRes"); + var de_CloudHsmClusterInvalidConfigurationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new CloudHsmClusterInvalidConfigurationException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_CloudHsmClusterInvalidConfigurationExceptionRes"); + var de_CloudHsmClusterNotActiveExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new CloudHsmClusterNotActiveException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_CloudHsmClusterNotActiveExceptionRes"); + var de_CloudHsmClusterNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new CloudHsmClusterNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_CloudHsmClusterNotFoundExceptionRes"); + var de_CloudHsmClusterNotRelatedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new CloudHsmClusterNotRelatedException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_CloudHsmClusterNotRelatedExceptionRes"); + var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ConflictException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ConflictExceptionRes"); + var de_CustomKeyStoreHasCMKsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new CustomKeyStoreHasCMKsException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_CustomKeyStoreHasCMKsExceptionRes"); + var de_CustomKeyStoreInvalidStateExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new CustomKeyStoreInvalidStateException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_CustomKeyStoreInvalidStateExceptionRes"); + var de_CustomKeyStoreNameInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new CustomKeyStoreNameInUseException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_CustomKeyStoreNameInUseExceptionRes"); + var de_CustomKeyStoreNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new CustomKeyStoreNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_CustomKeyStoreNotFoundExceptionRes"); + var de_DependencyTimeoutExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new DependencyTimeoutException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_DependencyTimeoutExceptionRes"); + var de_DisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new DisabledException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_DisabledExceptionRes"); + var de_DryRunOperationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new DryRunOperationException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_DryRunOperationExceptionRes"); + var de_ExpiredImportTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new ExpiredImportTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_ExpiredImportTokenExceptionRes"); + var de_IncorrectKeyExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new IncorrectKeyException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_IncorrectKeyExceptionRes"); + var de_IncorrectKeyMaterialExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new IncorrectKeyMaterialException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_IncorrectKeyMaterialExceptionRes"); + var de_IncorrectTrustAnchorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new IncorrectTrustAnchorException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_IncorrectTrustAnchorExceptionRes"); + var de_InvalidAliasNameExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidAliasNameException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidAliasNameExceptionRes"); + var de_InvalidArnExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidArnException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidArnExceptionRes"); + var de_InvalidCiphertextExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidCiphertextException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidCiphertextExceptionRes"); + var de_InvalidGrantIdExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidGrantIdException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidGrantIdExceptionRes"); + var de_InvalidGrantTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidGrantTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidGrantTokenExceptionRes"); + var de_InvalidImportTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidImportTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidImportTokenExceptionRes"); + var de_InvalidKeyUsageExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidKeyUsageException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidKeyUsageExceptionRes"); + var de_InvalidMarkerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new InvalidMarkerException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_InvalidMarkerExceptionRes"); + var de_KeyUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new KeyUnavailableException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_KeyUnavailableExceptionRes"); + var de_KMSInternalExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new KMSInternalException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_KMSInternalExceptionRes"); + var de_KMSInvalidMacExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new KMSInvalidMacException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_KMSInvalidMacExceptionRes"); + var de_KMSInvalidSignatureExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new KMSInvalidSignatureException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_KMSInvalidSignatureExceptionRes"); + var de_KMSInvalidStateExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new KMSInvalidStateException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_KMSInvalidStateExceptionRes"); + var de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new LimitExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_LimitExceededExceptionRes"); + var de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new MalformedPolicyDocumentException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_MalformedPolicyDocumentExceptionRes"); + var de_NotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new NotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_NotFoundExceptionRes"); + var de_TagExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new TagException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_TagExceptionRes"); + var de_UnsupportedOperationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new UnsupportedOperationException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_UnsupportedOperationExceptionRes"); + var de_XksKeyAlreadyInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksKeyAlreadyInUseException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksKeyAlreadyInUseExceptionRes"); + var de_XksKeyInvalidConfigurationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksKeyInvalidConfigurationException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksKeyInvalidConfigurationExceptionRes"); + var de_XksKeyNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksKeyNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksKeyNotFoundExceptionRes"); + var de_XksProxyIncorrectAuthenticationCredentialExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksProxyIncorrectAuthenticationCredentialException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksProxyIncorrectAuthenticationCredentialExceptionRes"); + var de_XksProxyInvalidConfigurationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksProxyInvalidConfigurationException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksProxyInvalidConfigurationExceptionRes"); + var de_XksProxyInvalidResponseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksProxyInvalidResponseException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksProxyInvalidResponseExceptionRes"); + var de_XksProxyUriEndpointInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksProxyUriEndpointInUseException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksProxyUriEndpointInUseExceptionRes"); + var de_XksProxyUriInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksProxyUriInUseException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksProxyUriInUseExceptionRes"); + var de_XksProxyUriUnreachableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksProxyUriUnreachableException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksProxyUriUnreachableExceptionRes"); + var de_XksProxyVpcEndpointServiceInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksProxyVpcEndpointServiceInUseException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksProxyVpcEndpointServiceInUseExceptionRes"); + var de_XksProxyVpcEndpointServiceInvalidConfigurationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksProxyVpcEndpointServiceInvalidConfigurationException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksProxyVpcEndpointServiceInvalidConfigurationExceptionRes"); + var de_XksProxyVpcEndpointServiceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = (0, import_smithy_client5._json)(body); + const exception = new XksProxyVpcEndpointServiceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client5.decorateServiceException)(exception, body); + }, "de_XksProxyVpcEndpointServiceNotFoundExceptionRes"); + var se_DecryptRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + CiphertextBlob: context.base64Encoder, + DryRun: [], + EncryptionAlgorithm: [], + EncryptionContext: import_smithy_client5._json, + GrantTokens: import_smithy_client5._json, + KeyId: [], + Recipient: (_) => se_RecipientInfo(_, context) + }); + }, "se_DecryptRequest"); + var se_DeriveSharedSecretRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + DryRun: [], + GrantTokens: import_smithy_client5._json, + KeyAgreementAlgorithm: [], + KeyId: [], + PublicKey: context.base64Encoder, + Recipient: (_) => se_RecipientInfo(_, context) + }); + }, "se_DeriveSharedSecretRequest"); + var se_EncryptRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + DryRun: [], + EncryptionAlgorithm: [], + EncryptionContext: import_smithy_client5._json, + GrantTokens: import_smithy_client5._json, + KeyId: [], + Plaintext: context.base64Encoder + }); + }, "se_EncryptRequest"); + var se_GenerateDataKeyPairRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + DryRun: [], + EncryptionContext: import_smithy_client5._json, + GrantTokens: import_smithy_client5._json, + KeyId: [], + KeyPairSpec: [], + Recipient: (_) => se_RecipientInfo(_, context) + }); + }, "se_GenerateDataKeyPairRequest"); + var se_GenerateDataKeyRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + DryRun: [], + EncryptionContext: import_smithy_client5._json, + GrantTokens: import_smithy_client5._json, + KeyId: [], + KeySpec: [], + NumberOfBytes: [], + Recipient: (_) => se_RecipientInfo(_, context) + }); + }, "se_GenerateDataKeyRequest"); + var se_GenerateMacRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + DryRun: [], + GrantTokens: import_smithy_client5._json, + KeyId: [], + MacAlgorithm: [], + Message: context.base64Encoder + }); + }, "se_GenerateMacRequest"); + var se_GenerateRandomRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + CustomKeyStoreId: [], + NumberOfBytes: [], + Recipient: (_) => se_RecipientInfo(_, context) + }); + }, "se_GenerateRandomRequest"); + var se_ImportKeyMaterialRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + EncryptedKeyMaterial: context.base64Encoder, + ExpirationModel: [], + ImportToken: context.base64Encoder, + KeyId: [], + ValidTo: (_) => _.getTime() / 1e3 + }); + }, "se_ImportKeyMaterialRequest"); + var se_RecipientInfo = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + AttestationDocument: context.base64Encoder, + KeyEncryptionAlgorithm: [] + }); + }, "se_RecipientInfo"); + var se_ReEncryptRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + CiphertextBlob: context.base64Encoder, + DestinationEncryptionAlgorithm: [], + DestinationEncryptionContext: import_smithy_client5._json, + DestinationKeyId: [], + DryRun: [], + GrantTokens: import_smithy_client5._json, + SourceEncryptionAlgorithm: [], + SourceEncryptionContext: import_smithy_client5._json, + SourceKeyId: [] + }); + }, "se_ReEncryptRequest"); + var se_SignRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + DryRun: [], + GrantTokens: import_smithy_client5._json, + KeyId: [], + Message: context.base64Encoder, + MessageType: [], + SigningAlgorithm: [] + }); + }, "se_SignRequest"); + var se_VerifyMacRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + DryRun: [], + GrantTokens: import_smithy_client5._json, + KeyId: [], + Mac: context.base64Encoder, + MacAlgorithm: [], + Message: context.base64Encoder + }); + }, "se_VerifyMacRequest"); + var se_VerifyRequest = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client5.take)(input, { + DryRun: [], + GrantTokens: import_smithy_client5._json, + KeyId: [], + Message: context.base64Encoder, + MessageType: [], + Signature: context.base64Encoder, + SigningAlgorithm: [] + }); + }, "se_VerifyRequest"); + var de_AliasList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_AliasListEntry(entry, context); + }); + return retVal; + }, "de_AliasList"); + var de_AliasListEntry = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + AliasArn: import_smithy_client5.expectString, + AliasName: import_smithy_client5.expectString, + CreationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + LastUpdatedDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + TargetKeyId: import_smithy_client5.expectString + }); + }, "de_AliasListEntry"); + var de_CreateKeyResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + KeyMetadata: (_) => de_KeyMetadata(_, context) + }); + }, "de_CreateKeyResponse"); + var de_CustomKeyStoresList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_CustomKeyStoresListEntry(entry, context); + }); + return retVal; + }, "de_CustomKeyStoresList"); + var de_CustomKeyStoresListEntry = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + CloudHsmClusterId: import_smithy_client5.expectString, + ConnectionErrorCode: import_smithy_client5.expectString, + ConnectionState: import_smithy_client5.expectString, + CreationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + CustomKeyStoreId: import_smithy_client5.expectString, + CustomKeyStoreName: import_smithy_client5.expectString, + CustomKeyStoreType: import_smithy_client5.expectString, + TrustAnchorCertificate: import_smithy_client5.expectString, + XksProxyConfiguration: import_smithy_client5._json + }); + }, "de_CustomKeyStoresListEntry"); + var de_DecryptResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + CiphertextForRecipient: context.base64Decoder, + EncryptionAlgorithm: import_smithy_client5.expectString, + KeyId: import_smithy_client5.expectString, + Plaintext: context.base64Decoder + }); + }, "de_DecryptResponse"); + var de_DeriveSharedSecretResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + CiphertextForRecipient: context.base64Decoder, + KeyAgreementAlgorithm: import_smithy_client5.expectString, + KeyId: import_smithy_client5.expectString, + KeyOrigin: import_smithy_client5.expectString, + SharedSecret: context.base64Decoder + }); + }, "de_DeriveSharedSecretResponse"); + var de_DescribeCustomKeyStoresResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + CustomKeyStores: (_) => de_CustomKeyStoresList(_, context), + NextMarker: import_smithy_client5.expectString, + Truncated: import_smithy_client5.expectBoolean + }); + }, "de_DescribeCustomKeyStoresResponse"); + var de_DescribeKeyResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + KeyMetadata: (_) => de_KeyMetadata(_, context) + }); + }, "de_DescribeKeyResponse"); + var de_EncryptResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + CiphertextBlob: context.base64Decoder, + EncryptionAlgorithm: import_smithy_client5.expectString, + KeyId: import_smithy_client5.expectString + }); + }, "de_EncryptResponse"); + var de_GenerateDataKeyPairResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + CiphertextForRecipient: context.base64Decoder, + KeyId: import_smithy_client5.expectString, + KeyPairSpec: import_smithy_client5.expectString, + PrivateKeyCiphertextBlob: context.base64Decoder, + PrivateKeyPlaintext: context.base64Decoder, + PublicKey: context.base64Decoder + }); + }, "de_GenerateDataKeyPairResponse"); + var de_GenerateDataKeyPairWithoutPlaintextResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + KeyId: import_smithy_client5.expectString, + KeyPairSpec: import_smithy_client5.expectString, + PrivateKeyCiphertextBlob: context.base64Decoder, + PublicKey: context.base64Decoder + }); + }, "de_GenerateDataKeyPairWithoutPlaintextResponse"); + var de_GenerateDataKeyResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + CiphertextBlob: context.base64Decoder, + CiphertextForRecipient: context.base64Decoder, + KeyId: import_smithy_client5.expectString, + Plaintext: context.base64Decoder + }); + }, "de_GenerateDataKeyResponse"); + var de_GenerateDataKeyWithoutPlaintextResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + CiphertextBlob: context.base64Decoder, + KeyId: import_smithy_client5.expectString + }); + }, "de_GenerateDataKeyWithoutPlaintextResponse"); + var de_GenerateMacResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + KeyId: import_smithy_client5.expectString, + Mac: context.base64Decoder, + MacAlgorithm: import_smithy_client5.expectString + }); + }, "de_GenerateMacResponse"); + var de_GenerateRandomResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + CiphertextForRecipient: context.base64Decoder, + Plaintext: context.base64Decoder + }); + }, "de_GenerateRandomResponse"); + var de_GetKeyRotationStatusResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + KeyId: import_smithy_client5.expectString, + KeyRotationEnabled: import_smithy_client5.expectBoolean, + NextRotationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + OnDemandRotationStartDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + RotationPeriodInDays: import_smithy_client5.expectInt32 + }); + }, "de_GetKeyRotationStatusResponse"); + var de_GetParametersForImportResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + ImportToken: context.base64Decoder, + KeyId: import_smithy_client5.expectString, + ParametersValidTo: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + PublicKey: context.base64Decoder + }); + }, "de_GetParametersForImportResponse"); + var de_GetPublicKeyResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + CustomerMasterKeySpec: import_smithy_client5.expectString, + EncryptionAlgorithms: import_smithy_client5._json, + KeyAgreementAlgorithms: import_smithy_client5._json, + KeyId: import_smithy_client5.expectString, + KeySpec: import_smithy_client5.expectString, + KeyUsage: import_smithy_client5.expectString, + PublicKey: context.base64Decoder, + SigningAlgorithms: import_smithy_client5._json + }); + }, "de_GetPublicKeyResponse"); + var de_GrantList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_GrantListEntry(entry, context); + }); + return retVal; + }, "de_GrantList"); + var de_GrantListEntry = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + Constraints: import_smithy_client5._json, + CreationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + GrantId: import_smithy_client5.expectString, + GranteePrincipal: import_smithy_client5.expectString, + IssuingAccount: import_smithy_client5.expectString, + KeyId: import_smithy_client5.expectString, + Name: import_smithy_client5.expectString, + Operations: import_smithy_client5._json, + RetiringPrincipal: import_smithy_client5.expectString + }); + }, "de_GrantListEntry"); + var de_KeyMetadata = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + AWSAccountId: import_smithy_client5.expectString, + Arn: import_smithy_client5.expectString, + CloudHsmClusterId: import_smithy_client5.expectString, + CreationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + CustomKeyStoreId: import_smithy_client5.expectString, + CustomerMasterKeySpec: import_smithy_client5.expectString, + DeletionDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + Description: import_smithy_client5.expectString, + Enabled: import_smithy_client5.expectBoolean, + EncryptionAlgorithms: import_smithy_client5._json, + ExpirationModel: import_smithy_client5.expectString, + KeyAgreementAlgorithms: import_smithy_client5._json, + KeyId: import_smithy_client5.expectString, + KeyManager: import_smithy_client5.expectString, + KeySpec: import_smithy_client5.expectString, + KeyState: import_smithy_client5.expectString, + KeyUsage: import_smithy_client5.expectString, + MacAlgorithms: import_smithy_client5._json, + MultiRegion: import_smithy_client5.expectBoolean, + MultiRegionConfiguration: import_smithy_client5._json, + Origin: import_smithy_client5.expectString, + PendingDeletionWindowInDays: import_smithy_client5.expectInt32, + SigningAlgorithms: import_smithy_client5._json, + ValidTo: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + XksKeyConfiguration: import_smithy_client5._json + }); + }, "de_KeyMetadata"); + var de_ListAliasesResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + Aliases: (_) => de_AliasList(_, context), + NextMarker: import_smithy_client5.expectString, + Truncated: import_smithy_client5.expectBoolean + }); + }, "de_ListAliasesResponse"); + var de_ListGrantsResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + Grants: (_) => de_GrantList(_, context), + NextMarker: import_smithy_client5.expectString, + Truncated: import_smithy_client5.expectBoolean + }); + }, "de_ListGrantsResponse"); + var de_ListKeyRotationsResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + NextMarker: import_smithy_client5.expectString, + Rotations: (_) => de_RotationsList(_, context), + Truncated: import_smithy_client5.expectBoolean + }); + }, "de_ListKeyRotationsResponse"); + var de_ReEncryptResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + CiphertextBlob: context.base64Decoder, + DestinationEncryptionAlgorithm: import_smithy_client5.expectString, + KeyId: import_smithy_client5.expectString, + SourceEncryptionAlgorithm: import_smithy_client5.expectString, + SourceKeyId: import_smithy_client5.expectString + }); + }, "de_ReEncryptResponse"); + var de_ReplicateKeyResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + ReplicaKeyMetadata: (_) => de_KeyMetadata(_, context), + ReplicaPolicy: import_smithy_client5.expectString, + ReplicaTags: import_smithy_client5._json + }); + }, "de_ReplicateKeyResponse"); + var de_RotationsList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e) => e != null).map((entry) => { + return de_RotationsListEntry(entry, context); + }); + return retVal; + }, "de_RotationsList"); + var de_RotationsListEntry = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + KeyId: import_smithy_client5.expectString, + RotationDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + RotationType: import_smithy_client5.expectString + }); + }, "de_RotationsListEntry"); + var de_ScheduleKeyDeletionResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + DeletionDate: (_) => (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.parseEpochTimestamp)((0, import_smithy_client5.expectNumber)(_))), + KeyId: import_smithy_client5.expectString, + KeyState: import_smithy_client5.expectString, + PendingWindowInDays: import_smithy_client5.expectInt32 + }); + }, "de_ScheduleKeyDeletionResponse"); + var de_SignResponse = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client5.take)(output, { + KeyId: import_smithy_client5.expectString, + Signature: context.base64Decoder, + SigningAlgorithm: import_smithy_client5.expectString + }); + }, "de_SignResponse"); + var deserializeMetadata = /* @__PURE__ */ __name((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"] + }), "deserializeMetadata"); + var throwDefaultError = (0, import_smithy_client5.withBaseException)(KMSServiceException); + var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers + }; + if (resolvedHostname !== void 0) { + contents.hostname = resolvedHostname; } - onHeaders(statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); - if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { - if (this.request) { - this.request.abort(new Error("max redirects")); - } - this.redirectionLimitReached = true; - this.abort(new Error("max redirects")); - return; - } - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)); - } - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText); - } - const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path = search ? `${pathname}${search}` : pathname; - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path; - this.opts.origin = origin; - this.opts.maxRedirections = 0; - this.opts.query = null; - if (statusCode === 303 && this.opts.method !== "HEAD") { - this.opts.method = "GET"; - this.opts.body = null; - } + if (body !== void 0) { + contents.body = body; } - onData(chunk) { - if (this.location) { - } else { - return this.handler.onData(chunk); - } + return new import_protocol_http8.HttpRequest(contents); + }, "buildHttpRpcRequest"); + function sharedHeaders(operation) { + return { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": `TrentService.${operation}` + }; + } + __name(sharedHeaders, "sharedHeaders"); + var _CancelKeyDeletionCommand = class _CancelKeyDeletionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "CancelKeyDeletion", {}).n("KMSClient", "CancelKeyDeletionCommand").f(void 0, void 0).ser(se_CancelKeyDeletionCommand).de(de_CancelKeyDeletionCommand).build() { + }; + __name(_CancelKeyDeletionCommand, "CancelKeyDeletionCommand"); + var CancelKeyDeletionCommand = _CancelKeyDeletionCommand; + var _ConnectCustomKeyStoreCommand = class _ConnectCustomKeyStoreCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ConnectCustomKeyStore", {}).n("KMSClient", "ConnectCustomKeyStoreCommand").f(void 0, void 0).ser(se_ConnectCustomKeyStoreCommand).de(de_ConnectCustomKeyStoreCommand).build() { + }; + __name(_ConnectCustomKeyStoreCommand, "ConnectCustomKeyStoreCommand"); + var ConnectCustomKeyStoreCommand = _ConnectCustomKeyStoreCommand; + var _CreateAliasCommand = class _CreateAliasCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "CreateAlias", {}).n("KMSClient", "CreateAliasCommand").f(void 0, void 0).ser(se_CreateAliasCommand).de(de_CreateAliasCommand).build() { + }; + __name(_CreateAliasCommand, "CreateAliasCommand"); + var CreateAliasCommand = _CreateAliasCommand; + var _CreateCustomKeyStoreCommand = class _CreateCustomKeyStoreCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "CreateCustomKeyStore", {}).n("KMSClient", "CreateCustomKeyStoreCommand").f(CreateCustomKeyStoreRequestFilterSensitiveLog, void 0).ser(se_CreateCustomKeyStoreCommand).de(de_CreateCustomKeyStoreCommand).build() { + }; + __name(_CreateCustomKeyStoreCommand, "CreateCustomKeyStoreCommand"); + var CreateCustomKeyStoreCommand = _CreateCustomKeyStoreCommand; + var _CreateGrantCommand = class _CreateGrantCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "CreateGrant", {}).n("KMSClient", "CreateGrantCommand").f(void 0, void 0).ser(se_CreateGrantCommand).de(de_CreateGrantCommand).build() { + }; + __name(_CreateGrantCommand, "CreateGrantCommand"); + var CreateGrantCommand = _CreateGrantCommand; + var _CreateKeyCommand = class _CreateKeyCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "CreateKey", {}).n("KMSClient", "CreateKeyCommand").f(void 0, void 0).ser(se_CreateKeyCommand).de(de_CreateKeyCommand).build() { + }; + __name(_CreateKeyCommand, "CreateKeyCommand"); + var CreateKeyCommand = _CreateKeyCommand; + var _DecryptCommand = class _DecryptCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "Decrypt", {}).n("KMSClient", "DecryptCommand").f(void 0, DecryptResponseFilterSensitiveLog).ser(se_DecryptCommand).de(de_DecryptCommand).build() { + }; + __name(_DecryptCommand, "DecryptCommand"); + var DecryptCommand = _DecryptCommand; + var _DeleteAliasCommand = class _DeleteAliasCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "DeleteAlias", {}).n("KMSClient", "DeleteAliasCommand").f(void 0, void 0).ser(se_DeleteAliasCommand).de(de_DeleteAliasCommand).build() { + }; + __name(_DeleteAliasCommand, "DeleteAliasCommand"); + var DeleteAliasCommand = _DeleteAliasCommand; + var _DeleteCustomKeyStoreCommand = class _DeleteCustomKeyStoreCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "DeleteCustomKeyStore", {}).n("KMSClient", "DeleteCustomKeyStoreCommand").f(void 0, void 0).ser(se_DeleteCustomKeyStoreCommand).de(de_DeleteCustomKeyStoreCommand).build() { + }; + __name(_DeleteCustomKeyStoreCommand, "DeleteCustomKeyStoreCommand"); + var DeleteCustomKeyStoreCommand = _DeleteCustomKeyStoreCommand; + var _DeleteImportedKeyMaterialCommand = class _DeleteImportedKeyMaterialCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "DeleteImportedKeyMaterial", {}).n("KMSClient", "DeleteImportedKeyMaterialCommand").f(void 0, void 0).ser(se_DeleteImportedKeyMaterialCommand).de(de_DeleteImportedKeyMaterialCommand).build() { + }; + __name(_DeleteImportedKeyMaterialCommand, "DeleteImportedKeyMaterialCommand"); + var DeleteImportedKeyMaterialCommand = _DeleteImportedKeyMaterialCommand; + var _DeriveSharedSecretCommand = class _DeriveSharedSecretCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "DeriveSharedSecret", {}).n("KMSClient", "DeriveSharedSecretCommand").f(void 0, DeriveSharedSecretResponseFilterSensitiveLog).ser(se_DeriveSharedSecretCommand).de(de_DeriveSharedSecretCommand).build() { + }; + __name(_DeriveSharedSecretCommand, "DeriveSharedSecretCommand"); + var DeriveSharedSecretCommand = _DeriveSharedSecretCommand; + var _DescribeCustomKeyStoresCommand = class _DescribeCustomKeyStoresCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "DescribeCustomKeyStores", {}).n("KMSClient", "DescribeCustomKeyStoresCommand").f(void 0, DescribeCustomKeyStoresResponseFilterSensitiveLog).ser(se_DescribeCustomKeyStoresCommand).de(de_DescribeCustomKeyStoresCommand).build() { + }; + __name(_DescribeCustomKeyStoresCommand, "DescribeCustomKeyStoresCommand"); + var DescribeCustomKeyStoresCommand = _DescribeCustomKeyStoresCommand; + var _DescribeKeyCommand = class _DescribeKeyCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "DescribeKey", {}).n("KMSClient", "DescribeKeyCommand").f(void 0, void 0).ser(se_DescribeKeyCommand).de(de_DescribeKeyCommand).build() { + }; + __name(_DescribeKeyCommand, "DescribeKeyCommand"); + var DescribeKeyCommand = _DescribeKeyCommand; + var _DisableKeyCommand = class _DisableKeyCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "DisableKey", {}).n("KMSClient", "DisableKeyCommand").f(void 0, void 0).ser(se_DisableKeyCommand).de(de_DisableKeyCommand).build() { + }; + __name(_DisableKeyCommand, "DisableKeyCommand"); + var DisableKeyCommand = _DisableKeyCommand; + var _DisableKeyRotationCommand = class _DisableKeyRotationCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "DisableKeyRotation", {}).n("KMSClient", "DisableKeyRotationCommand").f(void 0, void 0).ser(se_DisableKeyRotationCommand).de(de_DisableKeyRotationCommand).build() { + }; + __name(_DisableKeyRotationCommand, "DisableKeyRotationCommand"); + var DisableKeyRotationCommand = _DisableKeyRotationCommand; + var _DisconnectCustomKeyStoreCommand = class _DisconnectCustomKeyStoreCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "DisconnectCustomKeyStore", {}).n("KMSClient", "DisconnectCustomKeyStoreCommand").f(void 0, void 0).ser(se_DisconnectCustomKeyStoreCommand).de(de_DisconnectCustomKeyStoreCommand).build() { + }; + __name(_DisconnectCustomKeyStoreCommand, "DisconnectCustomKeyStoreCommand"); + var DisconnectCustomKeyStoreCommand = _DisconnectCustomKeyStoreCommand; + var _EnableKeyCommand = class _EnableKeyCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "EnableKey", {}).n("KMSClient", "EnableKeyCommand").f(void 0, void 0).ser(se_EnableKeyCommand).de(de_EnableKeyCommand).build() { + }; + __name(_EnableKeyCommand, "EnableKeyCommand"); + var EnableKeyCommand = _EnableKeyCommand; + var _EnableKeyRotationCommand = class _EnableKeyRotationCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "EnableKeyRotation", {}).n("KMSClient", "EnableKeyRotationCommand").f(void 0, void 0).ser(se_EnableKeyRotationCommand).de(de_EnableKeyRotationCommand).build() { + }; + __name(_EnableKeyRotationCommand, "EnableKeyRotationCommand"); + var EnableKeyRotationCommand = _EnableKeyRotationCommand; + var _EncryptCommand = class _EncryptCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "Encrypt", {}).n("KMSClient", "EncryptCommand").f(EncryptRequestFilterSensitiveLog, void 0).ser(se_EncryptCommand).de(de_EncryptCommand).build() { + }; + __name(_EncryptCommand, "EncryptCommand"); + var EncryptCommand = _EncryptCommand; + var _GenerateDataKeyCommand = class _GenerateDataKeyCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "GenerateDataKey", {}).n("KMSClient", "GenerateDataKeyCommand").f(void 0, GenerateDataKeyResponseFilterSensitiveLog).ser(se_GenerateDataKeyCommand).de(de_GenerateDataKeyCommand).build() { + }; + __name(_GenerateDataKeyCommand, "GenerateDataKeyCommand"); + var GenerateDataKeyCommand = _GenerateDataKeyCommand; + var _GenerateDataKeyPairCommand = class _GenerateDataKeyPairCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "GenerateDataKeyPair", {}).n("KMSClient", "GenerateDataKeyPairCommand").f(void 0, GenerateDataKeyPairResponseFilterSensitiveLog).ser(se_GenerateDataKeyPairCommand).de(de_GenerateDataKeyPairCommand).build() { + }; + __name(_GenerateDataKeyPairCommand, "GenerateDataKeyPairCommand"); + var GenerateDataKeyPairCommand = _GenerateDataKeyPairCommand; + var _GenerateDataKeyPairWithoutPlaintextCommand = class _GenerateDataKeyPairWithoutPlaintextCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "GenerateDataKeyPairWithoutPlaintext", {}).n("KMSClient", "GenerateDataKeyPairWithoutPlaintextCommand").f(void 0, void 0).ser(se_GenerateDataKeyPairWithoutPlaintextCommand).de(de_GenerateDataKeyPairWithoutPlaintextCommand).build() { + }; + __name(_GenerateDataKeyPairWithoutPlaintextCommand, "GenerateDataKeyPairWithoutPlaintextCommand"); + var GenerateDataKeyPairWithoutPlaintextCommand = _GenerateDataKeyPairWithoutPlaintextCommand; + var _GenerateDataKeyWithoutPlaintextCommand = class _GenerateDataKeyWithoutPlaintextCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "GenerateDataKeyWithoutPlaintext", {}).n("KMSClient", "GenerateDataKeyWithoutPlaintextCommand").f(void 0, void 0).ser(se_GenerateDataKeyWithoutPlaintextCommand).de(de_GenerateDataKeyWithoutPlaintextCommand).build() { + }; + __name(_GenerateDataKeyWithoutPlaintextCommand, "GenerateDataKeyWithoutPlaintextCommand"); + var GenerateDataKeyWithoutPlaintextCommand = _GenerateDataKeyWithoutPlaintextCommand; + var _GenerateMacCommand = class _GenerateMacCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "GenerateMac", {}).n("KMSClient", "GenerateMacCommand").f(GenerateMacRequestFilterSensitiveLog, void 0).ser(se_GenerateMacCommand).de(de_GenerateMacCommand).build() { + }; + __name(_GenerateMacCommand, "GenerateMacCommand"); + var GenerateMacCommand = _GenerateMacCommand; + var _GenerateRandomCommand = class _GenerateRandomCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "GenerateRandom", {}).n("KMSClient", "GenerateRandomCommand").f(void 0, GenerateRandomResponseFilterSensitiveLog).ser(se_GenerateRandomCommand).de(de_GenerateRandomCommand).build() { + }; + __name(_GenerateRandomCommand, "GenerateRandomCommand"); + var GenerateRandomCommand = _GenerateRandomCommand; + var _GetKeyPolicyCommand = class _GetKeyPolicyCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "GetKeyPolicy", {}).n("KMSClient", "GetKeyPolicyCommand").f(void 0, void 0).ser(se_GetKeyPolicyCommand).de(de_GetKeyPolicyCommand).build() { + }; + __name(_GetKeyPolicyCommand, "GetKeyPolicyCommand"); + var GetKeyPolicyCommand = _GetKeyPolicyCommand; + var _GetKeyRotationStatusCommand = class _GetKeyRotationStatusCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "GetKeyRotationStatus", {}).n("KMSClient", "GetKeyRotationStatusCommand").f(void 0, void 0).ser(se_GetKeyRotationStatusCommand).de(de_GetKeyRotationStatusCommand).build() { + }; + __name(_GetKeyRotationStatusCommand, "GetKeyRotationStatusCommand"); + var GetKeyRotationStatusCommand = _GetKeyRotationStatusCommand; + var _GetParametersForImportCommand = class _GetParametersForImportCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "GetParametersForImport", {}).n("KMSClient", "GetParametersForImportCommand").f(void 0, GetParametersForImportResponseFilterSensitiveLog).ser(se_GetParametersForImportCommand).de(de_GetParametersForImportCommand).build() { + }; + __name(_GetParametersForImportCommand, "GetParametersForImportCommand"); + var GetParametersForImportCommand = _GetParametersForImportCommand; + var _GetPublicKeyCommand = class _GetPublicKeyCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "GetPublicKey", {}).n("KMSClient", "GetPublicKeyCommand").f(void 0, void 0).ser(se_GetPublicKeyCommand).de(de_GetPublicKeyCommand).build() { + }; + __name(_GetPublicKeyCommand, "GetPublicKeyCommand"); + var GetPublicKeyCommand = _GetPublicKeyCommand; + var _ImportKeyMaterialCommand = class _ImportKeyMaterialCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ImportKeyMaterial", {}).n("KMSClient", "ImportKeyMaterialCommand").f(void 0, void 0).ser(se_ImportKeyMaterialCommand).de(de_ImportKeyMaterialCommand).build() { + }; + __name(_ImportKeyMaterialCommand, "ImportKeyMaterialCommand"); + var ImportKeyMaterialCommand = _ImportKeyMaterialCommand; + var _ListAliasesCommand = class _ListAliasesCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ListAliases", {}).n("KMSClient", "ListAliasesCommand").f(void 0, void 0).ser(se_ListAliasesCommand).de(de_ListAliasesCommand).build() { + }; + __name(_ListAliasesCommand, "ListAliasesCommand"); + var ListAliasesCommand = _ListAliasesCommand; + var _ListGrantsCommand = class _ListGrantsCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ListGrants", {}).n("KMSClient", "ListGrantsCommand").f(void 0, void 0).ser(se_ListGrantsCommand).de(de_ListGrantsCommand).build() { + }; + __name(_ListGrantsCommand, "ListGrantsCommand"); + var ListGrantsCommand = _ListGrantsCommand; + var _ListKeyPoliciesCommand = class _ListKeyPoliciesCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ListKeyPolicies", {}).n("KMSClient", "ListKeyPoliciesCommand").f(void 0, void 0).ser(se_ListKeyPoliciesCommand).de(de_ListKeyPoliciesCommand).build() { + }; + __name(_ListKeyPoliciesCommand, "ListKeyPoliciesCommand"); + var ListKeyPoliciesCommand = _ListKeyPoliciesCommand; + var _ListKeyRotationsCommand = class _ListKeyRotationsCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ListKeyRotations", {}).n("KMSClient", "ListKeyRotationsCommand").f(void 0, void 0).ser(se_ListKeyRotationsCommand).de(de_ListKeyRotationsCommand).build() { + }; + __name(_ListKeyRotationsCommand, "ListKeyRotationsCommand"); + var ListKeyRotationsCommand = _ListKeyRotationsCommand; + var _ListKeysCommand = class _ListKeysCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ListKeys", {}).n("KMSClient", "ListKeysCommand").f(void 0, void 0).ser(se_ListKeysCommand).de(de_ListKeysCommand).build() { + }; + __name(_ListKeysCommand, "ListKeysCommand"); + var ListKeysCommand = _ListKeysCommand; + var _ListResourceTagsCommand = class _ListResourceTagsCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ListResourceTags", {}).n("KMSClient", "ListResourceTagsCommand").f(void 0, void 0).ser(se_ListResourceTagsCommand).de(de_ListResourceTagsCommand).build() { + }; + __name(_ListResourceTagsCommand, "ListResourceTagsCommand"); + var ListResourceTagsCommand = _ListResourceTagsCommand; + var _ListRetirableGrantsCommand = class _ListRetirableGrantsCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ListRetirableGrants", {}).n("KMSClient", "ListRetirableGrantsCommand").f(void 0, void 0).ser(se_ListRetirableGrantsCommand).de(de_ListRetirableGrantsCommand).build() { + }; + __name(_ListRetirableGrantsCommand, "ListRetirableGrantsCommand"); + var ListRetirableGrantsCommand = _ListRetirableGrantsCommand; + var _PutKeyPolicyCommand = class _PutKeyPolicyCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "PutKeyPolicy", {}).n("KMSClient", "PutKeyPolicyCommand").f(void 0, void 0).ser(se_PutKeyPolicyCommand).de(de_PutKeyPolicyCommand).build() { + }; + __name(_PutKeyPolicyCommand, "PutKeyPolicyCommand"); + var PutKeyPolicyCommand = _PutKeyPolicyCommand; + var _ReEncryptCommand = class _ReEncryptCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ReEncrypt", {}).n("KMSClient", "ReEncryptCommand").f(void 0, void 0).ser(se_ReEncryptCommand).de(de_ReEncryptCommand).build() { + }; + __name(_ReEncryptCommand, "ReEncryptCommand"); + var ReEncryptCommand = _ReEncryptCommand; + var _ReplicateKeyCommand = class _ReplicateKeyCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ReplicateKey", {}).n("KMSClient", "ReplicateKeyCommand").f(void 0, void 0).ser(se_ReplicateKeyCommand).de(de_ReplicateKeyCommand).build() { + }; + __name(_ReplicateKeyCommand, "ReplicateKeyCommand"); + var ReplicateKeyCommand = _ReplicateKeyCommand; + var _RetireGrantCommand = class _RetireGrantCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "RetireGrant", {}).n("KMSClient", "RetireGrantCommand").f(void 0, void 0).ser(se_RetireGrantCommand).de(de_RetireGrantCommand).build() { + }; + __name(_RetireGrantCommand, "RetireGrantCommand"); + var RetireGrantCommand = _RetireGrantCommand; + var _RevokeGrantCommand = class _RevokeGrantCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "RevokeGrant", {}).n("KMSClient", "RevokeGrantCommand").f(void 0, void 0).ser(se_RevokeGrantCommand).de(de_RevokeGrantCommand).build() { + }; + __name(_RevokeGrantCommand, "RevokeGrantCommand"); + var RevokeGrantCommand = _RevokeGrantCommand; + var _RotateKeyOnDemandCommand = class _RotateKeyOnDemandCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "RotateKeyOnDemand", {}).n("KMSClient", "RotateKeyOnDemandCommand").f(void 0, void 0).ser(se_RotateKeyOnDemandCommand).de(de_RotateKeyOnDemandCommand).build() { + }; + __name(_RotateKeyOnDemandCommand, "RotateKeyOnDemandCommand"); + var RotateKeyOnDemandCommand = _RotateKeyOnDemandCommand; + var _ScheduleKeyDeletionCommand = class _ScheduleKeyDeletionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "ScheduleKeyDeletion", {}).n("KMSClient", "ScheduleKeyDeletionCommand").f(void 0, void 0).ser(se_ScheduleKeyDeletionCommand).de(de_ScheduleKeyDeletionCommand).build() { + }; + __name(_ScheduleKeyDeletionCommand, "ScheduleKeyDeletionCommand"); + var ScheduleKeyDeletionCommand = _ScheduleKeyDeletionCommand; + var _SignCommand = class _SignCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "Sign", {}).n("KMSClient", "SignCommand").f(SignRequestFilterSensitiveLog, void 0).ser(se_SignCommand).de(de_SignCommand).build() { + }; + __name(_SignCommand, "SignCommand"); + var SignCommand2 = _SignCommand; + var _TagResourceCommand = class _TagResourceCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "TagResource", {}).n("KMSClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() { + }; + __name(_TagResourceCommand, "TagResourceCommand"); + var TagResourceCommand = _TagResourceCommand; + var _UntagResourceCommand = class _UntagResourceCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "UntagResource", {}).n("KMSClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() { + }; + __name(_UntagResourceCommand, "UntagResourceCommand"); + var UntagResourceCommand = _UntagResourceCommand; + var _UpdateAliasCommand = class _UpdateAliasCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "UpdateAlias", {}).n("KMSClient", "UpdateAliasCommand").f(void 0, void 0).ser(se_UpdateAliasCommand).de(de_UpdateAliasCommand).build() { + }; + __name(_UpdateAliasCommand, "UpdateAliasCommand"); + var UpdateAliasCommand = _UpdateAliasCommand; + var _UpdateCustomKeyStoreCommand = class _UpdateCustomKeyStoreCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "UpdateCustomKeyStore", {}).n("KMSClient", "UpdateCustomKeyStoreCommand").f(UpdateCustomKeyStoreRequestFilterSensitiveLog, void 0).ser(se_UpdateCustomKeyStoreCommand).de(de_UpdateCustomKeyStoreCommand).build() { + }; + __name(_UpdateCustomKeyStoreCommand, "UpdateCustomKeyStoreCommand"); + var UpdateCustomKeyStoreCommand = _UpdateCustomKeyStoreCommand; + var _UpdateKeyDescriptionCommand = class _UpdateKeyDescriptionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "UpdateKeyDescription", {}).n("KMSClient", "UpdateKeyDescriptionCommand").f(void 0, void 0).ser(se_UpdateKeyDescriptionCommand).de(de_UpdateKeyDescriptionCommand).build() { + }; + __name(_UpdateKeyDescriptionCommand, "UpdateKeyDescriptionCommand"); + var UpdateKeyDescriptionCommand = _UpdateKeyDescriptionCommand; + var _UpdatePrimaryRegionCommand = class _UpdatePrimaryRegionCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "UpdatePrimaryRegion", {}).n("KMSClient", "UpdatePrimaryRegionCommand").f(void 0, void 0).ser(se_UpdatePrimaryRegionCommand).de(de_UpdatePrimaryRegionCommand).build() { + }; + __name(_UpdatePrimaryRegionCommand, "UpdatePrimaryRegionCommand"); + var UpdatePrimaryRegionCommand = _UpdatePrimaryRegionCommand; + var _VerifyCommand = class _VerifyCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "Verify", {}).n("KMSClient", "VerifyCommand").f(VerifyRequestFilterSensitiveLog, void 0).ser(se_VerifyCommand).de(de_VerifyCommand).build() { + }; + __name(_VerifyCommand, "VerifyCommand"); + var VerifyCommand = _VerifyCommand; + var _VerifyMacCommand = class _VerifyMacCommand extends import_smithy_client5.Command.classBuilder().ep({ + ...commonParams + }).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; + }).s("TrentService", "VerifyMac", {}).n("KMSClient", "VerifyMacCommand").f(VerifyMacRequestFilterSensitiveLog, void 0).ser(se_VerifyMacCommand).de(de_VerifyMacCommand).build() { + }; + __name(_VerifyMacCommand, "VerifyMacCommand"); + var VerifyMacCommand = _VerifyMacCommand; + var commands = { + CancelKeyDeletionCommand, + ConnectCustomKeyStoreCommand, + CreateAliasCommand, + CreateCustomKeyStoreCommand, + CreateGrantCommand, + CreateKeyCommand, + DecryptCommand, + DeleteAliasCommand, + DeleteCustomKeyStoreCommand, + DeleteImportedKeyMaterialCommand, + DeriveSharedSecretCommand, + DescribeCustomKeyStoresCommand, + DescribeKeyCommand, + DisableKeyCommand, + DisableKeyRotationCommand, + DisconnectCustomKeyStoreCommand, + EnableKeyCommand, + EnableKeyRotationCommand, + EncryptCommand, + GenerateDataKeyCommand, + GenerateDataKeyPairCommand, + GenerateDataKeyPairWithoutPlaintextCommand, + GenerateDataKeyWithoutPlaintextCommand, + GenerateMacCommand, + GenerateRandomCommand, + GetKeyPolicyCommand, + GetKeyRotationStatusCommand, + GetParametersForImportCommand, + GetPublicKeyCommand, + ImportKeyMaterialCommand, + ListAliasesCommand, + ListGrantsCommand, + ListKeyPoliciesCommand, + ListKeyRotationsCommand, + ListKeysCommand, + ListResourceTagsCommand, + ListRetirableGrantsCommand, + PutKeyPolicyCommand, + ReEncryptCommand, + ReplicateKeyCommand, + RetireGrantCommand, + RevokeGrantCommand, + RotateKeyOnDemandCommand, + ScheduleKeyDeletionCommand, + SignCommand: SignCommand2, + TagResourceCommand, + UntagResourceCommand, + UpdateAliasCommand, + UpdateCustomKeyStoreCommand, + UpdateKeyDescriptionCommand, + UpdatePrimaryRegionCommand, + VerifyCommand, + VerifyMacCommand + }; + var _KMS = class _KMS extends KMSClient2 { + }; + __name(_KMS, "KMS"); + var KMS = _KMS; + (0, import_smithy_client5.createAggregatedClient)(commands, KMS); + var paginateDescribeCustomKeyStores = (0, import_core5.createPaginator)(KMSClient2, DescribeCustomKeyStoresCommand, "Marker", "NextMarker", "Limit"); + var paginateListAliases = (0, import_core5.createPaginator)(KMSClient2, ListAliasesCommand, "Marker", "NextMarker", "Limit"); + var paginateListGrants = (0, import_core5.createPaginator)(KMSClient2, ListGrantsCommand, "Marker", "NextMarker", "Limit"); + var paginateListKeyPolicies = (0, import_core5.createPaginator)(KMSClient2, ListKeyPoliciesCommand, "Marker", "NextMarker", "Limit"); + var paginateListKeyRotations = (0, import_core5.createPaginator)(KMSClient2, ListKeyRotationsCommand, "Marker", "NextMarker", "Limit"); + var paginateListKeys = (0, import_core5.createPaginator)(KMSClient2, ListKeysCommand, "Marker", "NextMarker", "Limit"); + var paginateListResourceTags = (0, import_core5.createPaginator)(KMSClient2, ListResourceTagsCommand, "Marker", "NextMarker", "Limit"); + var paginateListRetirableGrants = (0, import_core5.createPaginator)(KMSClient2, ListRetirableGrantsCommand, "Marker", "NextMarker", "Limit"); + } +}); + +// node_modules/undici/lib/core/symbols.js +var require_symbols6 = __commonJS({ + "node_modules/undici/lib/core/symbols.js"(exports2, module2) { + module2.exports = { + kClose: Symbol("close"), + kDestroy: Symbol("destroy"), + kDispatch: Symbol("dispatch"), + kUrl: Symbol("url"), + kWriting: Symbol("writing"), + kResuming: Symbol("resuming"), + kQueue: Symbol("queue"), + kConnect: Symbol("connect"), + kConnecting: Symbol("connecting"), + kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: Symbol("keep alive timeout"), + kKeepAlive: Symbol("keep alive"), + kHeadersTimeout: Symbol("headers timeout"), + kBodyTimeout: Symbol("body timeout"), + kServerName: Symbol("server name"), + kLocalAddress: Symbol("local address"), + kHost: Symbol("host"), + kNoRef: Symbol("no ref"), + kBodyUsed: Symbol("used"), + kBody: Symbol("abstracted request body"), + kRunning: Symbol("running"), + kBlocking: Symbol("blocking"), + kPending: Symbol("pending"), + kSize: Symbol("size"), + kBusy: Symbol("busy"), + kQueued: Symbol("queued"), + kFree: Symbol("free"), + kConnected: Symbol("connected"), + kClosed: Symbol("closed"), + kNeedDrain: Symbol("need drain"), + kReset: Symbol("reset"), + kDestroyed: Symbol.for("nodejs.stream.destroyed"), + kResume: Symbol("resume"), + kOnError: Symbol("on error"), + kMaxHeadersSize: Symbol("max headers size"), + kRunningIdx: Symbol("running index"), + kPendingIdx: Symbol("pending index"), + kError: Symbol("error"), + kClients: Symbol("clients"), + kClient: Symbol("client"), + kParser: Symbol("parser"), + kOnDestroyed: Symbol("destroy callbacks"), + kPipelining: Symbol("pipelining"), + kSocket: Symbol("socket"), + kHostHeader: Symbol("host header"), + kConnector: Symbol("connector"), + kStrictContentLength: Symbol("strict content length"), + kMaxRedirections: Symbol("maxRedirections"), + kMaxRequests: Symbol("maxRequestsPerClient"), + kProxy: Symbol("proxy agent options"), + kCounter: Symbol("socket request counter"), + kInterceptors: Symbol("dispatch interceptors"), + kMaxResponseSize: Symbol("max response size"), + kHTTP2Session: Symbol("http2Session"), + kHTTP2SessionState: Symbol("http2Session state"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable"), + kListeners: Symbol("listeners"), + kHTTPContext: Symbol("http context"), + kMaxConcurrentStreams: Symbol("max concurrent streams"), + kNoProxyAgent: Symbol("no proxy agent"), + kHttpProxyAgent: Symbol("http proxy agent"), + kHttpsProxyAgent: Symbol("https proxy agent") + }; + } +}); + +// node_modules/undici/lib/core/errors.js +var require_errors2 = __commonJS({ + "node_modules/undici/lib/core/errors.js"(exports2, module2) { + "use strict"; + var UndiciError = class extends Error { + constructor(message) { + super(message); + this.name = "UndiciError"; + this.code = "UND_ERR"; } - onComplete(trailers) { - if (this.location) { - this.location = null; - this.abort = null; - this.dispatch(this.opts, this); - } else { - this.handler.onComplete(trailers); - } + }; + var ConnectTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; } - onBodySent(chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk); - } + }; + var HeadersTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; } }; - function parseLocation(statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) { - return null; + var HeadersOverflowError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; } - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].length === 8 && util.headerNameToString(headers[i]) === "location") { - return headers[i + 1]; - } + }; + var BodyTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; } - } - function shouldRemoveHeader(header, removeContent, unknownOrigin) { - if (header.length === 4) { - return util.headerNameToString(header) === "host"; + }; + var ResponseStatusCodeError = class extends UndiciError { + constructor(message, statusCode, headers, body) { + super(message); + this.name = "ResponseStatusCodeError"; + this.message = message || "Response Status Code Error"; + this.code = "UND_ERR_RESPONSE_STATUS_CODE"; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; } - if (removeContent && util.headerNameToString(header).startsWith("content-")) { - return true; + }; + var InvalidArgumentError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; } - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util.headerNameToString(header); - return name === "authorization" || name === "cookie" || name === "proxy-authorization"; + }; + var InvalidReturnValueError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; } - return false; - } - function cleanRequestHeaders(headers, removeContent, unknownOrigin) { - const ret = []; - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]); - } - } - } else if (headers && typeof headers === "object") { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]); - } - } - } else { - assert(headers == null, "headers must be an object or an array"); + }; + var AbortError2 = class extends UndiciError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "The operation was aborted"; } - return ret; - } - module2.exports = RedirectHandler; - } -}); - -// node_modules/undici/lib/interceptor/redirect-interceptor.js -var require_redirect_interceptor = __commonJS({ - "node_modules/undici/lib/interceptor/redirect-interceptor.js"(exports2, module2) { - "use strict"; - var RedirectHandler = require_redirect_handler(); - function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept(opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts; - if (!maxRedirections) { - return dispatch(opts, handler); - } - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); - opts = { ...opts, maxRedirections: 0 }; - return dispatch(opts, redirectHandler); - }; - }; - } - module2.exports = createRedirectInterceptor; - } -}); - -// node_modules/undici/lib/dispatcher/client.js -var require_client2 = __commonJS({ - "node_modules/undici/lib/dispatcher/client.js"(exports2, module2) { - "use strict"; - var assert = require("node:assert"); - var net = require("node:net"); - var http = require("node:http"); - var util = require_util8(); - var { channels } = require_diagnostics(); - var Request = require_request3(); - var DispatcherBase = require_dispatcher_base2(); - var { - InvalidArgumentError, - InformationalError, - ClientDestroyedError - } = require_errors2(); - var buildConnector = require_connect2(); - var { - kUrl, - kServerName, - kClient, - kBusy, - kConnect, - kResuming, - kRunning, - kPending, - kSize, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors, - kLocalAddress, - kMaxResponseSize, - kOnError, - kHTTPContext, - kMaxConcurrentStreams, - kResume - } = require_symbols6(); - var connectH1 = require_client_h1(); - var connectH2 = require_client_h2(); - var deprecatedInterceptorWarned = false; - var kClosedResolve = Symbol("kClosedResolve"); - function getPipelining(client) { - return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; - } - var Client = class extends DispatcherBase { - /** - * - * @param {string|URL} url - * @param {import('../../types/client.js').Client.Options} options - */ - constructor(url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect: connect2, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - maxConcurrentStreams, - allowH2 - } = {}) { - super(); - if (keepAlive !== void 0) { - throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); - } - if (socketTimeout !== void 0) { - throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); - } - if (requestTimeout !== void 0) { - throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); - } - if (idleTimeout !== void 0) { - throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); - } - if (maxKeepAliveTimeout !== void 0) { - throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); - } - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError("invalid maxHeaderSize"); - } - if (socketPath != null && typeof socketPath !== "string") { - throw new InvalidArgumentError("invalid socketPath"); - } - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError("invalid connectTimeout"); - } - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError("invalid keepAliveTimeout"); - } - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); - } - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); - } - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); - } - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); - } - if (connect2 != null && typeof connect2 !== "function" && typeof connect2 !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError("maxRedirections must be a positive number"); - } - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); - } - if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) { - throw new InvalidArgumentError("localAddress must be valid string IP address"); - } - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError("maxResponseSize must be a positive number"); - } - if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) { - throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); - } - if (allowH2 != null && typeof allowH2 !== "boolean") { - throw new InvalidArgumentError("allowH2 must be a valid boolean value"); - } - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); - } - if (typeof connect2 !== "function") { - connect2 = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, - ...connect2 - }); - } - if (interceptors?.Client && Array.isArray(interceptors.Client)) { - this[kInterceptors] = interceptors.Client; - if (!deprecatedInterceptorWarned) { - deprecatedInterceptorWarned = true; - process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.", { - code: "UNDICI-CLIENT-INTERCEPTOR-DEPRECATED" - }); - } - } else { - this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; - } - this[kUrl] = util.parseOrigin(url); - this[kConnector] = connect2; - this[kPipelining] = pipelining != null ? pipelining : 1; - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize; - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; - this[kServerName] = null; - this[kLocalAddress] = localAddress != null ? localAddress : null; - this[kResuming] = 0; - this[kNeedDrain] = 0; - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r -`; - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; - this[kMaxRedirections] = maxRedirections; - this[kMaxRequests] = maxRequestsPerClient; - this[kClosedResolve] = null; - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; - this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; - this[kHTTPContext] = null; - this[kQueue] = []; - this[kRunningIdx] = 0; - this[kPendingIdx] = 0; - this[kResume] = (sync) => resume(this, sync); - this[kOnError] = (err) => onError(this, err); - } - get pipelining() { - return this[kPipelining]; - } - set pipelining(value) { - this[kPipelining] = value; - this[kResume](true); - } - get [kPending]() { - return this[kQueue].length - this[kPendingIdx]; - } - get [kRunning]() { - return this[kPendingIdx] - this[kRunningIdx]; - } - get [kSize]() { - return this[kQueue].length - this[kRunningIdx]; + }; + var RequestAbortedError = class extends AbortError2 { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; } - get [kConnected]() { - return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; + }; + var InformationalError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; } - get [kBusy]() { - return Boolean( - this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0 - ); + }; + var RequestContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "RequestContentLengthMismatchError"; + this.message = message || "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; } - /* istanbul ignore: only used for test */ - [kConnect](cb) { - connect(this); - this.once("connect", cb); + }; + var ResponseContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseContentLengthMismatchError"; + this.message = message || "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; } - [kDispatch](opts, handler) { - const origin = opts.origin || this[kUrl].origin; - const request2 = new Request(origin, opts, handler); - this[kQueue].push(request2); - if (this[kResuming]) { - } else if (util.bodyLength(request2.body) == null && util.isIterable(request2.body)) { - this[kResuming] = 1; - queueMicrotask(() => resume(this)); - } else { - this[kResume](true); - } - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2; - } - return this[kNeedDrain] < 2; + }; + var ClientDestroyedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; } - async [kClose]() { - return new Promise((resolve) => { - if (this[kSize]) { - this[kClosedResolve] = resolve; - } else { - resolve(null); - } - }); + }; + var ClientClosedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; } - async [kDestroy](err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]); - for (let i = 0; i < requests.length; i++) { - const request2 = requests[i]; - util.errorRequest(this, request2, err); - } - const callback = () => { - if (this[kClosedResolve]) { - this[kClosedResolve](); - this[kClosedResolve] = null; - } - resolve(null); - }; - if (this[kHTTPContext]) { - this[kHTTPContext].destroy(err, callback); - this[kHTTPContext] = null; - } else { - queueMicrotask(callback); - } - this[kResume](); - }); + }; + var SocketError = class extends UndiciError { + constructor(message, socket) { + super(message); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; } }; - var createRedirectInterceptor = require_redirect_interceptor(); - function onError(client, err) { - if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { - assert(client[kPendingIdx] === client[kRunningIdx]); - const requests = client[kQueue].splice(client[kRunningIdx]); - for (let i = 0; i < requests.length; i++) { - const request2 = requests[i]; - util.errorRequest(client, request2, err); - } - assert(client[kSize] === 0); + var NotSupportedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; } - } - async function connect(client) { - assert(!client[kConnecting]); - assert(!client[kHTTPContext]); - let { host, hostname, protocol, port } = client[kUrl]; - if (hostname[0] === "[") { - const idx = hostname.indexOf("]"); - assert(idx !== -1); - const ip = hostname.substring(1, idx); - assert(net.isIP(ip)); - hostname = ip; + }; + var BalancedPoolMissingUpstreamError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MissingUpstreamError"; + this.message = message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; } - client[kConnecting] = true; - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }); + }; + var HTTPParserError = class extends Error { + constructor(message, code, data) { + super(message); + this.name = "HTTPParserError"; + this.code = code ? `HPE_${code}` : void 0; + this.data = data ? data.toString() : void 0; } - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket2) => { - if (err) { - reject(err); - } else { - resolve(socket2); - } - }); - }); - if (client.destroyed) { - util.destroy(socket.on("error", () => { - }), new ClientDestroyedError()); - return; - } - assert(socket); - try { - client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); - } catch (err) { - socket.destroy().on("error", () => { - }); - throw err; - } - client[kConnecting] = false; - socket[kCounter] = 0; - socket[kMaxRequests] = client[kMaxRequests]; - socket[kClient] = client; - socket[kError] = null; - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }); - } - client.emit("connect", client[kUrl], [client]); - } catch (err) { - if (client.destroyed) { - return; - } - client[kConnecting] = false; - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }); - } - if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - assert(client[kRunning] === 0); - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request2 = client[kQueue][client[kPendingIdx]++]; - util.errorRequest(client, request2, err); - } - } else { - onError(client, err); - } - client.emit("connectionError", client[kUrl], [client], err); + }; + var ResponseExceededMaxSizeError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; } - client[kResume](); - } - function emitDrain(client) { - client[kNeedDrain] = 0; - client.emit("drain", client[kUrl], [client]); - } - function resume(client, sync) { - if (client[kResuming] === 2) { - return; + }; + var RequestRetryError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code; + this.data = data; + this.headers = headers; } - client[kResuming] = 2; - _resume(client, sync); - client[kResuming] = 0; - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]); - client[kPendingIdx] -= client[kRunningIdx]; - client[kRunningIdx] = 0; + }; + var SecureProxyConnectionError = class extends UndiciError { + constructor(cause, message, options) { + super(message, { cause, ...options ?? {} }); + this.name = "SecureProxyConnectionError"; + this.message = message || "Secure Proxy Connection failed"; + this.code = "UND_ERR_PRX_TLS"; + this.cause = cause; } - } - function _resume(client, sync) { - while (true) { - if (client.destroyed) { - assert(client[kPending] === 0); - return; + }; + module2.exports = { + AbortError: AbortError2, + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError, + SecureProxyConnectionError + }; + } +}); + +// node_modules/undici/lib/core/constants.js +var require_constants6 = __commonJS({ + "node_modules/undici/lib/core/constants.js"(exports2, module2) { + "use strict"; + var headerNameLowerCasedRecord = {}; + var wellknownHeaderNames = [ + "Accept", + "Accept-Encoding", + "Accept-Language", + "Accept-Ranges", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Age", + "Allow", + "Alt-Svc", + "Alt-Used", + "Authorization", + "Cache-Control", + "Clear-Site-Data", + "Connection", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-Length", + "Content-Location", + "Content-Range", + "Content-Security-Policy", + "Content-Security-Policy-Report-Only", + "Content-Type", + "Cookie", + "Cross-Origin-Embedder-Policy", + "Cross-Origin-Opener-Policy", + "Cross-Origin-Resource-Policy", + "Date", + "Device-Memory", + "Downlink", + "ECT", + "ETag", + "Expect", + "Expect-CT", + "Expires", + "Forwarded", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Range", + "If-Unmodified-Since", + "Keep-Alive", + "Last-Modified", + "Link", + "Location", + "Max-Forwards", + "Origin", + "Permissions-Policy", + "Pragma", + "Proxy-Authenticate", + "Proxy-Authorization", + "RTT", + "Range", + "Referer", + "Referrer-Policy", + "Refresh", + "Retry-After", + "Sec-WebSocket-Accept", + "Sec-WebSocket-Extensions", + "Sec-WebSocket-Key", + "Sec-WebSocket-Protocol", + "Sec-WebSocket-Version", + "Server", + "Server-Timing", + "Service-Worker-Allowed", + "Service-Worker-Navigation-Preload", + "Set-Cookie", + "SourceMap", + "Strict-Transport-Security", + "Supports-Loading-Mode", + "TE", + "Timing-Allow-Origin", + "Trailer", + "Transfer-Encoding", + "Upgrade", + "Upgrade-Insecure-Requests", + "User-Agent", + "Vary", + "Via", + "WWW-Authenticate", + "X-Content-Type-Options", + "X-DNS-Prefetch-Control", + "X-Frame-Options", + "X-Permitted-Cross-Domain-Policies", + "X-Powered-By", + "X-Requested-With", + "X-XSS-Protection" + ]; + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + } + Object.setPrototypeOf(headerNameLowerCasedRecord, null); + module2.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord + }; + } +}); + +// node_modules/undici/lib/core/tree.js +var require_tree = __commonJS({ + "node_modules/undici/lib/core/tree.js"(exports2, module2) { + "use strict"; + var { + wellknownHeaderNames, + headerNameLowerCasedRecord + } = require_constants6(); + var TstNode = class _TstNode { + /** @type {any} */ + value = null; + /** @type {null | TstNode} */ + left = null; + /** @type {null | TstNode} */ + middle = null; + /** @type {null | TstNode} */ + right = null; + /** @type {number} */ + code; + /** + * @param {string} key + * @param {any} value + * @param {number} index + */ + constructor(key, value, index) { + if (index === void 0 || index >= key.length) { + throw new TypeError("Unreachable"); } - if (client[kClosedResolve] && !client[kSize]) { - client[kClosedResolve](); - client[kClosedResolve] = null; - return; + const code = this.code = key.charCodeAt(index); + if (code > 127) { + throw new TypeError("key must be ascii string"); } - if (client[kHTTPContext]) { - client[kHTTPContext].resume(); + if (key.length !== ++index) { + this.middle = new _TstNode(key, value, index); + } else { + this.value = value; } - if (client[kBusy]) { - client[kNeedDrain] = 2; - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1; - queueMicrotask(() => emitDrain(client)); + } + /** + * @param {string} key + * @param {any} value + */ + add(key, value) { + const length = key.length; + if (length === 0) { + throw new TypeError("Unreachable"); + } + let index = 0; + let node = this; + while (true) { + const code = key.charCodeAt(index); + if (code > 127) { + throw new TypeError("key must be ascii string"); + } + if (node.code === code) { + if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) { + node = node.middle; + } else { + node.middle = new _TstNode(key, value, index); + break; + } + } else if (node.code < code) { + if (node.left !== null) { + node = node.left; + } else { + node.left = new _TstNode(key, value, index); + break; + } + } else if (node.right !== null) { + node = node.right; } else { - emitDrain(client); + node.right = new _TstNode(key, value, index); + break; } - continue; - } - if (client[kPending] === 0) { - return; } - if (client[kRunning] >= (getPipelining(client) || 1)) { - return; - } - const request2 = client[kQueue][client[kPendingIdx]]; - if (client[kUrl].protocol === "https:" && client[kServerName] !== request2.servername) { - if (client[kRunning] > 0) { - return; + } + /** + * @param {Uint8Array} key + * @return {TstNode | null} + */ + search(key) { + const keylength = key.length; + let index = 0; + let node = this; + while (node !== null && index < keylength) { + let code = key[index]; + if (code <= 90 && code >= 65) { + code |= 32; + } + while (node !== null) { + if (code === node.code) { + if (keylength === ++index) { + return node; + } + node = node.middle; + break; + } + node = node.code < code ? node.left : node.right; } - client[kServerName] = request2.servername; - client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { - client[kHTTPContext] = null; - resume(client); - }); - } - if (client[kConnecting]) { - return; - } - if (!client[kHTTPContext]) { - connect(client); - return; - } - if (client[kHTTPContext].destroyed) { - return; - } - if (client[kHTTPContext].busy(request2)) { - return; } - if (!request2.aborted && client[kHTTPContext].write(request2)) { - client[kPendingIdx]++; + return null; + } + }; + var TernarySearchTree = class { + /** @type {TstNode | null} */ + node = null; + /** + * @param {string} key + * @param {any} value + * */ + insert(key, value) { + if (this.node === null) { + this.node = new TstNode(key, value, 0); } else { - client[kQueue].splice(client[kPendingIdx], 1); + this.node.add(key, value); } } + /** + * @param {Uint8Array} key + * @return {any} + */ + lookup(key) { + return this.node?.search(key)?.value ?? null; + } + }; + var tree = new TernarySearchTree(); + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; + tree.insert(key, key); } - module2.exports = Client; + module2.exports = { + TernarySearchTree, + tree + }; } }); -// node_modules/undici/lib/dispatcher/fixed-queue.js -var require_fixed_queue2 = __commonJS({ - "node_modules/undici/lib/dispatcher/fixed-queue.js"(exports2, module2) { +// node_modules/undici/lib/core/util.js +var require_util9 = __commonJS({ + "node_modules/undici/lib/core/util.js"(exports2, module2) { "use strict"; - var kSize = 2048; - var kMask = kSize - 1; - var FixedCircularBuffer = class { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } - isEmpty() { - return this.top === this.bottom; + var assert = require("node:assert"); + var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols6(); + var { IncomingMessage } = require("node:http"); + var stream = require("node:stream"); + var net = require("node:net"); + var { Blob: Blob2 } = require("node:buffer"); + var nodeUtil = require("node:util"); + var { stringify: stringify3 } = require("node:querystring"); + var { EventEmitter: EE } = require("node:events"); + var { InvalidArgumentError } = require_errors2(); + var { headerNameLowerCasedRecord } = require_constants6(); + var { tree } = require_tree(); + var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; } - isFull() { - return (this.top + 1 & kMask) === this.bottom; + async *[Symbol.asyncIterator]() { + assert(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; } - push(data) { - this.list[this.top] = data; - this.top = this.top + 1 & kMask; + }; + function wrapRequestBody(body) { + if (isStream(body)) { + if (bodyLength(body) === 0) { + body.on("data", function() { + assert(false); + }); + } + if (typeof body.readableDidRead !== "boolean") { + body[kBodyUsed] = false; + EE.prototype.on.call(body, "data", function() { + this[kBodyUsed] = true; + }); + } + return body; + } else if (body && typeof body.pipeTo === "function") { + return new BodyAsyncIterable(body); + } else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) { + return new BodyAsyncIterable(body); + } else { + return body; } - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === void 0) - return null; - this.list[this.bottom] = void 0; - this.bottom = this.bottom + 1 & kMask; - return nextItem; + } + function nop() { + } + function isStream(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; + } + function isBlobLike(object) { + if (object === null) { + return false; + } else if (object instanceof Blob2) { + return true; + } else if (typeof object !== "object") { + return false; + } else { + const sTag = object[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); } - }; - module2.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); + } + function buildURL(url, queryParams) { + if (url.includes("?") || url.includes("#")) { + throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } - isEmpty() { - return this.head.isEmpty(); + const stringified = stringify3(queryParams); + if (stringified) { + url += "?" + stringified; } - push(data) { - if (this.head.isFull()) { - this.head = this.head.next = new FixedCircularBuffer(); + return url; + } + function isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; + } + 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) { + if (typeof url === "string") { + url = new URL(url); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - this.head.push(data); + return url; } - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) { - this.tail = tail.next; + if (!url || typeof url !== "object") { + throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); + } + if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && isValidPort(url.port) === false) { + throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - return next; + if (url.path != null && typeof url.path !== "string") { + throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + } + if (url.pathname != null && typeof url.pathname !== "string") { + throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + } + if (url.hostname != null && typeof url.hostname !== "string") { + throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + } + if (url.origin != null && typeof url.origin !== "string") { + throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + } + 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 path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + if (origin[origin.length - 1] === "/") { + origin = origin.slice(0, origin.length - 1); + } + if (path && path[0] !== "/") { + path = `/${path}`; + } + return new URL(`${origin}${path}`); } - }; - } -}); - -// node_modules/undici/lib/dispatcher/pool-stats.js -var require_pool_stats2 = __commonJS({ - "node_modules/undici/lib/dispatcher/pool-stats.js"(exports2, module2) { - var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols6(); - var kPool = Symbol("pool"); - var PoolStats = class { - constructor(pool) { - this[kPool] = pool; + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - get connected() { - return this[kPool][kConnected]; + return url; + } + function parseOrigin(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) { + throw new InvalidArgumentError("invalid url"); } - get free() { - return this[kPool][kFree]; + return url; + } + function getHostname(host) { + if (host[0] === "[") { + const idx2 = host.indexOf("]"); + assert(idx2 !== -1); + return host.substring(1, idx2); } - get pending() { - return this[kPool][kPending]; + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); + } + function getServerName(host) { + if (!host) { + return null; } - get queued() { - return this[kPool][kQueued]; + assert.strictEqual(typeof host, "string"); + const servername = getHostname(host); + if (net.isIP(servername)) { + return ""; } - get running() { - return this[kPool][kRunning]; + return servername; + } + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); + } + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); + } + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); + } + function bodyLength(body) { + if (body == null) { + return 0; + } else if (isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike(body)) { + return body.size != null ? body.size : null; + } else if (isBuffer(body)) { + return body.byteLength; } - get size() { - return this[kPool][kSize]; + return null; + } + function isDestroyed(body) { + return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)); + } + function destroy(stream2, err) { + if (stream2 == null || !isStream(stream2) || isDestroyed(stream2)) { + return; } - }; - module2.exports = PoolStats; - } -}); - -// node_modules/undici/lib/dispatcher/pool-base.js -var require_pool_base2 = __commonJS({ - "node_modules/undici/lib/dispatcher/pool-base.js"(exports2, module2) { - "use strict"; - var DispatcherBase = require_dispatcher_base2(); - var FixedQueue = require_fixed_queue2(); - var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols6(); - var PoolStats = require_pool_stats2(); - var kClients = Symbol("clients"); - var kNeedDrain = Symbol("needDrain"); - var kQueue = Symbol("queue"); - var kClosedResolve = Symbol("closed resolve"); - var kOnDrain = Symbol("onDrain"); - var kOnConnect = Symbol("onConnect"); - var kOnDisconnect = Symbol("onDisconnect"); - var kOnConnectionError = Symbol("onConnectionError"); - var kGetDispatcher = Symbol("get dispatcher"); - var kAddClient = Symbol("add client"); - var kRemoveClient = Symbol("remove client"); - var kStats = Symbol("stats"); - var PoolBase = class extends DispatcherBase { - constructor() { - super(); - this[kQueue] = new FixedQueue(); - this[kClients] = []; - this[kQueued] = 0; - const pool = this; - this[kOnDrain] = function onDrain(origin, targets) { - const queue = pool[kQueue]; - let needDrain = false; - while (!needDrain) { - const item = queue.shift(); - if (!item) { - break; - } - pool[kQueued]--; - needDrain = !this.dispatch(item.opts, item.handler); - } - this[kNeedDrain] = needDrain; - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false; - pool.emit("drain", origin, [pool, ...targets]); + if (typeof stream2.destroy === "function") { + if (Object.getPrototypeOf(stream2).constructor === IncomingMessage) { + stream2.socket = null; + } + stream2.destroy(err); + } else if (err) { + queueMicrotask(() => { + stream2.emit("error", err); + }); + } + if (stream2.destroyed !== true) { + stream2[kDestroyed] = true; + } + } + var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val2) { + const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; + } + function headerNameToString(value) { + return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + function bufferToLowerCasedHeaderName(value) { + return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + function parseHeaders(headers, obj) { + if (obj === void 0) obj = {}; + for (let i = 0; i < headers.length; i += 2) { + const key = headerNameToString(headers[i]); + let val2 = obj[key]; + if (val2) { + if (typeof val2 === "string") { + val2 = [val2]; + obj[key] = val2; } - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); + val2.push(headers[i + 1].toString("utf8")); + } else { + const headersValue = headers[i + 1]; + if (typeof headersValue === "string") { + obj[key] = headersValue; + } else { + obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); } - }; - this[kOnConnect] = (origin, targets) => { - pool.emit("connect", origin, [pool, ...targets]); - }; - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit("disconnect", origin, [pool, ...targets], err); - }; - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit("connectionError", origin, [pool, ...targets], err); - }; - this[kStats] = new PoolStats(this); + } } - get [kBusy]() { - return this[kNeedDrain]; + if ("content-length" in obj && "content-disposition" in obj) { + obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); } - get [kConnected]() { - return this[kClients].filter((client) => client[kConnected]).length; + return obj; + } + function parseRawHeaders(headers) { + const len = headers.length; + const ret = new Array(len); + let hasContentLength = false; + let contentDispositionIdx = -1; + let key; + let val2; + let kLen = 0; + for (let n = 0; n < headers.length; n += 2) { + key = headers[n]; + val2 = headers[n + 1]; + typeof key !== "string" && (key = key.toString()); + typeof val2 !== "string" && (val2 = val2.toString("utf8")); + kLen = key.length; + if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) { + hasContentLength = true; + } else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { + contentDispositionIdx = n + 1; + } + ret[n] = key; + ret[n + 1] = val2; } - get [kFree]() { - return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; + if (hasContentLength && contentDispositionIdx !== -1) { + ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); } - get [kPending]() { - let ret = this[kQueued]; - for (const { [kPending]: pending } of this[kClients]) { - ret += pending; - } - return ret; + return ret; + } + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + } + function validateHandler(handler, method, upgrade) { + if (!handler || typeof handler !== "object") { + throw new InvalidArgumentError("handler must be an object"); } - get [kRunning]() { - let ret = 0; - for (const { [kRunning]: running } of this[kClients]) { - ret += running; - } - return ret; + if (typeof handler.onConnect !== "function") { + throw new InvalidArgumentError("invalid onConnect method"); } - get [kSize]() { - let ret = this[kQueued]; - for (const { [kSize]: size } of this[kClients]) { - ret += size; - } - return ret; + if (typeof handler.onError !== "function") { + throw new InvalidArgumentError("invalid onError method"); } - get stats() { - return this[kStats]; + if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) { + throw new InvalidArgumentError("invalid onBodySent method"); } - async [kClose]() { - if (this[kQueue].isEmpty()) { - return Promise.all(this[kClients].map((c) => c.close())); - } else { - return new Promise((resolve) => { - this[kClosedResolve] = resolve; - }); + if (upgrade || method === "CONNECT") { + if (typeof handler.onUpgrade !== "function") { + throw new InvalidArgumentError("invalid onUpgrade method"); } - } - async [kDestroy](err) { - while (true) { - const item = this[kQueue].shift(); - if (!item) { - break; - } - item.handler.onError(err); + } else { + if (typeof handler.onHeaders !== "function") { + throw new InvalidArgumentError("invalid onHeaders method"); } - return Promise.all(this[kClients].map((c) => c.destroy(err))); - } - [kDispatch](opts, handler) { - const dispatcher = this[kGetDispatcher](); - if (!dispatcher) { - this[kNeedDrain] = true; - this[kQueue].push({ opts, handler }); - this[kQueued]++; - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true; - this[kNeedDrain] = !this[kGetDispatcher](); + if (typeof handler.onData !== "function") { + throw new InvalidArgumentError("invalid onData method"); + } + if (typeof handler.onComplete !== "function") { + throw new InvalidArgumentError("invalid onComplete method"); } - return !this[kNeedDrain]; } - [kAddClient](client) { - client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); - this[kClients].push(client); - if (this[kNeedDrain]) { - queueMicrotask(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]); + } + function isDisturbed(body) { + return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); + } + function isErrored(body) { + return !!(body && stream.isErrored(body)); + } + function isReadable(body) { + return !!(body && stream.isReadable(body)); + } + function getSocketInfo(socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + }; + } + function ReadableStreamFrom(iterable) { + let iterator; + return new ReadableStream( + { + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + async pull(controller) { + const { done, value } = await iterator.next(); + if (done) { + queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) { + controller.enqueue(new Uint8Array(buf)); + } } - }); + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" } - return this; + ); + } + function isFormDataLike(object) { + return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + } + function addAbortListener(signal, listener) { + if ("addEventListener" in signal) { + signal.addEventListener("abort", listener, { once: true }); + return () => signal.removeEventListener("abort", listener); } - [kRemoveClient](client) { - client.close(() => { - const idx = this[kClients].indexOf(client); - if (idx !== -1) { - this[kClients].splice(idx, 1); - } - }); - this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + signal.addListener("abort", listener); + return () => signal.removeListener("abort", listener); + } + var hasToWellFormed = typeof String.prototype.toWellFormed === "function"; + var hasIsWellFormed = typeof String.prototype.isWellFormed === "function"; + function toUSVString(val2) { + return hasToWellFormed ? `${val2}`.toWellFormed() : nodeUtil.toUSVString(val2); + } + function isUSVString(val2) { + return hasIsWellFormed ? `${val2}`.isWellFormed() : toUSVString(val2) === `${val2}`; + } + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: + return false; + default: + return c >= 33 && c <= 126; } - }; - module2.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher - }; - } -}); - -// node_modules/undici/lib/dispatcher/pool.js -var require_pool2 = __commonJS({ - "node_modules/undici/lib/dispatcher/pool.js"(exports2, module2) { - "use strict"; - var { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher - } = require_pool_base2(); - var Client = require_client2(); - var { - InvalidArgumentError - } = require_errors2(); - var util = require_util8(); - var { kUrl, kInterceptors } = require_symbols6(); - var buildConnector = require_connect2(); - var kOptions = Symbol("options"); - var kConnections = Symbol("connections"); - var kFactory = Symbol("factory"); - function defaultFactory(origin, opts) { - return new Client(origin, opts); } - var Pool = class extends PoolBase { - constructor(origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - ...options - } = {}) { - super(); - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError("invalid connections"); - } - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); - } - if (connect != null && typeof connect !== "function" && typeof connect !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (typeof connect !== "function") { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, - ...connect - }); - } - this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; - this[kConnections] = connections || null; - this[kUrl] = util.parseOrigin(origin); - this[kOptions] = { ...util.deepClone(options), connect, allowH2 }; - this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; - this[kFactory] = factory; + function isValidHTTPToken(characters) { + if (characters.length === 0) { + return false; } - [kGetDispatcher]() { - for (const client of this[kClients]) { - if (!client[kNeedDrain]) { - return client; - } - } - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - const dispatcher = this[kFactory](this[kUrl], this[kOptions]); - this[kAddClient](dispatcher); - return dispatcher; + for (let i = 0; i < characters.length; ++i) { + if (!isTokenCharCode(characters.charCodeAt(i))) { + return false; } } - }; - module2.exports = Pool; - } -}); - -// node_modules/undici/lib/dispatcher/balanced-pool.js -var require_balanced_pool2 = __commonJS({ - "node_modules/undici/lib/dispatcher/balanced-pool.js"(exports2, module2) { - "use strict"; - var { - BalancedPoolMissingUpstreamError, - InvalidArgumentError - } = require_errors2(); - var { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher - } = require_pool_base2(); - var Pool = require_pool2(); - var { kUrl, kInterceptors } = require_symbols6(); - var { parseOrigin } = require_util8(); - var kFactory = Symbol("factory"); - var kOptions = Symbol("options"); - var kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); - var kCurrentWeight = Symbol("kCurrentWeight"); - var kIndex = Symbol("kIndex"); - var kWeight = Symbol("kWeight"); - var kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); - var kErrorPenalty = Symbol("kErrorPenalty"); - function getGreatestCommonDivisor(a, b) { - if (b === 0) return a; - return getGreatestCommonDivisor(b, a % b); + return true; } - function defaultFactory(origin, opts) { - return new Pool(origin, opts); + var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + function isValidHeaderValue(characters) { + return !headerCharRegex.test(characters); } - var BalancedPool = class extends PoolBase { - constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { - super(); - this[kOptions] = opts; - this[kIndex] = -1; - this[kCurrentWeight] = 0; - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; - this[kErrorPenalty] = this[kOptions].errorPenalty || 15; - if (!Array.isArray(upstreams)) { - upstreams = [upstreams]; - } - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); - } - this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; - this[kFactory] = factory; - for (const upstream of upstreams) { - this.addUpstream(upstream); - } - this._updateBalancedPoolStats(); + function parseRangeHeader(range) { + if (range == null || range === "") return { start: 0, end: null, size: null }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; + } + function addListener(obj, name, listener) { + const listeners = obj[kListeners] ??= []; + listeners.push([name, listener]); + obj.on(name, listener); + return obj; + } + function removeAllListeners(obj) { + for (const [name, listener] of obj[kListeners] ?? []) { + obj.removeListener(name, listener); } - addUpstream(upstream) { - const upstreamOrigin = parseOrigin(upstream).origin; - if (this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true)) { - return this; - } - const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); - this[kAddClient](pool); - pool.on("connect", () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); + obj[kListeners] = null; + } + function errorRequest(client, request2, err) { + try { + request2.onError(err); + assert(request2.aborted); + } catch (err2) { + client.emit("error", err2); + } + } + var kEnumerableProperty = /* @__PURE__ */ Object.create(null); + kEnumerableProperty.enumerable = true; + var normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + var normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); + module2.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isUSVString, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, + parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, + nodeMajor, + nodeMinor, + safeHTTPMethods: ["GET", "HEAD", "OPTIONS", "TRACE"], + wrapRequestBody + }; + } +}); + +// node_modules/undici/lib/core/diagnostics.js +var require_diagnostics = __commonJS({ + "node_modules/undici/lib/core/diagnostics.js"(exports2, module2) { + "use strict"; + var diagnosticsChannel = require("node:diagnostics_channel"); + var util = require("node:util"); + var undiciDebugLog = util.debuglog("undici"); + var fetchDebuglog = util.debuglog("fetch"); + var websocketDebuglog = util.debuglog("websocket"); + var isClientSet = false; + var channels = { + // Client + beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), + connected: diagnosticsChannel.channel("undici:client:connected"), + connectError: diagnosticsChannel.channel("undici:client:connectError"), + sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), + // Request + create: diagnosticsChannel.channel("undici:request:create"), + bodySent: diagnosticsChannel.channel("undici:request:bodySent"), + headers: diagnosticsChannel.channel("undici:request:headers"), + trailers: diagnosticsChannel.channel("undici:request:trailers"), + error: diagnosticsChannel.channel("undici:request:error"), + // WebSocket + open: diagnosticsChannel.channel("undici:websocket:open"), + close: diagnosticsChannel.channel("undici:websocket:close"), + socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), + ping: diagnosticsChannel.channel("undici:websocket:ping"), + pong: diagnosticsChannel.channel("undici:websocket:pong") + }; + if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { + connectParams: { version: version3, protocol, port, host } + } = evt; + debuglog( + "connecting to %s using %s%s", + `${host}${port ? `:${port}` : ""}`, + protocol, + version3 + ); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { + connectParams: { version: version3, protocol, port, host } + } = evt; + debuglog( + "connected to %s using %s%s", + `${host}${port ? `:${port}` : ""}`, + protocol, + version3 + ); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { + connectParams: { version: version3, protocol, port, host }, + error + } = evt; + debuglog( + "connection to %s using %s%s errored - %s", + `${host}${port ? `:${port}` : ""}`, + protocol, + version3, + error.message + ); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { + request: { method, path, origin } + } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { + const { + request: { method, path, origin }, + response: { statusCode } + } = evt; + debuglog( + "received response to %s %s/%s - HTTP %d", + method, + origin, + path, + statusCode + ); + }); + diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { + const { + request: { method, path, origin } + } = evt; + debuglog("trailers received from %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { + const { + request: { method, path, origin }, + error + } = evt; + debuglog( + "request to %s %s/%s errored - %s", + method, + origin, + path, + error.message + ); + }); + isClientSet = true; + } + if (websocketDebuglog.enabled) { + if (!isClientSet) { + const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { + connectParams: { version: version3, protocol, port, host } + } = evt; + debuglog( + "connecting to %s%s using %s%s", + host, + port ? `:${port}` : "", + protocol, + version3 + ); }); - pool.on("connectionError", () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); - this._updateBalancedPoolStats(); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { + connectParams: { version: version3, protocol, port, host } + } = evt; + debuglog( + "connected to %s%s using %s%s", + host, + port ? `:${port}` : "", + protocol, + version3 + ); }); - pool.on("disconnect", (...args) => { - const err = args[2]; - if (err && err.code === "UND_ERR_SOCKET") { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); - this._updateBalancedPoolStats(); - } + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { + connectParams: { version: version3, protocol, port, host }, + error + } = evt; + debuglog( + "connection to %s%s using %s%s errored - %s", + host, + port ? `:${port}` : "", + protocol, + version3, + error.message + ); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { + request: { method, path, origin } + } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); }); - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer]; - } - this._updateBalancedPoolStats(); - return this; - } - _updateBalancedPoolStats() { - this[kGreatestCommonDivisor] = this[kClients].map((p) => p[kWeight]).reduce(getGreatestCommonDivisor, 0); - } - removeUpstream(upstream) { - const upstreamOrigin = parseOrigin(upstream).origin; - const pool = this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true); - if (pool) { - this[kRemoveClient](pool); - } - return this; - } - get upstreams() { - return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); - } - [kGetDispatcher]() { - if (this[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError(); - } - const dispatcher = this[kClients].find((dispatcher2) => !dispatcher2[kNeedDrain] && dispatcher2.closed !== true && dispatcher2.destroyed !== true); - if (!dispatcher) { - return; - } - const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true); - if (allClientsBusy) { - return; - } - let counter = 0; - let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); - while (counter++ < this[kClients].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients].length; - const pool = this[kClients][this[kIndex]]; - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex]; - } - if (this[kIndex] === 0) { - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer]; - } - } - if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) { - return pool; - } - } - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; - this[kIndex] = maxWeightIndex; - return this[kClients][maxWeightIndex]; } + diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { + const { + address: { address, port } + } = evt; + websocketDebuglog("connection opened %s%s", address, port ? `:${port}` : ""); + }); + diagnosticsChannel.channel("undici:websocket:close").subscribe((evt) => { + const { websocket, code, reason } = evt; + websocketDebuglog( + "closed connection to %s - %s %s", + websocket.url, + code, + reason + ); + }); + diagnosticsChannel.channel("undici:websocket:socket_error").subscribe((err) => { + websocketDebuglog("connection errored - %s", err.message); + }); + diagnosticsChannel.channel("undici:websocket:ping").subscribe((evt) => { + websocketDebuglog("ping received"); + }); + diagnosticsChannel.channel("undici:websocket:pong").subscribe((evt) => { + websocketDebuglog("pong received"); + }); + } + module2.exports = { + channels }; - module2.exports = BalancedPool; } }); -// node_modules/undici/lib/dispatcher/agent.js -var require_agent2 = __commonJS({ - "node_modules/undici/lib/dispatcher/agent.js"(exports2, module2) { +// node_modules/undici/lib/core/request.js +var require_request3 = __commonJS({ + "node_modules/undici/lib/core/request.js"(exports2, module2) { "use strict"; - var { InvalidArgumentError } = require_errors2(); - var { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols6(); - var DispatcherBase = require_dispatcher_base2(); - var Pool = require_pool2(); - var Client = require_client2(); - var util = require_util8(); - var createRedirectInterceptor = require_redirect_interceptor(); - var kOnConnect = Symbol("onConnect"); - var kOnDisconnect = Symbol("onDisconnect"); - var kOnConnectionError = Symbol("onConnectionError"); - var kMaxRedirections = Symbol("maxRedirections"); - var kOnDrain = Symbol("onDrain"); - var kFactory = Symbol("factory"); - var kOptions = Symbol("options"); - function defaultFactory(origin, opts) { - return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); - } - var Agent = class extends DispatcherBase { - constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - super(); - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); + var { + InvalidArgumentError, + NotSupportedError + } = require_errors2(); + var assert = require("node:assert"); + var { + isValidHTTPToken, + isValidHeaderValue, + isStream, + destroy, + isBuffer, + isFormDataLike, + isIterable, + isBlobLike, + buildURL, + validateHandler, + getServerName, + normalizedMethodRecords + } = require_util9(); + var { channels } = require_diagnostics(); + var { headerNameLowerCasedRecord } = require_constants6(); + var invalidPathRegex = /[^\u0021-\u00ff]/; + var kHandler = Symbol("handler"); + var Request2 = class { + constructor(origin, { + path, + method, + body, + headers, + query, + idempotent, + blocking, + upgrade, + headersTimeout, + bodyTimeout, + reset, + throwOnError, + expectContinue, + servername + }, handler) { + if (typeof path !== "string") { + throw new InvalidArgumentError("path must be a string"); + } else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") { + throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + } else if (invalidPathRegex.test(path)) { + throw new InvalidArgumentError("invalid request path"); } - if (connect != null && typeof connect !== "function" && typeof connect !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); + if (typeof method !== "string") { + throw new InvalidArgumentError("method must be a string"); + } else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) { + throw new InvalidArgumentError("invalid request method"); } - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError("maxRedirections must be a positive number"); + if (upgrade && typeof upgrade !== "string") { + throw new InvalidArgumentError("upgrade must be a string"); } - if (connect && typeof connect !== "function") { - connect = { ...connect }; + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError("invalid headersTimeout"); } - this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; - this[kOptions] = { ...util.deepClone(options), connect }; - this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; - this[kMaxRedirections] = maxRedirections; - this[kFactory] = factory; - this[kClients] = /* @__PURE__ */ new Map(); - this[kOnDrain] = (origin, targets) => { - this.emit("drain", origin, [this, ...targets]); - }; - this[kOnConnect] = (origin, targets) => { - this.emit("connect", origin, [this, ...targets]); - }; - this[kOnDisconnect] = (origin, targets, err) => { - this.emit("disconnect", origin, [this, ...targets], err); - }; - this[kOnConnectionError] = (origin, targets, err) => { - this.emit("connectionError", origin, [this, ...targets], err); - }; - } - get [kRunning]() { - let ret = 0; - for (const client of this[kClients].values()) { - ret += client[kRunning]; + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError("invalid bodyTimeout"); } - return ret; - } - [kDispatch](opts, handler) { - let key; - if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) { - key = String(opts.origin); + if (reset != null && typeof reset !== "boolean") { + throw new InvalidArgumentError("invalid reset"); + } + if (expectContinue != null && typeof expectContinue !== "boolean") { + throw new InvalidArgumentError("invalid expectContinue"); + } + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.throwOnError = throwOnError === true; + this.method = method; + this.abort = null; + if (body == null) { + this.body = null; + } else if (isStream(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + destroy(this); + }; + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) { + this.abort(err); + } else { + this.error = err; + } + }; + this.body.on("error", this.errorHandler); + } else if (isBuffer(body)) { + this.body = body.byteLength ? body : null; + } else if (ArrayBuffer.isView(body)) { + this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + } else if (body instanceof ArrayBuffer) { + this.body = body.byteLength ? Buffer.from(body) : null; + } else if (typeof body === "string") { + this.body = body.length ? Buffer.from(body) : null; + } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { + this.body = body; } else { - throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); } - let dispatcher = this[kClients].get(key); - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); - this[kClients].set(key, dispatcher); + this.completed = false; + this.aborted = false; + this.upgrade = upgrade || null; + this.path = query ? buildURL(path, query) : path; + this.origin = origin; + this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; + this.blocking = blocking == null ? false : blocking; + this.reset = reset == null ? null : reset; + this.host = null; + this.contentLength = null; + this.contentType = null; + this.headers = []; + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError("headers array must be even"); + } + for (let i = 0; i < headers.length; i += 2) { + processHeader(this, headers[i], headers[i + 1]); + } + } else if (headers && typeof headers === "object") { + if (headers[Symbol.iterator]) { + for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) { + throw new InvalidArgumentError("headers must be in key-value pair format"); + } + processHeader(this, header[0], header[1]); + } + } else { + const keys = Object.keys(headers); + for (let i = 0; i < keys.length; ++i) { + processHeader(this, keys[i], headers[keys[i]]); + } + } + } else if (headers != null) { + throw new InvalidArgumentError("headers must be an object or an array"); + } + validateHandler(handler, method, upgrade); + this.servername = servername || getServerName(this.host); + this[kHandler] = handler; + if (channels.create.hasSubscribers) { + channels.create.publish({ request: this }); } - return dispatcher.dispatch(opts, handler); } - async [kClose]() { - const closePromises = []; - for (const client of this[kClients].values()) { - closePromises.push(client.close()); - } - this[kClients].clear(); - await Promise.all(closePromises); - } - async [kDestroy](err) { - const destroyPromises = []; - for (const client of this[kClients].values()) { - destroyPromises.push(client.destroy(err)); + onBodySent(chunk) { + if (this[kHandler].onBodySent) { + try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } } - this[kClients].clear(); - await Promise.all(destroyPromises); } - }; - module2.exports = Agent; - } -}); - -// node_modules/undici/lib/dispatcher/proxy-agent.js -var require_proxy_agent2 = __commonJS({ - "node_modules/undici/lib/dispatcher/proxy-agent.js"(exports2, module2) { - "use strict"; - var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols6(); - var { URL: URL3 } = require("node:url"); - var Agent = require_agent2(); - var Pool = require_pool2(); - var DispatcherBase = require_dispatcher_base2(); - var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors2(); - var buildConnector = require_connect2(); - var kAgent = Symbol("proxy agent"); - var kClient = Symbol("proxy client"); - var kProxyHeaders = Symbol("proxy headers"); - var kRequestTls = Symbol("request tls settings"); - var kProxyTls = Symbol("proxy tls settings"); - var kConnectEndpoint = Symbol("connect endpoint function"); - function defaultProtocolPort(protocol) { - return protocol === "https:" ? 443 : 80; - } - function defaultFactory(origin, opts) { - return new Pool(origin, opts); - } - var ProxyAgent2 = class extends DispatcherBase { - constructor(opts) { - super(); - if (!opts || typeof opts === "object" && !(opts instanceof URL3) && !opts.uri) { - throw new InvalidArgumentError("Proxy uri is mandatory"); - } - const { clientFactory = defaultFactory } = opts; - if (typeof clientFactory !== "function") { - throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); - } - const url = this.#getUrl(opts); - const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; - this[kProxy] = { uri: href, protocol }; - this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; - this[kRequestTls] = opts.requestTls; - this[kProxyTls] = opts.proxyTls; - this[kProxyHeaders] = opts.headers || {}; - if (opts.auth && opts.token) { - throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); - } else if (opts.auth) { - this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; - } else if (opts.token) { - this[kProxyHeaders]["proxy-authorization"] = opts.token; - } else if (username && password) { - this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + onRequestSent() { + if (channels.bodySent.hasSubscribers) { + channels.bodySent.publish({ request: this }); } - const connect = buildConnector({ ...opts.proxyTls }); - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); - this[kClient] = clientFactory(url, { connect }); - this[kAgent] = new Agent({ - ...opts, - connect: async (opts2, callback) => { - let requestedPath = opts2.host; - if (!opts2.port) { - requestedPath += `:${defaultProtocolPort(opts2.protocol)}`; - } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedPath, - signal: opts2.signal, - headers: { - ...this[kProxyHeaders], - host: opts2.host - }, - servername: this[kProxyTls]?.servername || proxyHostname - }); - if (statusCode !== 200) { - socket.on("error", () => { - }).destroy(); - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); - } - if (opts2.protocol !== "https:") { - callback(null, socket); - return; - } - let servername; - if (this[kRequestTls]) { - servername = this[kRequestTls].servername; - } else { - servername = opts2.servername; - } - this[kConnectEndpoint]({ ...opts2, servername, httpSocket: socket }, callback); - } catch (err) { - if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - callback(new SecureProxyConnectionError(err)); - } else { - callback(err); - } - } + if (this[kHandler].onRequestSent) { + try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); } - }); - } - dispatch(opts, handler) { - const headers = buildHeaders(opts.headers); - throwIfProxyAuthIsSent(headers); - if (headers && !("host" in headers) && !("Host" in headers)) { - const { host } = new URL3(opts.origin); - headers.host = host; } - return this[kAgent].dispatch( - { - ...opts, - headers - }, - handler - ); } - /** - * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts - * @returns {URL} - */ - #getUrl(opts) { - if (typeof opts === "string") { - return new URL3(opts); - } else if (opts instanceof URL3) { - return opts; + onConnect(abort) { + assert(!this.aborted); + assert(!this.completed); + if (this.error) { + abort(this.error); } else { - return new URL3(opts.uri); - } - } - async [kClose]() { - await this[kAgent].close(); - await this[kClient].close(); - } - async [kDestroy]() { - await this[kAgent].destroy(); - await this[kClient].destroy(); - } - }; - function buildHeaders(headers) { - if (Array.isArray(headers)) { - const headersPair = {}; - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1]; + this.abort = abort; + return this[kHandler].onConnect(abort); } - return headersPair; } - return headers; - } - function throwIfProxyAuthIsSent(headers) { - const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); - if (existProxyAuth) { - throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); + onResponseStarted() { + return this[kHandler].onResponseStarted?.(); } - } - module2.exports = ProxyAgent2; - } -}); - -// node_modules/undici/lib/dispatcher/env-http-proxy-agent.js -var require_env_http_proxy_agent = __commonJS({ - "node_modules/undici/lib/dispatcher/env-http-proxy-agent.js"(exports2, module2) { - "use strict"; - var DispatcherBase = require_dispatcher_base2(); - var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols6(); - var ProxyAgent2 = require_proxy_agent2(); - var Agent = require_agent2(); - var DEFAULT_PORTS = { - "http:": 80, - "https:": 443 - }; - var experimentalWarned = false; - var EnvHttpProxyAgent = class extends DispatcherBase { - #noProxyValue = null; - #noProxyEntries = null; - #opts = null; - constructor(opts = {}) { - super(); - this.#opts = opts; - if (!experimentalWarned) { - experimentalWarned = true; - process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.", { - code: "UNDICI-EHPA" - }); + onHeaders(statusCode, headers, resume, statusText) { + assert(!this.aborted); + assert(!this.completed); + if (channels.headers.hasSubscribers) { + channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); } - const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; - this[kNoProxyAgent] = new Agent(agentOpts); - const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; - if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTP_PROXY }); - } else { - this[kHttpProxyAgent] = this[kNoProxyAgent]; + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); } - const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; - if (HTTPS_PROXY) { - this[kHttpsProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTPS_PROXY }); - } else { - this[kHttpsProxyAgent] = this[kHttpProxyAgent]; + } + onData(chunk) { + assert(!this.aborted); + assert(!this.completed); + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; } - this.#parseNoProxy(); } - [kDispatch](opts, handler) { - const url = new URL(opts.origin); - const agent = this.#getProxyAgentForUrl(url); - return agent.dispatch(opts, handler); + onUpgrade(statusCode, headers, socket) { + assert(!this.aborted); + assert(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); } - async [kClose]() { - await this[kNoProxyAgent].close(); - if (!this[kHttpProxyAgent][kClosed]) { - await this[kHttpProxyAgent].close(); + onComplete(trailers) { + this.onFinally(); + assert(!this.aborted); + this.completed = true; + if (channels.trailers.hasSubscribers) { + channels.trailers.publish({ request: this, trailers }); } - if (!this[kHttpsProxyAgent][kClosed]) { - await this[kHttpsProxyAgent].close(); + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); } } - async [kDestroy](err) { - await this[kNoProxyAgent].destroy(err); - if (!this[kHttpProxyAgent][kDestroyed]) { - await this[kHttpProxyAgent].destroy(err); + onError(error) { + this.onFinally(); + if (channels.error.hasSubscribers) { + channels.error.publish({ request: this, error }); } - if (!this[kHttpsProxyAgent][kDestroyed]) { - await this[kHttpsProxyAgent].destroy(err); + if (this.aborted) { + return; } + this.aborted = true; + return this[kHandler].onError(error); } - #getProxyAgentForUrl(url) { - let { protocol, host: hostname, port } = url; - hostname = hostname.replace(/:\d*$/, "").toLowerCase(); - port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; - if (!this.#shouldProxy(hostname, port)) { - return this[kNoProxyAgent]; + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; } - if (protocol === "https:") { - return this[kHttpsProxyAgent]; + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; } - return this[kHttpProxyAgent]; } - #shouldProxy(hostname, port) { - if (this.#noProxyChanged) { - this.#parseNoProxy(); - } - if (this.#noProxyEntries.length === 0) { - return true; - } - if (this.#noProxyValue === "*") { - return false; + addHeader(key, value) { + processHeader(this, key, value); + return this; + } + }; + function processHeader(request2, key, val2) { + if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val2 === void 0) { + return; + } + let headerName = headerNameLowerCasedRecord[key]; + if (headerName === void 0) { + headerName = key.toLowerCase(); + if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) { + throw new InvalidArgumentError("invalid header key"); } - for (let i = 0; i < this.#noProxyEntries.length; i++) { - const entry = this.#noProxyEntries[i]; - if (entry.port && entry.port !== port) { - continue; - } - if (!/^[.*]/.test(entry.hostname)) { - if (hostname === entry.hostname) { - return false; + } + if (Array.isArray(val2)) { + const arr = []; + for (let i = 0; i < val2.length; i++) { + if (typeof val2[i] === "string") { + if (!isValidHeaderValue(val2[i])) { + throw new InvalidArgumentError(`invalid ${key} header`); } + arr.push(val2[i]); + } else if (val2[i] === null) { + arr.push(""); + } else if (typeof val2[i] === "object") { + throw new InvalidArgumentError(`invalid ${key} header`); } else { - if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) { - return false; - } + arr.push(`${val2[i]}`); } } - return true; - } - #parseNoProxy() { - const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; - const noProxySplit = noProxyValue.split(/[,\s]/); - const noProxyEntries = []; - for (let i = 0; i < noProxySplit.length; i++) { - const entry = noProxySplit[i]; - if (!entry) { - continue; - } - const parsed = entry.match(/^(.+):(\d+)$/); - noProxyEntries.push({ - hostname: (parsed ? parsed[1] : entry).toLowerCase(), - port: parsed ? Number.parseInt(parsed[2], 10) : 0 - }); + val2 = arr; + } else if (typeof val2 === "string") { + if (!isValidHeaderValue(val2)) { + throw new InvalidArgumentError(`invalid ${key} header`); } - this.#noProxyValue = noProxyValue; - this.#noProxyEntries = noProxyEntries; + } else if (val2 === null) { + val2 = ""; + } else { + val2 = `${val2}`; } - get #noProxyChanged() { - if (this.#opts.noProxy !== void 0) { - return false; + if (request2.host === null && headerName === "host") { + if (typeof val2 !== "string") { + throw new InvalidArgumentError("invalid host header"); } - return this.#noProxyValue !== this.#noProxyEnv; - } - get #noProxyEnv() { - return process.env.no_proxy ?? process.env.NO_PROXY ?? ""; + request2.host = val2; + } else if (request2.contentLength === null && headerName === "content-length") { + request2.contentLength = parseInt(val2, 10); + if (!Number.isFinite(request2.contentLength)) { + throw new InvalidArgumentError("invalid content-length header"); + } + } else if (request2.contentType === null && headerName === "content-type") { + request2.contentType = val2; + request2.headers.push(key, val2); + } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") { + throw new InvalidArgumentError(`invalid ${headerName} header`); + } else if (headerName === "connection") { + const value = typeof val2 === "string" ? val2.toLowerCase() : null; + if (value !== "close" && value !== "keep-alive") { + throw new InvalidArgumentError("invalid connection header"); + } + if (value === "close") { + request2.reset = true; + } + } else if (headerName === "expect") { + throw new NotSupportedError("expect header not supported"); + } else { + request2.headers.push(key, val2); } - }; - module2.exports = EnvHttpProxyAgent; + } + module2.exports = Request2; } }); -// node_modules/undici/lib/handler/retry-handler.js -var require_retry_handler = __commonJS({ - "node_modules/undici/lib/handler/retry-handler.js"(exports2, module2) { +// node_modules/undici/lib/dispatcher/dispatcher.js +var require_dispatcher2 = __commonJS({ + "node_modules/undici/lib/dispatcher/dispatcher.js"(exports2, module2) { "use strict"; - var assert = require("node:assert"); - var { kRetryHandlerDefaultRetry } = require_symbols6(); - var { RequestRetryError } = require_errors2(); - var { - isDisturbed, - parseHeaders, - parseRangeHeader, - wrapRequestBody - } = require_util8(); - function calculateRetryAfterHeader(retryAfter) { - const current = Date.now(); - return new Date(retryAfter).getTime() - current; - } - var RetryHandler = class _RetryHandler { - constructor(opts, handlers) { - const { retryOptions, ...dispatchOpts } = opts; - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes - } = retryOptions ?? {}; - this.dispatch = handlers.dispatch; - this.handler = handlers.handler; - this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) }; - this.abort = null; - this.aborted = false; - this.retryOpts = { - retry: retryFn ?? _RetryHandler[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1e3, - // 30s, - minTimeout: minTimeout ?? 500, - // .5s - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - // What errors we should retry - methods: methods ?? ["GET", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE"], - // Indicates which errors to retry - statusCodes: statusCodes ?? [500, 502, 503, 504, 429], - // List of errors to retry - errorCodes: errorCodes ?? [ - "ECONNRESET", - "ECONNREFUSED", - "ENOTFOUND", - "ENETDOWN", - "ENETUNREACH", - "EHOSTDOWN", - "EHOSTUNREACH", - "EPIPE", - "UND_ERR_SOCKET" - ] - }; - this.retryCount = 0; - this.retryCountCheckpoint = 0; - this.start = 0; - this.end = null; - this.etag = null; - this.resume = null; - this.handler.onConnect((reason) => { - this.aborted = true; - if (this.abort) { - this.abort(reason); - } else { - this.reason = reason; - } - }); + var EventEmitter = require("node:events"); + var Dispatcher = class extends EventEmitter { + dispatch() { + throw new Error("not implemented"); } - onRequestSent() { - if (this.handler.onRequestSent) { - this.handler.onRequestSent(); - } + close() { + throw new Error("not implemented"); } - onUpgrade(statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket); - } + destroy() { + throw new Error("not implemented"); } - onConnect(abort) { - if (this.aborted) { - abort(this.reason); - } else { - this.abort = abort; + compose(...args) { + const interceptors = Array.isArray(args[0]) ? args[0] : args; + let dispatch = this.dispatch.bind(this); + for (const interceptor of interceptors) { + if (interceptor == null) { + continue; + } + if (typeof interceptor !== "function") { + throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); + } + dispatch = interceptor(dispatch); + if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) { + throw new TypeError("invalid interceptor"); + } } + return new ComposedDispatcher(this, dispatch); } - onBodySent(chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + }; + var ComposedDispatcher = class extends Dispatcher { + #dispatcher = null; + #dispatch = null; + constructor(dispatcher, dispatch) { + super(); + this.#dispatcher = dispatcher; + this.#dispatch = dispatch; } - static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { - const { statusCode, code, headers } = err; - const { method, retryOptions } = opts; - const { - maxRetries, - minTimeout, - maxTimeout, - timeoutFactor, - statusCodes, - errorCodes, - methods - } = retryOptions; - const { counter } = state; - if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code)) { - cb(err); - return; + dispatch(...args) { + this.#dispatch(...args); + } + close(...args) { + return this.#dispatcher.close(...args); + } + destroy(...args) { + return this.#dispatcher.destroy(...args); + } + }; + module2.exports = Dispatcher; + } +}); + +// node_modules/undici/lib/dispatcher/dispatcher-base.js +var require_dispatcher_base2 = __commonJS({ + "node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports2, module2) { + "use strict"; + var Dispatcher = require_dispatcher2(); + var { + ClientDestroyedError, + ClientClosedError, + InvalidArgumentError + } = require_errors2(); + var { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require_symbols6(); + var kOnDestroyed = Symbol("onDestroyed"); + var kOnClosed = Symbol("onClosed"); + var kInterceptedDispatch = Symbol("Intercepted Dispatch"); + var DispatcherBase = class extends Dispatcher { + constructor() { + super(); + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + } + get destroyed() { + return this[kDestroyed]; + } + get closed() { + return this[kClosed]; + } + get interceptors() { + return this[kInterceptors]; + } + set interceptors(newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) { + const interceptor = this[kInterceptors][i]; + if (typeof interceptor !== "function") { + throw new InvalidArgumentError("interceptor must be an function"); + } + } } - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err); - return; + this[kInterceptors] = newInterceptors; + } + close(callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data); + }); + }); } - if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { - cb(err); - return; + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); } - if (counter > maxRetries) { - cb(err); + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)); return; } - let retryAfterHeader = headers?.["retry-after"]; - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader); - retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; - } - const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); - setTimeout(() => cb(null), retryTimeout); - } - onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders); - this.retryCount += 1; - if (statusCode >= 300) { - if (this.retryOpts.statusCodes.includes(statusCode) === false) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ); + if (this[kClosed]) { + if (this[kOnClosed]) { + this[kOnClosed].push(callback); } else { - this.abort( - new RequestRetryError("Request failed", statusCode, { - headers, - data: { - count: this.retryCount - } - }) - ); - return false; + queueMicrotask(() => callback(null, null)); } + return; } - if (this.resume != null) { - this.resume = null; - if (statusCode !== 206) { - return true; - } - const contentRange = parseRangeHeader(headers["content-range"]); - if (!contentRange) { - this.abort( - new RequestRetryError("Content-Range mismatch", statusCode, { - headers, - count: this.retryCount - }) - ); - return false; - } - if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError("ETag mismatch", statusCode, { - headers, - count: this.retryCount - }) - ); - return false; + this[kClosed] = true; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null); } - const { start, size, end = size } = contentRange; - assert(this.start === start, "content-range mismatch"); - assert(this.end == null || this.end === end, "content-range mismatch"); - this.resume = resume; - return true; + }; + this[kClose]().then(() => this.destroy()).then(() => { + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; } - if (this.end == null) { - if (statusCode === 206) { - const range = parseRangeHeader(headers["content-range"]); - if (range == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ); - } - const { start, size, end = size } = range; - assert( - start != null && Number.isFinite(start), - "content-range mismatch" - ); - assert(end != null && Number.isFinite(end), "invalid content-length"); - this.start = start; - this.end = end; - } - if (this.end == null) { - const contentLength = headers["content-length"]; - this.end = contentLength != null ? Number(contentLength) : null; - } - assert(Number.isFinite(this.start)); - assert( - this.end == null || Number.isFinite(this.end), - "invalid content-length" - ); - this.resume = resume; - this.etag = headers.etag != null ? headers.etag : null; - if (this.etag != null && this.etag.startsWith("W/")) { - this.etag = null; + if (callback === void 0) { + return new Promise((resolve, reject) => { + this.destroy(err, (err2, data) => { + return err2 ? ( + /* istanbul ignore next: should never error */ + reject(err2) + ) : resolve(data); + }); + }); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (this[kDestroyed]) { + if (this[kOnDestroyed]) { + this[kOnDestroyed].push(callback); + } else { + queueMicrotask(() => callback(null, null)); } - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ); + return; } - const err = new RequestRetryError("Request failed", statusCode, { - headers, - data: { count: this.retryCount } + if (!err) { + err = new ClientDestroyedError(); + } + this[kDestroyed] = true; + this[kOnDestroyed] = this[kOnDestroyed] || []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null); + } + }; + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed); }); - this.abort(err); - return false; - } - onData(chunk) { - this.start += chunk.length; - return this.handler.onData(chunk); - } - onComplete(rawTrailers) { - this.retryCount = 0; - return this.handler.onComplete(rawTrailers); } - onError(err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err); + [kInterceptedDispatch](opts, handler) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch]; + return this[kDispatch](opts, handler); } - if (this.retryCount - this.retryCountCheckpoint > 0) { - this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); - } else { - this.retryCount += 1; + let dispatch = this[kDispatch].bind(this); + for (let i = this[kInterceptors].length - 1; i >= 0; i--) { + dispatch = this[kInterceptors][i](dispatch); } - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - onRetry.bind(this) - ); - function onRetry(err2) { - if (err2 != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err2); + this[kInterceptedDispatch] = dispatch; + return dispatch(opts, handler); + } + dispatch(opts, handler) { + if (!handler || typeof handler !== "object") { + throw new InvalidArgumentError("handler must be an object"); + } + try { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("opts must be an object."); } - if (this.start !== 0) { - const headers = { range: `bytes=${this.start}-${this.end ?? ""}` }; - if (this.etag != null) { - headers["if-match"] = this.etag; - } - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - ...headers - } - }; + if (this[kDestroyed] || this[kOnDestroyed]) { + throw new ClientDestroyedError(); } - try { - this.retryCountCheckpoint = this.retryCount; - this.dispatch(this.opts, this); - } catch (err3) { - this.handler.onError(err3); + if (this[kClosed]) { + throw new ClientClosedError(); + } + return this[kInterceptedDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== "function") { + throw new InvalidArgumentError("invalid onError method"); } + handler.onError(err); + return false; } } }; - module2.exports = RetryHandler; - } -}); - -// node_modules/undici/lib/dispatcher/retry-agent.js -var require_retry_agent = __commonJS({ - "node_modules/undici/lib/dispatcher/retry-agent.js"(exports2, module2) { - "use strict"; - var Dispatcher = require_dispatcher2(); - var RetryHandler = require_retry_handler(); - var RetryAgent = class extends Dispatcher { - #agent = null; - #options = null; - constructor(agent, options = {}) { - super(options); - this.#agent = agent; - this.#options = options; - } - dispatch(opts, handler) { - const retry2 = new RetryHandler({ - ...opts, - retryOptions: this.#options - }, { - dispatch: this.#agent.dispatch.bind(this.#agent), - handler - }); - return this.#agent.dispatch(opts, retry2); - } - close() { - return this.#agent.close(); - } - destroy() { - return this.#agent.destroy(); - } - }; - module2.exports = RetryAgent; + module2.exports = DispatcherBase; } }); -// node_modules/undici/lib/api/readable.js -var require_readable2 = __commonJS({ - "node_modules/undici/lib/api/readable.js"(exports2, module2) { +// node_modules/undici/lib/core/connect.js +var require_connect2 = __commonJS({ + "node_modules/undici/lib/core/connect.js"(exports2, module2) { "use strict"; + var net = require("node:net"); var assert = require("node:assert"); - var { Readable } = require("node:stream"); - var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError: AbortError2 } = require_errors2(); - var util = require_util8(); - var { ReadableStreamFrom } = require_util8(); - var kConsume = Symbol("kConsume"); - var kReading = Symbol("kReading"); - var kBody = Symbol("kBody"); - var kAbort = Symbol("kAbort"); - var kContentType = Symbol("kContentType"); - var kContentLength = Symbol("kContentLength"); - var noop = () => { - }; - var BodyReadable = class extends Readable { - constructor({ - resume, - abort, - contentType = "", - contentLength, - highWaterMark = 64 * 1024 - // Same as nodejs fs streams. - }) { - super({ - autoDestroy: true, - read: resume, - highWaterMark - }); - this._readableState.dataEmitted = false; - this[kAbort] = abort; - this[kConsume] = null; - this[kBody] = null; - this[kContentType] = contentType; - this[kContentLength] = contentLength; - this[kReading] = false; - } - destroy(err) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError(); - } - if (err) { - this[kAbort](); - } - return super.destroy(err); - } - _destroy(err, callback) { - if (!this[kReading]) { - setImmediate(() => { - callback(err); + var util = require_util9(); + var { InvalidArgumentError, ConnectTimeoutError } = require_errors2(); + var tls; + var SessionCache; + if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { + SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) { + return; + } + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) { + this._sessionCache.delete(key); + } }); - } else { - callback(err); } - } - on(ev, ...args) { - if (ev === "data" || ev === "readable") { - this[kReading] = true; - } - return super.on(ev, ...args); - } - addListener(ev, ...args) { - return this.on(ev, ...args); - } - off(ev, ...args) { - const ret = super.off(ev, ...args); - if (ev === "data" || ev === "readable") { - this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; - } - return ret; - } - removeListener(ev, ...args) { - return this.off(ev, ...args); - } - push(chunk) { - if (this[kConsume] && chunk !== null) { - consumePush(this[kConsume], chunk); - return this[kReading] ? super.push(chunk) : true; + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; } - return super.push(chunk); - } - // https://fetch.spec.whatwg.org/#dom-body-text - async text() { - return consume(this, "text"); - } - // https://fetch.spec.whatwg.org/#dom-body-json - async json() { - return consume(this, "json"); - } - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob() { - return consume(this, "blob"); - } - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer() { - return consume(this, "arrayBuffer"); - } - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData() { - throw new NotSupportedError(); - } - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed() { - return util.isDisturbed(this); - } - // https://fetch.spec.whatwg.org/#dom-body-body - get body() { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this); - if (this[kConsume]) { - this[kBody].getReader(); - assert(this[kBody].locked); + set(sessionKey, session) { + if (this._maxCachedSessions === 0) { + return; } + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); } - return this[kBody]; - } - async dump(opts) { - let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024; - const signal = opts?.signal; - if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) { - throw new InvalidArgumentError("signal must be an AbortSignal"); + }; + } else { + SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); } - signal?.throwIfAborted(); - if (this._readableState.closeEmitted) { - return null; + get(sessionKey) { + return this._sessionCache.get(sessionKey); } - return await new Promise((resolve, reject) => { - if (this[kContentLength] > limit) { - this.destroy(new AbortError2()); + set(sessionKey, session) { + if (this._maxCachedSessions === 0) { + return; } - const onAbort = () => { - this.destroy(signal.reason ?? new AbortError2()); - }; - signal?.addEventListener("abort", onAbort); - this.on("close", function() { - signal?.removeEventListener("abort", onAbort); - if (signal?.aborted) { - reject(signal.reason ?? new AbortError2()); - } else { - resolve(null); - } - }).on("error", noop).on("data", function(chunk) { - limit -= chunk.length; - if (limit <= 0) { - this.destroy(); - } - }).resume(); - }); - } - }; - function isLocked(self) { - return self[kBody] && self[kBody].locked === true || self[kConsume]; - } - function isUnusable(self) { - return util.isDisturbed(self) || isLocked(self); - } - async function consume(stream, type) { - assert(!stream[kConsume]); - return new Promise((resolve, reject) => { - if (isUnusable(stream)) { - const rState = stream._readableState; - if (rState.destroyed && rState.closeEmitted === false) { - stream.on("error", (err) => { - reject(err); - }).on("close", () => { - reject(new TypeError("unusable")); - }); - } else { - reject(rState.errored ?? new TypeError("unusable")); + if (this._sessionCache.size >= this._maxCachedSessions) { + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); } - } else { - queueMicrotask(() => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] - }; - stream.on("error", function(err) { - consumeFinish(this[kConsume], err); - }).on("close", function() { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()); - } - }); - consumeStart(stream[kConsume]); - }); + this._sessionCache.set(sessionKey, session); } - }); + }; } - function consumeStart(consume2) { - if (consume2.body === null) { - return; + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { + throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); } - const { _readableState: state } = consume2.stream; - if (state.bufferIndex) { - const start = state.bufferIndex; - const end = state.buffer.length; - for (let n = start; n < end; n++) { - consumePush(consume2, state.buffer[n]); + const options = { path: socketPath, ...opts }; + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 1e4 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket; + if (protocol === "https:") { + if (!tls) { + tls = require("node:tls"); + } + servername = servername || options.servername || util.getServerName(host) || null; + const sessionKey = servername || hostname; + const session = customSession || sessionCache.get(sessionKey) || null; + assert(sessionKey); + socket = tls.connect({ + highWaterMark: 16384, + // TLS in node can't have bigger HWM anyway... + ...options, + servername, + session, + localAddress, + // TODO(HTTP/2): Add support for h2c + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + // upgrade socket connection + port: port || 443, + host: hostname + }); + socket.on("session", function(session2) { + sessionCache.set(sessionKey, session2); + }); + } else { + assert(!httpSocket, "httpSocket can only be sent on TLS update"); + socket = net.connect({ + highWaterMark: 64 * 1024, + // Same as nodejs fs streams. + ...options, + localAddress, + port: port || 80, + host: hostname + }); } - } else { - for (const chunk of state.buffer) { - consumePush(consume2, chunk); + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); } - } - if (state.endEmitted) { - consumeEnd(this[kConsume]); - } else { - consume2.stream.on("end", function() { - consumeEnd(this[kConsume]); + const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout); + socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { + cancelTimeout(); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on("error", function(err) { + cancelTimeout(); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } }); - } - consume2.stream.resume(); - while (consume2.stream.read() != null) { - } + return socket; + }; } - function chunksDecode(chunks, length) { - if (chunks.length === 0 || length === 0) { - return ""; + function setupTimeout(onConnectTimeout2, timeout) { + if (!timeout) { + return () => { + }; } - const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); - const bufferLength = buffer.length; - const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; - return buffer.utf8Slice(start, bufferLength); - } - function consumeEnd(consume2) { - const { type, body, resolve, stream, length } = consume2; - try { - if (type === "text") { - resolve(chunksDecode(body, length)); - } else if (type === "json") { - resolve(JSON.parse(chunksDecode(body, length))); - } else if (type === "arrayBuffer") { - const dst = new Uint8Array(length); - let pos = 0; - for (const buf of body) { - dst.set(buf, pos); - pos += buf.byteLength; + let s1 = null; + let s2 = null; + const timeoutId = setTimeout(() => { + s1 = setImmediate(() => { + if (process.platform === "win32") { + s2 = setImmediate(() => onConnectTimeout2()); + } else { + onConnectTimeout2(); } - resolve(dst.buffer); - } else if (type === "blob") { - resolve(new Blob(body, { type: stream[kContentType] })); - } - consumeFinish(consume2); - } catch (err) { - stream.destroy(err); - } - } - function consumePush(consume2, chunk) { - consume2.length += chunk.length; - consume2.body.push(chunk); + }); + }, timeout); + return () => { + clearTimeout(timeoutId); + clearImmediate(s1); + clearImmediate(s2); + }; } - function consumeFinish(consume2, err) { - if (consume2.body === null) { - return; - } - if (err) { - consume2.reject(err); - } else { - consume2.resolve(); + function onConnectTimeout(socket) { + let message = "Connect Timeout Error"; + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { + message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")})`; } - consume2.type = null; - consume2.stream = null; - consume2.resolve = null; - consume2.reject = null; - consume2.length = 0; - consume2.body = null; + util.destroy(socket, new ConnectTimeoutError(message)); } - module2.exports = { Readable: BodyReadable, chunksDecode }; + module2.exports = buildConnector; } }); -// node_modules/undici/lib/api/util.js -var require_util10 = __commonJS({ - "node_modules/undici/lib/api/util.js"(exports2, module2) { - var assert = require("node:assert"); - var { - ResponseStatusCodeError - } = require_errors2(); - var { chunksDecode } = require_readable2(); - var CHUNK_LIMIT = 128 * 1024; - async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body); - let chunks = []; - let length = 0; - try { - for await (const chunk of body) { - chunks.push(chunk); - length += chunk.length; - if (length > CHUNK_LIMIT) { - chunks = []; - length = 0; - break; +// node_modules/undici/lib/util/timers.js +var require_timers2 = __commonJS({ + "node_modules/undici/lib/util/timers.js"(exports2, module2) { + "use strict"; + var TICK_MS = 499; + var fastNow = Date.now(); + var fastNowTimeout; + var fastTimers = []; + function onTimeout() { + fastNow = Date.now(); + let len = fastTimers.length; + let idx = 0; + while (idx < len) { + const timer = fastTimers[idx]; + if (timer.state === 0) { + timer.state = fastNow + timer.delay - TICK_MS; + } else if (timer.state > 0 && fastNow >= timer.state) { + timer.state = -1; + timer.callback(timer.opaque); + } + if (timer.state === -1) { + timer.state = -2; + if (idx !== len - 1) { + fastTimers[idx] = fastTimers.pop(); + } else { + fastTimers.pop(); } + len -= 1; + } else { + idx += 1; } - } catch { - chunks = []; - length = 0; } - const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`; - if (statusCode === 204 || !contentType || !length) { - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))); - return; + if (fastTimers.length > 0) { + refreshTimeout(); } - const stackTraceLimit = Error.stackTraceLimit; - Error.stackTraceLimit = 0; - let payload; - try { - if (isContentTypeApplicationJson(contentType)) { - payload = JSON.parse(chunksDecode(chunks, length)); - } else if (isContentTypeText(contentType)) { - payload = chunksDecode(chunks, length); + } + function refreshTimeout() { + if (fastNowTimeout?.refresh) { + fastNowTimeout.refresh(); + } else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTimeout, TICK_MS); + if (fastNowTimeout.unref) { + fastNowTimeout.unref(); } - } catch { - } finally { - Error.stackTraceLimit = stackTraceLimit; } - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))); } - var isContentTypeApplicationJson = (contentType) => { - return contentType.length > 15 && contentType[11] === "/" && contentType[0] === "a" && contentType[1] === "p" && contentType[2] === "p" && contentType[3] === "l" && contentType[4] === "i" && contentType[5] === "c" && contentType[6] === "a" && contentType[7] === "t" && contentType[8] === "i" && contentType[9] === "o" && contentType[10] === "n" && contentType[12] === "j" && contentType[13] === "s" && contentType[14] === "o" && contentType[15] === "n"; - }; - var isContentTypeText = (contentType) => { - return contentType.length > 4 && contentType[4] === "/" && contentType[0] === "t" && contentType[1] === "e" && contentType[2] === "x" && contentType[3] === "t"; - }; - module2.exports = { - getResolveErrorBodyCallback, - isContentTypeApplicationJson, - isContentTypeText - }; - } -}); - -// node_modules/undici/lib/api/api-request.js -var require_api_request2 = __commonJS({ - "node_modules/undici/lib/api/api-request.js"(exports2, module2) { - "use strict"; - var assert = require("node:assert"); - var { Readable } = require_readable2(); - var { InvalidArgumentError, RequestAbortedError } = require_errors2(); - var util = require_util8(); - var { getResolveErrorBodyCallback } = require_util10(); - var { AsyncResource } = require("node:async_hooks"); - var RequestHandler = class extends AsyncResource { - constructor(opts, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; - try { - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) { - throw new InvalidArgumentError("invalid highWaterMark"); - } - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - if (method === "CONNECT") { - throw new InvalidArgumentError("invalid method"); - } - if (onInfo && typeof onInfo !== "function") { - throw new InvalidArgumentError("invalid onInfo callback"); - } - super("UNDICI_REQUEST"); - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on("error", util.nop), err); - } - throw err; - } - this.method = method; - this.responseHeaders = responseHeaders || null; - this.opaque = opaque || null; + var Timeout = class { + constructor(callback, delay, opaque) { this.callback = callback; - this.res = null; - this.abort = null; - this.body = body; - this.trailers = {}; - this.context = null; - this.onInfo = onInfo || null; - this.throwOnError = throwOnError; - this.highWaterMark = highWaterMark; - this.signal = signal; - this.reason = null; - this.removeAbortListener = null; - if (util.isStream(body)) { - body.on("error", (err) => { - this.onError(err); - }); - } - if (this.signal) { - if (this.signal.aborted) { - this.reason = this.signal.reason ?? new RequestAbortedError(); - } else { - this.removeAbortListener = util.addAbortListener(this.signal, () => { - this.reason = this.signal.reason ?? new RequestAbortedError(); - if (this.res) { - util.destroy(this.res, this.reason); - } else if (this.abort) { - this.abort(this.reason); - } - if (this.removeAbortListener) { - this.res?.off("close", this.removeAbortListener); - this.removeAbortListener(); - this.removeAbortListener = null; - } - }); - } - } - } - onConnect(abort, context) { - if (this.reason) { - abort(this.reason); - return; - } - assert(this.callback); - this.abort = abort; - this.context = context; + this.delay = delay; + this.opaque = opaque; + this.state = -2; + this.refresh(); } - onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; - const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }); - } - return; - } - const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; - const contentType = parsedHeaders["content-type"]; - const contentLength = parsedHeaders["content-length"]; - const res = new Readable({ - resume, - abort, - contentType, - contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, - highWaterMark - }); - if (this.removeAbortListener) { - res.on("close", this.removeAbortListener); - } - this.callback = null; - this.res = res; - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope( - getResolveErrorBodyCallback, - null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ); - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }); + refresh() { + if (this.state === -2) { + fastTimers.push(this); + if (!fastNowTimeout || fastTimers.length === 1) { + refreshTimeout(); } } + this.state = 0; } - onData(chunk) { - return this.res.push(chunk); - } - onComplete(trailers) { - util.parseHeaders(trailers, this.trailers); - this.res.push(null); - } - onError(err) { - const { res, callback, body, opaque } = this; - if (callback) { - this.callback = null; - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }); - }); - } - if (res) { - this.res = null; - queueMicrotask(() => { - util.destroy(res, err); - }); - } - if (body) { - this.body = null; - util.destroy(body, err); - } - if (this.removeAbortListener) { - res?.off("close", this.removeAbortListener); - this.removeAbortListener(); - this.removeAbortListener = null; - } + clear() { + this.state = -1; } }; - function request2(opts, callback) { - if (callback === void 0) { - return new Promise((resolve, reject) => { - request2.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); - }); - } - try { - this.dispatch(opts, new RequestHandler(opts, callback)); - } catch (err) { - if (typeof callback !== "function") { - throw err; + module2.exports = { + setTimeout(callback, delay, opaque) { + return delay <= 1e3 ? setTimeout(callback, delay, opaque) : new Timeout(callback, delay, opaque); + }, + clearTimeout(timeout) { + if (timeout instanceof Timeout) { + timeout.clear(); + } else { + clearTimeout(timeout); } - const opaque = opts?.opaque; - queueMicrotask(() => callback(err, { opaque })); } - } - module2.exports = request2; - module2.exports.RequestHandler = RequestHandler; + }; } }); -// node_modules/undici/lib/api/abort-signal.js -var require_abort_signal2 = __commonJS({ - "node_modules/undici/lib/api/abort-signal.js"(exports2, module2) { - var { addAbortListener } = require_util8(); - var { RequestAbortedError } = require_errors2(); - var kListener = Symbol("kListener"); - var kSignal = Symbol("kSignal"); - function abort(self) { +// node_modules/undici/lib/llhttp/utils.js +var require_utils3 = __commonJS({ + "node_modules/undici/lib/llhttp/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.enumToMap = void 0; + function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === "number") { + res[key] = value; + } + }); + return res; + } + exports2.enumToMap = enumToMap; + } +}); + +// node_modules/undici/lib/llhttp/constants.js +var require_constants7 = __commonJS({ + "node_modules/undici/lib/llhttp/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SPECIAL_HEADERS = exports2.HEADER_STATE = exports2.MINOR = exports2.MAJOR = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.STRICT_TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.STRICT_URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.FINISH = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; + var utils_1 = require_utils3(); + var ERROR; + (function(ERROR2) { + ERROR2[ERROR2["OK"] = 0] = "OK"; + ERROR2[ERROR2["INTERNAL"] = 1] = "INTERNAL"; + ERROR2[ERROR2["STRICT"] = 2] = "STRICT"; + ERROR2[ERROR2["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR2[ERROR2["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR2[ERROR2["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR2[ERROR2["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR2[ERROR2["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR2[ERROR2["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR2[ERROR2["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR2[ERROR2["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR2[ERROR2["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR2[ERROR2["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR2[ERROR2["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR2[ERROR2["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR2[ERROR2["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR2[ERROR2["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR2[ERROR2["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR2[ERROR2["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR2[ERROR2["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR2[ERROR2["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR2[ERROR2["PAUSED"] = 21] = "PAUSED"; + ERROR2[ERROR2["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR2[ERROR2["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR2[ERROR2["USER"] = 24] = "USER"; + })(ERROR = exports2.ERROR || (exports2.ERROR = {})); + var TYPE; + (function(TYPE2) { + TYPE2[TYPE2["BOTH"] = 0] = "BOTH"; + TYPE2[TYPE2["REQUEST"] = 1] = "REQUEST"; + TYPE2[TYPE2["RESPONSE"] = 2] = "RESPONSE"; + })(TYPE = exports2.TYPE || (exports2.TYPE = {})); + var FLAGS; + (function(FLAGS2) { + FLAGS2[FLAGS2["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS2[FLAGS2["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS2[FLAGS2["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS2[FLAGS2["CHUNKED"] = 8] = "CHUNKED"; + FLAGS2[FLAGS2["UPGRADE"] = 16] = "UPGRADE"; + FLAGS2[FLAGS2["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS2[FLAGS2["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS2[FLAGS2["TRAILING"] = 128] = "TRAILING"; + FLAGS2[FLAGS2["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; + })(FLAGS = exports2.FLAGS || (exports2.FLAGS = {})); + var LENIENT_FLAGS; + (function(LENIENT_FLAGS2) { + LENIENT_FLAGS2[LENIENT_FLAGS2["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS2[LENIENT_FLAGS2["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS2[LENIENT_FLAGS2["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; + })(LENIENT_FLAGS = exports2.LENIENT_FLAGS || (exports2.LENIENT_FLAGS = {})); + var METHODS; + (function(METHODS2) { + METHODS2[METHODS2["DELETE"] = 0] = "DELETE"; + METHODS2[METHODS2["GET"] = 1] = "GET"; + METHODS2[METHODS2["HEAD"] = 2] = "HEAD"; + METHODS2[METHODS2["POST"] = 3] = "POST"; + METHODS2[METHODS2["PUT"] = 4] = "PUT"; + METHODS2[METHODS2["CONNECT"] = 5] = "CONNECT"; + METHODS2[METHODS2["OPTIONS"] = 6] = "OPTIONS"; + METHODS2[METHODS2["TRACE"] = 7] = "TRACE"; + METHODS2[METHODS2["COPY"] = 8] = "COPY"; + METHODS2[METHODS2["LOCK"] = 9] = "LOCK"; + METHODS2[METHODS2["MKCOL"] = 10] = "MKCOL"; + METHODS2[METHODS2["MOVE"] = 11] = "MOVE"; + METHODS2[METHODS2["PROPFIND"] = 12] = "PROPFIND"; + METHODS2[METHODS2["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS2[METHODS2["SEARCH"] = 14] = "SEARCH"; + METHODS2[METHODS2["UNLOCK"] = 15] = "UNLOCK"; + METHODS2[METHODS2["BIND"] = 16] = "BIND"; + METHODS2[METHODS2["REBIND"] = 17] = "REBIND"; + METHODS2[METHODS2["UNBIND"] = 18] = "UNBIND"; + METHODS2[METHODS2["ACL"] = 19] = "ACL"; + METHODS2[METHODS2["REPORT"] = 20] = "REPORT"; + METHODS2[METHODS2["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS2[METHODS2["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS2[METHODS2["MERGE"] = 23] = "MERGE"; + METHODS2[METHODS2["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS2[METHODS2["NOTIFY"] = 25] = "NOTIFY"; + METHODS2[METHODS2["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS2[METHODS2["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + METHODS2[METHODS2["PATCH"] = 28] = "PATCH"; + METHODS2[METHODS2["PURGE"] = 29] = "PURGE"; + METHODS2[METHODS2["MKCALENDAR"] = 30] = "MKCALENDAR"; + METHODS2[METHODS2["LINK"] = 31] = "LINK"; + METHODS2[METHODS2["UNLINK"] = 32] = "UNLINK"; + METHODS2[METHODS2["SOURCE"] = 33] = "SOURCE"; + METHODS2[METHODS2["PRI"] = 34] = "PRI"; + METHODS2[METHODS2["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS2[METHODS2["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS2[METHODS2["SETUP"] = 37] = "SETUP"; + METHODS2[METHODS2["PLAY"] = 38] = "PLAY"; + METHODS2[METHODS2["PAUSE"] = 39] = "PAUSE"; + METHODS2[METHODS2["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS2[METHODS2["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS2[METHODS2["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS2[METHODS2["REDIRECT"] = 43] = "REDIRECT"; + METHODS2[METHODS2["RECORD"] = 44] = "RECORD"; + METHODS2[METHODS2["FLUSH"] = 45] = "FLUSH"; + })(METHODS = exports2.METHODS || (exports2.METHODS = {})); + exports2.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS["M-SEARCH"], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + // TODO(indutny): should we allow it with HTTP? + METHODS.SOURCE + ]; + exports2.METHODS_ICE = [ + METHODS.SOURCE + ]; + exports2.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + // For AirPlay + METHODS.GET, + METHODS.POST + ]; + exports2.METHOD_MAP = utils_1.enumToMap(METHODS); + exports2.H_METHOD_MAP = {}; + Object.keys(exports2.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) { + exports2.H_METHOD_MAP[key] = exports2.METHOD_MAP[key]; + } + }); + var FINISH; + (function(FINISH2) { + FINISH2[FINISH2["SAFE"] = 0] = "SAFE"; + FINISH2[FINISH2["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH2[FINISH2["UNSAFE"] = 2] = "UNSAFE"; + })(FINISH = exports2.FINISH || (exports2.FINISH = {})); + exports2.ALPHA = []; + for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { + exports2.ALPHA.push(String.fromCharCode(i)); + exports2.ALPHA.push(String.fromCharCode(i + 32)); + } + exports2.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + }; + exports2.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + a: 10, + b: 11, + c: 12, + d: 13, + e: 14, + f: 15 + }; + exports2.NUM = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ]; + exports2.ALPHANUM = exports2.ALPHA.concat(exports2.NUM); + exports2.MARK = ["-", "_", ".", "!", "~", "*", "'", "(", ")"]; + exports2.USERINFO_CHARS = exports2.ALPHANUM.concat(exports2.MARK).concat(["%", ";", ":", "&", "=", "+", "$", ","]); + exports2.STRICT_URL_CHAR = [ + "!", + '"', + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports2.ALPHANUM); + exports2.URL_CHAR = exports2.STRICT_URL_CHAR.concat([" ", "\f"]); + for (let i = 128; i <= 255; i++) { + exports2.URL_CHAR.push(i); + } + exports2.HEX = exports2.NUM.concat(["a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); + exports2.STRICT_TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports2.ALPHANUM); + exports2.TOKEN = exports2.STRICT_TOKEN.concat([" "]); + exports2.HEADER_CHARS = [" "]; + for (let i = 32; i <= 255; i++) { + if (i !== 127) { + exports2.HEADER_CHARS.push(i); + } + } + exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS.filter((c) => c !== 44); + exports2.MAJOR = exports2.NUM_MAP; + exports2.MINOR = exports2.MAJOR; + var HEADER_STATE; + (function(HEADER_STATE2) { + HEADER_STATE2[HEADER_STATE2["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE2[HEADER_STATE2["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE2[HEADER_STATE2["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE2[HEADER_STATE2["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE2[HEADER_STATE2["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE2[HEADER_STATE2["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE2[HEADER_STATE2["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; + })(HEADER_STATE = exports2.HEADER_STATE || (exports2.HEADER_STATE = {})); + exports2.SPECIAL_HEADERS = { + "connection": HEADER_STATE.CONNECTION, + "content-length": HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": HEADER_STATE.CONNECTION, + "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, + "upgrade": HEADER_STATE.UPGRADE + }; + } +}); + +// node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm2 = __commonJS({ + "node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports2, module2) { + "use strict"; + var { Buffer: Buffer2 } = require("node:buffer"); + module2.exports = Buffer2.from("AGFzbQEAAAABJwdgAX8Bf2ADf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cCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQ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QAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V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BjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEt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gxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgA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RQL0FEVFAv", "base64"); + } +}); + +// node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm2 = __commonJS({ + "node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports2, module2) { + "use strict"; + var { Buffer: Buffer2 } = require("node:buffer"); + module2.exports = Buffer2.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHR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BCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAk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QwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ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AEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==", "base64"); + } +}); + +// node_modules/undici/lib/web/fetch/constants.js +var require_constants8 = __commonJS({ + "node_modules/undici/lib/web/fetch/constants.js"(exports2, module2) { + "use strict"; + var corsSafeListedMethods = ["GET", "HEAD", "POST"]; + var corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + var nullBodyStatus = [101, 204, 205, 304]; + var redirectStatus = [301, 302, 303, 307, 308]; + var redirectStatusSet = new Set(redirectStatus); + var badPorts = [ + "1", + "7", + "9", + "11", + "13", + "15", + "17", + "19", + "20", + "21", + "22", + "23", + "25", + "37", + "42", + "43", + "53", + "69", + "77", + "79", + "87", + "95", + "101", + "102", + "103", + "104", + "109", + "110", + "111", + "113", + "115", + "117", + "119", + "123", + "135", + "137", + "139", + "143", + "161", + "179", + "389", + "427", + "465", + "512", + "513", + "514", + "515", + "526", + "530", + "531", + "532", + "540", + "548", + "554", + "556", + "563", + "587", + "601", + "636", + "989", + "990", + "993", + "995", + "1719", + "1720", + "1723", + "2049", + "3659", + "4045", + "4190", + "5060", + "5061", + "6000", + "6566", + "6665", + "6666", + "6667", + "6668", + "6669", + "6679", + "6697", + "10080" + ]; + var badPortsSet = new Set(badPorts); + var referrerPolicy = [ + "", + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ]; + var referrerPolicySet = new Set(referrerPolicy); + var requestRedirect = ["follow", "manual", "error"]; + var safeMethods = ["GET", "HEAD", "OPTIONS", "TRACE"]; + var safeMethodsSet = new Set(safeMethods); + var requestMode = ["navigate", "same-origin", "no-cors", "cors"]; + var requestCredentials = ["omit", "same-origin", "include"]; + var requestCache = [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ]; + var requestBodyHeader = [ + "content-encoding", + "content-language", + "content-location", + "content-type", + // See https://github.com/nodejs/undici/issues/2021 + // 'Content-Length' is a forbidden header name, which is typically + // removed in the Headers implementation. However, undici doesn't + // filter out headers, so we add it here. + "content-length" + ]; + var requestDuplex = [ + "half" + ]; + var forbiddenMethods = ["CONNECT", "TRACE", "TRACK"]; + var forbiddenMethodsSet = new Set(forbiddenMethods); + var subresource = [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ]; + var subresourceSet = new Set(subresource); + module2.exports = { + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet + }; + } +}); + +// node_modules/undici/lib/web/fetch/global.js +var require_global3 = __commonJS({ + "node_modules/undici/lib/web/fetch/global.js"(exports2, module2) { + "use strict"; + var globalOrigin = Symbol.for("undici.globalOrigin.1"); + function getGlobalOrigin() { + return globalThis[globalOrigin]; + } + function setGlobalOrigin(newOrigin) { + if (newOrigin === void 0) { + Object.defineProperty(globalThis, globalOrigin, { + value: void 0, + writable: true, + enumerable: false, + configurable: false + }); + return; + } + const parsedURL = new URL(newOrigin); + if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") { + throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + } + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }); + } + module2.exports = { + getGlobalOrigin, + setGlobalOrigin + }; + } +}); + +// node_modules/undici/lib/web/fetch/data-url.js +var require_data_url = __commonJS({ + "node_modules/undici/lib/web/fetch/data-url.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var encoder = new TextEncoder(); + var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; + var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; + var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; + var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; + function dataURLProcessor(dataURL) { + assert(dataURL.protocol === "data:"); + let input = URLSerializer(dataURL, true); + input = input.slice(5); + const position = { position: 0 }; + let mimeType = collectASequenceOfCodePointsFast( + ",", + input, + position + ); + const mimeTypeLength = mimeType.length; + mimeType = removeASCIIWhitespace(mimeType, true, true); + if (position.position >= input.length) { + return "failure"; + } + position.position++; + const encodedBody = input.slice(mimeTypeLength + 1); + let body = stringPercentDecode(encodedBody); + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + const stringBody = isomorphicDecode(body); + body = forgivingBase64(stringBody); + if (body === "failure") { + return "failure"; + } + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020)+$/, ""); + mimeType = mimeType.slice(0, -1); + } + if (mimeType.startsWith(";")) { + mimeType = "text/plain" + mimeType; + } + let mimeTypeRecord = parseMIMEType(mimeType); + if (mimeTypeRecord === "failure") { + mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); + } + return { mimeType: mimeTypeRecord, body }; + } + function URLSerializer(url, excludeFragment = false) { + if (!excludeFragment) { + return url.href; + } + const href = url.href; + const hashLength = url.hash.length; + const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); + if (!hashLength && href.endsWith("#")) { + return serialized.slice(0, -1); + } + return serialized; + } + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; + } + function collectASequenceOfCodePointsFast(char, input, position) { + const idx = input.indexOf(char, position.position); + const start = position.position; + if (idx === -1) { + position.position = input.length; + return input.slice(start); + } + position.position = idx; + return input.slice(start, position.position); + } + function stringPercentDecode(input) { + const bytes = encoder.encode(input); + return percentDecode(bytes); + } + function isHexCharByte(byte) { + return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; + } + function hexByteToNumber(byte) { + return ( + // 0-9 + byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55 + ); + } + function percentDecode(input) { + const length = input.length; + const output = new Uint8Array(length); + let j = 0; + for (let i = 0; i < length; ++i) { + const byte = input[i]; + if (byte !== 37) { + output[j++] = byte; + } else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) { + output[j++] = 37; + } else { + output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); + i += 2; + } + } + return length === j ? output : output.subarray(0, j); + } + function parseMIMEType(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type = collectASequenceOfCodePointsFast( + "/", + input, + position + ); + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { + return "failure"; + } + if (position.position > input.length) { + return "failure"; + } + position.position++; + let subtype = collectASequenceOfCodePointsFast( + ";", + input, + position + ); + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { + return "failure"; + } + const typeLowercase = type.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: /* @__PURE__ */ new Map(), + // https://mimesniff.spec.whatwg.org/#mime-type-essence + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints( + // https://fetch.spec.whatwg.org/#http-whitespace + (char) => HTTP_WHITESPACE_REGEX.test(char), + input, + position + ); + let parameterName = collectASequenceOfCodePoints( + (char) => char !== ";" && char !== "=", + input, + position + ); + parameterName = parameterName.toLowerCase(); + if (position.position < input.length) { + if (input[position.position] === ";") { + continue; + } + position.position++; + } + if (position.position > input.length) { + break; + } + let parameterValue = null; + if (input[position.position] === '"') { + parameterValue = collectAnHTTPQuotedString(input, position, true); + collectASequenceOfCodePointsFast( + ";", + input, + position + ); + } else { + parameterValue = collectASequenceOfCodePointsFast( + ";", + input, + position + ); + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) { + continue; + } + } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) { + mimeType.parameters.set(parameterName, parameterValue); + } + } + return mimeType; + } + function forgivingBase64(data) { + data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); + let dataLength = data.length; + if (dataLength % 4 === 0) { + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + } + } + } + if (dataLength % 4 === 1) { + return "failure"; + } + if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { + return "failure"; + } + const buffer = Buffer.from(data, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + function collectAnHTTPQuotedString(input, position, extractValue) { + const positionStart = position.position; + let value = ""; + assert(input[position.position] === '"'); + position.position++; + while (true) { + value += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== "\\", + input, + position + ); + if (position.position >= input.length) { + break; + } + const quoteOrBackslash = input[position.position]; + position.position++; + if (quoteOrBackslash === "\\") { + if (position.position >= input.length) { + value += "\\"; + break; + } + value += input[position.position]; + position.position++; + } else { + assert(quoteOrBackslash === '"'); + break; + } + } + if (extractValue) { + return value; + } + return input.slice(positionStart, position.position); + } + function serializeAMimeType(mimeType) { + assert(mimeType !== "failure"); + const { parameters, essence } = mimeType; + let serialization = essence; + for (let [name, value] of parameters.entries()) { + serialization += ";"; + serialization += name; + serialization += "="; + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + value = value.replace(/(\\|")/g, "\\$1"); + value = '"' + value; + value += '"'; + } + serialization += value; + } + return serialization; + } + function isHTTPWhiteSpace(char) { + return char === 13 || char === 10 || char === 9 || char === 32; + } + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); + } + function isASCIIWhitespace(char) { + return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; + } + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); + } + function removeChars(str, leading, trailing, predicate) { + let lead = 0; + let trail = str.length - 1; + if (leading) { + while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + } + if (trailing) { + while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; + } + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); + } + function isomorphicDecode(input) { + const length = input.length; + if ((2 << 15) - 1 > length) { + return String.fromCharCode.apply(null, input); + } + let result = ""; + let i = 0; + let addition = (2 << 15) - 1; + while (i < length) { + if (i + addition > length) { + addition = length - i; + } + result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); + } + return result; + } + function minimizeSupportedMimeType(mimeType) { + switch (mimeType.essence) { + case "application/ecmascript": + case "application/javascript": + case "application/x-ecmascript": + case "application/x-javascript": + case "text/ecmascript": + case "text/javascript": + case "text/javascript1.0": + case "text/javascript1.1": + case "text/javascript1.2": + case "text/javascript1.3": + case "text/javascript1.4": + case "text/javascript1.5": + case "text/jscript": + case "text/livescript": + case "text/x-ecmascript": + case "text/x-javascript": + return "text/javascript"; + case "application/json": + case "text/json": + return "application/json"; + case "image/svg+xml": + return "image/svg+xml"; + case "text/xml": + case "application/xml": + return "application/xml"; + } + if (mimeType.subtype.endsWith("+json")) { + return "application/json"; + } + if (mimeType.subtype.endsWith("+xml")) { + return "application/xml"; + } + return ""; + } + module2.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType, + removeChars, + removeHTTPWhitespace, + minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS, + isomorphicDecode + }; + } +}); + +// node_modules/undici/lib/web/fetch/webidl.js +var require_webidl2 = __commonJS({ + "node_modules/undici/lib/web/fetch/webidl.js"(exports2, module2) { + "use strict"; + var { types, inspect } = require("node:util"); + var { toUSVString } = require_util9(); + var webidl = {}; + webidl.converters = {}; + webidl.util = {}; + webidl.errors = {}; + webidl.errors.exception = function(message) { + return new TypeError(`${message.header}: ${message.message}`); + }; + webidl.errors.conversionFailed = function(context) { + const plural = context.types.length === 1 ? "" : " one of"; + const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; + return webidl.errors.exception({ + header: context.prefix, + message + }); + }; + webidl.errors.invalidArgument = function(context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); + }; + webidl.brandCheck = function(V, I, opts) { + if (opts?.strict !== false) { + if (!(V instanceof I)) { + const err = new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + } else { + if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { + const err = new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + } + }; + webidl.argumentLengthCheck = function({ length }, min, ctx) { + if (length < min) { + throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + header: ctx + }); + } + }; + webidl.illegalConstructor = function() { + throw webidl.errors.exception({ + header: "TypeError", + message: "Illegal constructor" + }); + }; + webidl.util.Type = function(V) { + switch (typeof V) { + case "undefined": + return "Undefined"; + case "boolean": + return "Boolean"; + case "string": + return "String"; + case "symbol": + return "Symbol"; + case "number": + return "Number"; + case "bigint": + return "BigInt"; + case "function": + case "object": { + if (V === null) { + return "Null"; + } + return "Object"; + } + } + }; + webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { + let upperBound; + let lowerBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + if (signedness === "unsigned") { + lowerBound = 0; + } else { + lowerBound = Math.pow(-2, 53) + 1; + } + } else if (signedness === "unsigned") { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = Math.pow(-2, bitLength) - 1; + upperBound = Math.pow(2, bitLength - 1) - 1; + } + let x = Number(V); + if (x === 0) { + x = 0; + } + if (opts?.enforceRange === true) { + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { + throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` + }); + } + x = webidl.util.IntegerPart(x); + if (x < lowerBound || x > upperBound) { + throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); + } + return x; + } + if (!Number.isNaN(x) && opts?.clamp === true) { + x = Math.min(Math.max(x, lowerBound), upperBound); + if (Math.floor(x) % 2 === 0) { + x = Math.floor(x); + } else { + x = Math.ceil(x); + } + return x; + } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { + return 0; + } + x = webidl.util.IntegerPart(x); + x = x % Math.pow(2, bitLength); + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) { + return x - Math.pow(2, bitLength); + } + return x; + }; + webidl.util.IntegerPart = function(n) { + const r = Math.floor(Math.abs(n)); + if (n < 0) { + return -1 * r; + } + return r; + }; + webidl.util.Stringify = function(V) { + const type = webidl.util.Type(V); + switch (type) { + case "Symbol": + return `Symbol(${V.description})`; + case "Object": + return inspect(V); + case "String": + return `"${V}"`; + default: + return `${V}`; + } + }; + webidl.sequenceConverter = function(converter) { + return (V, prefix, argument, Iterable) => { + if (webidl.util.Type(V) !== "Object") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` + }); + } + const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); + const seq = []; + let index = 0; + if (method === void 0 || typeof method.next !== "function") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); + } + while (true) { + const { done, value } = method.next(); + if (done) { + break; + } + seq.push(converter(value, prefix, `${argument}[${index++}]`)); + } + return seq; + }; + }; + webidl.recordConverter = function(keyConverter, valueConverter) { + return (O, prefix, argument) => { + if (webidl.util.Type(O) !== "Object") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` + }); + } + const result = {}; + if (!types.isProxy(O)) { + const keys2 = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; + for (const key of keys2) { + const typedKey = keyConverter(key, prefix, argument); + const typedValue = valueConverter(O[key], prefix, argument); + result[typedKey] = typedValue; + } + return result; + } + const keys = Reflect.ownKeys(O); + for (const key of keys) { + const desc = Reflect.getOwnPropertyDescriptor(O, key); + if (desc?.enumerable) { + const typedKey = keyConverter(key, prefix, argument); + const typedValue = valueConverter(O[key], prefix, argument); + result[typedKey] = typedValue; + } + } + return result; + }; + }; + webidl.interfaceConverter = function(i) { + return (V, prefix, argument, opts) => { + if (opts?.strict !== false && !(V instanceof i)) { + throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` + }); + } + return V; + }; + }; + webidl.dictionaryConverter = function(converters) { + return (dictionary, prefix, argument) => { + const type = webidl.util.Type(dictionary); + const dict = {}; + if (type === "Null" || type === "Undefined") { + return dict; + } else if (type !== "Object") { + throw webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + } + for (const options of converters) { + const { key, defaultValue, required, converter } = options; + if (required === true) { + if (!Object.hasOwn(dictionary, key)) { + throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); + } + } + let value = dictionary[key]; + const hasDefault = Object.hasOwn(options, "defaultValue"); + if (hasDefault && value !== null) { + value ??= defaultValue(); + } + if (required || hasDefault || value !== void 0) { + value = converter(value, prefix, `${argument}.${key}`); + if (options.allowedValues && !options.allowedValues.includes(value)) { + throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` + }); + } + dict[key] = value; + } + } + return dict; + }; + }; + webidl.nullableConverter = function(converter) { + return (V, prefix, argument) => { + if (V === null) { + return V; + } + return converter(V, prefix, argument); + }; + }; + webidl.converters.DOMString = function(V, prefix, argument, opts) { + if (V === null && opts?.legacyNullToEmptyString) { + return ""; + } + if (typeof V === "symbol") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); + } + return String(V); + }; + webidl.converters.ByteString = function(V, prefix, argument) { + const x = webidl.converters.DOMString(V, prefix, argument); + for (let index = 0; index < x.length; index++) { + if (x.charCodeAt(index) > 255) { + throw new TypeError( + `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` + ); + } + } + return x; + }; + webidl.converters.USVString = toUSVString; + webidl.converters.boolean = function(V) { + const x = Boolean(V); + return x; + }; + webidl.converters.any = function(V) { + return V; + }; + webidl.converters["long long"] = function(V, prefix, argument) { + const x = webidl.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); + return x; + }; + webidl.converters["unsigned long long"] = function(V, prefix, argument) { + const x = webidl.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); + return x; + }; + webidl.converters["unsigned long"] = function(V, prefix, argument) { + const x = webidl.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); + return x; + }; + webidl.converters["unsigned short"] = function(V, prefix, argument, opts) { + const x = webidl.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); + return x; + }; + webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { + if (webidl.util.Type(V) !== "Object" || !types.isAnyArrayBuffer(V)) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["ArrayBuffer"] + }); + } + if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + if (V.resizable || V.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + } + return V; + }; + webidl.converters.TypedArray = function(V, T, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types.isTypedArray(V) || V.constructor.name !== T.name) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: [T.name] + }); + } + if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + if (V.buffer.resizable || V.buffer.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + } + return V; + }; + webidl.converters.DataView = function(V, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types.isDataView(V)) { + throw webidl.errors.exception({ + header: prefix, + message: `${name} is not a DataView.` + }); + } + if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + if (V.buffer.resizable || V.buffer.growable) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + } + return V; + }; + webidl.converters.BufferSource = function(V, prefix, name, opts) { + if (types.isAnyArrayBuffer(V)) { + return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }); + } + if (types.isTypedArray(V)) { + return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }); + } + if (types.isDataView(V)) { + return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }); + } + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: ["BufferSource"] + }); + }; + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.ByteString + ); + webidl.converters["sequence>"] = webidl.sequenceConverter( + webidl.converters["sequence"] + ); + webidl.converters["record"] = webidl.recordConverter( + webidl.converters.ByteString, + webidl.converters.ByteString + ); + module2.exports = { + webidl + }; + } +}); + +// node_modules/undici/lib/web/fetch/util.js +var require_util10 = __commonJS({ + "node_modules/undici/lib/web/fetch/util.js"(exports2, module2) { + "use strict"; + var { Transform } = require("node:stream"); + var zlib = require("node:zlib"); + var { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants8(); + var { getGlobalOrigin } = require_global3(); + var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); + var { performance: performance2 } = require("node:perf_hooks"); + var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util9(); + var assert = require("node:assert"); + var { isUint8Array } = require("node:util/types"); + var { webidl } = require_webidl2(); + var supportedHashes = []; + var crypto8; + try { + crypto8 = require("node:crypto"); + const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; + supportedHashes = crypto8.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + } catch { + } + function responseURL(response) { + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); + } + function responseLocationURL(response, requestFragment) { + if (!redirectStatusSet.has(response.status)) { + return null; + } + let location = response.headersList.get("location", true); + if (location !== null && isValidHeaderValue(location)) { + if (!isValidEncodedURL(location)) { + location = normalizeBinaryStringToUtf8(location); + } + location = new URL(location, responseURL(response)); + } + if (location && !location.hash) { + location.hash = requestFragment; + } + return location; + } + function isValidEncodedURL(url) { + for (let i = 0; i < url.length; ++i) { + const code = url.charCodeAt(i); + if (code > 126 || // Non-US-ASCII + DEL + code < 32) { + return false; + } + } + return true; + } + function normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, "binary").toString("utf8"); + } + function requestCurrentURL(request2) { + return request2.urlList[request2.urlList.length - 1]; + } + function requestBadPort(request2) { + const url = requestCurrentURL(request2); + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + return "blocked"; + } + return "allowed"; + } + function isErrorLike(object) { + return object instanceof Error || (object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"); + } + function isValidReasonPhrase(statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i); + if (!(c === 9 || // HTAB + c >= 32 && c <= 126 || // SP / VCHAR + c >= 128 && c <= 255)) { + return false; + } + } + return true; + } + var isValidHeaderName = isValidHTTPToken; + function isValidHeaderValue(potentialValue) { + return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; + } + function setRequestReferrerPolicyOnRedirect(request2, actualResponse) { + const { headersList } = actualResponse; + const policyHeader = (headersList.get("referrer-policy", true) ?? "").split(","); + let policy = ""; + if (policyHeader.length > 0) { + for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + } + if (policy !== "") { + request2.referrerPolicy = policy; + } + } + function crossOriginResourcePolicyCheck() { + return "allowed"; + } + function corsCheck() { + return "success"; + } + function TAOCheck() { + return "success"; + } + function appendFetchMetadata(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header, true); + } + function appendRequestOriginHeader(request2) { + let serializedOrigin = request2.origin; + if (serializedOrigin === "client" || serializedOrigin === void 0) { + return; + } + if (request2.responseTainting === "cors" || request2.mode === "websocket") { + request2.headersList.append("origin", serializedOrigin, true); + } else if (request2.method !== "GET" && request2.method !== "HEAD") { + switch (request2.referrerPolicy) { + case "no-referrer": + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + if (request2.origin && urlHasHttpsScheme(request2.origin) && !urlHasHttpsScheme(requestCurrentURL(request2))) { + serializedOrigin = null; + } + break; + case "same-origin": + if (!sameOrigin(request2, requestCurrentURL(request2))) { + serializedOrigin = null; + } + break; + default: + } + request2.headersList.append("origin", serializedOrigin, true); + } + } + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; + } + function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { + if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { + return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol + }; + } + return { + domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), + domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), + connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), + connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), + secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), + ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol + }; + } + function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return coarsenTime(performance2.now(), crossOriginIsolatedCapability); + } + function createOpaqueTimingInfo(timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null + }; + } + function makePolicyContainer() { + return { + referrerPolicy: "strict-origin-when-cross-origin" + }; + } + function clonePolicyContainer(policyContainer) { + return { + referrerPolicy: policyContainer.referrerPolicy + }; + } + function determineRequestsReferrer(request2) { + const policy = request2.referrerPolicy; + assert(policy); + let referrerSource = null; + if (request2.referrer === "client") { + const globalOrigin = getGlobalOrigin(); + if (!globalOrigin || globalOrigin.origin === "null") { + return "no-referrer"; + } + referrerSource = new URL(globalOrigin); + } else if (request2.referrer instanceof URL) { + referrerSource = request2.referrer; + } + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) { + referrerURL = referrerOrigin; + } + const areSameOrigin = sameOrigin(request2, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request2.url); + switch (policy) { + case "origin": + return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); + case "unsafe-url": + return referrerURL; + case "same-origin": + return areSameOrigin ? referrerOrigin : "no-referrer"; + case "origin-when-cross-origin": + return areSameOrigin ? referrerURL : referrerOrigin; + case "strict-origin-when-cross-origin": { + const currentURL = requestCurrentURL(request2); + if (sameOrigin(referrerURL, currentURL)) { + return referrerURL; + } + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return "no-referrer"; + } + return referrerOrigin; + } + case "strict-origin": + case "no-referrer-when-downgrade": + default: + return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; + } + } + function stripURLForReferrer(url, originOnly) { + assert(url instanceof URL); + url = new URL(url); + if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { + return "no-referrer"; + } + url.username = ""; + url.password = ""; + url.hash = ""; + if (originOnly) { + url.pathname = ""; + url.search = ""; + } + return url; + } + function isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) { + return false; + } + if (url.href === "about:blank" || url.href === "about:srcdoc") { + return true; + } + if (url.protocol === "data:") return true; + if (url.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url.origin); + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") return false; + const originAsURL = new URL(origin); + if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") { + return true; + } + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || (originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.")) || originAsURL.hostname.endsWith(".localhost")) { + return true; + } + return false; + } + } + function bytesMatch(bytes, metadataList) { + if (crypto8 === void 0) { + return true; + } + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata === "no metadata") { + return true; + } + if (parsedMetadata.length === 0) { + return true; + } + const strongest = getStrongestMetadata(parsedMetadata); + const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest); + for (const item of metadata) { + const algorithm = item.algo; + const expectedValue = item.hash; + let actualValue = crypto8.createHash(algorithm).update(bytes).digest("base64"); + if (actualValue[actualValue.length - 1] === "=") { + if (actualValue[actualValue.length - 2] === "=") { + actualValue = actualValue.slice(0, -2); + } else { + actualValue = actualValue.slice(0, -1); + } + } + if (compareBase64Mixed(actualValue, expectedValue)) { + return true; + } + } + return false; + } + var parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; + function parseMetadata(metadata) { + const result = []; + let empty = true; + for (const token of metadata.split(" ")) { + empty = false; + const parsedToken = parseHashWithOptions.exec(token); + if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) { + continue; + } + const algorithm = parsedToken.groups.algo.toLowerCase(); + if (supportedHashes.includes(algorithm)) { + result.push(parsedToken.groups); + } + } + if (empty === true) { + return "no metadata"; + } + return result; + } + function getStrongestMetadata(metadataList) { + let algorithm = metadataList[0].algo; + if (algorithm[3] === "5") { + return algorithm; + } + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i]; + if (metadata.algo[3] === "5") { + algorithm = "sha512"; + break; + } else if (algorithm[3] === "3") { + continue; + } else if (metadata.algo[3] === "3") { + algorithm = "sha384"; + } + } + return algorithm; + } + function filterMetadataListByAlgorithm(metadataList, algorithm) { + if (metadataList.length === 1) { + return metadataList; + } + let pos = 0; + for (let i = 0; i < metadataList.length; ++i) { + if (metadataList[i].algo === algorithm) { + metadataList[pos++] = metadataList[i]; + } + } + metadataList.length = pos; + return metadataList; + } + function compareBase64Mixed(actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) { + return false; + } + for (let i = 0; i < actualValue.length; ++i) { + if (actualValue[i] !== expectedValue[i]) { + if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") { + continue; + } + return false; + } + } + return true; + } + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request2) { + } + function sameOrigin(A, B) { + if (A.origin === B.origin && A.origin === "null") { + return true; + } + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { + return true; + } + return false; + } + function createDeferredPromise() { + let res; + let rej; + const promise = new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }); + return { promise, resolve: res, reject: rej }; + } + function isAborted(fetchParams) { + return fetchParams.controller.state === "aborted"; + } + function isCancelled(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + function normalizeMethod(method) { + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; + } + function serializeJavascriptValueToJSONString(value) { + const result = JSON.stringify(value); + if (result === void 0) { + throw new TypeError("Value is not JSON serializable"); + } + assert(typeof result === "string"); + return result; + } + var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + function createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { + class FastIterableIterator { + /** @type {any} */ + #target; + /** @type {'key' | 'value' | 'key+value'} */ + #kind; + /** @type {number} */ + #index; + /** + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + */ + constructor(target, kind) { + this.#target = target; + this.#kind = kind; + this.#index = 0; + } + next() { + if (typeof this !== "object" || this === null || !(#target in this)) { + throw new TypeError( + `'next' called on an object that does not implement interface ${name} Iterator.` + ); + } + const index = this.#index; + const values = this.#target[kInternalIterator]; + const len = values.length; + if (index >= len) { + return { + value: void 0, + done: true + }; + } + const { [keyIndex]: key, [valueIndex]: value } = values[index]; + this.#index = index + 1; + let result; + switch (this.#kind) { + case "key": + result = key; + break; + case "value": + result = value; + break; + case "key+value": + result = [key, value]; + break; + } + return { + value: result, + done: false + }; + } + } + delete FastIterableIterator.prototype.constructor; + Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); + Object.defineProperties(FastIterableIterator.prototype, { + [Symbol.toStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: `${name} Iterator` + }, + next: { writable: true, enumerable: true, configurable: true } + }); + return function(target, kind) { + return new FastIterableIterator(target, kind); + }; + } + function iteratorMixin(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { + const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); + const properties = { + keys: { + writable: true, + enumerable: true, + configurable: true, + value: function keys() { + webidl.brandCheck(this, object); + return makeIterator(this, "key"); + } + }, + values: { + writable: true, + enumerable: true, + configurable: true, + value: function values() { + webidl.brandCheck(this, object); + return makeIterator(this, "value"); + } + }, + entries: { + writable: true, + enumerable: true, + configurable: true, + value: function entries() { + webidl.brandCheck(this, object); + return makeIterator(this, "key+value"); + } + }, + forEach: { + writable: true, + enumerable: true, + configurable: true, + value: function forEach(callbackfn, thisArg = globalThis) { + webidl.brandCheck(this, object); + webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); + if (typeof callbackfn !== "function") { + throw new TypeError( + `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.` + ); + } + for (const { 0: key, 1: value } of makeIterator(this, "key+value")) { + callbackfn.call(thisArg, value, key, this); + } + } + } + }; + return Object.defineProperties(object.prototype, { + ...properties, + [Symbol.iterator]: { + writable: true, + enumerable: false, + configurable: true, + value: properties.entries.value + } + }); + } + async function fullyReadBody(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + let reader; + try { + reader = body.stream.getReader(); + } catch (e) { + errorSteps(e); + return; + } + try { + successSteps(await readAllBytes(reader)); + } catch (e) { + errorSteps(e); + } + } + function isReadableStreamLike(stream) { + return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; + } + function readableStreamClose(controller) { + try { + controller.close(); + controller.byobRequest?.respond(0); + } catch (err) { + if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) { + throw err; + } + } + } + var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; + function isomorphicEncode(input) { + assert(!invalidIsomorphicEncodeValueRegex.test(input)); + return input; + } + async function readAllBytes(reader) { + const bytes = []; + let byteLength = 0; + while (true) { + const { done, value: chunk } = await reader.read(); + if (done) { + return Buffer.concat(bytes, byteLength); + } + if (!isUint8Array(chunk)) { + throw new TypeError("Received non-Uint8Array chunk"); + } + bytes.push(chunk); + byteLength += chunk.length; + } + } + function urlIsLocal(url) { + assert("protocol" in url); + const protocol = url.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + function urlHasHttpsScheme(url) { + return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; + } + function urlIsHttpHttpsScheme(url) { + assert("protocol" in url); + const protocol = url.protocol; + return protocol === "http:" || protocol === "https:"; + } + function simpleRangeHeaderValue(value, allowWhitespace) { + const data = value; + if (!data.startsWith("bytes")) { + return "failure"; + } + const position = { position: 5 }; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + if (data.charCodeAt(position.position) !== 61) { + return "failure"; + } + position.position++; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + const rangeStart = collectASequenceOfCodePoints( + (char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, + data, + position + ); + const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + if (data.charCodeAt(position.position) !== 45) { + return "failure"; + } + position.position++; + if (allowWhitespace) { + collectASequenceOfCodePoints( + (char) => char === " " || char === " ", + data, + position + ); + } + const rangeEnd = collectASequenceOfCodePoints( + (char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, + data, + position + ); + const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; + if (position.position < data.length) { + return "failure"; + } + if (rangeEndValue === null && rangeStartValue === null) { + return "failure"; + } + if (rangeStartValue > rangeEndValue) { + return "failure"; + } + return { rangeStartValue, rangeEndValue }; + } + function buildContentRange(rangeStart, rangeEnd, fullLength) { + let contentRange = "bytes "; + contentRange += isomorphicEncode(`${rangeStart}`); + contentRange += "-"; + contentRange += isomorphicEncode(`${rangeEnd}`); + contentRange += "/"; + contentRange += isomorphicEncode(`${fullLength}`); + return contentRange; + } + var InflateStream = class extends Transform { + _transform(chunk, encoding, callback) { + if (!this._inflateStream) { + if (chunk.length === 0) { + callback(); + return; + } + this._inflateStream = (chunk[0] & 15) === 8 ? zlib.createInflate() : zlib.createInflateRaw(); + this._inflateStream.on("data", this.push.bind(this)); + this._inflateStream.on("end", () => this.push(null)); + this._inflateStream.on("error", (err) => this.destroy(err)); + } + this._inflateStream.write(chunk, encoding, callback); + } + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; + } + callback(); + } + }; + function createInflate() { + return new InflateStream(); + } + function extractMimeType(headers) { + let charset = null; + let essence = null; + let mimeType = null; + const values = getDecodeSplit("content-type", headers); + if (values === null) { + return "failure"; + } + for (const value of values) { + const temporaryMimeType = parseMIMEType(value); + if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") { + continue; + } + mimeType = temporaryMimeType; + if (mimeType.essence !== essence) { + charset = null; + if (mimeType.parameters.has("charset")) { + charset = mimeType.parameters.get("charset"); + } + essence = mimeType.essence; + } else if (!mimeType.parameters.has("charset") && charset !== null) { + mimeType.parameters.set("charset", charset); + } + } + if (mimeType == null) { + return "failure"; + } + return mimeType; + } + function gettingDecodingSplitting(value) { + const input = value; + const position = { position: 0 }; + const values = []; + let temporaryValue = ""; + while (position.position < input.length) { + temporaryValue += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== ",", + input, + position + ); + if (position.position < input.length) { + if (input.charCodeAt(position.position) === 34) { + temporaryValue += collectAnHTTPQuotedString( + input, + position + ); + if (position.position < input.length) { + continue; + } + } else { + assert(input.charCodeAt(position.position) === 44); + position.position++; + } + } + temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); + values.push(temporaryValue); + temporaryValue = ""; + } + return values; + } + function getDecodeSplit(name, list) { + const value = list.get(name, true); + if (value === null) { + return null; + } + return gettingDecodingSplitting(value); + } + var textDecoder = new TextDecoder(); + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) { + return ""; + } + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { + buffer = buffer.subarray(3); + } + const output = textDecoder.decode(buffer); + return output; + } + var EnvironmentSettingsObjectBase = class { + get baseUrl() { + return getGlobalOrigin(); + } + get origin() { + return this.baseUrl?.origin; + } + policyContainer = makePolicyContainer(); + }; + var EnvironmentSettingsObject = class { + settingsObject = new EnvironmentSettingsObjectBase(); + }; + var environmentSettingsObject = new EnvironmentSettingsObject(); + module2.exports = { + isAborted, + isCancelled, + isValidEncodedURL, + createDeferredPromise, + ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + iteratorMixin, + createIterator, + isValidHeaderName, + isValidHeaderValue, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + simpleRangeHeaderValue, + buildContentRange, + parseMetadata, + createInflate, + extractMimeType, + getDecodeSplit, + utf8DecodeBytes, + environmentSettingsObject + }; + } +}); + +// node_modules/undici/lib/web/fetch/symbols.js +var require_symbols7 = __commonJS({ + "node_modules/undici/lib/web/fetch/symbols.js"(exports2, module2) { + "use strict"; + module2.exports = { + kUrl: Symbol("url"), + kHeaders: Symbol("headers"), + kSignal: Symbol("signal"), + kState: Symbol("state"), + kDispatcher: Symbol("dispatcher") + }; + } +}); + +// node_modules/undici/lib/web/fetch/file.js +var require_file2 = __commonJS({ + "node_modules/undici/lib/web/fetch/file.js"(exports2, module2) { + "use strict"; + var { Blob: Blob2, File } = require("node:buffer"); + var { kState } = require_symbols7(); + var { webidl } = require_webidl2(); + var FileLike = class _FileLike { + constructor(blobLike, fileName, options = {}) { + const n = fileName; + const t = options.type; + const d = options.lastModified ?? Date.now(); + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + }; + } + stream(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.stream(...args); + } + arrayBuffer(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.arrayBuffer(...args); + } + slice(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.slice(...args); + } + text(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.text(...args); + } + get size() { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.size; + } + get type() { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.type; + } + get name() { + webidl.brandCheck(this, _FileLike); + return this[kState].name; + } + get lastModified() { + webidl.brandCheck(this, _FileLike); + return this[kState].lastModified; + } + get [Symbol.toStringTag]() { + return "File"; + } + }; + webidl.converters.Blob = webidl.interfaceConverter(Blob2); + function isFileLike(object) { + return object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + } + module2.exports = { FileLike, isFileLike }; + } +}); + +// node_modules/undici/lib/web/fetch/formdata.js +var require_formdata2 = __commonJS({ + "node_modules/undici/lib/web/fetch/formdata.js"(exports2, module2) { + "use strict"; + var { isBlobLike, iteratorMixin } = require_util10(); + var { kState } = require_symbols7(); + var { kEnumerableProperty } = require_util9(); + var { FileLike, isFileLike } = require_file2(); + var { webidl } = require_webidl2(); + var { File: NativeFile } = require("node:buffer"); + var nodeUtil = require("node:util"); + var File = globalThis.File ?? NativeFile; + var FormData = class _FormData { + constructor(form) { + if (form !== void 0) { + throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); + } + this[kState] = []; + } + append(name, value, filename = void 0) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" + ); + } + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "value", { strict: false }) : webidl.converters.USVString(value, prefix, "value"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "filename") : void 0; + const entry = makeEntry(name, value, filename); + this[kState].push(entry); + } + delete(name) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + this[kState] = this[kState].filter((entry) => entry.name !== name); + } + get(name) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.get"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx === -1) { + return null; + } + return this[kState][idx].value; + } + getAll(name) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); + } + has(name) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].findIndex((entry) => entry.name === name) !== -1; + } + set(name, value, filename = void 0) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.set"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" + ); + } + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "name", { strict: false }) : webidl.converters.USVString(value, prefix, "name"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "name") : void 0; + const entry = makeEntry(name, value, filename); + const idx = this[kState].findIndex((entry2) => entry2.name === name); + if (idx !== -1) { + this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry2) => entry2.name !== name) + ]; + } else { + this[kState].push(entry); + } + } + [nodeUtil.inspect.custom](depth, options) { + const state = this[kState].reduce((a, b) => { + if (a[b.name]) { + if (Array.isArray(a[b.name])) { + a[b.name].push(b.value); + } else { + a[b.name] = [a[b.name], b.value]; + } + } else { + a[b.name] = b.value; + } + return a; + }, { __proto__: null }); + options.depth ??= depth; + options.colors ??= true; + const output = nodeUtil.formatWithOptions(options, state); + return `FormData ${output.slice(output.indexOf("]") + 2)}`; + } + }; + iteratorMixin("FormData", FormData, kState, "name", "value"); + Object.defineProperties(FormData.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + getAll: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } + }); + function makeEntry(name, value, filename) { + if (typeof value === "string") { + } else { + if (!isFileLike(value)) { + value = value instanceof Blob ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); + } + if (filename !== void 0) { + const options = { + type: value.type, + lastModified: value.lastModified + }; + value = value instanceof NativeFile ? new File([value], filename, options) : new FileLike(value, filename, options); + } + } + return { name, value }; + } + module2.exports = { FormData, makeEntry }; + } +}); + +// node_modules/undici/lib/web/fetch/formdata-parser.js +var require_formdata_parser = __commonJS({ + "node_modules/undici/lib/web/fetch/formdata-parser.js"(exports2, module2) { + "use strict"; + var { isUSVString, bufferToLowerCasedHeaderName } = require_util9(); + var { utf8DecodeBytes } = require_util10(); + var { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); + var { isFileLike } = require_file2(); + var { makeEntry } = require_formdata2(); + var assert = require("node:assert"); + var { File: NodeFile } = require("node:buffer"); + var File = globalThis.File ?? NodeFile; + var formDataNameBuffer = Buffer.from('form-data; name="'); + var filenameBuffer = Buffer.from("; filename"); + var dd = Buffer.from("--"); + var ddcrlf = Buffer.from("--\r\n"); + function isAsciiString(chars) { + for (let i = 0; i < chars.length; ++i) { + if ((chars.charCodeAt(i) & ~127) !== 0) { + return false; + } + } + return true; + } + function validateBoundary(boundary) { + const length = boundary.length; + if (length < 27 || length > 70) { + return false; + } + for (let i = 0; i < length; ++i) { + const cp = boundary.charCodeAt(i); + if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) { + return false; + } + } + return true; + } + function multipartFormDataParser(input, mimeType) { + assert(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + const boundaryString = mimeType.parameters.get("boundary"); + if (boundaryString === void 0) { + return "failure"; + } + const boundary = Buffer.from(`--${boundaryString}`, "utf8"); + const entryList = []; + const position = { position: 0 }; + if (input[0] === 13 && input[1] === 10) { + position.position += 2; + } + while (true) { + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { + position.position += boundary.length; + } else { + return "failure"; + } + if (position.position === input.length - 2 && bufferStartsWith(input, dd, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) { + return entryList; + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) { + return "failure"; + } + position.position += 2; + const result = parseMultipartFormDataHeaders(input, position); + if (result === "failure") { + return "failure"; + } + let { name, filename, contentType, encoding } = result; + position.position += 2; + let body; + { + const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); + if (boundaryIndex === -1) { + return "failure"; + } + body = input.subarray(position.position, boundaryIndex - 4); + position.position += body.length; + if (encoding === "base64") { + body = Buffer.from(body.toString(), "base64"); + } + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) { + return "failure"; + } else { + position.position += 2; + } + let value; + if (filename !== null) { + contentType ??= "text/plain"; + if (!isAsciiString(contentType)) { + contentType = ""; + } + value = new File([body], filename, { type: contentType }); + } else { + value = utf8DecodeBytes(Buffer.from(body)); + } + assert(isUSVString(name)); + assert(typeof value === "string" && isUSVString(value) || isFileLike(value)); + entryList.push(makeEntry(name, value, filename)); + } + } + function parseMultipartFormDataHeaders(input, position) { + let name = null; + let filename = null; + let contentType = null; + let encoding = null; + while (true) { + if (input[position.position] === 13 && input[position.position + 1] === 10) { + if (name === null) { + return "failure"; + } + return { name, filename, contentType, encoding }; + } + let headerName = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13 && char !== 58, + input, + position + ); + headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); + if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { + return "failure"; + } + if (input[position.position] !== 58) { + return "failure"; + } + position.position++; + collectASequenceOfBytes( + (char) => char === 32 || char === 9, + input, + position + ); + switch (bufferToLowerCasedHeaderName(headerName)) { + case "content-disposition": { + name = filename = null; + if (!bufferStartsWith(input, formDataNameBuffer, position)) { + return "failure"; + } + position.position += 17; + name = parseMultipartFormDataName(input, position); + if (name === null) { + return "failure"; + } + if (bufferStartsWith(input, filenameBuffer, position)) { + let check = position.position + filenameBuffer.length; + if (input[check] === 42) { + position.position += 1; + check += 1; + } + if (input[check] !== 61 || input[check + 1] !== 34) { + return "failure"; + } + position.position += 12; + filename = parseMultipartFormDataName(input, position); + if (filename === null) { + return "failure"; + } + } + break; + } + case "content-type": { + let headerValue = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13, + input, + position + ); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + contentType = isomorphicDecode(headerValue); + break; + } + case "content-transfer-encoding": { + let headerValue = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13, + input, + position + ); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + encoding = isomorphicDecode(headerValue); + break; + } + default: { + collectASequenceOfBytes( + (char) => char !== 10 && char !== 13, + input, + position + ); + } + } + if (input[position.position] !== 13 && input[position.position + 1] !== 10) { + return "failure"; + } else { + position.position += 2; + } + } + } + function parseMultipartFormDataName(input, position) { + assert(input[position.position - 1] === 34); + let name = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13 && char !== 34, + input, + position + ); + if (input[position.position] !== 34) { + return null; + } else { + position.position++; + } + name = new TextDecoder().decode(name).replace(/%0A/ig, "\n").replace(/%0D/ig, "\r").replace(/%22/g, '"'); + return name; + } + function collectASequenceOfBytes(condition, input, position) { + let start = position.position; + while (start < input.length && condition(input[start])) { + ++start; + } + return input.subarray(position.position, position.position = start); + } + function removeChars(buf, leading, trailing, predicate) { + let lead = 0; + let trail = buf.length - 1; + if (leading) { + while (lead < buf.length && predicate(buf[lead])) lead++; + } + if (trailing) { + while (trail > 0 && predicate(buf[trail])) trail--; + } + return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); + } + function bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) { + return false; + } + for (let i = 0; i < start.length; i++) { + if (start[i] !== buffer[position.position + i]) { + return false; + } + } + return true; + } + module2.exports = { + multipartFormDataParser, + validateBoundary + }; + } +}); + +// node_modules/undici/lib/web/fetch/body.js +var require_body2 = __commonJS({ + "node_modules/undici/lib/web/fetch/body.js"(exports2, module2) { + "use strict"; + var util = require_util9(); + var { + ReadableStreamFrom, + isBlobLike, + isReadableStreamLike, + readableStreamClose, + createDeferredPromise, + fullyReadBody, + extractMimeType, + utf8DecodeBytes + } = require_util10(); + var { FormData } = require_formdata2(); + var { kState } = require_symbols7(); + var { webidl } = require_webidl2(); + var { Blob: Blob2 } = require("node:buffer"); + var assert = require("node:assert"); + var { isErrored } = require_util9(); + var { isArrayBuffer } = require("node:util/types"); + var { serializeAMimeType } = require_data_url(); + var { multipartFormDataParser } = require_formdata_parser(); + var textEncoder = new TextEncoder(); + function extractBody(object, keepalive = false) { + let stream = null; + if (object instanceof ReadableStream) { + stream = object; + } else if (isBlobLike(object)) { + stream = object.stream(); + } else { + stream = new ReadableStream({ + async pull(controller) { + const buffer = typeof source === "string" ? textEncoder.encode(source) : source; + if (buffer.byteLength) { + controller.enqueue(buffer); + } + queueMicrotask(() => readableStreamClose(controller)); + }, + start() { + }, + type: "bytes" + }); + } + assert(isReadableStreamLike(stream)); + let action = null; + let source = null; + let length = null; + let type = null; + if (typeof object === "string") { + source = object; + type = "text/plain;charset=UTF-8"; + } else if (object instanceof URLSearchParams) { + source = object.toString(); + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) { + source = new Uint8Array(object.slice()); + } else if (ArrayBuffer.isView(object)) { + source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + } else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r +Content-Disposition: form-data`; + const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const blobParts = []; + const rn = new Uint8Array([13, 10]); + length = 0; + let hasUnknownSizeValue = false; + for (const [name, value] of object) { + if (typeof value === "string") { + const chunk2 = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r +\r +${normalizeLinefeeds(value)}\r +`); + blobParts.push(chunk2); + length += chunk2.byteLength; + } else { + const chunk2 = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r +\r +`); + blobParts.push(chunk2, value, rn); + if (typeof value.size === "number") { + length += chunk2.byteLength + value.size + rn.byteLength; + } else { + hasUnknownSizeValue = true; + } + } + } + const chunk = textEncoder.encode(`--${boundary}--`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) { + length = null; + } + source = object; + action = async function* () { + for (const part of blobParts) { + if (part.stream) { + yield* part.stream(); + } else { + yield part; + } + } + }; + type = `multipart/form-data; boundary=${boundary}`; + } else if (isBlobLike(object)) { + source = object; + length = object.size; + if (object.type) { + type = object.type; + } + } else if (typeof object[Symbol.asyncIterator] === "function") { + if (keepalive) { + throw new TypeError("keepalive"); + } + if (util.isDisturbed(object) || object.locked) { + throw new TypeError( + "Response body object should not be disturbed or locked" + ); + } + stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); + } + if (typeof source === "string" || util.isBuffer(source)) { + length = Buffer.byteLength(source); + } + if (action != null) { + let iterator; + stream = new ReadableStream({ + async start() { + iterator = action(object)[Symbol.asyncIterator](); + }, + async pull(controller) { + const { value, done } = await iterator.next(); + if (done) { + queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + } else { + if (!isErrored(stream)) { + const buffer = new Uint8Array(value); + if (buffer.byteLength) { + controller.enqueue(buffer); + } + } + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + const body = { stream, source, length }; + return [body, type]; + } + function safelyExtractBody(object, keepalive = false) { + if (object instanceof ReadableStream) { + assert(!util.isDisturbed(object), "The body has already been consumed."); + assert(!object.locked, "The stream is locked."); + } + return extractBody(object, keepalive); + } + function cloneBody(body) { + const [out1, out2] = body.stream.tee(); + body.stream = out1; + return { + stream: out2, + length: body.length, + source: body.source + }; + } + function throwIfAborted(state) { + if (state.aborted) { + throw new DOMException("The operation was aborted.", "AbortError"); + } + } + function bodyMixinMethods(instance) { + const methods = { + blob() { + return consumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this); + if (mimeType === null) { + mimeType = ""; + } else if (mimeType) { + mimeType = serializeAMimeType(mimeType); + } + return new Blob2([bytes], { type: mimeType }); + }, instance); + }, + arrayBuffer() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance); + }, + text() { + return consumeBody(this, utf8DecodeBytes, instance); + }, + json() { + return consumeBody(this, parseJSONFromBytes, instance); + }, + formData() { + return consumeBody(this, (value) => { + const mimeType = bodyMimeType(this); + if (mimeType !== null) { + switch (mimeType.essence) { + case "multipart/form-data": { + const parsed = multipartFormDataParser(value, mimeType); + if (parsed === "failure") { + throw new TypeError("Failed to parse body as FormData."); + } + const fd = new FormData(); + fd[kState] = parsed; + return fd; + } + case "application/x-www-form-urlencoded": { + const entries = new URLSearchParams(value.toString()); + const fd = new FormData(); + for (const [name, value2] of entries) { + fd.append(name, value2); + } + return fd; + } + } + } + throw new TypeError( + 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' + ); + }, instance); + }, + bytes() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes); + }, instance); + } + }; + return methods; + } + function mixinBody(prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)); + } + async function consumeBody(object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance); + if (bodyUnusable(object[kState].body)) { + throw new TypeError("Body is unusable: Body has already been read"); + } + throwIfAborted(object[kState]); + const promise = createDeferredPromise(); + const errorSteps = (error) => promise.reject(error); + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + if (object[kState].body == null) { + successSteps(Buffer.allocUnsafe(0)); + return promise.promise; + } + await fullyReadBody(object[kState].body, successSteps, errorSteps); + return promise.promise; + } + function bodyUnusable(body) { + return body != null && (body.stream.locked || util.isDisturbed(body.stream)); + } + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); + } + function bodyMimeType(requestOrResponse) { + const headers = requestOrResponse[kState].headersList; + const mimeType = extractMimeType(headers); + if (mimeType === "failure") { + return null; + } + return mimeType; + } + module2.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody + }; + } +}); + +// node_modules/undici/lib/dispatcher/client-h1.js +var require_client_h1 = __commonJS({ + "node_modules/undici/lib/dispatcher/client-h1.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var util = require_util9(); + var { channels } = require_diagnostics(); + var timers = require_timers2(); + var { + RequestContentLengthMismatchError, + ResponseContentLengthMismatchError, + RequestAbortedError, + HeadersTimeoutError, + HeadersOverflowError, + SocketError, + InformationalError, + BodyTimeoutError, + HTTPParserError, + ResponseExceededMaxSizeError + } = require_errors2(); + var { + kUrl, + kReset, + kClient, + kParser, + kBlocking, + kRunning, + kPending, + kSize, + kWriting, + kQueue, + kNoRef, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kSocket, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kMaxRequests, + kCounter, + kMaxResponseSize, + kOnError, + kResume, + kHTTPContext + } = require_symbols6(); + var constants = require_constants7(); + var EMPTY_BUF = Buffer.alloc(0); + var FastBuffer = Buffer[Symbol.species]; + var addListener = util.addListener; + var removeAllListeners = util.removeAllListeners; + var extractBody; + async function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm2() : void 0; + let mod; + try { + mod = await WebAssembly.compile(require_llhttp_simd_wasm2()); + } catch (e) { + mod = await WebAssembly.compile(llhttpWasmData || require_llhttp_wasm2()); + } + return await WebAssembly.instantiate(mod, { + env: { + /* eslint-disable camelcase */ + wasm_on_url: (p, at, len) => { + return 0; + }, + wasm_on_status: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_begin: (p) => { + assert.strictEqual(currentParser.ptr, p); + return currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_header_value: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert.strictEqual(currentParser.ptr, p); + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; + }, + wasm_on_body: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_complete: (p) => { + assert.strictEqual(currentParser.ptr, p); + return currentParser.onMessageComplete() || 0; + } + /* eslint-enable camelcase */ + } + }); + } + var llhttpInstance = null; + var llhttpPromise = lazyllhttp(); + llhttpPromise.catch(); + var currentParser = null; + var currentBufferRef = null; + var currentBufferSize = 0; + var currentBufferPtr = null; + var TIMEOUT_HEADERS = 1; + var TIMEOUT_BODY = 2; + var TIMEOUT_IDLE = 3; + var Parser = class { + constructor(client, socket, { exports: exports3 }) { + assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + this.llhttp = exports3; + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); + this.client = client; + this.socket = socket; + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.statusCode = null; + this.statusText = ""; + this.upgrade = false; + this.headers = []; + this.headersSize = 0; + this.headersMaxSize = client[kMaxHeadersSize]; + this.shouldKeepAlive = false; + this.paused = false; + this.resume = this.resume.bind(this); + this.bytesRead = 0; + this.keepAlive = ""; + this.contentLength = ""; + this.connection = ""; + this.maxResponseSize = client[kMaxResponseSize]; + } + setTimeout(value, type) { + this.timeoutType = type; + if (value !== this.timeoutValue) { + timers.clearTimeout(this.timeout); + if (value) { + this.timeout = timers.setTimeout(onParserTimeout, value, this); + if (this.timeout.unref) { + this.timeout.unref(); + } + } else { + this.timeout = null; + } + this.timeoutValue = value; + } else if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + } + resume() { + if (this.socket.destroyed || !this.paused) { + return; + } + assert(this.ptr != null); + assert(currentParser == null); + this.llhttp.llhttp_resume(this.ptr); + assert(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + this.paused = false; + this.execute(this.socket.read() || EMPTY_BUF); + this.readMore(); + } + readMore() { + while (!this.paused && this.ptr) { + const chunk = this.socket.read(); + if (chunk === null) { + break; + } + this.execute(chunk); + } + } + execute(data) { + assert(this.ptr != null); + assert(currentParser == null); + assert(!this.paused); + const { socket, llhttp } = this; + if (data.length > currentBufferSize) { + if (currentBufferPtr) { + llhttp.free(currentBufferPtr); + } + currentBufferSize = Math.ceil(data.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); + try { + let ret; + try { + currentBufferRef = data; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); + } catch (err) { + throw err; + } finally { + currentParser = null; + currentBufferRef = null; + } + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; + if (ret === constants.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(data.slice(offset)); + } else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data.slice(offset)); + } else if (ret !== constants.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); + } + } catch (err) { + util.destroy(socket, err); + } + } + destroy() { + assert(this.ptr != null); + assert(currentParser == null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + timers.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; + } + onStatus(buf) { + this.statusText = buf.toString(); + } + onMessageBegin() { + const { socket, client } = this; + if (socket.destroyed) { + return -1; + } + const request2 = client[kQueue][client[kRunningIdx]]; + if (!request2) { + return -1; + } + request2.onResponseStarted(); + } + onHeaderField(buf) { + const len = this.headers.length; + if ((len & 1) === 0) { + this.headers.push(buf); + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + } + this.trackHeader(buf.length); + } + onHeaderValue(buf) { + let len = this.headers.length; + if ((len & 1) === 1) { + this.headers.push(buf); + len += 1; + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + } + const key = this.headers[len - 2]; + if (key.length === 10) { + const headerName = util.bufferToLowerCasedHeaderName(key); + if (headerName === "keep-alive") { + this.keepAlive += buf.toString(); + } else if (headerName === "connection") { + this.connection += buf.toString(); + } + } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") { + this.contentLength += buf.toString(); + } + this.trackHeader(buf.length); + } + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) { + util.destroy(this.socket, new HeadersOverflowError()); + } + } + onUpgrade(head) { + const { upgrade, client, socket, headers, statusCode } = this; + assert(upgrade); + const request2 = client[kQueue][client[kRunningIdx]]; + assert(request2); + assert(!socket.destroyed); + assert(socket === client[kSocket]); + assert(!this.paused); + assert(request2.upgrade || request2.method === "CONNECT"); + this.statusCode = null; + this.statusText = ""; + this.shouldKeepAlive = null; + assert(this.headers.length % 2 === 0); + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[kParser].destroy(); + socket[kParser] = null; + socket[kClient] = null; + socket[kError] = null; + removeAllListeners(socket); + client[kSocket] = null; + client[kHTTPContext] = null; + client[kQueue][client[kRunningIdx]++] = null; + client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); + try { + request2.onUpgrade(statusCode, headers, socket); + } catch (err) { + util.destroy(socket, err); + } + client[kResume](); + } + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + if (socket.destroyed) { + return -1; + } + const request2 = client[kQueue][client[kRunningIdx]]; + if (!request2) { + return -1; + } + assert(!this.upgrade); + assert(this.statusCode < 200); + if (statusCode === 100) { + util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); + return -1; + } + if (upgrade && !request2.upgrade) { + util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); + return -1; + } + assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. + request2.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + if (this.statusCode >= 200) { + const bodyTimeout = request2.bodyTimeout != null ? request2.bodyTimeout : client[kBodyTimeout]; + this.setTimeout(bodyTimeout, TIMEOUT_BODY); + } else if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + if (request2.method === "CONNECT") { + assert(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + if (upgrade) { + assert(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + assert(this.headers.length % 2 === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min( + keepAliveTimeout - client[kKeepAliveTimeoutThreshold], + client[kKeepAliveMaxTimeout] + ); + if (timeout <= 0) { + socket[kReset] = true; + } else { + client[kKeepAliveTimeoutValue] = timeout; + } + } else { + client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } + } else { + socket[kReset] = true; + } + const pause = request2.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request2.aborted) { + return -1; + } + if (request2.method === "HEAD") { + return 1; + } + if (statusCode < 200) { + return 1; + } + if (socket[kBlocking]) { + socket[kBlocking] = false; + client[kResume](); + } + return pause ? constants.ERROR.PAUSED : 0; + } + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + if (socket.destroyed) { + return -1; + } + const request2 = client[kQueue][client[kRunningIdx]]; + assert(request2); + assert.strictEqual(this.timeoutType, TIMEOUT_BODY); + if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + assert(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request2.onData(buf) === false) { + return constants.ERROR.PAUSED; + } + } + onMessageComplete() { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) { + return -1; + } + if (upgrade) { + return; + } + const request2 = client[kQueue][client[kRunningIdx]]; + assert(request2); + assert(statusCode >= 100); + this.statusCode = null; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + assert(this.headers.length % 2 === 0); + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) { + return; + } + if (request2.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + request2.onComplete(headers); + client[kQueue][client[kRunningIdx]++] = null; + if (socket[kWriting]) { + assert.strictEqual(client[kRunning], 0); + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (socket[kReset] && client[kRunning] === 0) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (client[kPipelining] == null || client[kPipelining] === 1) { + setImmediate(() => client[kResume]()); + } else { + client[kResume](); + } + } + }; + function onParserTimeout(parser) { + const { socket, timeoutType, client } = parser; + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert(!parser.paused, "cannot be paused while waiting for headers"); + util.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!parser.paused) { + util.destroy(socket, new BodyTimeoutError()); + } + } else if (timeoutType === TIMEOUT_IDLE) { + assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + util.destroy(socket, new InformationalError("socket idle timeout")); + } + } + async function connectH1(client, socket) { + client[kSocket] = socket; + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise; + llhttpPromise = null; + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + addListener(socket, "error", function(err) { + const parser = this[kParser]; + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + this[kError] = err; + this[kClient][kOnError](err); + }); + addListener(socket, "readable", function() { + const parser = this[kParser]; + if (parser) { + parser.readMore(); + } + }); + addListener(socket, "end", function() { + const parser = this[kParser]; + if (parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + addListener(socket, "close", function() { + const client2 = this[kClient]; + const parser = this[kParser]; + if (parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + } + this[kParser].destroy(); + this[kParser] = null; + } + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client2[kSocket] = null; + client2[kHTTPContext] = null; + if (client2.destroyed) { + assert(client2[kPending] === 0); + const requests = client2[kQueue].splice(client2[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request2 = requests[i]; + util.errorRequest(client2, request2, err); + } + } else if (client2[kRunning] > 0 && err.code !== "UND_ERR_INFO") { + const request2 = client2[kQueue][client2[kRunningIdx]]; + client2[kQueue][client2[kRunningIdx]++] = null; + util.errorRequest(client2, request2, err); + } + client2[kPendingIdx] = client2[kRunningIdx]; + assert(client2[kRunning] === 0); + client2.emit("disconnect", client2[kUrl], [client2], err); + client2[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h1", + defaultPipelining: 1, + write(...args) { + return writeH1(client, ...args); + }, + resume() { + resumeH1(client); + }, + destroy(err, callback) { + if (closed) { + queueMicrotask(callback); + } else { + socket.destroy(err).on("close", callback); + } + }, + get destroyed() { + return socket.destroyed; + }, + busy(request2) { + if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { + return true; + } + if (request2) { + if (client[kRunning] > 0 && !request2.idempotent) { + return true; + } + if (client[kRunning] > 0 && (request2.upgrade || request2.method === "CONNECT")) { + return true; + } + if (client[kRunning] > 0 && util.bodyLength(request2.body) !== 0 && (util.isStream(request2.body) || util.isAsyncIterable(request2.body) || util.isFormDataLike(request2.body))) { + return true; + } + } + return false; + } + }; + } + function resumeH1(client) { + const socket = client[kSocket]; + if (socket && !socket.destroyed) { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref(); + socket[kNoRef] = true; + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref(); + socket[kNoRef] = false; + } + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_IDLE) { + socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE); + } + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request2 = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request2.headersTimeout != null ? request2.headersTimeout : client[kHeadersTimeout]; + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); + } + } + } + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH1(client, request2) { + const { method, path, host, upgrade, blocking, reset } = request2; + let { body, headers, contentLength } = request2; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (util.isFormDataLike(body)) { + if (!extractBody) { + extractBody = require_body2().extractBody; + } + const [bodyStream, contentType] = extractBody(body); + if (request2.contentType == null) { + headers.push("content-type", contentType); + } + body = bodyStream.stream; + contentLength = bodyStream.length; + } else if (util.isBlobLike(body) && request2.contentType == null && body.type) { + headers.push("content-type", body.type); + } + if (body && typeof body.read === "function") { + body.read(0); + } + const bodyLength = util.bodyLength(body); + contentLength = bodyLength ?? contentLength; + if (contentLength === null) { + contentLength = request2.contentLength; + } + if (contentLength === 0 && !expectsPayload) { + contentLength = null; + } + if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength !== null && request2.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request2, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + const socket = client[kSocket]; + const abort = (err) => { + if (request2.aborted || request2.completed) { + return; + } + util.errorRequest(client, request2, err || new RequestAbortedError()); + util.destroy(body); + util.destroy(socket, new InformationalError("aborted")); + }; + try { + request2.onConnect(abort); + } catch (err) { + util.errorRequest(client, request2, err); + } + if (request2.aborted) { + return false; + } + if (method === "HEAD") { + socket[kReset] = true; + } + if (upgrade || method === "CONNECT") { + socket[kReset] = true; + } + if (reset != null) { + socket[kReset] = reset; + } + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { + socket[kReset] = true; + } + if (blocking) { + socket[kBlocking] = true; + } + let header = `${method} ${path} HTTP/1.1\r +`; + if (typeof host === "string") { + header += `host: ${host}\r +`; + } else { + header += client[kHostHeader]; + } + if (upgrade) { + header += `connection: upgrade\r +upgrade: ${upgrade}\r +`; + } else if (client[kPipelining] && !socket[kReset]) { + header += "connection: keep-alive\r\n"; + } else { + header += "connection: close\r\n"; + } + if (Array.isArray(headers)) { + for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0]; + const val2 = headers[n + 1]; + if (Array.isArray(val2)) { + for (let i = 0; i < val2.length; i++) { + header += `${key}: ${val2[i]}\r +`; + } + } else { + header += `${key}: ${val2}\r +`; + } + } + } + if (channels.sendHeaders.hasSubscribers) { + channels.sendHeaders.publish({ request: request2, headers: header, socket }); + } + if (!body || bodyLength === 0) { + writeBuffer(abort, null, client, request2, socket, contentLength, header, expectsPayload); + } else if (util.isBuffer(body)) { + writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload); + } else if (util.isBlobLike(body)) { + if (typeof body.stream === "function") { + writeIterable(abort, body.stream(), client, request2, socket, contentLength, header, expectsPayload); + } else { + writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload); + } + } else if (util.isStream(body)) { + writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload); + } else if (util.isIterable(body)) { + writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload); + } else { + assert(false); + } + return true; + } + function writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload) { + assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + let finished = false; + const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header }); + const onData = function(chunk) { + if (finished) { + return; + } + try { + if (!writer.write(chunk) && this.pause) { + this.pause(); + } + } catch (err) { + util.destroy(this, err); + } + }; + const onDrain = function() { + if (finished) { + return; + } + if (body.resume) { + body.resume(); + } + }; + const onClose = function() { + queueMicrotask(() => { + body.removeListener("error", onFinished); + }); + if (!finished) { + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); + } + }; + const onFinished = function(err) { + if (finished) { + return; + } + finished = true; + assert(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + socket.off("drain", onDrain).off("error", onFinished); + body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); + if (!err) { + try { + writer.end(); + } catch (er) { + err = er; + } + } + writer.destroy(err); + if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) { + util.destroy(body, err); + } else { + util.destroy(body); + } + }; + body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); + if (body.resume) { + body.resume(); + } + socket.on("drain", onDrain).on("error", onFinished); + if (body.errorEmitted ?? body.errored) { + setImmediate(() => onFinished(body.errored)); + } else if (body.endEmitted ?? body.readableEnded) { + setImmediate(() => onFinished(null)); + } + if (body.closeEmitted ?? body.closed) { + setImmediate(onClose); + } + } + function writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload) { + try { + if (!body) { + if (contentLength === 0) { + socket.write(`${header}content-length: 0\r +\r +`, "latin1"); + } else { + assert(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r +`, "latin1"); + } + } else if (util.isBuffer(body)) { + assert(contentLength === body.byteLength, "buffer body must have content length"); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + socket.write(body); + socket.uncork(); + request2.onBodySent(body); + if (!expectsPayload) { + socket[kReset] = true; + } + } + request2.onRequestSent(); + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload) { + assert(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) { + throw new RequestContentLengthMismatchError(); + } + const buffer = Buffer.from(await body.arrayBuffer()); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + socket.write(buffer); + socket.uncork(); + request2.onBodySent(buffer); + request2.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload) { + assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert(callback === null); + if (socket[kError]) { + reject(socket[kError]); + } else { + callback = resolve; + } + }); + socket.on("close", onDrain).on("drain", onDrain); + const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header }); + try { + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError]; + } + if (!writer.write(chunk)) { + await waitForDrain(); + } + } + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + var AsyncWriter = class { + constructor({ abort, socket, request: request2, contentLength, client, expectsPayload, header }) { + this.socket = socket; + this.request = request2; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + this.abort = abort; + socket[kWriting] = true; + } + write(chunk) { + const { socket, request: request2, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError]) { + throw socket[kError]; + } + if (socket.destroyed) { + return false; + } + const len = Buffer.byteLength(chunk); + if (!len) { + return true; + } + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload) { + socket[kReset] = true; + } + if (contentLength === null) { + socket.write(`${header}transfer-encoding: chunked\r +`, "latin1"); + } else { + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + } + } + if (contentLength === null) { + socket.write(`\r +${len.toString(16)}\r +`, "latin1"); + } + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request2.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); + } + } + } + return ret; + } + end() { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request2 } = this; + request2.onRequestSent(); + socket[kWriting] = false; + if (socket[kError]) { + throw socket[kError]; + } + if (socket.destroyed) { + return; + } + if (bytesWritten === 0) { + if (expectsPayload) { + socket.write(`${header}content-length: 0\r +\r +`, "latin1"); + } else { + socket.write(`${header}\r +`, "latin1"); + } + } else if (contentLength === null) { + socket.write("\r\n0\r\n\r\n", "latin1"); + } + if (contentLength !== null && bytesWritten !== contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } else { + process.emitWarning(new RequestContentLengthMismatchError()); + } + } + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); + } + } + client[kResume](); + } + destroy(err) { + const { socket, client, abort } = this; + socket[kWriting] = false; + if (err) { + assert(client[kRunning] <= 1, "pipeline should only contain this request"); + abort(err); + } + } + }; + module2.exports = connectH1; + } +}); + +// node_modules/undici/lib/dispatcher/client-h2.js +var require_client_h2 = __commonJS({ + "node_modules/undici/lib/dispatcher/client-h2.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { pipeline } = require("node:stream"); + var util = require_util9(); + var { + RequestContentLengthMismatchError, + RequestAbortedError, + SocketError, + InformationalError + } = require_errors2(); + var { + kUrl, + kReset, + kClient, + kRunning, + kPending, + kQueue, + kPendingIdx, + kRunningIdx, + kError, + kSocket, + kStrictContentLength, + kOnError, + kMaxConcurrentStreams, + kHTTP2Session, + kResume + } = require_symbols6(); + var kOpenStreams = Symbol("open streams"); + var h2ExperimentalWarned = false; + var http2; + try { + http2 = require("node:http2"); + } catch { + http2 = { constants: {} }; + } + var { + constants: { + HTTP2_HEADER_AUTHORITY, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_HEADER_SCHEME, + HTTP2_HEADER_CONTENT_LENGTH, + HTTP2_HEADER_EXPECT, + HTTP2_HEADER_STATUS + } + } = http2; + function parseH2Headers(headers) { + const result = []; + for (const [name, value] of Object.entries(headers)) { + if (Array.isArray(value)) { + for (const subvalue of value) { + result.push(Buffer.from(name), Buffer.from(subvalue)); + } + } else { + result.push(Buffer.from(name), Buffer.from(value)); + } + } + return result; + } + async function connectH2(client, socket) { + client[kSocket] = socket; + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true; + process.emitWarning("H2 support is experimental, expect them to change at any time.", { + code: "UNDICI-H2" + }); + } + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kMaxConcurrentStreams] + }); + session[kOpenStreams] = 0; + session[kClient] = client; + session[kSocket] = socket; + util.addListener(session, "error", onHttp2SessionError); + util.addListener(session, "frameError", onHttp2FrameError); + util.addListener(session, "end", onHttp2SessionEnd); + util.addListener(session, "goaway", onHTTP2GoAway); + util.addListener(session, "close", function() { + const { [kClient]: client2 } = this; + const { [kSocket]: socket2 } = client2; + const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket2)); + client2[kHTTP2Session] = null; + if (client2.destroyed) { + assert(client2[kPending] === 0); + const requests = client2[kQueue].splice(client2[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request2 = requests[i]; + util.errorRequest(client2, request2, err); + } + } + }); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + util.addListener(socket, "error", function(err) { + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kError] = err; + this[kClient][kOnError](err); + }); + util.addListener(socket, "end", function() { + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + util.addListener(socket, "close", function() { + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + if (this[kHTTP2Session] != null) { + this[kHTTP2Session].destroy(err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h2", + defaultPipelining: Infinity, + write(...args) { + writeH2(client, ...args); + }, + resume() { + }, + destroy(err, callback) { + if (closed) { + queueMicrotask(callback); + } else { + socket.destroy(err).on("close", callback); + } + }, + get destroyed() { + return socket.destroyed; + }, + busy() { + return false; + } + }; + } + function onHttp2SessionError(err) { + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + function onHttp2FrameError(type, code, id) { + if (id === 0) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + } + function onHttp2SessionEnd() { + const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); + this.destroy(err); + util.destroy(this[kSocket], err); + } + function onHTTP2GoAway(code) { + const err = new RequestAbortedError(`HTTP/2: "GOAWAY" frame received with code ${code}`); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + this.unref(); + util.destroy(this[kSocket], err); + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH2(client, request2) { + const session = client[kHTTP2Session]; + const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + if (upgrade) { + util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); + return false; + } + if (request2.aborted) { + return false; + } + const headers = {}; + for (let n = 0; n < reqHeaders.length; n += 2) { + const key = reqHeaders[n + 0]; + const val2 = reqHeaders[n + 1]; + if (Array.isArray(val2)) { + for (let i = 0; i < val2.length; i++) { + if (headers[key]) { + headers[key] += `,${val2[i]}`; + } else { + headers[key] = val2[i]; + } + } + } else { + headers[key] = val2; + } + } + let stream; + const { hostname, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; + headers[HTTP2_HEADER_METHOD] = method; + const abort = (err) => { + if (request2.aborted || request2.completed) { + return; + } + err = err || new RequestAbortedError(); + util.errorRequest(client, request2, err); + if (stream != null) { + util.destroy(stream, err); + } + util.destroy(body, err); + }; + try { + request2.onConnect(abort); + } catch (err) { + util.errorRequest(client, request2, err); + } + if (method === "CONNECT") { + session.ref(); + stream = session.request(headers, { endStream: false, signal }); + if (stream.id && !stream.pending) { + request2.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + } else { + stream.once("ready", () => { + request2.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + }); + } + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + return true; + } + headers[HTTP2_HEADER_PATH] = path; + headers[HTTP2_HEADER_SCHEME] = "https"; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") { + body.read(0); + } + let contentLength = util.bodyLength(body); + if (contentLength == null) { + contentLength = request2.contentLength; + } + if (contentLength === 0 || !expectsPayload) { + contentLength = null; + } + if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength != null && request2.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request2, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + if (contentLength != null) { + assert(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + const shouldEndStream = method === "GET" || method === "HEAD" || body === null; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream = session.request(headers, { endStream: shouldEndStream, signal }); + stream.once("continue", writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + writeBodyH2(); + } + ++session[kOpenStreams]; + stream.once("response", (headers2) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; + request2.onResponseStarted(); + if (request2.aborted) { + const err = new RequestAbortedError(); + util.errorRequest(client, request2, err); + util.destroy(stream, err); + return; + } + if (request2.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) { + stream.pause(); + } + stream.on("data", (chunk) => { + if (request2.onData(chunk) === false) { + stream.pause(); + } + }); + }); + stream.once("end", () => { + if (stream.state?.state == null || stream.state.state < 6) { + request2.onComplete([]); + return; + } + if (session[kOpenStreams] === 0) { + session.unref(); + } + abort(new InformationalError("HTTP/2: stream half-closed (remote)")); + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) { + session.unref(); + } + }); + stream.once("error", function(err) { + abort(err); + }); + stream.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); + }); + return true; + function writeBodyH2() { + if (!body || contentLength === 0) { + writeBuffer( + abort, + stream, + null, + client, + request2, + client[kSocket], + contentLength, + expectsPayload + ); + } else if (util.isBuffer(body)) { + writeBuffer( + abort, + stream, + body, + client, + request2, + client[kSocket], + contentLength, + expectsPayload + ); + } else if (util.isBlobLike(body)) { + if (typeof body.stream === "function") { + writeIterable( + abort, + stream, + body.stream(), + client, + request2, + client[kSocket], + contentLength, + expectsPayload + ); + } else { + writeBlob( + abort, + stream, + body, + client, + request2, + client[kSocket], + contentLength, + expectsPayload + ); + } + } else if (util.isStream(body)) { + writeStream( + abort, + client[kSocket], + expectsPayload, + stream, + body, + client, + request2, + contentLength + ); + } else if (util.isIterable(body)) { + writeIterable( + abort, + stream, + body, + client, + request2, + client[kSocket], + contentLength, + expectsPayload + ); + } else { + assert(false); + } + } + } + function writeBuffer(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { + try { + if (body != null && util.isBuffer(body)) { + assert(contentLength === body.byteLength, "buffer body must have content length"); + h2stream.cork(); + h2stream.write(body); + h2stream.uncork(); + h2stream.end(); + request2.onBodySent(body); + } + if (!expectsPayload) { + socket[kReset] = true; + } + request2.onRequestSent(); + client[kResume](); + } catch (error) { + abort(error); + } + } + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) { + assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + const pipe = pipeline( + body, + h2stream, + (err) => { + if (err) { + util.destroy(pipe, err); + abort(err); + } else { + util.removeAllListeners(pipe); + request2.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + client[kResume](); + } + } + ); + util.addListener(pipe, "data", onPipeData); + function onPipeData(chunk) { + request2.onBodySent(chunk); + } + } + async function writeBlob(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { + assert(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) { + throw new RequestContentLengthMismatchError(); + } + const buffer = Buffer.from(await body.arrayBuffer()); + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + h2stream.end(); + request2.onBodySent(buffer); + request2.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { + assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert(callback === null); + if (socket[kError]) { + reject(socket[kError]); + } else { + callback = resolve; + } + }); + h2stream.on("close", onDrain).on("drain", onDrain); + try { + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError]; + } + const res = h2stream.write(chunk); + request2.onBodySent(chunk); + if (!res) { + await waitForDrain(); + } + } + h2stream.end(); + request2.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + client[kResume](); + } catch (err) { + abort(err); + } finally { + h2stream.off("close", onDrain).off("drain", onDrain); + } + } + module2.exports = connectH2; + } +}); + +// node_modules/undici/lib/handler/redirect-handler.js +var require_redirect_handler = __commonJS({ + "node_modules/undici/lib/handler/redirect-handler.js"(exports2, module2) { + "use strict"; + var util = require_util9(); + var { kBodyUsed } = require_symbols6(); + var assert = require("node:assert"); + var { InvalidArgumentError } = require_errors2(); + var EE = require("node:events"); + var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; + var kBody = Symbol("body"); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + var RedirectHandler = class { + constructor(dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + util.validateHandler(handler, opts.method, opts.upgrade); + this.dispatch = dispatch; + this.location = null; + this.abort = null; + this.opts = { ...opts, maxRedirections: 0 }; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + this.redirectionLimitReached = false; + if (util.isStream(this.opts.body)) { + if (util.bodyLength(this.opts.body) === 0) { + this.opts.body.on("data", function() { + assert(false); + }); + } + if (typeof this.opts.body.readableDidRead !== "boolean") { + this.opts.body[kBodyUsed] = false; + EE.prototype.on.call(this.opts.body, "data", function() { + this[kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") { + this.opts.body = new BodyAsyncIterable(this.opts.body); + } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) { + this.opts.body = new BodyAsyncIterable(this.opts.body); + } + } + onConnect(abort) { + this.abort = abort; + this.handler.onConnect(abort, { history: this.history }); + } + onUpgrade(statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket); + } + onError(error) { + this.handler.onError(error); + } + onHeaders(statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { + if (this.request) { + this.request.abort(new Error("max redirects")); + } + this.redirectionLimitReached = true; + this.abort(new Error("max redirects")); + return; + } + if (this.opts.origin) { + this.history.push(new URL(this.opts.path, this.opts.origin)); + } + if (!this.location) { + return this.handler.onHeaders(statusCode, headers, resume, statusText); + } + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path = search ? `${pathname}${search}` : pathname; + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path; + this.opts.origin = origin; + this.opts.maxRedirections = 0; + this.opts.query = null; + if (statusCode === 303 && this.opts.method !== "HEAD") { + this.opts.method = "GET"; + this.opts.body = null; + } + } + onData(chunk) { + if (this.location) { + } else { + return this.handler.onData(chunk); + } + } + onComplete(trailers) { + if (this.location) { + this.location = null; + this.abort = null; + this.dispatch(this.opts, this); + } else { + this.handler.onComplete(trailers); + } + } + onBodySent(chunk) { + if (this.handler.onBodySent) { + this.handler.onBodySent(chunk); + } + } + }; + function parseLocation(statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) { + return null; + } + for (let i = 0; i < headers.length; i += 2) { + if (headers[i].length === 8 && util.headerNameToString(headers[i]) === "location") { + return headers[i + 1]; + } + } + } + function shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) { + return util.headerNameToString(header) === "host"; + } + if (removeContent && util.headerNameToString(header).startsWith("content-")) { + return true; + } + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header); + return name === "authorization" || name === "cookie" || name === "proxy-authorization"; + } + return false; + } + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) { + if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { + ret.push(headers[i], headers[i + 1]); + } + } + } else if (headers && typeof headers === "object") { + for (const key of Object.keys(headers)) { + if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { + ret.push(key, headers[key]); + } + } + } else { + assert(headers == null, "headers must be an object or an array"); + } + return ret; + } + module2.exports = RedirectHandler; + } +}); + +// node_modules/undici/lib/interceptor/redirect-interceptor.js +var require_redirect_interceptor = __commonJS({ + "node_modules/undici/lib/interceptor/redirect-interceptor.js"(exports2, module2) { + "use strict"; + var RedirectHandler = require_redirect_handler(); + function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts; + if (!maxRedirections) { + return dispatch(opts, handler); + } + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); + opts = { ...opts, maxRedirections: 0 }; + return dispatch(opts, redirectHandler); + }; + }; + } + module2.exports = createRedirectInterceptor; + } +}); + +// node_modules/undici/lib/dispatcher/client.js +var require_client2 = __commonJS({ + "node_modules/undici/lib/dispatcher/client.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var net = require("node:net"); + var http = require("node:http"); + var util = require_util9(); + var { channels } = require_diagnostics(); + var Request2 = require_request3(); + var DispatcherBase = require_dispatcher_base2(); + var { + InvalidArgumentError, + InformationalError, + ClientDestroyedError + } = require_errors2(); + var buildConnector = require_connect2(); + var { + kUrl, + kServerName, + kClient, + kBusy, + kConnect, + kResuming, + kRunning, + kPending, + kSize, + kQueue, + kConnected, + kConnecting, + kNeedDrain, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kConnector, + kMaxRedirections, + kMaxRequests, + kCounter, + kClose, + kDestroy, + kDispatch, + kInterceptors, + kLocalAddress, + kMaxResponseSize, + kOnError, + kHTTPContext, + kMaxConcurrentStreams, + kResume + } = require_symbols6(); + var connectH1 = require_client_h1(); + var connectH2 = require_client_h2(); + var deprecatedInterceptorWarned = false; + var kClosedResolve = Symbol("kClosedResolve"); + function getPipelining(client) { + return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; + } + var Client = class extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').Client.Options} options + */ + constructor(url, { + interceptors, + maxHeaderSize, + headersTimeout, + socketTimeout, + requestTimeout, + connectTimeout, + bodyTimeout, + idleTimeout, + keepAlive, + keepAliveTimeout, + maxKeepAliveTimeout, + keepAliveMaxTimeout, + keepAliveTimeoutThreshold, + socketPath, + pipelining, + tls, + strictContentLength, + maxCachedSessions, + maxRedirections, + connect: connect2, + maxRequestsPerClient, + localAddress, + maxResponseSize, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + // h2 + maxConcurrentStreams, + allowH2 + } = {}) { + super(); + if (keepAlive !== void 0) { + throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); + } + if (socketTimeout !== void 0) { + throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + } + if (requestTimeout !== void 0) { + throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + } + if (idleTimeout !== void 0) { + throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); + } + if (maxKeepAliveTimeout !== void 0) { + throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); + } + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { + throw new InvalidArgumentError("invalid maxHeaderSize"); + } + if (socketPath != null && typeof socketPath !== "string") { + throw new InvalidArgumentError("invalid socketPath"); + } + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { + throw new InvalidArgumentError("invalid connectTimeout"); + } + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { + throw new InvalidArgumentError("invalid keepAliveTimeout"); + } + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { + throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); + } + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { + throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); + } + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); + } + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); + } + if (connect2 != null && typeof connect2 !== "function" && typeof connect2 !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { + throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); + } + if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) { + throw new InvalidArgumentError("localAddress must be valid string IP address"); + } + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { + throw new InvalidArgumentError("maxResponseSize must be a positive number"); + } + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) { + throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); + } + if (allowH2 != null && typeof allowH2 !== "boolean") { + throw new InvalidArgumentError("allowH2 must be a valid boolean value"); + } + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) { + throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); + } + if (typeof connect2 !== "function") { + connect2 = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...connect2 + }); + } + if (interceptors?.Client && Array.isArray(interceptors.Client)) { + this[kInterceptors] = interceptors.Client; + if (!deprecatedInterceptorWarned) { + deprecatedInterceptorWarned = true; + process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.", { + code: "UNDICI-CLIENT-INTERCEPTOR-DEPRECATED" + }); + } + } else { + this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; + } + this[kUrl] = util.parseOrigin(url); + this[kConnector] = connect2; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize; + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; + this[kServerName] = null; + this[kLocalAddress] = localAddress != null ? localAddress : null; + this[kResuming] = 0; + this[kNeedDrain] = 0; + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r +`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRedirections] = maxRedirections; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; + this[kHTTPContext] = null; + this[kQueue] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + this[kResume] = (sync) => resume(this, sync); + this[kOnError] = (err) => onError(this, err); + } + get pipelining() { + return this[kPipelining]; + } + set pipelining(value) { + this[kPipelining] = value; + this[kResume](true); + } + get [kPending]() { + return this[kQueue].length - this[kPendingIdx]; + } + get [kRunning]() { + return this[kPendingIdx] - this[kRunningIdx]; + } + get [kSize]() { + return this[kQueue].length - this[kRunningIdx]; + } + get [kConnected]() { + return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; + } + get [kBusy]() { + return Boolean( + this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0 + ); + } + /* istanbul ignore: only used for test */ + [kConnect](cb) { + connect(this); + this.once("connect", cb); + } + [kDispatch](opts, handler) { + const origin = opts.origin || this[kUrl].origin; + const request2 = new Request2(origin, opts, handler); + this[kQueue].push(request2); + if (this[kResuming]) { + } else if (util.bodyLength(request2.body) == null && util.isIterable(request2.body)) { + this[kResuming] = 1; + queueMicrotask(() => resume(this)); + } else { + this[kResume](true); + } + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { + this[kNeedDrain] = 2; + } + return this[kNeedDrain] < 2; + } + async [kClose]() { + return new Promise((resolve) => { + if (this[kSize]) { + this[kClosedResolve] = resolve; + } else { + resolve(null); + } + }); + } + async [kDestroy](err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]); + for (let i = 0; i < requests.length; i++) { + const request2 = requests[i]; + util.errorRequest(this, request2, err); + } + const callback = () => { + if (this[kClosedResolve]) { + this[kClosedResolve](); + this[kClosedResolve] = null; + } + resolve(null); + }; + if (this[kHTTPContext]) { + this[kHTTPContext].destroy(err, callback); + this[kHTTPContext] = null; + } else { + queueMicrotask(callback); + } + this[kResume](); + }); + } + }; + var createRedirectInterceptor = require_redirect_interceptor(); + function onError(client, err) { + if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request2 = requests[i]; + util.errorRequest(client, request2, err); + } + assert(client[kSize] === 0); + } + } + async function connect(client) { + assert(!client[kConnecting]); + assert(!client[kHTTPContext]); + let { host, hostname, protocol, port } = client[kUrl]; + if (hostname[0] === "[") { + const idx = hostname.indexOf("]"); + assert(idx !== -1); + const ip = hostname.substring(1, idx); + assert(net.isIP(ip)); + hostname = ip; + } + client[kConnecting] = true; + if (channels.beforeConnect.hasSubscribers) { + channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); + } + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket2) => { + if (err) { + reject(err); + } else { + resolve(socket2); + } + }); + }); + if (client.destroyed) { + util.destroy(socket.on("error", () => { + }), new ClientDestroyedError()); + return; + } + assert(socket); + try { + client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); + } catch (err) { + socket.destroy().on("error", () => { + }); + throw err; + } + client[kConnecting] = false; + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient] = client; + socket[kError] = null; + if (channels.connected.hasSubscribers) { + channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }); + } + client.emit("connect", client[kUrl], [client]); + } catch (err) { + if (client.destroyed) { + return; + } + client[kConnecting] = false; + if (channels.connectError.hasSubscribers) { + channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); + } + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + assert(client[kRunning] === 0); + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request2 = client[kQueue][client[kPendingIdx]++]; + util.errorRequest(client, request2, err); + } + } else { + onError(client, err); + } + client.emit("connectionError", client[kUrl], [client], err); + } + client[kResume](); + } + function emitDrain(client) { + client[kNeedDrain] = 0; + client.emit("drain", client[kUrl], [client]); + } + function resume(client, sync) { + if (client[kResuming] === 2) { + return; + } + client[kResuming] = 2; + _resume(client, sync); + client[kResuming] = 0; + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]); + client[kPendingIdx] -= client[kRunningIdx]; + client[kRunningIdx] = 0; + } + } + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert(client[kPending] === 0); + return; + } + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; + } + if (client[kHTTPContext]) { + client[kHTTPContext].resume(); + } + if (client[kBusy]) { + client[kNeedDrain] = 2; + } else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + queueMicrotask(() => emitDrain(client)); + } else { + emitDrain(client); + } + continue; + } + if (client[kPending] === 0) { + return; + } + if (client[kRunning] >= (getPipelining(client) || 1)) { + return; + } + const request2 = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request2.servername) { + if (client[kRunning] > 0) { + return; + } + client[kServerName] = request2.servername; + client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { + client[kHTTPContext] = null; + resume(client); + }); + } + if (client[kConnecting]) { + return; + } + if (!client[kHTTPContext]) { + connect(client); + return; + } + if (client[kHTTPContext].destroyed) { + return; + } + if (client[kHTTPContext].busy(request2)) { + return; + } + if (!request2.aborted && client[kHTTPContext].write(request2)) { + client[kPendingIdx]++; + } else { + client[kQueue].splice(client[kPendingIdx], 1); + } + } + } + module2.exports = Client; + } +}); + +// node_modules/undici/lib/dispatcher/fixed-queue.js +var require_fixed_queue2 = __commonJS({ + "node_modules/undici/lib/dispatcher/fixed-queue.js"(exports2, module2) { + "use strict"; + var kSize = 2048; + var kMask = kSize - 1; + var FixedCircularBuffer = class { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; + } + isEmpty() { + return this.top === this.bottom; + } + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) + return null; + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module2.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + isEmpty() { + return this.head.isEmpty(); + } + push(data) { + if (this.head.isFull()) { + this.head = this.head.next = new FixedCircularBuffer(); + } + this.head.push(data); + } + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) { + this.tail = tail.next; + } + return next; + } + }; + } +}); + +// node_modules/undici/lib/dispatcher/pool-stats.js +var require_pool_stats2 = __commonJS({ + "node_modules/undici/lib/dispatcher/pool-stats.js"(exports2, module2) { + var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols6(); + var kPool = Symbol("pool"); + var PoolStats = class { + constructor(pool) { + this[kPool] = pool; + } + get connected() { + return this[kPool][kConnected]; + } + get free() { + return this[kPool][kFree]; + } + get pending() { + return this[kPool][kPending]; + } + get queued() { + return this[kPool][kQueued]; + } + get running() { + return this[kPool][kRunning]; + } + get size() { + return this[kPool][kSize]; + } + }; + module2.exports = PoolStats; + } +}); + +// node_modules/undici/lib/dispatcher/pool-base.js +var require_pool_base2 = __commonJS({ + "node_modules/undici/lib/dispatcher/pool-base.js"(exports2, module2) { + "use strict"; + var DispatcherBase = require_dispatcher_base2(); + var FixedQueue = require_fixed_queue2(); + var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols6(); + var PoolStats = require_pool_stats2(); + var kClients = Symbol("clients"); + var kNeedDrain = Symbol("needDrain"); + var kQueue = Symbol("queue"); + var kClosedResolve = Symbol("closed resolve"); + var kOnDrain = Symbol("onDrain"); + var kOnConnect = Symbol("onConnect"); + var kOnDisconnect = Symbol("onDisconnect"); + var kOnConnectionError = Symbol("onConnectionError"); + var kGetDispatcher = Symbol("get dispatcher"); + var kAddClient = Symbol("add client"); + var kRemoveClient = Symbol("remove client"); + var kStats = Symbol("stats"); + var PoolBase = class extends DispatcherBase { + constructor() { + super(); + this[kQueue] = new FixedQueue(); + this[kClients] = []; + this[kQueued] = 0; + const pool = this; + this[kOnDrain] = function onDrain(origin, targets) { + const queue = pool[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) { + break; + } + pool[kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); + } + this[kNeedDrain] = needDrain; + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false; + pool.emit("drain", origin, [pool, ...targets]); + } + if (pool[kClosedResolve] && queue.isEmpty()) { + Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); + } + }; + this[kOnConnect] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit("disconnect", origin, [pool, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit("connectionError", origin, [pool, ...targets], err); + }; + this[kStats] = new PoolStats(this); + } + get [kBusy]() { + return this[kNeedDrain]; + } + get [kConnected]() { + return this[kClients].filter((client) => client[kConnected]).length; + } + get [kFree]() { + return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients]) { + ret += pending; + } + return ret; + } + get [kRunning]() { + let ret = 0; + for (const { [kRunning]: running } of this[kClients]) { + ret += running; + } + return ret; + } + get [kSize]() { + let ret = this[kQueued]; + for (const { [kSize]: size } of this[kClients]) { + ret += size; + } + return ret; + } + get stats() { + return this[kStats]; + } + async [kClose]() { + if (this[kQueue].isEmpty()) { + return Promise.all(this[kClients].map((c) => c.close())); + } else { + return new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); + } + } + async [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) { + break; + } + item.handler.onError(err); + } + return Promise.all(this[kClients].map((c) => c.destroy(err))); + } + [kDispatch](opts, handler) { + const dispatcher = this[kGetDispatcher](); + if (!dispatcher) { + this[kNeedDrain] = true; + this[kQueue].push({ opts, handler }); + this[kQueued]++; + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true; + this[kNeedDrain] = !this[kGetDispatcher](); + } + return !this[kNeedDrain]; + } + [kAddClient](client) { + client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].push(client); + if (this[kNeedDrain]) { + queueMicrotask(() => { + if (this[kNeedDrain]) { + this[kOnDrain](client[kUrl], [this, client]); + } + }); + } + return this; + } + [kRemoveClient](client) { + client.close(() => { + const idx = this[kClients].indexOf(client); + if (idx !== -1) { + this[kClients].splice(idx, 1); + } + }); + this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module2.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + }; + } +}); + +// node_modules/undici/lib/dispatcher/pool.js +var require_pool2 = __commonJS({ + "node_modules/undici/lib/dispatcher/pool.js"(exports2, module2) { + "use strict"; + var { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kGetDispatcher + } = require_pool_base2(); + var Client = require_client2(); + var { + InvalidArgumentError + } = require_errors2(); + var util = require_util9(); + var { kUrl, kInterceptors } = require_symbols6(); + var buildConnector = require_connect2(); + var kOptions = Symbol("options"); + var kConnections = Symbol("connections"); + var kFactory = Symbol("factory"); + function defaultFactory(origin, opts) { + return new Client(origin, opts); + } + var Pool = class extends PoolBase { + constructor(origin, { + connections, + factory = defaultFactory, + connect, + connectTimeout, + tls, + maxCachedSessions, + socketPath, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + allowH2, + ...options + } = {}) { + super(); + if (connections != null && (!Number.isFinite(connections) || connections < 0)) { + throw new InvalidArgumentError("invalid connections"); + } + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); + } + if (connect != null && typeof connect !== "function" && typeof connect !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + if (typeof connect !== "function") { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...connect + }); + } + this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; + this[kConnections] = connections || null; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { ...util.deepClone(options), connect, allowH2 }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kFactory] = factory; + } + [kGetDispatcher]() { + for (const client of this[kClients]) { + if (!client[kNeedDrain]) { + return client; + } + } + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; + } + } + }; + module2.exports = Pool; + } +}); + +// node_modules/undici/lib/dispatcher/balanced-pool.js +var require_balanced_pool2 = __commonJS({ + "node_modules/undici/lib/dispatcher/balanced-pool.js"(exports2, module2) { + "use strict"; + var { + BalancedPoolMissingUpstreamError, + InvalidArgumentError + } = require_errors2(); + var { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + } = require_pool_base2(); + var Pool = require_pool2(); + var { kUrl, kInterceptors } = require_symbols6(); + var { parseOrigin } = require_util9(); + var kFactory = Symbol("factory"); + var kOptions = Symbol("options"); + var kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); + var kCurrentWeight = Symbol("kCurrentWeight"); + var kIndex = Symbol("kIndex"); + var kWeight = Symbol("kWeight"); + var kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); + var kErrorPenalty = Symbol("kErrorPenalty"); + function getGreatestCommonDivisor(a, b) { + if (b === 0) return a; + return getGreatestCommonDivisor(b, a % b); + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var BalancedPool = class extends PoolBase { + constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { + super(); + this[kOptions] = opts; + this[kIndex] = -1; + this[kCurrentWeight] = 0; + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; + this[kErrorPenalty] = this[kOptions].errorPenalty || 15; + if (!Array.isArray(upstreams)) { + upstreams = [upstreams]; + } + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); + } + this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; + this[kFactory] = factory; + for (const upstream of upstreams) { + this.addUpstream(upstream); + } + this._updateBalancedPoolStats(); + } + addUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + if (this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true)) { + return this; + } + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); + this[kAddClient](pool); + pool.on("connect", () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); + }); + pool.on("connectionError", () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + }); + pool.on("disconnect", (...args) => { + const err = args[2]; + if (err && err.code === "UND_ERR_SOCKET") { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + } + }); + for (const client of this[kClients]) { + client[kWeight] = this[kMaxWeightPerServer]; + } + this._updateBalancedPoolStats(); + return this; + } + _updateBalancedPoolStats() { + this[kGreatestCommonDivisor] = this[kClients].map((p) => p[kWeight]).reduce(getGreatestCommonDivisor, 0); + } + removeUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + const pool = this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true); + if (pool) { + this[kRemoveClient](pool); + } + return this; + } + get upstreams() { + return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); + } + [kGetDispatcher]() { + if (this[kClients].length === 0) { + throw new BalancedPoolMissingUpstreamError(); + } + const dispatcher = this[kClients].find((dispatcher2) => !dispatcher2[kNeedDrain] && dispatcher2.closed !== true && dispatcher2.destroyed !== true); + if (!dispatcher) { + return; + } + const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true); + if (allClientsBusy) { + return; + } + let counter = 0; + let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length; + const pool = this[kClients][this[kIndex]]; + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { + maxWeightIndex = this[kIndex]; + } + if (this[kIndex] === 0) { + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; + if (this[kCurrentWeight] <= 0) { + this[kCurrentWeight] = this[kMaxWeightPerServer]; + } + } + if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) { + return pool; + } + } + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; + this[kIndex] = maxWeightIndex; + return this[kClients][maxWeightIndex]; + } + }; + module2.exports = BalancedPool; + } +}); + +// node_modules/undici/lib/dispatcher/agent.js +var require_agent2 = __commonJS({ + "node_modules/undici/lib/dispatcher/agent.js"(exports2, module2) { + "use strict"; + var { InvalidArgumentError } = require_errors2(); + var { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols6(); + var DispatcherBase = require_dispatcher_base2(); + var Pool = require_pool2(); + var Client = require_client2(); + var util = require_util9(); + var createRedirectInterceptor = require_redirect_interceptor(); + var kOnConnect = Symbol("onConnect"); + var kOnDisconnect = Symbol("onDisconnect"); + var kOnConnectionError = Symbol("onConnectionError"); + var kMaxRedirections = Symbol("maxRedirections"); + var kOnDrain = Symbol("onDrain"); + var kFactory = Symbol("factory"); + var kOptions = Symbol("options"); + function defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); + } + var Agent = class extends DispatcherBase { + constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { + super(); + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); + } + if (connect != null && typeof connect !== "function" && typeof connect !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + if (connect && typeof connect !== "function") { + connect = { ...connect }; + } + this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; + this[kOptions] = { ...util.deepClone(options), connect }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kMaxRedirections] = maxRedirections; + this[kFactory] = factory; + this[kClients] = /* @__PURE__ */ new Map(); + this[kOnDrain] = (origin, targets) => { + this.emit("drain", origin, [this, ...targets]); + }; + this[kOnConnect] = (origin, targets) => { + this.emit("connect", origin, [this, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + this.emit("disconnect", origin, [this, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + this.emit("connectionError", origin, [this, ...targets], err); + }; + } + get [kRunning]() { + let ret = 0; + for (const client of this[kClients].values()) { + ret += client[kRunning]; + } + return ret; + } + [kDispatch](opts, handler) { + let key; + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) { + key = String(opts.origin); + } else { + throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + } + let dispatcher = this[kClients].get(key); + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].set(key, dispatcher); + } + return dispatcher.dispatch(opts, handler); + } + async [kClose]() { + const closePromises = []; + for (const client of this[kClients].values()) { + closePromises.push(client.close()); + } + this[kClients].clear(); + await Promise.all(closePromises); + } + async [kDestroy](err) { + const destroyPromises = []; + for (const client of this[kClients].values()) { + destroyPromises.push(client.destroy(err)); + } + this[kClients].clear(); + await Promise.all(destroyPromises); + } + }; + module2.exports = Agent; + } +}); + +// node_modules/undici/lib/dispatcher/proxy-agent.js +var require_proxy_agent2 = __commonJS({ + "node_modules/undici/lib/dispatcher/proxy-agent.js"(exports2, module2) { + "use strict"; + var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols6(); + var { URL: URL4 } = require("node:url"); + var Agent = require_agent2(); + var Pool = require_pool2(); + var DispatcherBase = require_dispatcher_base2(); + var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors2(); + var buildConnector = require_connect2(); + var kAgent = Symbol("proxy agent"); + var kClient = Symbol("proxy client"); + var kProxyHeaders = Symbol("proxy headers"); + var kRequestTls = Symbol("request tls settings"); + var kProxyTls = Symbol("proxy tls settings"); + var kConnectEndpoint = Symbol("connect endpoint function"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var ProxyAgent2 = class extends DispatcherBase { + constructor(opts) { + super(); + if (!opts || typeof opts === "object" && !(opts instanceof URL4) && !opts.uri) { + throw new InvalidArgumentError("Proxy uri is mandatory"); + } + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") { + throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); + } + const url = this.#getUrl(opts); + const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; + this[kProxy] = { uri: href, protocol }; + this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + if (opts.auth && opts.token) { + throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); + } else if (opts.auth) { + this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + } else if (opts.token) { + this[kProxyHeaders]["proxy-authorization"] = opts.token; + } else if (username && password) { + this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + } + const connect = buildConnector({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); + this[kClient] = clientFactory(url, { connect }); + this[kAgent] = new Agent({ + ...opts, + connect: async (opts2, callback) => { + let requestedPath = opts2.host; + if (!opts2.port) { + requestedPath += `:${defaultProtocolPort(opts2.protocol)}`; + } + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedPath, + signal: opts2.signal, + headers: { + ...this[kProxyHeaders], + host: opts2.host + }, + servername: this[kProxyTls]?.servername || proxyHostname + }); + if (statusCode !== 200) { + socket.on("error", () => { + }).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts2.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) { + servername = this[kRequestTls].servername; + } else { + servername = opts2.servername; + } + this[kConnectEndpoint]({ ...opts2, servername, httpSocket: socket }, callback); + } catch (err) { + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + callback(new SecureProxyConnectionError(err)); + } else { + callback(err); + } + } + } + }); + } + dispatch(opts, handler) { + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + if (headers && !("host" in headers) && !("Host" in headers)) { + const { host } = new URL4(opts.origin); + headers.host = host; + } + return this[kAgent].dispatch( + { + ...opts, + headers + }, + handler + ); + } + /** + * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts + * @returns {URL} + */ + #getUrl(opts) { + if (typeof opts === "string") { + return new URL4(opts); + } else if (opts instanceof URL4) { + return opts; + } else { + return new URL4(opts.uri); + } + } + async [kClose]() { + await this[kAgent].close(); + await this[kClient].close(); + } + async [kDestroy]() { + await this[kAgent].destroy(); + await this[kClient].destroy(); + } + }; + function buildHeaders(headers) { + if (Array.isArray(headers)) { + const headersPair = {}; + for (let i = 0; i < headers.length; i += 2) { + headersPair[headers[i]] = headers[i + 1]; + } + return headersPair; + } + return headers; + } + function throwIfProxyAuthIsSent(headers) { + const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); + if (existProxyAuth) { + throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); + } + } + module2.exports = ProxyAgent2; + } +}); + +// node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +var require_env_http_proxy_agent = __commonJS({ + "node_modules/undici/lib/dispatcher/env-http-proxy-agent.js"(exports2, module2) { + "use strict"; + var DispatcherBase = require_dispatcher_base2(); + var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols6(); + var ProxyAgent2 = require_proxy_agent2(); + var Agent = require_agent2(); + var DEFAULT_PORTS = { + "http:": 80, + "https:": 443 + }; + var experimentalWarned = false; + var EnvHttpProxyAgent = class extends DispatcherBase { + #noProxyValue = null; + #noProxyEntries = null; + #opts = null; + constructor(opts = {}) { + super(); + this.#opts = opts; + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.", { + code: "UNDICI-EHPA" + }); + } + const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; + this[kNoProxyAgent] = new Agent(agentOpts); + const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; + if (HTTP_PROXY) { + this[kHttpProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTP_PROXY }); + } else { + this[kHttpProxyAgent] = this[kNoProxyAgent]; + } + const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; + if (HTTPS_PROXY) { + this[kHttpsProxyAgent] = new ProxyAgent2({ ...agentOpts, uri: HTTPS_PROXY }); + } else { + this[kHttpsProxyAgent] = this[kHttpProxyAgent]; + } + this.#parseNoProxy(); + } + [kDispatch](opts, handler) { + const url = new URL(opts.origin); + const agent = this.#getProxyAgentForUrl(url); + return agent.dispatch(opts, handler); + } + async [kClose]() { + await this[kNoProxyAgent].close(); + if (!this[kHttpProxyAgent][kClosed]) { + await this[kHttpProxyAgent].close(); + } + if (!this[kHttpsProxyAgent][kClosed]) { + await this[kHttpsProxyAgent].close(); + } + } + async [kDestroy](err) { + await this[kNoProxyAgent].destroy(err); + if (!this[kHttpProxyAgent][kDestroyed]) { + await this[kHttpProxyAgent].destroy(err); + } + if (!this[kHttpsProxyAgent][kDestroyed]) { + await this[kHttpsProxyAgent].destroy(err); + } + } + #getProxyAgentForUrl(url) { + let { protocol, host: hostname, port } = url; + hostname = hostname.replace(/:\d*$/, "").toLowerCase(); + port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; + if (!this.#shouldProxy(hostname, port)) { + return this[kNoProxyAgent]; + } + if (protocol === "https:") { + return this[kHttpsProxyAgent]; + } + return this[kHttpProxyAgent]; + } + #shouldProxy(hostname, port) { + if (this.#noProxyChanged) { + this.#parseNoProxy(); + } + if (this.#noProxyEntries.length === 0) { + return true; + } + if (this.#noProxyValue === "*") { + return false; + } + for (let i = 0; i < this.#noProxyEntries.length; i++) { + const entry = this.#noProxyEntries[i]; + if (entry.port && entry.port !== port) { + continue; + } + if (!/^[.*]/.test(entry.hostname)) { + if (hostname === entry.hostname) { + return false; + } + } else { + if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) { + return false; + } + } + } + return true; + } + #parseNoProxy() { + const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; + const noProxySplit = noProxyValue.split(/[,\s]/); + const noProxyEntries = []; + for (let i = 0; i < noProxySplit.length; i++) { + const entry = noProxySplit[i]; + if (!entry) { + continue; + } + const parsed = entry.match(/^(.+):(\d+)$/); + noProxyEntries.push({ + hostname: (parsed ? parsed[1] : entry).toLowerCase(), + port: parsed ? Number.parseInt(parsed[2], 10) : 0 + }); + } + this.#noProxyValue = noProxyValue; + this.#noProxyEntries = noProxyEntries; + } + get #noProxyChanged() { + if (this.#opts.noProxy !== void 0) { + return false; + } + return this.#noProxyValue !== this.#noProxyEnv; + } + get #noProxyEnv() { + return process.env.no_proxy ?? process.env.NO_PROXY ?? ""; + } + }; + module2.exports = EnvHttpProxyAgent; + } +}); + +// node_modules/undici/lib/handler/retry-handler.js +var require_retry_handler = __commonJS({ + "node_modules/undici/lib/handler/retry-handler.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { kRetryHandlerDefaultRetry } = require_symbols6(); + var { RequestRetryError } = require_errors2(); + var { + isDisturbed, + parseHeaders, + parseRangeHeader, + wrapRequestBody + } = require_util9(); + function calculateRetryAfterHeader(retryAfter) { + const current = Date.now(); + return new Date(retryAfter).getTime() - current; + } + var RetryHandler = class _RetryHandler { + constructor(opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts; + const { + // Retry scoped + retry: retryFn, + maxRetries, + maxTimeout, + minTimeout, + timeoutFactor, + // Response scoped + methods, + errorCodes, + retryAfter, + statusCodes + } = retryOptions ?? {}; + this.dispatch = handlers.dispatch; + this.handler = handlers.handler; + this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) }; + this.abort = null; + this.aborted = false; + this.retryOpts = { + retry: retryFn ?? _RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1e3, + // 30s, + minTimeout: minTimeout ?? 500, + // .5s + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + // What errors we should retry + methods: methods ?? ["GET", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE"], + // Indicates which errors to retry + statusCodes: statusCodes ?? [500, 502, 503, 504, 429], + // List of errors to retry + errorCodes: errorCodes ?? [ + "ECONNRESET", + "ECONNREFUSED", + "ENOTFOUND", + "ENETDOWN", + "ENETUNREACH", + "EHOSTDOWN", + "EHOSTUNREACH", + "EPIPE", + "UND_ERR_SOCKET" + ] + }; + this.retryCount = 0; + this.retryCountCheckpoint = 0; + this.start = 0; + this.end = null; + this.etag = null; + this.resume = null; + this.handler.onConnect((reason) => { + this.aborted = true; + if (this.abort) { + this.abort(reason); + } else { + this.reason = reason; + } + }); + } + onRequestSent() { + if (this.handler.onRequestSent) { + this.handler.onRequestSent(); + } + } + onUpgrade(statusCode, headers, socket) { + if (this.handler.onUpgrade) { + this.handler.onUpgrade(statusCode, headers, socket); + } + } + onConnect(abort) { + if (this.aborted) { + abort(this.reason); + } else { + this.abort = abort; + } + } + onBodySent(chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + } + static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { + const { statusCode, code, headers } = err; + const { method, retryOptions } = opts; + const { + maxRetries, + minTimeout, + maxTimeout, + timeoutFactor, + statusCodes, + errorCodes, + methods + } = retryOptions; + const { counter } = state; + if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code)) { + cb(err); + return; + } + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; + } + if (counter > maxRetries) { + cb(err); + return; + } + let retryAfterHeader = headers?.["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); + setTimeout(() => cb(null), retryTimeout); + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders); + this.retryCount += 1; + if (statusCode >= 300) { + if (this.retryOpts.statusCodes.includes(statusCode) === false) { + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ); + } else { + this.abort( + new RequestRetryError("Request failed", statusCode, { + headers, + data: { + count: this.retryCount + } + }) + ); + return false; + } + } + if (this.resume != null) { + this.resume = null; + if (statusCode !== 206) { + return true; + } + const contentRange = parseRangeHeader(headers["content-range"]); + if (!contentRange) { + this.abort( + new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + data: { count: this.retryCount } + }) + ); + return false; + } + if (this.etag != null && this.etag !== headers.etag) { + this.abort( + new RequestRetryError("ETag mismatch", statusCode, { + headers, + data: { count: this.retryCount } + }) + ); + return false; + } + const { start, size, end = size } = contentRange; + assert(this.start === start, "content-range mismatch"); + assert(this.end == null || this.end === end, "content-range mismatch"); + this.resume = resume; + return true; + } + if (this.end == null) { + if (statusCode === 206) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) { + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ); + } + const { start, size, end = size } = range; + assert( + start != null && Number.isFinite(start), + "content-range mismatch" + ); + assert(end != null && Number.isFinite(end), "invalid content-length"); + this.start = start; + this.end = end; + } + if (this.end == null) { + const contentLength = headers["content-length"]; + this.end = contentLength != null ? Number(contentLength) : null; + } + assert(Number.isFinite(this.start)); + assert( + this.end == null || Number.isFinite(this.end), + "invalid content-length" + ); + this.resume = resume; + this.etag = headers.etag != null ? headers.etag : null; + if (this.etag != null && this.etag.startsWith("W/")) { + this.etag = null; + } + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ); + } + const err = new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + }); + this.abort(err); + return false; + } + onData(chunk) { + this.start += chunk.length; + return this.handler.onData(chunk); + } + onComplete(rawTrailers) { + this.retryCount = 0; + return this.handler.onComplete(rawTrailers); + } + onError(err) { + if (this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err); + } + if (this.retryCount - this.retryCountCheckpoint > 0) { + this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); + } else { + this.retryCount += 1; + } + this.retryOpts.retry( + err, + { + state: { counter: this.retryCount }, + opts: { retryOptions: this.retryOpts, ...this.opts } + }, + onRetry.bind(this) + ); + function onRetry(err2) { + if (err2 != null || this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err2); + } + if (this.start !== 0) { + const headers = { range: `bytes=${this.start}-${this.end ?? ""}` }; + if (this.etag != null) { + headers["if-match"] = this.etag; + } + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + ...headers + } + }; + } + try { + this.retryCountCheckpoint = this.retryCount; + this.dispatch(this.opts, this); + } catch (err3) { + this.handler.onError(err3); + } + } + } + }; + module2.exports = RetryHandler; + } +}); + +// node_modules/undici/lib/dispatcher/retry-agent.js +var require_retry_agent = __commonJS({ + "node_modules/undici/lib/dispatcher/retry-agent.js"(exports2, module2) { + "use strict"; + var Dispatcher = require_dispatcher2(); + var RetryHandler = require_retry_handler(); + var RetryAgent = class extends Dispatcher { + #agent = null; + #options = null; + constructor(agent, options = {}) { + super(options); + this.#agent = agent; + this.#options = options; + } + dispatch(opts, handler) { + const retry2 = new RetryHandler({ + ...opts, + retryOptions: this.#options + }, { + dispatch: this.#agent.dispatch.bind(this.#agent), + handler + }); + return this.#agent.dispatch(opts, retry2); + } + close() { + return this.#agent.close(); + } + destroy() { + return this.#agent.destroy(); + } + }; + module2.exports = RetryAgent; + } +}); + +// node_modules/undici/lib/api/readable.js +var require_readable2 = __commonJS({ + "node_modules/undici/lib/api/readable.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { Readable } = require("node:stream"); + var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError: AbortError2 } = require_errors2(); + var util = require_util9(); + var { ReadableStreamFrom } = require_util9(); + var kConsume = Symbol("kConsume"); + var kReading = Symbol("kReading"); + var kBody = Symbol("kBody"); + var kAbort = Symbol("kAbort"); + var kContentType = Symbol("kContentType"); + var kContentLength = Symbol("kContentLength"); + var noop = () => { + }; + var BodyReadable = class extends Readable { + constructor({ + resume, + abort, + contentType = "", + contentLength, + highWaterMark = 64 * 1024 + // Same as nodejs fs streams. + }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }); + this._readableState.dataEmitted = false; + this[kAbort] = abort; + this[kConsume] = null; + this[kBody] = null; + this[kContentType] = contentType; + this[kContentLength] = contentLength; + this[kReading] = false; + } + destroy(err) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError(); + } + if (err) { + this[kAbort](); + } + return super.destroy(err); + } + _destroy(err, callback) { + if (!this[kReading]) { + setImmediate(() => { + callback(err); + }); + } else { + callback(err); + } + } + on(ev, ...args) { + if (ev === "data" || ev === "readable") { + this[kReading] = true; + } + return super.on(ev, ...args); + } + addListener(ev, ...args) { + return this.on(ev, ...args); + } + off(ev, ...args) { + const ret = super.off(ev, ...args); + if (ev === "data" || ev === "readable") { + this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; + } + return ret; + } + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + push(chunk) { + if (this[kConsume] && chunk !== null) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; + } + return super.push(chunk); + } + // https://fetch.spec.whatwg.org/#dom-body-text + async text() { + return consume(this, "text"); + } + // https://fetch.spec.whatwg.org/#dom-body-json + async json() { + return consume(this, "json"); + } + // https://fetch.spec.whatwg.org/#dom-body-blob + async blob() { + return consume(this, "blob"); + } + // https://fetch.spec.whatwg.org/#dom-body-arraybuffer + async arrayBuffer() { + return consume(this, "arrayBuffer"); + } + // https://fetch.spec.whatwg.org/#dom-body-formdata + async formData() { + throw new NotSupportedError(); + } + // https://fetch.spec.whatwg.org/#dom-body-bodyused + get bodyUsed() { + return util.isDisturbed(this); + } + // https://fetch.spec.whatwg.org/#dom-body-body + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert(this[kBody].locked); + } + } + return this[kBody]; + } + async dump(opts) { + let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024; + const signal = opts?.signal; + if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) { + throw new InvalidArgumentError("signal must be an AbortSignal"); + } + signal?.throwIfAborted(); + if (this._readableState.closeEmitted) { + return null; + } + return await new Promise((resolve, reject) => { + if (this[kContentLength] > limit) { + this.destroy(new AbortError2()); + } + const onAbort = () => { + this.destroy(signal.reason ?? new AbortError2()); + }; + signal?.addEventListener("abort", onAbort); + this.on("close", function() { + signal?.removeEventListener("abort", onAbort); + if (signal?.aborted) { + reject(signal.reason ?? new AbortError2()); + } else { + resolve(null); + } + }).on("error", noop).on("data", function(chunk) { + limit -= chunk.length; + if (limit <= 0) { + this.destroy(); + } + }).resume(); + }); + } + }; + function isLocked(self) { + return self[kBody] && self[kBody].locked === true || self[kConsume]; + } + function isUnusable(self) { + return util.isDisturbed(self) || isLocked(self); + } + async function consume(stream, type) { + assert(!stream[kConsume]); + return new Promise((resolve, reject) => { + if (isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) { + stream.on("error", (err) => { + reject(err); + }).on("close", () => { + reject(new TypeError("unusable")); + }); + } else { + reject(rState.errored ?? new TypeError("unusable")); + } + } else { + queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + }; + stream.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) { + consumeFinish(this[kConsume], new RequestAbortedError()); + } + }); + consumeStart(stream[kConsume]); + }); + } + }); + } + function consumeStart(consume2) { + if (consume2.body === null) { + return; + } + const { _readableState: state } = consume2.stream; + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for (let n = start; n < end; n++) { + consumePush(consume2, state.buffer[n]); + } + } else { + for (const chunk of state.buffer) { + consumePush(consume2, chunk); + } + } + if (state.endEmitted) { + consumeEnd(this[kConsume]); + } else { + consume2.stream.on("end", function() { + consumeEnd(this[kConsume]); + }); + } + consume2.stream.resume(); + while (consume2.stream.read() != null) { + } + } + function chunksDecode(chunks, length) { + if (chunks.length === 0 || length === 0) { + return ""; + } + const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); + const bufferLength = buffer.length; + const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; + return buffer.utf8Slice(start, bufferLength); + } + function consumeEnd(consume2) { + const { type, body, resolve, stream, length } = consume2; + try { + if (type === "text") { + resolve(chunksDecode(body, length)); + } else if (type === "json") { + resolve(JSON.parse(chunksDecode(body, length))); + } else if (type === "arrayBuffer") { + const dst = new Uint8Array(length); + let pos = 0; + for (const buf of body) { + dst.set(buf, pos); + pos += buf.byteLength; + } + resolve(dst.buffer); + } else if (type === "blob") { + resolve(new Blob(body, { type: stream[kContentType] })); + } + consumeFinish(consume2); + } catch (err) { + stream.destroy(err); + } + } + function consumePush(consume2, chunk) { + consume2.length += chunk.length; + consume2.body.push(chunk); + } + function consumeFinish(consume2, err) { + if (consume2.body === null) { + return; + } + if (err) { + consume2.reject(err); + } else { + consume2.resolve(); + } + consume2.type = null; + consume2.stream = null; + consume2.resolve = null; + consume2.reject = null; + consume2.length = 0; + consume2.body = null; + } + module2.exports = { Readable: BodyReadable, chunksDecode }; + } +}); + +// node_modules/undici/lib/api/util.js +var require_util11 = __commonJS({ + "node_modules/undici/lib/api/util.js"(exports2, module2) { + var assert = require("node:assert"); + var { + ResponseStatusCodeError + } = require_errors2(); + var { chunksDecode } = require_readable2(); + var CHUNK_LIMIT = 128 * 1024; + async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert(body); + let chunks = []; + let length = 0; + try { + for await (const chunk of body) { + chunks.push(chunk); + length += chunk.length; + if (length > CHUNK_LIMIT) { + chunks = []; + length = 0; + break; + } + } + } catch { + chunks = []; + length = 0; + } + const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`; + if (statusCode === 204 || !contentType || !length) { + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))); + return; + } + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + let payload; + try { + if (isContentTypeApplicationJson(contentType)) { + payload = JSON.parse(chunksDecode(chunks, length)); + } else if (isContentTypeText(contentType)) { + payload = chunksDecode(chunks, length); + } + } catch { + } finally { + Error.stackTraceLimit = stackTraceLimit; + } + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))); + } + var isContentTypeApplicationJson = (contentType) => { + return contentType.length > 15 && contentType[11] === "/" && contentType[0] === "a" && contentType[1] === "p" && contentType[2] === "p" && contentType[3] === "l" && contentType[4] === "i" && contentType[5] === "c" && contentType[6] === "a" && contentType[7] === "t" && contentType[8] === "i" && contentType[9] === "o" && contentType[10] === "n" && contentType[12] === "j" && contentType[13] === "s" && contentType[14] === "o" && contentType[15] === "n"; + }; + var isContentTypeText = (contentType) => { + return contentType.length > 4 && contentType[4] === "/" && contentType[0] === "t" && contentType[1] === "e" && contentType[2] === "x" && contentType[3] === "t"; + }; + module2.exports = { + getResolveErrorBodyCallback, + isContentTypeApplicationJson, + isContentTypeText + }; + } +}); + +// node_modules/undici/lib/api/api-request.js +var require_api_request2 = __commonJS({ + "node_modules/undici/lib/api/api-request.js"(exports2, module2) { + "use strict"; + var assert = require("node:assert"); + var { Readable } = require_readable2(); + var { InvalidArgumentError, RequestAbortedError } = require_errors2(); + var util = require_util9(); + var { getResolveErrorBodyCallback } = require_util11(); + var { AsyncResource } = require("node:async_hooks"); + var RequestHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; + try { + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) { + throw new InvalidArgumentError("invalid highWaterMark"); + } + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + if (method === "CONNECT") { + throw new InvalidArgumentError("invalid method"); + } + if (onInfo && typeof onInfo !== "function") { + throw new InvalidArgumentError("invalid onInfo callback"); + } + super("UNDICI_REQUEST"); + } catch (err) { + if (util.isStream(body)) { + util.destroy(body.on("error", util.nop), err); + } + throw err; + } + this.method = method; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError; + this.highWaterMark = highWaterMark; + this.signal = signal; + this.reason = null; + this.removeAbortListener = null; + if (util.isStream(body)) { + body.on("error", (err) => { + this.onError(err); + }); + } + if (this.signal) { + if (this.signal.aborted) { + this.reason = this.signal.reason ?? new RequestAbortedError(); + } else { + this.removeAbortListener = util.addAbortListener(this.signal, () => { + this.reason = this.signal.reason ?? new RequestAbortedError(); + if (this.res) { + util.destroy(this.res, this.reason); + } else if (this.abort) { + this.abort(this.reason); + } + if (this.removeAbortListener) { + this.res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + }); + } + } + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }); + } + return; + } + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const contentLength = parsedHeaders["content-length"]; + const res = new Readable({ + resume, + abort, + contentType, + contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, + highWaterMark + }); + if (this.removeAbortListener) { + res.on("close", this.removeAbortListener); + } + this.callback = null; + this.res = res; + if (callback !== null) { + if (this.throwOnError && statusCode >= 400) { + this.runInAsyncScope( + getResolveErrorBodyCallback, + null, + { callback, body: res, contentType, statusCode, statusMessage, headers } + ); + } else { + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }); + } + } + } + onData(chunk) { + return this.res.push(chunk); + } + onComplete(trailers) { + util.parseHeaders(trailers, this.trailers); + this.res.push(null); + } + onError(err) { + const { res, callback, body, opaque } = this; + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (res) { + this.res = null; + queueMicrotask(() => { + util.destroy(res, err); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + if (this.removeAbortListener) { + res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + } + }; + function request2(opts, callback) { + if (callback === void 0) { + return new Promise((resolve, reject) => { + request2.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + } + try { + this.dispatch(opts, new RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module2.exports = request2; + module2.exports.RequestHandler = RequestHandler; + } +}); + +// node_modules/undici/lib/api/abort-signal.js +var require_abort_signal2 = __commonJS({ + "node_modules/undici/lib/api/abort-signal.js"(exports2, module2) { + var { addAbortListener } = require_util9(); + var { RequestAbortedError } = require_errors2(); + var kListener = Symbol("kListener"); + var kSignal = Symbol("kSignal"); + function abort(self) { if (self.abort) { self.abort(self[kSignal]?.reason); } else { @@ -28116,8 +49363,8 @@ var require_api_stream2 = __commonJS({ var assert = require("node:assert"); var { finished, PassThrough } = require("node:stream"); var { InvalidArgumentError, InvalidReturnValueError } = require_errors2(); - var util = require_util8(); - var { getResolveErrorBodyCallback } = require_util10(); + var util = require_util9(); + var { getResolveErrorBodyCallback } = require_util11(); var { AsyncResource } = require("node:async_hooks"); var { addSignal, removeSignal } = require_abort_signal2(); var StreamHandler = class extends AsyncResource { @@ -28296,7 +49543,7 @@ var require_api_pipeline2 = __commonJS({ InvalidReturnValueError, RequestAbortedError } = require_errors2(); - var util = require_util8(); + var util = require_util9(); var { AsyncResource } = require("node:async_hooks"); var { addSignal, removeSignal } = require_abort_signal2(); var assert = require("node:assert"); @@ -28488,7 +49735,7 @@ var require_api_upgrade2 = __commonJS({ "use strict"; var { InvalidArgumentError, SocketError } = require_errors2(); var { AsyncResource } = require("node:async_hooks"); - var util = require_util8(); + var util = require_util9(); var { addSignal, removeSignal } = require_abort_signal2(); var assert = require("node:assert"); var UpgradeHandler = class extends AsyncResource { @@ -28581,7 +49828,7 @@ var require_api_connect2 = __commonJS({ var assert = require("node:assert"); var { AsyncResource } = require("node:async_hooks"); var { InvalidArgumentError, SocketError } = require_errors2(); - var util = require_util8(); + var util = require_util9(); var { addSignal, removeSignal } = require_abort_signal2(); var ConnectHandler = class extends AsyncResource { constructor(opts, callback) { @@ -28736,7 +49983,7 @@ var require_mock_utils2 = __commonJS({ kOrigin, kGetNetConnect } = require_mock_symbols2(); - var { buildURL } = require_util8(); + var { buildURL } = require_util9(); var { STATUS_CODES } = require("node:http"); var { types: { @@ -28835,23 +50082,23 @@ var require_mock_utils2 = __commonJS({ } function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; - const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)); + const resolvedPath2 = typeof basePath === "string" ? safeUrl(basePath) : basePath; + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath2)); if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath2}'`); } matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); + throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath2}'`); } matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); + throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath2}'`); } matchedMockDispatches = matchedMockDispatches.filter((mockDispatch2) => matchHeaders(mockDispatch2, key.headers)); if (matchedMockDispatches.length === 0) { const headers = typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers; - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`); + throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath2}'`); } return matchedMockDispatches[0]; } @@ -29030,7 +50277,7 @@ var require_mock_interceptor2 = __commonJS({ kMockDispatch } = require_mock_symbols2(); var { InvalidArgumentError } = require_errors2(); - var { buildURL } = require_util8(); + var { buildURL } = require_util9(); var MockScope = class { constructor(mockDispatch) { this[kMockDispatch] = mockDispatch; @@ -29611,7 +50858,7 @@ var require_retry3 = __commonJS({ var require_dump = __commonJS({ "node_modules/undici/lib/interceptor/dump.js"(exports2, module2) { "use strict"; - var util = require_util8(); + var util = require_util9(); var { InvalidArgumentError, RequestAbortedError } = require_errors2(); var DecoratorHandler = require_decorator_handler(); var DumpHandler = class extends DecoratorHandler { @@ -29710,12 +50957,12 @@ var require_headers2 = __commonJS({ "node_modules/undici/lib/web/fetch/headers.js"(exports2, module2) { "use strict"; var { kConstruct } = require_symbols6(); - var { kEnumerableProperty } = require_util8(); + var { kEnumerableProperty } = require_util9(); var { iteratorMixin, isValidHeaderName, isValidHeaderValue - } = require_util9(); + } = require_util10(); var { webidl } = require_webidl2(); var assert = require("node:assert"); var util = require("node:util"); @@ -29944,7 +51191,7 @@ var require_headers2 = __commonJS({ } } }; - var Headers = class _Headers { + var Headers2 = class _Headers { #guard; #headersList; constructor(init = void 0) { @@ -30093,13 +51340,13 @@ var require_headers2 = __commonJS({ o.#headersList = list; } }; - var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers; - Reflect.deleteProperty(Headers, "getHeadersGuard"); - Reflect.deleteProperty(Headers, "setHeadersGuard"); - Reflect.deleteProperty(Headers, "getHeadersList"); - Reflect.deleteProperty(Headers, "setHeadersList"); - iteratorMixin("Headers", Headers, kHeadersSortedMap, 0, 1); - Object.defineProperties(Headers.prototype, { + var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers2; + Reflect.deleteProperty(Headers2, "getHeadersGuard"); + Reflect.deleteProperty(Headers2, "setHeadersGuard"); + Reflect.deleteProperty(Headers2, "getHeadersList"); + Reflect.deleteProperty(Headers2, "setHeadersList"); + iteratorMixin("Headers", Headers2, kHeadersSortedMap, 0, 1); + Object.defineProperties(Headers2.prototype, { append: kEnumerableProperty, delete: kEnumerableProperty, get: kEnumerableProperty, @@ -30117,7 +51364,7 @@ var require_headers2 = __commonJS({ webidl.converters.HeadersInit = function(V, prefix, argument) { if (webidl.util.Type(V) === "Object") { const iterator = Reflect.get(V, Symbol.iterator); - if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { + if (!util.types.isProxy(V) && iterator === Headers2.prototype.entries) { try { return getHeadersList(V).entriesList; } catch { @@ -30138,7 +51385,7 @@ var require_headers2 = __commonJS({ fill, // for test. compareHeaderName, - Headers, + Headers: Headers2, HeadersList, getHeadersGuard, setHeadersGuard, @@ -30152,9 +51399,9 @@ var require_headers2 = __commonJS({ var require_response2 = __commonJS({ "node_modules/undici/lib/web/fetch/response.js"(exports2, module2) { "use strict"; - var { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers2(); + var { Headers: Headers2, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers2(); var { extractBody, cloneBody, mixinBody } = require_body2(); - var util = require_util8(); + var util = require_util9(); var nodeUtil = require("node:util"); var { kEnumerableProperty } = util; var { @@ -30166,7 +51413,7 @@ var require_response2 = __commonJS({ isErrorLike, isomorphicEncode, environmentSettingsObject: relevantRealm - } = require_util9(); + } = require_util10(); var { redirectStatusSet, nullBodyStatus @@ -30241,7 +51488,7 @@ var require_response2 = __commonJS({ } init = webidl.converters.ResponseInit(init); this[kState] = makeResponse({}); - this[kHeaders] = new Headers(kConstruct); + this[kHeaders] = new Headers2(kConstruct); setHeadersGuard(this[kHeaders], "response"); setHeadersList(this[kHeaders], this[kState].headersList); let bodyWithType = null; @@ -30482,7 +51729,7 @@ var require_response2 = __commonJS({ function fromInnerResponse(innerResponse, guard) { const response = new Response(kConstruct); response[kState] = innerResponse; - response[kHeaders] = new Headers(kConstruct); + response[kHeaders] = new Headers2(kConstruct); setHeadersList(response[kHeaders], innerResponse.headersList); setHeadersGuard(response[kHeaders], guard); if (hasFinalizationRegistry && innerResponse.body?.stream) { @@ -30602,17 +51849,15 @@ var require_request4 = __commonJS({ "node_modules/undici/lib/web/fetch/request.js"(exports2, module2) { "use strict"; var { extractBody, mixinBody, cloneBody } = require_body2(); - var { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers2(); + var { Headers: Headers2, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers2(); var { FinalizationRegistry: FinalizationRegistry2 } = require_dispatcher_weakref2()(); - var util = require_util8(); + var util = require_util9(); var nodeUtil = require("node:util"); var { isValidHTTPToken, sameOrigin, - normalizeMethod, - environmentSettingsObject, - normalizeMethodRecord - } = require_util9(); + environmentSettingsObject + } = require_util10(); var { forbiddenMethodsSet, corsSafeListedMethodsSet, @@ -30623,7 +51868,7 @@ var require_request4 = __commonJS({ requestCache, requestDuplex } = require_constants8(); - var { kEnumerableProperty } = util; + var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; var { kHeaders, kSignal, kState, kDispatcher } = require_symbols7(); var { webidl } = require_webidl2(); var { URLSerializer } = require_data_url(); @@ -30660,7 +51905,7 @@ var require_request4 = __commonJS({ } } var patchMethodWarning = false; - var Request = class _Request { + var Request2 = class _Request { // https://fetch.spec.whatwg.org/#dom-request constructor(input, init = {}) { if (input === kConstruct) { @@ -30696,15 +51941,15 @@ var require_request4 = __commonJS({ signal = input[kSignal]; } const origin = environmentSettingsObject.settingsObject.origin; - let window = "client"; + let window2 = "client"; if (request2.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request2.window, origin)) { - window = request2.window; + window2 = request2.window; } if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`); + throw new TypeError(`'window' option '${window2}' must be null`); } if ("window" in init) { - window = "no-window"; + window2 = "no-window"; } request2 = makeRequest({ // URL request’s URL. @@ -30719,7 +51964,7 @@ var require_request4 = __commonJS({ // client This’s relevant settings object. client: environmentSettingsObject.settingsObject, // window window. - window, + window: window2, // priority request’s priority. priority: request2.priority, // origin request’s origin. The propagation of the origin is only significant for navigation requests @@ -30820,17 +52065,18 @@ var require_request4 = __commonJS({ } if (init.method !== void 0) { let method = init.method; - const mayBeNormalized = normalizeMethodRecord[method]; + const mayBeNormalized = normalizedMethodRecords[method]; if (mayBeNormalized !== void 0) { request2.method = mayBeNormalized; } else { if (!isValidHTTPToken(method)) { throw new TypeError(`'${method}' is not a valid HTTP method.`); } - if (forbiddenMethodsSet.has(method.toUpperCase())) { + const upperCase = method.toUpperCase(); + if (forbiddenMethodsSet.has(upperCase)) { throw new TypeError(`'${method}' HTTP method is unsupported.`); } - method = normalizeMethod(method); + method = normalizedMethodRecordsBase[upperCase] ?? method; request2.method = method; } if (!patchMethodWarning && request2.method === "patch") { @@ -30870,7 +52116,7 @@ var require_request4 = __commonJS({ requestFinalizer.register(ac, { signal, abort }, abort); } } - this[kHeaders] = new Headers(kConstruct); + this[kHeaders] = new Headers2(kConstruct); setHeadersList(this[kHeaders], request2.headersList); setHeadersGuard(this[kHeaders], "request"); if (mode === "no-cors") { @@ -31105,7 +52351,7 @@ var require_request4 = __commonJS({ return `Request ${nodeUtil.formatWithOptions(options, properties)}`; } }; - mixinBody(Request); + mixinBody(Request2); function makeRequest(init) { return { method: init.method ?? "GET", @@ -31156,15 +52402,15 @@ var require_request4 = __commonJS({ return newRequest; } function fromInnerRequest(innerRequest, signal, guard) { - const request2 = new Request(kConstruct); + const request2 = new Request2(kConstruct); request2[kState] = innerRequest; request2[kSignal] = signal; - request2[kHeaders] = new Headers(kConstruct); + request2[kHeaders] = new Headers2(kConstruct); setHeadersList(request2[kHeaders], innerRequest.headersList); setHeadersGuard(request2[kHeaders], guard); return request2; } - Object.defineProperties(Request.prototype, { + Object.defineProperties(Request2.prototype, { method: kEnumerableProperty, url: kEnumerableProperty, headers: kEnumerableProperty, @@ -31191,13 +52437,13 @@ var require_request4 = __commonJS({ } }); webidl.converters.Request = webidl.interfaceConverter( - Request + Request2 ); webidl.converters.RequestInfo = function(V, prefix, argument) { if (typeof V === "string") { return webidl.converters.USVString(V, prefix, argument); } - if (V instanceof Request) { + if (V instanceof Request2) { return webidl.converters.Request(V, prefix, argument); } return webidl.converters.USVString(V, prefix, argument); @@ -31288,7 +52534,7 @@ var require_request4 = __commonJS({ converter: webidl.converters.any } ]); - module2.exports = { Request, makeRequest, fromInnerRequest, cloneRequest }; + module2.exports = { Request: Request2, makeRequest, fromInnerRequest, cloneRequest }; } }); @@ -31304,7 +52550,7 @@ var require_fetch2 = __commonJS({ fromInnerResponse } = require_response2(); var { HeadersList } = require_headers2(); - var { Request, cloneRequest } = require_request4(); + var { Request: Request2, cloneRequest } = require_request4(); var zlib = require("node:zlib"); var { bytesMatch, @@ -31340,7 +52586,7 @@ var require_fetch2 = __commonJS({ buildContentRange, createInflate, extractMimeType - } = require_util9(); + } = require_util10(); var { kState, kDispatcher } = require_symbols7(); var assert = require("node:assert"); var { safelyExtractBody, extractBody } = require_body2(); @@ -31353,7 +52599,7 @@ var require_fetch2 = __commonJS({ } = require_constants8(); var EE = require("node:events"); var { Readable, pipeline, finished } = require("node:stream"); - var { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require_util8(); + var { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require_util9(); var { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url(); var { getGlobalDispatcher } = require_global4(); var { webidl } = require_webidl2(); @@ -31394,12 +52640,12 @@ var require_fetch2 = __commonJS({ function handleFetchDone(response) { finalizeAndReportTiming(response, "fetch"); } - function fetch(input, init = void 0) { + function fetch2(input, init = void 0) { webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); let p = createDeferredPromise(); let requestObject; try { - requestObject = new Request(input, init); + requestObject = new Request2(input, init); } catch (e) { p.reject(e); return p.promise; @@ -32340,7 +53586,7 @@ var require_fetch2 = __commonJS({ } } module2.exports = { - fetch, + fetch: fetch2, Fetch, fetching, finalizeAndReportTiming @@ -32718,7 +53964,7 @@ var require_encoding2 = __commonJS({ }); // node_modules/undici/lib/web/fileapi/util.js -var require_util11 = __commonJS({ +var require_util12 = __commonJS({ "node_modules/undici/lib/web/fileapi/util.js"(exports2, module2) { "use strict"; var { @@ -32733,7 +53979,7 @@ var require_util11 = __commonJS({ var { serializeAMimeType, parseMIMEType } = require_data_url(); var { types } = require("node:util"); var { StringDecoder } = require("string_decoder"); - var { btoa: btoa2 } = require("node:buffer"); + var { btoa } = require("node:buffer"); var staticPropertyDescriptors = { enumerable: true, writable: false, @@ -32825,9 +54071,9 @@ var require_util11 = __commonJS({ dataURL += ";base64,"; const decoder = new StringDecoder("latin1"); for (const chunk of bytes) { - dataURL += btoa2(decoder.write(chunk)); + dataURL += btoa(decoder.write(chunk)); } - dataURL += btoa2(decoder.end()); + dataURL += btoa(decoder.end()); return dataURL; } case "Text": { @@ -32910,7 +54156,7 @@ var require_filereader2 = __commonJS({ staticPropertyDescriptors, readOperation, fireAProgressEvent - } = require_util11(); + } = require_util12(); var { kState, kError, @@ -32919,8 +54165,8 @@ var require_filereader2 = __commonJS({ kAborted } = require_symbols8(); var { webidl } = require_webidl2(); - var { kEnumerableProperty } = require_util8(); - var FileReader = class _FileReader extends EventTarget { + var { kEnumerableProperty } = require_util9(); + var FileReader2 = class _FileReader extends EventTarget { constructor() { super(); this[kState] = "empty"; @@ -33122,10 +54368,10 @@ var require_filereader2 = __commonJS({ } } }; - FileReader.EMPTY = FileReader.prototype.EMPTY = 0; - FileReader.LOADING = FileReader.prototype.LOADING = 1; - FileReader.DONE = FileReader.prototype.DONE = 2; - Object.defineProperties(FileReader.prototype, { + FileReader2.EMPTY = FileReader2.prototype.EMPTY = 0; + FileReader2.LOADING = FileReader2.prototype.LOADING = 1; + FileReader2.DONE = FileReader2.prototype.DONE = 2; + Object.defineProperties(FileReader2.prototype, { EMPTY: staticPropertyDescriptors, LOADING: staticPropertyDescriptors, DONE: staticPropertyDescriptors, @@ -33150,13 +54396,13 @@ var require_filereader2 = __commonJS({ configurable: true } }); - Object.defineProperties(FileReader, { + Object.defineProperties(FileReader2, { EMPTY: staticPropertyDescriptors, LOADING: staticPropertyDescriptors, DONE: staticPropertyDescriptors }); module2.exports = { - FileReader + FileReader: FileReader2 }; } }); @@ -33172,12 +54418,12 @@ var require_symbols9 = __commonJS({ }); // node_modules/undici/lib/web/cache/util.js -var require_util12 = __commonJS({ +var require_util13 = __commonJS({ "node_modules/undici/lib/web/cache/util.js"(exports2, module2) { "use strict"; var assert = require("node:assert"); var { URLSerializer } = require_data_url(); - var { isValidHeaderName } = require_util9(); + var { isValidHeaderName } = require_util10(); function urlEquals(A, B, excludeFragment = false) { const serializedA = URLSerializer(A, excludeFragment); const serializedB = URLSerializer(B, excludeFragment); @@ -33206,14 +54452,14 @@ var require_cache2 = __commonJS({ "node_modules/undici/lib/web/cache/cache.js"(exports2, module2) { "use strict"; var { kConstruct } = require_symbols9(); - var { urlEquals, getFieldValues } = require_util12(); - var { kEnumerableProperty, isDisturbed } = require_util8(); + var { urlEquals, getFieldValues } = require_util13(); + var { kEnumerableProperty, isDisturbed } = require_util9(); var { webidl } = require_webidl2(); var { Response, cloneResponse, fromInnerResponse } = require_response2(); - var { Request, fromInnerRequest } = require_request4(); + var { Request: Request2, fromInnerRequest } = require_request4(); var { kState } = require_symbols7(); var { fetching } = require_fetch2(); - var { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util9(); + var { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util10(); var assert = require("node:assert"); var Cache = class _Cache { /** @@ -33283,7 +54529,7 @@ var require_cache2 = __commonJS({ } const fetchControllers = []; for (const request2 of requests) { - const r = new Request(request2)[kState]; + const r = new Request2(request2)[kState]; if (!urlIsHttpHttpsScheme(r.url)) { throw webidl.errors.exception({ header: prefix, @@ -33367,10 +54613,10 @@ var require_cache2 = __commonJS({ request2 = webidl.converters.RequestInfo(request2, prefix, "request"); response = webidl.converters.Response(response, prefix, "response"); let innerRequest = null; - if (request2 instanceof Request) { + if (request2 instanceof Request2) { innerRequest = request2[kState]; } else { - innerRequest = new Request(request2)[kState]; + innerRequest = new Request2(request2)[kState]; } if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") { throw webidl.errors.exception({ @@ -33448,14 +54694,14 @@ var require_cache2 = __commonJS({ request2 = webidl.converters.RequestInfo(request2, prefix, "request"); options = webidl.converters.CacheQueryOptions(options, prefix, "options"); let r = null; - if (request2 instanceof Request) { + if (request2 instanceof Request2) { r = request2[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return false; } } else { assert(typeof request2 === "string"); - r = new Request(request2)[kState]; + r = new Request2(request2)[kState]; } const operations = []; const operation = { @@ -33494,13 +54740,13 @@ var require_cache2 = __commonJS({ options = webidl.converters.CacheQueryOptions(options, prefix, "options"); let r = null; if (request2 !== void 0) { - if (request2 instanceof Request) { + if (request2 instanceof Request2) { r = request2[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return []; } } else if (typeof request2 === "string") { - r = new Request(request2)[kState]; + r = new Request2(request2)[kState]; } } const promise = createDeferredPromise(); @@ -33666,13 +54912,13 @@ var require_cache2 = __commonJS({ #internalMatchAll(request2, options, maxResponses = Infinity) { let r = null; if (request2 !== void 0) { - if (request2 instanceof Request) { + if (request2 instanceof Request2) { r = request2[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return []; } } else if (typeof request2 === "string") { - r = new Request(request2)[kState]; + r = new Request2(request2)[kState]; } } const responses = []; @@ -33752,7 +54998,7 @@ var require_cachestorage2 = __commonJS({ var { kConstruct } = require_symbols9(); var { Cache } = require_cache2(); var { webidl } = require_webidl2(); - var { kEnumerableProperty } = require_util8(); + var { kEnumerableProperty } = require_util9(); var CacheStorage = class _CacheStorage { /** * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map @@ -33868,7 +55114,7 @@ var require_constants9 = __commonJS({ }); // node_modules/undici/lib/web/cookies/util.js -var require_util13 = __commonJS({ +var require_util14 = __commonJS({ "node_modules/undici/lib/web/cookies/util.js"(exports2, module2) { "use strict"; function isCTLExcludingHtab(value) { @@ -33978,7 +55224,7 @@ var require_util13 = __commonJS({ throw new Error("Invalid cookie max-age"); } } - function stringify2(cookie) { + function stringify3(cookie) { if (cookie.name.length === 0) { return null; } @@ -34032,7 +55278,7 @@ var require_util13 = __commonJS({ validateCookiePath, validateCookieValue, toIMFDate, - stringify: stringify2 + stringify: stringify3 }; } }); @@ -34042,7 +55288,7 @@ var require_parse2 = __commonJS({ "node_modules/undici/lib/web/cookies/parse.js"(exports2, module2) { "use strict"; var { maxNameValuePairSize, maxAttributeValueSize } = require_constants9(); - var { isCTLExcludingHtab } = require_util13(); + var { isCTLExcludingHtab } = require_util14(); var { collectASequenceOfCodePointsFast } = require_data_url(); var assert = require("node:assert"); function parseSetCookie(header) { @@ -34182,12 +55428,12 @@ var require_cookies2 = __commonJS({ "node_modules/undici/lib/web/cookies/index.js"(exports2, module2) { "use strict"; var { parseSetCookie } = require_parse2(); - var { stringify: stringify2 } = require_util13(); + var { stringify: stringify3 } = require_util14(); var { webidl } = require_webidl2(); - var { Headers } = require_headers2(); + var { Headers: Headers2 } = require_headers2(); function getCookies(headers) { webidl.argumentLengthCheck(arguments, 1, "getCookies"); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); const cookie = headers.get("cookie"); const out = {}; if (!cookie) { @@ -34200,7 +55446,7 @@ var require_cookies2 = __commonJS({ return out; } function deleteCookie(headers, name, attributes) { - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); const prefix = "deleteCookie"; webidl.argumentLengthCheck(arguments, 2, prefix); name = webidl.converters.DOMString(name, prefix, "name"); @@ -34214,7 +55460,7 @@ var require_cookies2 = __commonJS({ } function getSetCookies(headers) { webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); const cookies = headers.getSetCookie(); if (!cookies) { return []; @@ -34223,9 +55469,9 @@ var require_cookies2 = __commonJS({ } function setCookie(headers, cookie) { webidl.argumentLengthCheck(arguments, 2, "setCookie"); - webidl.brandCheck(headers, Headers, { strict: false }); + webidl.brandCheck(headers, Headers2, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str = stringify2(cookie); + const str = stringify3(cookie); if (str) { headers.append("Set-Cookie", str); } @@ -34311,7 +55557,7 @@ var require_events2 = __commonJS({ "node_modules/undici/lib/web/websocket/events.js"(exports2, module2) { "use strict"; var { webidl } = require_webidl2(); - var { kEnumerableProperty } = require_util8(); + var { kEnumerableProperty } = require_util9(); var { kConstruct } = require_symbols6(); var { MessagePort } = require("node:worker_threads"); var MessageEvent = class _MessageEvent extends Event { @@ -34643,7 +55889,7 @@ var require_symbols10 = __commonJS({ }); // node_modules/undici/lib/web/websocket/util.js -var require_util14 = __commonJS({ +var require_util15 = __commonJS({ "node_modules/undici/lib/web/websocket/util.js"(exports2, module2) { "use strict"; var { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols10(); @@ -34817,13 +56063,13 @@ var require_frame2 = __commonJS({ "use strict"; var { maxUnsigned16Bit } = require_constants10(); var BUFFER_SIZE = 16386; - var crypto4; + var crypto8; var buffer = null; var bufIdx = BUFFER_SIZE; try { - crypto4 = require("node:crypto"); + crypto8 = require("node:crypto"); } catch { - crypto4 = { + crypto8 = { // not full compatibility, but minimum. randomFillSync: function randomFillSync(buffer2, _offset, _size) { for (let i = 0; i < buffer2.length; ++i) { @@ -34836,7 +56082,7 @@ var require_frame2 = __commonJS({ function generateMask() { if (bufIdx === BUFFER_SIZE) { bufIdx = 0; - crypto4.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + crypto8.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); } return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]]; } @@ -34900,17 +56146,17 @@ var require_connection2 = __commonJS({ kReceivedClose, kResponse } = require_symbols10(); - var { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = require_util14(); + var { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = require_util15(); var { channels } = require_diagnostics(); var { CloseEvent } = require_events2(); var { makeRequest } = require_request4(); var { fetching } = require_fetch2(); - var { Headers, getHeadersList } = require_headers2(); - var { getDecodeSplit } = require_util9(); + var { Headers: Headers2, getHeadersList } = require_headers2(); + var { getDecodeSplit } = require_util10(); var { WebsocketFrameSend } = require_frame2(); - var crypto4; + var crypto8; try { - crypto4 = require("node:crypto"); + crypto8 = require("node:crypto"); } catch { } function establishWebSocketConnection(url, protocols, client, ws, onEstablish, options) { @@ -34927,10 +56173,10 @@ var require_connection2 = __commonJS({ redirect: "error" }); if (options.headers) { - const headersList = getHeadersList(new Headers(options.headers)); + const headersList = getHeadersList(new Headers2(options.headers)); request2.headersList = headersList; } - const keyValue = crypto4.randomBytes(16).toString("base64"); + const keyValue = crypto8.randomBytes(16).toString("base64"); request2.headersList.append("sec-websocket-key", keyValue); request2.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -34960,7 +56206,7 @@ var require_connection2 = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto4.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto8.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -35078,7 +56324,7 @@ var require_permessage_deflate = __commonJS({ "node_modules/undici/lib/web/websocket/permessage-deflate.js"(exports2, module2) { "use strict"; var { createInflateRaw, Z_DEFAULT_WINDOWBITS } = require("node:zlib"); - var { isValidClientWindowBits } = require_util14(); + var { isValidClientWindowBits } = require_util15(); var tail = Buffer.from([0, 0, 255, 255]); var kBuffer = Symbol("kBuffer"); var kLength = Symbol("kLength"); @@ -35146,7 +56392,7 @@ var require_receiver2 = __commonJS({ isControlFrame, isTextBinaryFrame, isContinuationFrame - } = require_util14(); + } = require_util15(); var { WebsocketFrameSend } = require_frame2(); var { closeWebSocketConnection } = require_connection2(); var { PerMessageDeflate } = require_permessage_deflate(); @@ -35521,7 +56767,7 @@ var require_websocket2 = __commonJS({ "use strict"; var { webidl } = require_webidl2(); var { URLSerializer } = require_data_url(); - var { environmentSettingsObject } = require_util9(); + var { environmentSettingsObject } = require_util10(); var { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require_constants10(); var { kWebSocketURL, @@ -35538,15 +56784,14 @@ var require_websocket2 = __commonJS({ isClosing, isValidSubprotocol, fireEvent - } = require_util14(); + } = require_util15(); var { establishWebSocketConnection, closeWebSocketConnection } = require_connection2(); var { ByteParser } = require_receiver2(); - var { kEnumerableProperty, isBlobLike } = require_util8(); + var { kEnumerableProperty, isBlobLike } = require_util9(); var { getGlobalDispatcher } = require_global4(); var { types } = require("node:util"); var { ErrorEvent, CloseEvent } = require_events2(); var { SendQueue } = require_sender(); - var experimentalWarned = false; var WebSocket = class _WebSocket extends EventTarget { #events = { open: null, @@ -35567,12 +56812,6 @@ var require_websocket2 = __commonJS({ super(); const prefix = "WebSocket constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); - if (!experimentalWarned) { - experimentalWarned = true; - process.emitWarning("WebSockets are experimental, expect them to change at any time.", { - code: "UNDICI-WS" - }); - } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); url = webidl.converters.USVString(url, prefix, "url"); protocols = options.protocols; @@ -35906,7 +57145,7 @@ var require_websocket2 = __commonJS({ }); // node_modules/undici/lib/web/eventsource/util.js -var require_util15 = __commonJS({ +var require_util16 = __commonJS({ "node_modules/undici/lib/web/eventsource/util.js"(exports2, module2) { "use strict"; function isValidLastEventId(value) { @@ -35937,7 +57176,7 @@ var require_eventsource_stream = __commonJS({ "node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports2, module2) { "use strict"; var { Transform } = require("node:stream"); - var { isASCIINumber, isValidLastEventId } = require_util15(); + var { isASCIINumber, isValidLastEventId } = require_util16(); var BOM = [239, 187, 191]; var LF = 10; var CR = 13; @@ -36070,3737 +57309,1361 @@ var require_eventsource_stream = __commonJS({ this.pos = 0; this.eventEndCheck = true; continue; - } - this.pos++; - } - callback(); - } - /** - * @param {Buffer} line - * @param {EventStreamEvent} event - */ - parseLine(line, event) { - if (line.length === 0) { - return; - } - const colonPosition = line.indexOf(COLON); - if (colonPosition === 0) { - return; - } - let field = ""; - let value = ""; - if (colonPosition !== -1) { - field = line.subarray(0, colonPosition).toString("utf8"); - let valueStart = colonPosition + 1; - if (line[valueStart] === SPACE) { - ++valueStart; - } - value = line.subarray(valueStart).toString("utf8"); - } else { - field = line.toString("utf8"); - value = ""; - } - switch (field) { - case "data": - if (event[field] === void 0) { - event[field] = value; - } else { - event[field] += ` -${value}`; - } - break; - case "retry": - if (isASCIINumber(value)) { - event[field] = value; - } - break; - case "id": - if (isValidLastEventId(value)) { - event[field] = value; - } - break; - case "event": - if (value.length > 0) { - event[field] = value; - } - break; - } - } - /** - * @param {EventSourceStreamEvent} event - */ - processEvent(event) { - if (event.retry && isASCIINumber(event.retry)) { - this.state.reconnectionTime = parseInt(event.retry, 10); - } - if (event.id && isValidLastEventId(event.id)) { - this.state.lastEventId = event.id; - } - if (event.data !== void 0) { - this.push({ - type: event.event || "message", - options: { - data: event.data, - lastEventId: this.state.lastEventId, - origin: this.state.origin - } - }); - } - } - clearEvent() { - this.event = { - data: void 0, - event: void 0, - id: void 0, - retry: void 0 - }; - } - }; - module2.exports = { - EventSourceStream - }; - } -}); - -// node_modules/undici/lib/web/eventsource/eventsource.js -var require_eventsource = __commonJS({ - "node_modules/undici/lib/web/eventsource/eventsource.js"(exports2, module2) { - "use strict"; - var { pipeline } = require("node:stream"); - var { fetching } = require_fetch2(); - var { makeRequest } = require_request4(); - var { webidl } = require_webidl2(); - var { EventSourceStream } = require_eventsource_stream(); - var { parseMIMEType } = require_data_url(); - var { createFastMessageEvent } = require_events2(); - var { isNetworkError: isNetworkError2 } = require_response2(); - var { delay } = require_util15(); - var { kEnumerableProperty } = require_util8(); - var { environmentSettingsObject } = require_util9(); - var experimentalWarned = false; - var defaultReconnectionTime = 3e3; - var CONNECTING = 0; - var OPEN = 1; - var CLOSED = 2; - var ANONYMOUS = "anonymous"; - var USE_CREDENTIALS = "use-credentials"; - var EventSource = class _EventSource extends EventTarget { - #events = { - open: null, - error: null, - message: null - }; - #url = null; - #withCredentials = false; - #readyState = CONNECTING; - #request = null; - #controller = null; - #dispatcher; - /** - * @type {import('./eventsource-stream').eventSourceSettings} - */ - #state; - /** - * Creates a new EventSource object. - * @param {string} url - * @param {EventSourceInit} [eventSourceInitDict] - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface - */ - constructor(url, eventSourceInitDict = {}) { - super(); - const prefix = "EventSource constructor"; - webidl.argumentLengthCheck(arguments, 1, prefix); - if (!experimentalWarned) { - experimentalWarned = true; - process.emitWarning("EventSource is experimental, expect them to change at any time.", { - code: "UNDICI-ES" - }); - } - url = webidl.converters.USVString(url, prefix, "url"); - eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); - this.#dispatcher = eventSourceInitDict.dispatcher; - this.#state = { - lastEventId: "", - reconnectionTime: defaultReconnectionTime - }; - const settings = environmentSettingsObject; - let urlRecord; - try { - urlRecord = new URL(url, settings.settingsObject.baseUrl); - this.#state.origin = urlRecord.origin; - } catch (e) { - throw new DOMException(e, "SyntaxError"); - } - this.#url = urlRecord.href; - let corsAttributeState = ANONYMOUS; - if (eventSourceInitDict.withCredentials) { - corsAttributeState = USE_CREDENTIALS; - this.#withCredentials = true; - } - const initRequest = { - redirect: "follow", - keepalive: true, - // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes - mode: "cors", - credentials: corsAttributeState === "anonymous" ? "same-origin" : "omit", - referrer: "no-referrer" - }; - initRequest.client = environmentSettingsObject.settingsObject; - initRequest.headersList = [["accept", { name: "accept", value: "text/event-stream" }]]; - initRequest.cache = "no-store"; - initRequest.initiator = "other"; - initRequest.urlList = [new URL(this.#url)]; - this.#request = makeRequest(initRequest); - this.#connect(); - } - /** - * Returns the state of this EventSource object's connection. It can have the - * values described below. - * @returns {0|1|2} - * @readonly - */ - get readyState() { - return this.#readyState; - } - /** - * Returns the URL providing the event stream. - * @readonly - * @returns {string} - */ - get url() { - return this.#url; - } - /** - * Returns a boolean indicating whether the EventSource object was - * instantiated with CORS credentials set (true), or not (false, the default). - */ - get withCredentials() { - return this.#withCredentials; - } - #connect() { - if (this.#readyState === CLOSED) return; - this.#readyState = CONNECTING; - const fetchParams = { - request: this.#request, - dispatcher: this.#dispatcher - }; - const processEventSourceEndOfBody = (response) => { - if (isNetworkError2(response)) { - this.dispatchEvent(new Event("error")); - this.close(); - } - this.#reconnect(); - }; - fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; - fetchParams.processResponse = (response) => { - if (isNetworkError2(response)) { - if (response.aborted) { - this.close(); - this.dispatchEvent(new Event("error")); - return; - } else { - this.#reconnect(); - return; - } - } - const contentType = response.headersList.get("content-type", true); - const mimeType = contentType !== null ? parseMIMEType(contentType) : "failure"; - const contentTypeValid = mimeType !== "failure" && mimeType.essence === "text/event-stream"; - if (response.status !== 200 || contentTypeValid === false) { - this.close(); - this.dispatchEvent(new Event("error")); - return; - } - this.#readyState = OPEN; - this.dispatchEvent(new Event("open")); - this.#state.origin = response.urlList[response.urlList.length - 1].origin; - const eventSourceStream = new EventSourceStream({ - eventSourceSettings: this.#state, - push: (event) => { - this.dispatchEvent(createFastMessageEvent( - event.type, - event.options - )); - } - }); - pipeline( - response.body.stream, - eventSourceStream, - (error) => { - if (error?.aborted === false) { - this.close(); - this.dispatchEvent(new Event("error")); - } - } - ); - }; - this.#controller = fetching(fetchParams); - } - /** - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - * @returns {Promise} - */ - async #reconnect() { - if (this.#readyState === CLOSED) return; - this.#readyState = CONNECTING; - this.dispatchEvent(new Event("error")); - await delay(this.#state.reconnectionTime); - if (this.#readyState !== CONNECTING) return; - if (this.#state.lastEventId.length) { - this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); - } - this.#connect(); - } - /** - * Closes the connection, if any, and sets the readyState attribute to - * CLOSED. - */ - close() { - webidl.brandCheck(this, _EventSource); - if (this.#readyState === CLOSED) return; - this.#readyState = CLOSED; - this.#controller.abort(); - this.#request = null; - } - get onopen() { - return this.#events.open; - } - set onopen(fn) { - if (this.#events.open) { - this.removeEventListener("open", this.#events.open); - } - if (typeof fn === "function") { - this.#events.open = fn; - this.addEventListener("open", fn); - } else { - this.#events.open = null; + } + this.pos++; } + callback(); } - get onmessage() { - return this.#events.message; - } - set onmessage(fn) { - if (this.#events.message) { - this.removeEventListener("message", this.#events.message); + /** + * @param {Buffer} line + * @param {EventStreamEvent} event + */ + parseLine(line, event) { + if (line.length === 0) { + return; } - if (typeof fn === "function") { - this.#events.message = fn; - this.addEventListener("message", fn); + const colonPosition = line.indexOf(COLON); + if (colonPosition === 0) { + return; + } + let field = ""; + let value = ""; + if (colonPosition !== -1) { + field = line.subarray(0, colonPosition).toString("utf8"); + let valueStart = colonPosition + 1; + if (line[valueStart] === SPACE) { + ++valueStart; + } + value = line.subarray(valueStart).toString("utf8"); } else { - this.#events.message = null; + field = line.toString("utf8"); + value = ""; + } + switch (field) { + case "data": + if (event[field] === void 0) { + event[field] = value; + } else { + event[field] += ` +${value}`; + } + break; + case "retry": + if (isASCIINumber(value)) { + event[field] = value; + } + break; + case "id": + if (isValidLastEventId(value)) { + event[field] = value; + } + break; + case "event": + if (value.length > 0) { + event[field] = value; + } + break; } } - get onerror() { - return this.#events.error; - } - set onerror(fn) { - if (this.#events.error) { - this.removeEventListener("error", this.#events.error); + /** + * @param {EventSourceStreamEvent} event + */ + processEvent(event) { + if (event.retry && isASCIINumber(event.retry)) { + this.state.reconnectionTime = parseInt(event.retry, 10); } - if (typeof fn === "function") { - this.#events.error = fn; - this.addEventListener("error", fn); - } else { - this.#events.error = null; + if (event.id && isValidLastEventId(event.id)) { + this.state.lastEventId = event.id; + } + if (event.data !== void 0) { + this.push({ + type: event.event || "message", + options: { + data: event.data, + lastEventId: this.state.lastEventId, + origin: this.state.origin + } + }); } } - }; - var constantsPropertyDescriptors = { - CONNECTING: { - __proto__: null, - configurable: false, - enumerable: true, - value: CONNECTING, - writable: false - }, - OPEN: { - __proto__: null, - configurable: false, - enumerable: true, - value: OPEN, - writable: false - }, - CLOSED: { - __proto__: null, - configurable: false, - enumerable: true, - value: CLOSED, - writable: false + clearEvent() { + this.event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; } }; - Object.defineProperties(EventSource, constantsPropertyDescriptors); - Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors); - Object.defineProperties(EventSource.prototype, { - close: kEnumerableProperty, - onerror: kEnumerableProperty, - onmessage: kEnumerableProperty, - onopen: kEnumerableProperty, - readyState: kEnumerableProperty, - url: kEnumerableProperty, - withCredentials: kEnumerableProperty - }); - webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([ - { - key: "withCredentials", - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: "dispatcher", - // undici only - converter: webidl.converters.any - } - ]); module2.exports = { - EventSource, - defaultReconnectionTime + EventSourceStream }; } }); -// node_modules/undici/index.js -var require_undici2 = __commonJS({ - "node_modules/undici/index.js"(exports2, module2) { +// node_modules/undici/lib/web/eventsource/eventsource.js +var require_eventsource = __commonJS({ + "node_modules/undici/lib/web/eventsource/eventsource.js"(exports2, module2) { "use strict"; - var Client = require_client2(); - var Dispatcher = require_dispatcher2(); - var Pool = require_pool2(); - var BalancedPool = require_balanced_pool2(); - var Agent = require_agent2(); - var ProxyAgent2 = require_proxy_agent2(); - var EnvHttpProxyAgent = require_env_http_proxy_agent(); - var RetryAgent = require_retry_agent(); - var errors = require_errors2(); - var util = require_util8(); - var { InvalidArgumentError } = errors; - var api = require_api2(); - var buildConnector = require_connect2(); - var MockClient = require_mock_client2(); - var MockAgent = require_mock_agent2(); - var MockPool = require_mock_pool2(); - var mockErrors = require_mock_errors2(); - var RetryHandler = require_retry_handler(); - var { getGlobalDispatcher, setGlobalDispatcher } = require_global4(); - var DecoratorHandler = require_decorator_handler(); - var RedirectHandler = require_redirect_handler(); - var createRedirectInterceptor = require_redirect_interceptor(); - Object.assign(Dispatcher.prototype, api); - module2.exports.Dispatcher = Dispatcher; - module2.exports.Client = Client; - module2.exports.Pool = Pool; - module2.exports.BalancedPool = BalancedPool; - module2.exports.Agent = Agent; - module2.exports.ProxyAgent = ProxyAgent2; - module2.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; - module2.exports.RetryAgent = RetryAgent; - module2.exports.RetryHandler = RetryHandler; - module2.exports.DecoratorHandler = DecoratorHandler; - module2.exports.RedirectHandler = RedirectHandler; - module2.exports.createRedirectInterceptor = createRedirectInterceptor; - module2.exports.interceptors = { - redirect: require_redirect(), - retry: require_retry3(), - dump: require_dump() - }; - module2.exports.buildConnector = buildConnector; - module2.exports.errors = errors; - module2.exports.util = { - parseHeaders: util.parseHeaders, - headerNameToString: util.headerNameToString - }; - function makeDispatcher(fn) { - return (url, opts, handler) => { - if (typeof opts === "function") { - handler = opts; - opts = null; - } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { - throw new InvalidArgumentError("invalid url"); - } - if (opts != null && typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - if (opts && opts.path != null) { - if (typeof opts.path !== "string") { - throw new InvalidArgumentError("invalid opts.path"); - } - let path = opts.path; - if (!opts.path.startsWith("/")) { - path = `/${path}`; - } - url = new URL(util.parseOrigin(url).origin + path); - } else { - if (!opts) { - opts = typeof url === "object" ? url : {}; - } - url = util.parseURL(url); - } - const { agent, dispatcher = getGlobalDispatcher() } = opts; - if (agent) { - throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); - } - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? "PUT" : "GET") - }, handler); + var { pipeline } = require("node:stream"); + var { fetching } = require_fetch2(); + var { makeRequest } = require_request4(); + var { webidl } = require_webidl2(); + var { EventSourceStream } = require_eventsource_stream(); + var { parseMIMEType } = require_data_url(); + var { createFastMessageEvent } = require_events2(); + var { isNetworkError: isNetworkError2 } = require_response2(); + var { delay } = require_util16(); + var { kEnumerableProperty } = require_util9(); + var { environmentSettingsObject } = require_util10(); + var experimentalWarned = false; + var defaultReconnectionTime = 3e3; + var CONNECTING = 0; + var OPEN = 1; + var CLOSED = 2; + var ANONYMOUS = "anonymous"; + var USE_CREDENTIALS = "use-credentials"; + var EventSource = class _EventSource extends EventTarget { + #events = { + open: null, + error: null, + message: null }; - } - module2.exports.setGlobalDispatcher = setGlobalDispatcher; - module2.exports.getGlobalDispatcher = getGlobalDispatcher; - var fetchImpl = require_fetch2().fetch; - module2.exports.fetch = async function fetch(init, options = void 0) { - try { - return await fetchImpl(init, options); - } catch (err) { - if (err && typeof err === "object") { - Error.captureStackTrace(err); - } - throw err; - } - }; - module2.exports.Headers = require_headers2().Headers; - module2.exports.Response = require_response2().Response; - module2.exports.Request = require_request4().Request; - module2.exports.FormData = require_formdata2().FormData; - module2.exports.File = globalThis.File ?? require("node:buffer").File; - module2.exports.FileReader = require_filereader2().FileReader; - var { setGlobalOrigin, getGlobalOrigin } = require_global3(); - module2.exports.setGlobalOrigin = setGlobalOrigin; - module2.exports.getGlobalOrigin = getGlobalOrigin; - var { CacheStorage } = require_cachestorage2(); - var { kConstruct } = require_symbols9(); - module2.exports.caches = new CacheStorage(kConstruct); - var { deleteCookie, getCookies, getSetCookies, setCookie } = require_cookies2(); - module2.exports.deleteCookie = deleteCookie; - module2.exports.getCookies = getCookies; - module2.exports.getSetCookies = getSetCookies; - module2.exports.setCookie = setCookie; - var { parseMIMEType, serializeAMimeType } = require_data_url(); - module2.exports.parseMIMEType = parseMIMEType; - module2.exports.serializeAMimeType = serializeAMimeType; - var { CloseEvent, ErrorEvent, MessageEvent } = require_events2(); - module2.exports.WebSocket = require_websocket2().WebSocket; - module2.exports.CloseEvent = CloseEvent; - module2.exports.ErrorEvent = ErrorEvent; - module2.exports.MessageEvent = MessageEvent; - module2.exports.request = makeDispatcher(api.request); - module2.exports.stream = makeDispatcher(api.stream); - module2.exports.pipeline = makeDispatcher(api.pipeline); - module2.exports.connect = makeDispatcher(api.connect); - module2.exports.upgrade = makeDispatcher(api.upgrade); - module2.exports.MockClient = MockClient; - module2.exports.MockPool = MockPool; - module2.exports.MockAgent = MockAgent; - module2.exports.mockErrors = mockErrors; - var { EventSource } = require_eventsource(); - module2.exports.EventSource = EventSource; - } -}); - -// main.js -var import_core2 = __toESM(require_core(), 1); - -// node_modules/universal-user-agent/index.js -function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } - if (typeof process === "object" && process.version !== void 0) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; - } - return ""; -} - -// node_modules/@octokit/endpoint/dist-bundle/index.js -var VERSION = "0.0.0-development"; -var userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; -var DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "" - } -}; -function lowercaseKeys(object) { - if (!object) { - return {}; - } - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} -function isPlainObject(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach((key) => { - if (isPlainObject(options[key])) { - if (!(key in defaults)) - Object.assign(result, { [key]: options[key] }); - else - result[key] = mergeDeep(defaults[key], options[key]); - } else { - Object.assign(result, { [key]: options[key] }); - } - }); - return result; -} -function removeUndefinedProperties(obj) { - for (const key in obj) { - if (obj[key] === void 0) { - delete obj[key]; - } - } - return obj; -} -function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); - } else { - options = Object.assign({}, route); - } - options.headers = lowercaseKeys(options.headers); - removeUndefinedProperties(options); - removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); - if (options.url === "/graphql") { - if (defaults && defaults.mediaType.previews?.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( - (preview) => !mergedOptions.mediaType.previews.includes(preview) - ).concat(mergedOptions.mediaType.previews); - } - mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); - } - return mergedOptions; -} -function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - if (names.length === 0) { - return url; - } - return url + separator + names.map((name) => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); - } - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} -var urlVariableRegex = /\{[^}]+\}/g; -function removeNonChars(variableName) { - return variableName.replace(/^\W+|\W+$/g, "").split(/,/); -} -function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); - if (!matches) { - return []; - } - return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); -} -function omit(object, keysToOmit) { - const result = { __proto__: null }; - for (const key of Object.keys(object)) { - if (keysToOmit.indexOf(key) === -1) { - result[key] = object[key]; - } - } - return result; -} -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); - } - return part; - }).join(""); -} -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} -function encodeValue(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; - } -} -function isDefined(value) { - return value !== void 0 && value !== null; -} -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} -function getValues(context, operator, key, modifier) { - var value = context[key], result = []; - if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { - value = value.toString(); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - result.push( - encodeValue(operator, value, isKeyOperator(operator) ? key : "") - ); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - result.push( - encodeValue(operator, value2, isKeyOperator(operator) ? key : "") - ); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - tmp.push(encodeValue(operator, value2)); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } + #url = null; + #withCredentials = false; + #readyState = CONNECTING; + #request = null; + #controller = null; + #dispatcher; + /** + * @type {import('./eventsource-stream').eventSourceSettings} + */ + #state; + /** + * Creates a new EventSource object. + * @param {string} url + * @param {EventSourceInit} [eventSourceInitDict] + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface + */ + constructor(url, eventSourceInitDict = {}) { + super(); + const prefix = "EventSource constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EventSource is experimental, expect them to change at any time.", { + code: "UNDICI-ES" }); } - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); + url = webidl.converters.USVString(url, prefix, "url"); + eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); + this.#dispatcher = eventSourceInitDict.dispatcher; + this.#state = { + lastEventId: "", + reconnectionTime: defaultReconnectionTime + }; + const settings = environmentSettingsObject; + let urlRecord; + try { + urlRecord = new URL(url, settings.settingsObject.baseUrl); + this.#state.origin = urlRecord.origin; + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + this.#url = urlRecord.href; + let corsAttributeState = ANONYMOUS; + if (eventSourceInitDict.withCredentials) { + corsAttributeState = USE_CREDENTIALS; + this.#withCredentials = true; } + const initRequest = { + redirect: "follow", + keepalive: true, + // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes + mode: "cors", + credentials: corsAttributeState === "anonymous" ? "same-origin" : "omit", + referrer: "no-referrer" + }; + initRequest.client = environmentSettingsObject.settingsObject; + initRequest.headersList = [["accept", { name: "accept", value: "text/event-stream" }]]; + initRequest.cache = "no-store"; + initRequest.initiator = "other"; + initRequest.urlList = [new URL(this.#url)]; + this.#request = makeRequest(initRequest); + this.#connect(); } - } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); + /** + * Returns the state of this EventSource object's connection. It can have the + * values described below. + * @returns {0|1|2} + * @readonly + */ + get readyState() { + return this.#readyState; } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); - } - } - return result; -} -function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - template = template.replace( - /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - expression.split(/,/g).forEach(function(variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - if (operator && operator !== "+") { - var separator = ","; - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; + /** + * Returns the URL providing the event stream. + * @readonly + * @returns {string} + */ + get url() { + return this.#url; + } + /** + * Returns a boolean indicating whether the EventSource object was + * instantiated with CORS credentials set (true), or not (false, the default). + */ + get withCredentials() { + return this.#withCredentials; + } + #connect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + const fetchParams = { + request: this.#request, + dispatcher: this.#dispatcher + }; + const processEventSourceEndOfBody = (response) => { + if (isNetworkError2(response)) { + this.dispatchEvent(new Event("error")); + this.close(); } - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); + this.#reconnect(); + }; + fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; + fetchParams.processResponse = (response) => { + if (isNetworkError2(response)) { + if (response.aborted) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } else { + this.#reconnect(); + return; + } + } + const contentType = response.headersList.get("content-type", true); + const mimeType = contentType !== null ? parseMIMEType(contentType) : "failure"; + const contentTypeValid = mimeType !== "failure" && mimeType.essence === "text/event-stream"; + if (response.status !== 200 || contentTypeValid === false) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } + this.#readyState = OPEN; + this.dispatchEvent(new Event("open")); + this.#state.origin = response.urlList[response.urlList.length - 1].origin; + const eventSourceStream = new EventSourceStream({ + eventSourceSettings: this.#state, + push: (event) => { + this.dispatchEvent(createFastMessageEvent( + event.type, + event.options + )); + } + }); + pipeline( + response.body.stream, + eventSourceStream, + (error) => { + if (error?.aborted === false) { + this.close(); + this.dispatchEvent(new Event("error")); + } + } + ); + }; + this.#controller = fetching(fetchParams); + } + /** + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model + * @returns {Promise} + */ + async #reconnect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + this.dispatchEvent(new Event("error")); + await delay(this.#state.reconnectionTime); + if (this.#readyState !== CONNECTING) return; + if (this.#state.lastEventId.length) { + this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); } - } else { - return encodeReserved(literal); + this.#connect(); } - } - ); - if (template === "/") { - return template; - } else { - return template.replace(/\/$/, ""); - } -} -function parse2(options) { - let method = options.method.toUpperCase(); - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType" - ]); - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequest) { - if (options.mediaType.format) { - headers.accept = headers.accept.split(/,/).map( - (format) => format.replace( - /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, - `application/vnd$1$2.${options.mediaType.format}` - ) - ).join(","); - } - if (url.endsWith("/graphql")) { - if (options.mediaType.previews?.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); + /** + * Closes the connection, if any, and sets the readyState attribute to + * CLOSED. + */ + close() { + webidl.brandCheck(this, _EventSource); + if (this.#readyState === CLOSED) return; + this.#readyState = CLOSED; + this.#controller.abort(); + this.#request = null; } - } - } - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; + get onopen() { + return this.#events.open; } - } - } - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } - return Object.assign( - { method, url, headers }, - typeof body !== "undefined" ? { body } : null, - options.request ? { request: options.request } : null - ); -} -function endpointWithDefaults(defaults, route, options) { - return parse2(merge(defaults, route, options)); -} -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS2 = merge(oldDefaults, newDefaults); - const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); - return Object.assign(endpoint2, { - DEFAULTS: DEFAULTS2, - defaults: withDefaults.bind(null, DEFAULTS2), - merge: merge.bind(null, DEFAULTS2), - parse: parse2 - }); -} -var endpoint = withDefaults(null, DEFAULTS); - -// node_modules/@octokit/request-error/dist-src/index.js -var RequestError = class extends Error { - name; - /** - * http status code - */ - status; - /** - * Request options that lead to the error. - */ - request; - /** - * Response object if a response was received - */ - response; - constructor(message, statusCode, options) { - super(message); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = "HttpError"; - this.status = statusCode; - if ("response" in options) { - this.response = options.response; - } - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - / .*$/, - " [REDACTED]" - ) - }); - } - requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; - } -}; - -// node_modules/@octokit/request/dist-bundle/index.js -var VERSION2 = "0.0.0-development"; -function isPlainObject2(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} -function getBufferResponse(response) { - return response.arrayBuffer(); -} -function fetchWrapper(requestOptions) { - const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; - if (isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - let headers = {}; - let status; - let url; - let { fetch } = globalThis; - if (requestOptions.request?.fetch) { - fetch = requestOptions.request.fetch; - } - if (!fetch) { - throw new Error( - "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" - ); - } - return fetch(requestOptions.url, { - method: requestOptions.method, - body: requestOptions.body, - redirect: requestOptions.request?.redirect, - // Header values must be `string` - headers: Object.fromEntries( - Object.entries(requestOptions.headers).map(([name, value]) => [ - name, - String(value) - ]) - ), - signal: requestOptions.request?.signal, - // duplex must be set if request.body is ReadableStream or Async Iterables. - // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. - ...requestOptions.body && { duplex: "half" } - }).then(async (response) => { - url = response.url; - status = response.status; - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - if ("deprecation" in headers) { - const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); - const deprecationLink = matches && matches.pop(); - log.warn( - `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` - ); - } - if (status === 204 || status === 205) { - return; - } - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; + set onopen(fn) { + if (this.#events.open) { + this.removeEventListener("open", this.#events.open); + } + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else { + this.#events.open = null; + } } - throw new RequestError(response.statusText, status, { - response: { - url, - status, - headers, - data: void 0 - }, - request: requestOptions - }); - } - if (status === 304) { - throw new RequestError("Not modified", status, { - response: { - url, - status, - headers, - data: await getResponseData(response) - }, - request: requestOptions - }); - } - if (status >= 400) { - const data = await getResponseData(response); - const error = new RequestError(toErrorMessage(data), status, { - response: { - url, - status, - headers, - data - }, - request: requestOptions - }); - throw error; - } - return parseSuccessResponseBody ? await getResponseData(response) : response.body; - }).then((data) => { - return { - status, - url, - headers, - data - }; - }).catch((error) => { - if (error instanceof RequestError) - throw error; - else if (error.name === "AbortError") - throw error; - let message = error.message; - if (error.name === "TypeError" && "cause" in error) { - if (error.cause instanceof Error) { - message = error.cause.message; - } else if (typeof error.cause === "string") { - message = error.cause; + get onmessage() { + return this.#events.message; } - } - throw new RequestError(message, 500, { - request: requestOptions - }); - }); -} -async function getResponseData(response) { - const contentType = response.headers.get("content-type"); - if (/application\/json/.test(contentType)) { - return response.json().catch(() => response.text()).catch(() => ""); - } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - return getBufferResponse(response); -} -function toErrorMessage(data) { - if (typeof data === "string") - return data; - let suffix; - if ("documentation_url" in data) { - suffix = ` - ${data.documentation_url}`; - } else { - suffix = ""; - } - if ("message" in data) { - if (Array.isArray(data.errors)) { - return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; - } - return `${data.message}${suffix}`; - } - return `Unknown error: ${JSON.stringify(data)}`; -} -function withDefaults2(oldEndpoint, newDefaults) { - const endpoint2 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { - const endpointOptions = endpoint2.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint2.parse(endpointOptions)); - } - const request2 = (route2, parameters2) => { - return fetchWrapper( - endpoint2.parse(endpoint2.merge(route2, parameters2)) - ); - }; - Object.assign(request2, { - endpoint: endpoint2, - defaults: withDefaults2.bind(null, endpoint2) - }); - return endpointOptions.request.hook(request2, endpointOptions); - }; - return Object.assign(newApi, { - endpoint: endpoint2, - defaults: withDefaults2.bind(null, endpoint2) - }); -} -var request = withDefaults2(endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}` - } -}); - -// node_modules/@octokit/oauth-methods/dist-bundle/index.js -function requestToOAuthBaseUrl(request2) { - const endpointDefaults = request2.endpoint.DEFAULTS; - return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", ""); -} -async function oauthRequest(request2, route, parameters) { - const withOAuthParameters = { - baseUrl: requestToOAuthBaseUrl(request2), - headers: { - accept: "application/json" - }, - ...parameters - }; - const response = await request2(route, withOAuthParameters); - if ("error" in response.data) { - const error = new RequestError( - `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, - 400, - { - request: request2.endpoint.merge( - route, - withOAuthParameters - ) + set onmessage(fn) { + if (this.#events.message) { + this.removeEventListener("message", this.#events.message); + } + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else { + this.#events.message = null; + } } - ); - error.response = response; - throw error; - } - return response; -} -async function exchangeWebFlowCode(options) { - const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - request; - const response = await oauthRequest( - request2, - "POST /login/oauth/access_token", - { - client_id: options.clientId, - client_secret: options.clientSecret, - code: options.code, - redirect_uri: options.redirectUrl - } - ); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - clientSecret: options.clientSecret, - token: response.data.access_token, - scopes: response.data.scope.split(/\s+/).filter(Boolean) - }; - if (options.clientType === "github-app") { - if ("refresh_token" in response.data) { - const apiTimeInMs = new Date(response.headers.date).getTime(); - authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp( - apiTimeInMs, - response.data.expires_in - ), authentication.refreshTokenExpiresAt = toTimestamp( - apiTimeInMs, - response.data.refresh_token_expires_in - ); - } - delete authentication.scopes; - } - return { ...response, authentication }; -} -function toTimestamp(apiTimeInMs, expirationInSeconds) { - return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); -} -async function createDeviceCode(options) { - const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - request; - const parameters = { - client_id: options.clientId - }; - if ("scopes" in options && Array.isArray(options.scopes)) { - parameters.scope = options.scopes.join(" "); - } - return oauthRequest(request2, "POST /login/device/code", parameters); -} -async function exchangeDeviceCode(options) { - const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - request; - const response = await oauthRequest( - request2, - "POST /login/oauth/access_token", - { - client_id: options.clientId, - device_code: options.code, - grant_type: "urn:ietf:params:oauth:grant-type:device_code" - } - ); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - token: response.data.access_token, - scopes: response.data.scope.split(/\s+/).filter(Boolean) - }; - if ("clientSecret" in options) { - authentication.clientSecret = options.clientSecret; - } - if (options.clientType === "github-app") { - if ("refresh_token" in response.data) { - const apiTimeInMs = new Date(response.headers.date).getTime(); - authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp2( - apiTimeInMs, - response.data.expires_in - ), authentication.refreshTokenExpiresAt = toTimestamp2( - apiTimeInMs, - response.data.refresh_token_expires_in - ); - } - delete authentication.scopes; - } - return { ...response, authentication }; -} -function toTimestamp2(apiTimeInMs, expirationInSeconds) { - return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); -} -async function checkToken(options) { - const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - request; - const response = await request2("POST /applications/{client_id}/token", { - headers: { - authorization: `basic ${btoa( - `${options.clientId}:${options.clientSecret}` - )}` - }, - client_id: options.clientId, - access_token: options.token - }); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - clientSecret: options.clientSecret, - token: options.token, - scopes: response.data.scopes - }; - if (response.data.expires_at) - authentication.expiresAt = response.data.expires_at; - if (options.clientType === "github-app") { - delete authentication.scopes; - } - return { ...response, authentication }; -} -async function refreshToken(options) { - const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - request; - const response = await oauthRequest( - request2, - "POST /login/oauth/access_token", - { - client_id: options.clientId, - client_secret: options.clientSecret, - grant_type: "refresh_token", - refresh_token: options.refreshToken - } - ); - const apiTimeInMs = new Date(response.headers.date).getTime(); - const authentication = { - clientType: "github-app", - clientId: options.clientId, - clientSecret: options.clientSecret, - token: response.data.access_token, - refreshToken: response.data.refresh_token, - expiresAt: toTimestamp3(apiTimeInMs, response.data.expires_in), - refreshTokenExpiresAt: toTimestamp3( - apiTimeInMs, - response.data.refresh_token_expires_in - ) - }; - return { ...response, authentication }; -} -function toTimestamp3(apiTimeInMs, expirationInSeconds) { - return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); -} -async function resetToken(options) { - const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - request; - const auth5 = btoa(`${options.clientId}:${options.clientSecret}`); - const response = await request2( - "PATCH /applications/{client_id}/token", - { - headers: { - authorization: `basic ${auth5}` - }, - client_id: options.clientId, - access_token: options.token - } - ); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - clientSecret: options.clientSecret, - token: response.data.token, - scopes: response.data.scopes - }; - if (response.data.expires_at) - authentication.expiresAt = response.data.expires_at; - if (options.clientType === "github-app") { - delete authentication.scopes; - } - return { ...response, authentication }; -} -async function deleteToken(options) { - const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - request; - const auth5 = btoa(`${options.clientId}:${options.clientSecret}`); - return request2( - "DELETE /applications/{client_id}/token", - { - headers: { - authorization: `basic ${auth5}` + get onerror() { + return this.#events.error; + } + set onerror(fn) { + if (this.#events.error) { + this.removeEventListener("error", this.#events.error); + } + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else { + this.#events.error = null; + } + } + }; + var constantsPropertyDescriptors = { + CONNECTING: { + __proto__: null, + configurable: false, + enumerable: true, + value: CONNECTING, + writable: false }, - client_id: options.clientId, - access_token: options.token - } - ); -} -async function deleteAuthorization(options) { - const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - request; - const auth5 = btoa(`${options.clientId}:${options.clientSecret}`); - return request2( - "DELETE /applications/{client_id}/grant", - { - headers: { - authorization: `basic ${auth5}` + OPEN: { + __proto__: null, + configurable: false, + enumerable: true, + value: OPEN, + writable: false }, - client_id: options.clientId, - access_token: options.token - } - ); -} - -// node_modules/@octokit/auth-oauth-device/dist-bundle/index.js -async function getOAuthAccessToken(state, options) { - const cachedAuthentication = getCachedAuthentication(state, options.auth); - if (cachedAuthentication) - return cachedAuthentication; - const { data: verification } = await createDeviceCode({ - clientType: state.clientType, - clientId: state.clientId, - request: options.request || state.request, - // @ts-expect-error the extra code to make TS happy is not worth it - scopes: options.auth.scopes || state.scopes - }); - await state.onVerification(verification); - const authentication = await waitForAccessToken( - options.request || state.request, - state.clientId, - state.clientType, - verification - ); - state.authentication = authentication; - return authentication; -} -function getCachedAuthentication(state, auth22) { - if (auth22.refresh === true) - return false; - if (!state.authentication) - return false; - if (state.clientType === "github-app") { - return state.authentication; - } - const authentication = state.authentication; - const newScope = ("scopes" in auth22 && auth22.scopes || state.scopes).join( - " " - ); - const currentScope = authentication.scopes.join(" "); - return newScope === currentScope ? authentication : false; -} -async function wait(seconds) { - await new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); -} -async function waitForAccessToken(request2, clientId, clientType, verification) { - try { - const options = { - clientId, - request: request2, - code: verification.device_code + CLOSED: { + __proto__: null, + configurable: false, + enumerable: true, + value: CLOSED, + writable: false + } }; - const { authentication } = clientType === "oauth-app" ? await exchangeDeviceCode({ - ...options, - clientType: "oauth-app" - }) : await exchangeDeviceCode({ - ...options, - clientType: "github-app" + Object.defineProperties(EventSource, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, { + close: kEnumerableProperty, + onerror: kEnumerableProperty, + onmessage: kEnumerableProperty, + onopen: kEnumerableProperty, + readyState: kEnumerableProperty, + url: kEnumerableProperty, + withCredentials: kEnumerableProperty }); - return { - type: "token", - tokenType: "oauth", - ...authentication + webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([ + { + key: "withCredentials", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "dispatcher", + // undici only + converter: webidl.converters.any + } + ]); + module2.exports = { + EventSource, + defaultReconnectionTime }; - } catch (error) { - if (!error.response) - throw error; - const errorType = error.response.data.error; - if (errorType === "authorization_pending") { - await wait(verification.interval); - return waitForAccessToken(request2, clientId, clientType, verification); - } - if (errorType === "slow_down") { - await wait(verification.interval + 5); - return waitForAccessToken(request2, clientId, clientType, verification); - } - throw error; - } -} -async function auth(state, authOptions) { - return getOAuthAccessToken(state, { - auth: authOptions - }); -} -async function hook(state, request2, route, parameters) { - let endpoint2 = request2.endpoint.merge( - route, - parameters - ); - if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint2.url)) { - return request2(endpoint2); - } - const { token } = await getOAuthAccessToken(state, { - request: request2, - auth: { type: "oauth" } - }); - endpoint2.headers.authorization = `token ${token}`; - return request2(endpoint2); -} -var VERSION3 = "0.0.0-development"; -function createOAuthDeviceAuth(options) { - const requestWithDefaults = options.request || request.defaults({ - headers: { - "user-agent": `octokit-auth-oauth-device.js/${VERSION3} ${getUserAgent()}` - } - }); - const { request: request2 = requestWithDefaults, ...otherOptions } = options; - const state = options.clientType === "github-app" ? { - ...otherOptions, - clientType: "github-app", - request: request2 - } : { - ...otherOptions, - clientType: "oauth-app", - request: request2, - scopes: options.scopes || [] - }; - if (!options.clientId) { - throw new Error( - '[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)' - ); - } - if (!options.onVerification) { - throw new Error( - '[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)' - ); } - return Object.assign(auth.bind(null, state), { - hook: hook.bind(null, state) - }); -} +}); -// node_modules/@octokit/auth-oauth-user/dist-bundle/index.js -var VERSION4 = "0.0.0-development"; -async function getAuthentication(state) { - if ("code" in state.strategyOptions) { - const { authentication } = await exchangeWebFlowCode({ - clientId: state.clientId, - clientSecret: state.clientSecret, - clientType: state.clientType, - onTokenCreated: state.onTokenCreated, - ...state.strategyOptions, - request: state.request - }); - return { - type: "token", - tokenType: "oauth", - ...authentication - }; - } - if ("onVerification" in state.strategyOptions) { - const deviceAuth = createOAuthDeviceAuth({ - clientType: state.clientType, - clientId: state.clientId, - onTokenCreated: state.onTokenCreated, - ...state.strategyOptions, - request: state.request - }); - const authentication = await deviceAuth({ - type: "oauth" - }); - return { - clientSecret: state.clientSecret, - ...authentication +// node_modules/undici/index.js +var require_undici2 = __commonJS({ + "node_modules/undici/index.js"(exports2, module2) { + "use strict"; + var Client = require_client2(); + var Dispatcher = require_dispatcher2(); + var Pool = require_pool2(); + var BalancedPool = require_balanced_pool2(); + var Agent = require_agent2(); + var ProxyAgent2 = require_proxy_agent2(); + var EnvHttpProxyAgent = require_env_http_proxy_agent(); + var RetryAgent = require_retry_agent(); + var errors = require_errors2(); + var util = require_util9(); + var { InvalidArgumentError } = errors; + var api = require_api2(); + var buildConnector = require_connect2(); + var MockClient = require_mock_client2(); + var MockAgent = require_mock_agent2(); + var MockPool = require_mock_pool2(); + var mockErrors = require_mock_errors2(); + var RetryHandler = require_retry_handler(); + var { getGlobalDispatcher, setGlobalDispatcher } = require_global4(); + var DecoratorHandler = require_decorator_handler(); + var RedirectHandler = require_redirect_handler(); + var createRedirectInterceptor = require_redirect_interceptor(); + Object.assign(Dispatcher.prototype, api); + module2.exports.Dispatcher = Dispatcher; + module2.exports.Client = Client; + module2.exports.Pool = Pool; + module2.exports.BalancedPool = BalancedPool; + module2.exports.Agent = Agent; + module2.exports.ProxyAgent = ProxyAgent2; + module2.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; + module2.exports.RetryAgent = RetryAgent; + module2.exports.RetryHandler = RetryHandler; + module2.exports.DecoratorHandler = DecoratorHandler; + module2.exports.RedirectHandler = RedirectHandler; + module2.exports.createRedirectInterceptor = createRedirectInterceptor; + module2.exports.interceptors = { + redirect: require_redirect(), + retry: require_retry3(), + dump: require_dump() }; - } - if ("token" in state.strategyOptions) { - return { - type: "token", - tokenType: "oauth", - clientId: state.clientId, - clientSecret: state.clientSecret, - clientType: state.clientType, - onTokenCreated: state.onTokenCreated, - ...state.strategyOptions + module2.exports.buildConnector = buildConnector; + module2.exports.errors = errors; + module2.exports.util = { + parseHeaders: util.parseHeaders, + headerNameToString: util.headerNameToString }; - } - throw new Error("[@octokit/auth-oauth-user] Invalid strategy options"); -} -async function auth2(state, options = {}) { - if (!state.authentication) { - state.authentication = state.clientType === "oauth-app" ? await getAuthentication(state) : await getAuthentication(state); - } - if (state.authentication.invalid) { - throw new Error("[@octokit/auth-oauth-user] Token is invalid"); - } - const currentAuthentication = state.authentication; - if ("expiresAt" in currentAuthentication) { - if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) { - const { authentication } = await refreshToken({ - clientType: "github-app", - clientId: state.clientId, - clientSecret: state.clientSecret, - refreshToken: currentAuthentication.refreshToken, - request: state.request - }); - state.authentication = { - tokenType: "oauth", - type: "token", - ...authentication - }; - } - } - if (options.type === "refresh") { - if (state.clientType === "oauth-app") { - throw new Error( - "[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens" - ); - } - if (!currentAuthentication.hasOwnProperty("expiresAt")) { - throw new Error("[@octokit/auth-oauth-user] Refresh token missing"); - } - await state.onTokenCreated?.(state.authentication, { - type: options.type - }); - } - if (options.type === "check" || options.type === "reset") { - const method = options.type === "check" ? checkToken : resetToken; - try { - const { authentication } = await method({ - // @ts-expect-error making TS happy would require unnecessary code so no - clientType: state.clientType, - clientId: state.clientId, - clientSecret: state.clientSecret, - token: state.authentication.token, - request: state.request - }); - state.authentication = { - tokenType: "oauth", - type: "token", - // @ts-expect-error TBD - ...authentication - }; - if (options.type === "reset") { - await state.onTokenCreated?.(state.authentication, { - type: options.type - }); - } - return state.authentication; - } catch (error) { - if (error.status === 404) { - error.message = "[@octokit/auth-oauth-user] Token is invalid"; - state.authentication.invalid = true; - } - throw error; - } - } - if (options.type === "delete" || options.type === "deleteAuthorization") { - const method = options.type === "delete" ? deleteToken : deleteAuthorization; - try { - await method({ - // @ts-expect-error making TS happy would require unnecessary code so no - clientType: state.clientType, - clientId: state.clientId, - clientSecret: state.clientSecret, - token: state.authentication.token, - request: state.request - }); - } catch (error) { - if (error.status !== 404) - throw error; + function makeDispatcher(fn) { + return (url, opts, handler) => { + if (typeof opts === "function") { + handler = opts; + opts = null; + } + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { + throw new InvalidArgumentError("invalid url"); + } + if (opts != null && typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (opts && opts.path != null) { + if (typeof opts.path !== "string") { + throw new InvalidArgumentError("invalid opts.path"); + } + let path = opts.path; + if (!opts.path.startsWith("/")) { + path = `/${path}`; + } + url = new URL(util.parseOrigin(url).origin + path); + } else { + if (!opts) { + opts = typeof url === "object" ? url : {}; + } + url = util.parseURL(url); + } + const { agent, dispatcher = getGlobalDispatcher() } = opts; + if (agent) { + throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); + } + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? "PUT" : "GET") + }, handler); + }; } - state.authentication.invalid = true; - return state.authentication; - } - return state.authentication; -} -var ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; -function requiresBasicAuth(url) { - return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); -} -async function hook2(state, request2, route, parameters = {}) { - const endpoint2 = request2.endpoint.merge( - route, - parameters - ); - if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint2.url)) { - return request2(endpoint2); - } - if (requiresBasicAuth(endpoint2.url)) { - const credentials = btoa(`${state.clientId}:${state.clientSecret}`); - endpoint2.headers.authorization = `basic ${credentials}`; - return request2(endpoint2); - } - const { token } = state.clientType === "oauth-app" ? await auth2({ ...state, request: request2 }) : await auth2({ ...state, request: request2 }); - endpoint2.headers.authorization = "token " + token; - return request2(endpoint2); -} -function createOAuthUserAuth({ - clientId, - clientSecret, - clientType = "oauth-app", - request: request2 = request.defaults({ - headers: { - "user-agent": `octokit-auth-oauth-app.js/${VERSION4} ${getUserAgent()}` - } - }), - onTokenCreated, - ...strategyOptions -}) { - const state = Object.assign({ - clientType, - clientId, - clientSecret, - onTokenCreated, - strategyOptions, - request: request2 - }); - return Object.assign(auth2.bind(null, state), { - // @ts-expect-error not worth the extra code needed to appease TS - hook: hook2.bind(null, state) - }); -} -createOAuthUserAuth.VERSION = VERSION4; - -// node_modules/@octokit/auth-oauth-app/dist-bundle/index.js -async function auth3(state, authOptions) { - if (authOptions.type === "oauth-app") { - return { - type: "oauth-app", - clientId: state.clientId, - clientSecret: state.clientSecret, - clientType: state.clientType, - headers: { - authorization: `basic ${btoa( - `${state.clientId}:${state.clientSecret}` - )}` + module2.exports.setGlobalDispatcher = setGlobalDispatcher; + module2.exports.getGlobalDispatcher = getGlobalDispatcher; + var fetchImpl = require_fetch2().fetch; + module2.exports.fetch = async function fetch2(init, options = void 0) { + try { + return await fetchImpl(init, options); + } catch (err) { + if (err && typeof err === "object") { + Error.captureStackTrace(err); + } + throw err; } }; + module2.exports.Headers = require_headers2().Headers; + module2.exports.Response = require_response2().Response; + module2.exports.Request = require_request4().Request; + module2.exports.FormData = require_formdata2().FormData; + module2.exports.File = globalThis.File ?? require("node:buffer").File; + module2.exports.FileReader = require_filereader2().FileReader; + var { setGlobalOrigin, getGlobalOrigin } = require_global3(); + module2.exports.setGlobalOrigin = setGlobalOrigin; + module2.exports.getGlobalOrigin = getGlobalOrigin; + var { CacheStorage } = require_cachestorage2(); + var { kConstruct } = require_symbols9(); + module2.exports.caches = new CacheStorage(kConstruct); + var { deleteCookie, getCookies, getSetCookies, setCookie } = require_cookies2(); + module2.exports.deleteCookie = deleteCookie; + module2.exports.getCookies = getCookies; + module2.exports.getSetCookies = getSetCookies; + module2.exports.setCookie = setCookie; + var { parseMIMEType, serializeAMimeType } = require_data_url(); + module2.exports.parseMIMEType = parseMIMEType; + module2.exports.serializeAMimeType = serializeAMimeType; + var { CloseEvent, ErrorEvent, MessageEvent } = require_events2(); + module2.exports.WebSocket = require_websocket2().WebSocket; + module2.exports.CloseEvent = CloseEvent; + module2.exports.ErrorEvent = ErrorEvent; + module2.exports.MessageEvent = MessageEvent; + module2.exports.request = makeDispatcher(api.request); + module2.exports.stream = makeDispatcher(api.stream); + module2.exports.pipeline = makeDispatcher(api.pipeline); + module2.exports.connect = makeDispatcher(api.connect); + module2.exports.upgrade = makeDispatcher(api.upgrade); + module2.exports.MockClient = MockClient; + module2.exports.MockPool = MockPool; + module2.exports.MockAgent = MockAgent; + module2.exports.mockErrors = mockErrors; + var { EventSource } = require_eventsource(); + module2.exports.EventSource = EventSource; } - if ("factory" in authOptions) { - const { type, ...options } = { - ...authOptions, - ...state - }; - return authOptions.factory(options); - } - const common = { - clientId: state.clientId, - clientSecret: state.clientSecret, - request: state.request, - ...authOptions - }; - const userAuth = state.clientType === "oauth-app" ? await createOAuthUserAuth({ - ...common, - clientType: state.clientType - }) : await createOAuthUserAuth({ - ...common, - clientType: state.clientType - }); - return userAuth(); -} -async function hook3(state, request2, route, parameters) { - let endpoint2 = request2.endpoint.merge( - route, - parameters - ); - if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint2.url)) { - return request2(endpoint2); - } - if (state.clientType === "github-app" && !requiresBasicAuth(endpoint2.url)) { - throw new Error( - `[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint2.method} ${endpoint2.url}" is not supported.` - ); - } - const credentials = btoa(`${state.clientId}:${state.clientSecret}`); - endpoint2.headers.authorization = `basic ${credentials}`; - try { - return await request2(endpoint2); - } catch (error) { - if (error.status !== 401) - throw error; - error.message = `[@octokit/auth-oauth-app] "${endpoint2.method} ${endpoint2.url}" does not support clientId/clientSecret basic authentication.`; - throw error; - } -} -var VERSION5 = "0.0.0-development"; -function createOAuthAppAuth(options) { - const state = Object.assign( - { - request: request.defaults({ - headers: { - "user-agent": `octokit-auth-oauth-app.js/${VERSION5} ${getUserAgent()}` - } - }), - clientType: "oauth-app" - }, - options - ); - return Object.assign(auth3.bind(null, state), { - hook: hook3.bind(null, state) - }); -} +}); -// node_modules/universal-github-app-jwt/lib/utils.js -function isPkcs1(privateKey2) { - return privateKey2.includes("-----BEGIN RSA PRIVATE KEY-----"); -} -function isOpenSsh(privateKey2) { - return privateKey2.includes("-----BEGIN OPENSSH PRIVATE KEY-----"); -} -function string2ArrayBuffer(str) { - const buf = new ArrayBuffer(str.length); - const bufView = new Uint8Array(buf); - for (let i = 0, strLen = str.length; i < strLen; i++) { - bufView[i] = str.charCodeAt(i); - } - return buf; -} -function getDERfromPEM(pem) { - const pemB64 = pem.trim().split("\n").slice(1, -1).join(""); - const decoded = atob(pemB64); - return string2ArrayBuffer(decoded); -} -function getEncodedMessage(header, payload) { - return `${base64encodeJSON(header)}.${base64encodeJSON(payload)}`; -} -function base64encode(buffer) { - var binary = ""; - var bytes = new Uint8Array(buffer); - var len = bytes.byteLength; - for (var i = 0; i < len; i++) { - binary += String.fromCharCode(bytes[i]); - } - return fromBase64(btoa(binary)); -} -function fromBase64(base64) { - return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); -} -function base64encodeJSON(obj) { - return fromBase64(btoa(JSON.stringify(obj))); -} +// main.js +var import_core4 = __toESM(require_core(), 1); -// node_modules/universal-github-app-jwt/lib/crypto-node.js -var crypto_node_exports = {}; -__export(crypto_node_exports, { - convertPrivateKey: () => convertPrivateKey -}); -__reExport(crypto_node_exports, require("node:crypto")); -var import_node_crypto = require("node:crypto"); -function convertPrivateKey(privateKey2) { - if (!isPkcs1(privateKey2)) return privateKey2; - return (0, import_node_crypto.createPrivateKey)(privateKey2).export({ - type: "pkcs8", - format: "pem" - }); -} +// node_modules/p-retry/index.js +var import_retry = __toESM(require_retry2(), 1); -// node_modules/universal-github-app-jwt/lib/get-token.js -async function getToken({ privateKey: privateKey2, payload }) { - const convertedPrivateKey = convertPrivateKey(privateKey2); - if (isPkcs1(convertedPrivateKey)) { - throw new Error( - "[universal-github-app-jwt] Private Key is in PKCS#1 format, but only PKCS#8 is supported. See https://github.com/gr2m/universal-github-app-jwt#private-key-formats" - ); +// node_modules/is-network-error/index.js +var objectToString = Object.prototype.toString; +var isError = (value) => objectToString.call(value) === "[object Error]"; +var errorMessages = /* @__PURE__ */ new Set([ + "network error", + // Chrome + "Failed to fetch", + // Chrome + "NetworkError when attempting to fetch resource.", + // Firefox + "The Internet connection appears to be offline.", + // Safari 16 + "Load failed", + // Safari 17+ + "Network request failed", + // `cross-fetch` + "fetch failed", + // Undici (Node.js) + "terminated" + // Undici (Node.js) +]); +function isNetworkError(error) { + const isValid = error && isError(error) && error.name === "TypeError" && typeof error.message === "string"; + if (!isValid) { + return false; } - if (isOpenSsh(convertedPrivateKey)) { - throw new Error( - "[universal-github-app-jwt] Private Key is in OpenSSH format, but only PKCS#8 is supported. See https://github.com/gr2m/universal-github-app-jwt#private-key-formats" - ); + if (error.message === "Load failed") { + return error.stack === void 0; } - const algorithm = { - name: "RSASSA-PKCS1-v1_5", - hash: { name: "SHA-256" } - }; - const header = { alg: "RS256", typ: "JWT" }; - const privateKeyDER = getDERfromPEM(convertedPrivateKey); - const importedKey = await crypto_node_exports.subtle.importKey( - "pkcs8", - privateKeyDER, - algorithm, - false, - ["sign"] - ); - const encodedMessage = getEncodedMessage(header, payload); - const encodedMessageArrBuf = string2ArrayBuffer(encodedMessage); - const signatureArrBuf = await crypto_node_exports.subtle.sign( - algorithm.name, - importedKey, - encodedMessageArrBuf - ); - const encodedSignature = base64encode(signatureArrBuf); - return `${encodedMessage}.${encodedSignature}`; -} - -// node_modules/universal-github-app-jwt/index.js -async function githubAppJwt({ - id, - privateKey: privateKey2, - now = Math.floor(Date.now() / 1e3) -}) { - const privateKeyWithNewlines = privateKey2.replace(/\\n/g, "\n"); - const nowWithSafetyMargin = now - 30; - const expiration = nowWithSafetyMargin + 60 * 10; - const payload = { - iat: nowWithSafetyMargin, - // Issued at time - exp: expiration, - iss: id - }; - const token = await getToken({ - privateKey: privateKeyWithNewlines, - payload - }); - return { - appId: id, - expiration, - token - }; + return errorMessages.has(error.message); } -// node_modules/lru-cache/dist/esm/index.js -var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date; -var warned = /* @__PURE__ */ new Set(); -var PROCESS = typeof process === "object" && !!process ? process : {}; -var emitWarning = (msg, type, code, fn) => { - typeof PROCESS.emitWarning === "function" ? PROCESS.emitWarning(msg, type, code, fn) : console.error(`[${code}] ${type}: ${msg}`); -}; -var AC = globalThis.AbortController; -var AS = globalThis.AbortSignal; -if (typeof AC === "undefined") { - AS = class AbortSignal { - onabort; - _onabort = []; - reason; - aborted = false; - addEventListener(_, fn) { - this._onabort.push(fn); - } - }; - AC = class AbortController { - constructor() { - warnACPolyfill(); - } - signal = new AS(); - abort(reason) { - if (this.signal.aborted) - return; - this.signal.reason = reason; - this.signal.aborted = true; - for (const fn of this.signal._onabort) { - fn(reason); - } - this.signal.onabort?.(reason); - } - }; - let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1"; - const warnACPolyfill = () => { - if (!printACPolyfillWarning) - return; - printACPolyfillWarning = false; - emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", warnACPolyfill); - }; -} -var shouldWarn = (code) => !warned.has(code); -var TYPE = Symbol("type"); -var isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); -var getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null; -var ZeroArray = class extends Array { - constructor(size) { - super(size); - this.fill(0); - } -}; -var Stack = class _Stack { - heap; - length; - // private constructor - static #constructing = false; - static create(max) { - const HeapCls = getUintArray(max); - if (!HeapCls) - return []; - _Stack.#constructing = true; - const s = new _Stack(max, HeapCls); - _Stack.#constructing = false; - return s; - } - constructor(max, HeapCls) { - if (!_Stack.#constructing) { - throw new TypeError("instantiate Stack using Stack.create(n)"); - } - this.heap = new HeapCls(max); - this.length = 0; - } - push(n) { - this.heap[this.length++] = n; - } - pop() { - return this.heap[--this.length]; - } -}; -var LRUCache = class _LRUCache { - // properties coming in from the options of these, only max and maxSize - // really *need* to be protected. The rest can be modified, as they just - // set defaults for various methods. - #max; - #maxSize; - #dispose; - #disposeAfter; - #fetchMethod; - /** - * {@link LRUCache.OptionsBase.ttl} - */ - ttl; - /** - * {@link LRUCache.OptionsBase.ttlResolution} - */ - ttlResolution; - /** - * {@link LRUCache.OptionsBase.ttlAutopurge} - */ - ttlAutopurge; - /** - * {@link LRUCache.OptionsBase.updateAgeOnGet} - */ - updateAgeOnGet; - /** - * {@link LRUCache.OptionsBase.updateAgeOnHas} - */ - updateAgeOnHas; - /** - * {@link LRUCache.OptionsBase.allowStale} - */ - allowStale; - /** - * {@link LRUCache.OptionsBase.noDisposeOnSet} - */ - noDisposeOnSet; - /** - * {@link LRUCache.OptionsBase.noUpdateTTL} - */ - noUpdateTTL; - /** - * {@link LRUCache.OptionsBase.maxEntrySize} - */ - maxEntrySize; - /** - * {@link LRUCache.OptionsBase.sizeCalculation} - */ - sizeCalculation; - /** - * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} - */ - noDeleteOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} - */ - noDeleteOnStaleGet; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} - */ - allowStaleOnFetchAbort; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} - */ - allowStaleOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.ignoreFetchAbort} - */ - ignoreFetchAbort; - // computed properties - #size; - #calculatedSize; - #keyMap; - #keyList; - #valList; - #next; - #prev; - #head; - #tail; - #free; - #disposed; - #sizes; - #starts; - #ttls; - #hasDispose; - #hasFetchMethod; - #hasDisposeAfter; - /** - * Do not call this method unless you need to inspect the - * inner workings of the cache. If anything returned by this - * object is modified in any way, strange breakage may occur. - * - * These fields are private for a reason! - * - * @internal - */ - static unsafeExposeInternals(c) { - return { - // properties - starts: c.#starts, - ttls: c.#ttls, - sizes: c.#sizes, - keyMap: c.#keyMap, - keyList: c.#keyList, - valList: c.#valList, - next: c.#next, - prev: c.#prev, - get head() { - return c.#head; - }, - get tail() { - return c.#tail; - }, - free: c.#free, - // methods - isBackgroundFetch: (p) => c.#isBackgroundFetch(p), - backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), - moveToTail: (index) => c.#moveToTail(index), - indexes: (options) => c.#indexes(options), - rindexes: (options) => c.#rindexes(options), - isStale: (index) => c.#isStale(index) - }; - } - // Protected read-only members - /** - * {@link LRUCache.OptionsBase.max} (read-only) - */ - get max() { - return this.#max; - } - /** - * {@link LRUCache.OptionsBase.maxSize} (read-only) - */ - get maxSize() { - return this.#maxSize; - } - /** - * The total computed size of items in the cache (read-only) - */ - get calculatedSize() { - return this.#calculatedSize; - } - /** - * The number of items stored in the cache (read-only) - */ - get size() { - return this.#size; - } - /** - * {@link LRUCache.OptionsBase.fetchMethod} (read-only) - */ - get fetchMethod() { - return this.#fetchMethod; - } - /** - * {@link LRUCache.OptionsBase.dispose} (read-only) - */ - get dispose() { - return this.#dispose; - } - /** - * {@link LRUCache.OptionsBase.disposeAfter} (read-only) - */ - get disposeAfter() { - return this.#disposeAfter; - } - constructor(options) { - const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options; - if (max !== 0 && !isPosInt(max)) { - throw new TypeError("max option must be a nonnegative integer"); - } - const UintArray = max ? getUintArray(max) : Array; - if (!UintArray) { - throw new Error("invalid max value: " + max); - } - this.#max = max; - this.#maxSize = maxSize; - this.maxEntrySize = maxEntrySize || this.#maxSize; - this.sizeCalculation = sizeCalculation; - if (this.sizeCalculation) { - if (!this.#maxSize && !this.maxEntrySize) { - throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize"); - } - if (typeof this.sizeCalculation !== "function") { - throw new TypeError("sizeCalculation set to non-function"); - } - } - if (fetchMethod !== void 0 && typeof fetchMethod !== "function") { - throw new TypeError("fetchMethod must be a function if specified"); - } - this.#fetchMethod = fetchMethod; - this.#hasFetchMethod = !!fetchMethod; - this.#keyMap = /* @__PURE__ */ new Map(); - this.#keyList = new Array(max).fill(void 0); - this.#valList = new Array(max).fill(void 0); - this.#next = new UintArray(max); - this.#prev = new UintArray(max); - this.#head = 0; - this.#tail = 0; - this.#free = Stack.create(max); - this.#size = 0; - this.#calculatedSize = 0; - if (typeof dispose === "function") { - this.#dispose = dispose; - } - if (typeof disposeAfter === "function") { - this.#disposeAfter = disposeAfter; - this.#disposed = []; +// node_modules/p-retry/index.js +var AbortError = class extends Error { + constructor(message) { + super(); + if (message instanceof Error) { + this.originalError = message; + ({ message } = message); } else { - this.#disposeAfter = void 0; - this.#disposed = void 0; - } - this.#hasDispose = !!this.#dispose; - this.#hasDisposeAfter = !!this.#disposeAfter; - this.noDisposeOnSet = !!noDisposeOnSet; - this.noUpdateTTL = !!noUpdateTTL; - this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; - this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; - this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; - this.ignoreFetchAbort = !!ignoreFetchAbort; - if (this.maxEntrySize !== 0) { - if (this.#maxSize !== 0) { - if (!isPosInt(this.#maxSize)) { - throw new TypeError("maxSize must be a positive integer if specified"); - } - } - if (!isPosInt(this.maxEntrySize)) { - throw new TypeError("maxEntrySize must be a positive integer if specified"); - } - this.#initializeSizeTracking(); - } - this.allowStale = !!allowStale; - this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; - this.updateAgeOnGet = !!updateAgeOnGet; - this.updateAgeOnHas = !!updateAgeOnHas; - this.ttlResolution = isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1; - this.ttlAutopurge = !!ttlAutopurge; - this.ttl = ttl || 0; - if (this.ttl) { - if (!isPosInt(this.ttl)) { - throw new TypeError("ttl must be a positive integer if specified"); - } - this.#initializeTTLTracking(); - } - if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { - throw new TypeError("At least one of max, maxSize, or ttl is required"); - } - if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { - const code = "LRU_CACHE_UNBOUNDED"; - if (shouldWarn(code)) { - warned.add(code); - const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption."; - emitWarning(msg, "UnboundedCacheWarning", code, _LRUCache); - } - } - } - /** - * Return the remaining TTL time for a given entry key - */ - getRemainingTTL(key) { - return this.#keyMap.has(key) ? Infinity : 0; - } - #initializeTTLTracking() { - const ttls = new ZeroArray(this.#max); - const starts = new ZeroArray(this.#max); - this.#ttls = ttls; - this.#starts = starts; - this.#setItemTTL = (index, ttl, start = perf.now()) => { - starts[index] = ttl !== 0 ? start : 0; - ttls[index] = ttl; - if (ttl !== 0 && this.ttlAutopurge) { - const t = setTimeout(() => { - if (this.#isStale(index)) { - this.delete(this.#keyList[index]); - } - }, ttl + 1); - if (t.unref) { - t.unref(); - } - } - }; - this.#updateItemAge = (index) => { - starts[index] = ttls[index] !== 0 ? perf.now() : 0; - }; - this.#statusTTL = (status, index) => { - if (ttls[index]) { - const ttl = ttls[index]; - const start = starts[index]; - if (!ttl || !start) - return; - status.ttl = ttl; - status.start = start; - status.now = cachedNow || getNow(); - const age = status.now - start; - status.remainingTTL = ttl - age; - } - }; - let cachedNow = 0; - const getNow = () => { - const n = perf.now(); - if (this.ttlResolution > 0) { - cachedNow = n; - const t = setTimeout(() => cachedNow = 0, this.ttlResolution); - if (t.unref) { - t.unref(); - } - } - return n; + this.originalError = new Error(message); + this.originalError.stack = this.stack; + } + this.name = "AbortError"; + this.message = message; + } +}; +var decorateErrorWithCounts = (error, attemptNumber, options) => { + const retriesLeft = options.retries - (attemptNumber - 1); + error.attemptNumber = attemptNumber; + error.retriesLeft = retriesLeft; + return error; +}; +async function pRetry(input, options) { + return new Promise((resolve, reject) => { + options = { + onFailedAttempt() { + }, + retries: 10, + shouldRetry: () => true, + ...options }; - this.getRemainingTTL = (key) => { - const index = this.#keyMap.get(key); - if (index === void 0) { - return 0; - } - const ttl = ttls[index]; - const start = starts[index]; - if (!ttl || !start) { - return Infinity; - } - const age = (cachedNow || getNow()) - start; - return ttl - age; + const operation = import_retry.default.operation(options); + const abortHandler = () => { + operation.stop(); + reject(options.signal?.reason); }; - this.#isStale = (index) => { - const s = starts[index]; - const t = ttls[index]; - return !!t && !!s && (cachedNow || getNow()) - s > t; + if (options.signal && !options.signal.aborted) { + options.signal.addEventListener("abort", abortHandler, { once: true }); + } + const cleanUp = () => { + options.signal?.removeEventListener("abort", abortHandler); + operation.stop(); }; - } - // conditionally set private methods related to TTL - #updateItemAge = () => { - }; - #statusTTL = () => { - }; - #setItemTTL = () => { - }; - /* c8 ignore stop */ - #isStale = () => false; - #initializeSizeTracking() { - const sizes = new ZeroArray(this.#max); - this.#calculatedSize = 0; - this.#sizes = sizes; - this.#removeItemSize = (index) => { - this.#calculatedSize -= sizes[index]; - sizes[index] = 0; - }; - this.#requireSize = (k, v, size, sizeCalculation) => { - if (this.#isBackgroundFetch(v)) { - return 0; - } - if (!isPosInt(size)) { - if (sizeCalculation) { - if (typeof sizeCalculation !== "function") { - throw new TypeError("sizeCalculation must be a function"); + operation.attempt(async (attemptNumber) => { + try { + const result = await input(attemptNumber); + cleanUp(); + resolve(result); + } catch (error) { + try { + if (!(error instanceof Error)) { + throw new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`); + } + if (error instanceof AbortError) { + throw error.originalError; } - size = sizeCalculation(v, k); - if (!isPosInt(size)) { - throw new TypeError("sizeCalculation return invalid (expect positive integer)"); + if (error instanceof TypeError && !isNetworkError(error)) { + throw error; } - } else { - throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set."); - } - } - return size; - }; - this.#addItemSize = (index, size, status) => { - sizes[index] = size; - if (this.#maxSize) { - const maxSize = this.#maxSize - sizes[index]; - while (this.#calculatedSize > maxSize) { - this.#evict(true); + decorateErrorWithCounts(error, attemptNumber, options); + if (!await options.shouldRetry(error)) { + operation.stop(); + reject(error); + } + await options.onFailedAttempt(error); + if (!operation.retry(error)) { + throw operation.mainError(); + } + } catch (finalError) { + decorateErrorWithCounts(finalError, attemptNumber, options); + cleanUp(); + reject(finalError); } } - this.#calculatedSize += sizes[index]; - if (status) { - status.entrySize = size; - status.totalCalculatedSize = this.#calculatedSize; - } - }; + }); + }); +} + +// lib/main.js +var import_client_kms = __toESM(require_dist_cjs53(), 1); +async function main(appId2, kmsKeyId2, owner2, repositories2, core4, request2, skipTokenRevoke2) { + let parsedOwner = ""; + let parsedRepositoryNames = ""; + if (!owner2 && !repositories2) { + [parsedOwner, parsedRepositoryNames] = String( + process.env.GITHUB_REPOSITORY + ).split("/"); + core4.info( + `owner and repositories not set, creating token for the current repository ("${parsedRepositoryNames}")` + ); } - #removeItemSize = (_i) => { - }; - #addItemSize = (_i, _s, _st) => { - }; - #requireSize = (_k, _v, size, sizeCalculation) => { - if (size || sizeCalculation) { - throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache"); - } - return 0; - }; - *#indexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#tail; true; ) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#head) { - break; - } else { - i = this.#prev[i]; - } - } - } + if (owner2 && !repositories2) { + parsedOwner = owner2; + core4.info( + `repositories not set, creating token for all repositories for given owner "${owner2}"` + ); } - *#rindexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#head; true; ) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#tail) { - break; - } else { - i = this.#next[i]; - } - } - } + if (!owner2 && repositories2) { + parsedOwner = String(process.env.GITHUB_REPOSITORY_OWNER); + parsedRepositoryNames = repositories2; + core4.info( + `owner not set, creating owner for given repositories "${repositories2}" in current owner ("${parsedOwner}")` + ); } - #isValidIndex(index) { - return index !== void 0 && this.#keyMap.get(this.#keyList[index]) === index; + if (owner2 && repositories2) { + parsedOwner = owner2; + parsedRepositoryNames = repositories2; + core4.info( + `owner and repositories set, creating token for repositories "${repositories2}" owned by "${owner2}"` + ); } - /** - * Return a generator yielding `[key, value]` pairs, - * in order from most recently used to least recently used. - */ - *entries() { - for (const i of this.#indexes()) { - if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } + const jwt = await createJWT({ appId: appId2, kmsKeyId: kmsKeyId2 }); + let authentication, installationId, appSlug; + if (parsedRepositoryNames) { + ({ authentication, installationId, appSlug } = await pRetry(() => getTokenFromRepository(request2, jwt, parsedOwner, parsedRepositoryNames), { + onFailedAttempt: (error) => { + core4.info( + `Failed to create token for "${parsedRepositoryNames}" (attempt ${error.attemptNumber}): ${error.message}` + ); + }, + retries: 3 + })); + } else { + ({ authentication, installationId, appSlug } = await pRetry(() => getTokenFromOwner(request2, jwt, parsedOwner), { + onFailedAttempt: (error) => { + core4.info( + `Failed to create token for "${parsedOwner}" (attempt ${error.attemptNumber}): ${error.message}` + ); + }, + retries: 3 + })); } - /** - * Inverse order version of {@link LRUCache.entries} - * - * Return a generator yielding `[key, value]` pairs, - * in order from least recently used to most recently used. - */ - *rentries() { - for (const i of this.#rindexes()) { - if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } + core4.setSecret(authentication.token); + core4.setOutput("token", authentication.token); + core4.setOutput("installation-id", installationId); + core4.setOutput("app-slug", appSlug); + if (!skipTokenRevoke2) { + core4.saveState("token", authentication.token); + core4.saveState("expiresAt", authentication.expiresAt); } - /** - * Return a generator yielding the keys in the cache, - * in order from most recently used to least recently used. - */ - *keys() { - for (const i of this.#indexes()) { - const k = this.#keyList[i]; - if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } +} +async function getTokenFromOwner(request2, jwt, parsedOwner) { + const installationResponse = await request2("GET /orgs/{org}/installation", { + org: parsedOwner, + headers: { + authorization: `bearer ${jwt}` } - } - /** - * Inverse order version of {@link LRUCache.keys} - * - * Return a generator yielding the keys in the cache, - * in order from least recently used to most recently used. - */ - *rkeys() { - for (const i of this.#rindexes()) { - const k = this.#keyList[i]; - if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { - yield k; + }).catch((error) => { + if (error.status !== 404) throw error; + return request2("GET /users/{username}/installation", { + username: parsedOwner, + headers: { + authorization: `bearer ${jwt}` } + }); + }); + const accessTokenResponse = await request2(`POST /app/installations/${installationResponse.data.id}/access_tokens`, { + headers: { + authorization: `bearer ${jwt}` + }, + installationId: installationResponse.data.id + }).catch((error) => { + core.info(`Error obtaining the installation access token: ${error.message}`); + throw error; + }); + const authentication = accessTokenResponse.data; + const installationId = installationResponse.data.id; + const appSlug = installationResponse.data["app_slug"]; + return { authentication, installationId, appSlug }; +} +async function getTokenFromRepository(request2, jwt, parsedOwner, parsedRepositoryNames) { + const installationResponse = await request2("GET /repos/{owner}/{repo}/installation", { + owner: parsedOwner, + repo: parsedRepositoryNames.split(",")[0], + headers: { + authorization: `bearer ${jwt}` } + }); + const accessTokenResponse = await request2(`POST /app/installations/${installationResponse.data.id}/access_tokens`, { + headers: { + authorization: `bearer ${jwt}` + }, + installationId: installationResponse.data.id, + repositories: parsedRepositoryNames.split(",") + }).catch((error) => { + core.info(`Error obtaining the installation access token: ${error.message}`); + throw error; + }); + const authentication = accessTokenResponse.data; + const installationId = installationResponse.data.id; + const appSlug = installationResponse.data["app_slug"]; + return { authentication, installationId, appSlug }; +} +async function createJWT({ appId: appId2, expirationTime = 600, httpRequestHandler = void 0, kmsKeyId: kmsKeyId2 }) { + const now = Math.floor(Date.now() / 1e3); + const iat = now - 60; + const exp = now + expirationTime; + const header = { + typ: "JWT", + alg: "RS256" + }; + const payload = { + iat, + exp, + iss: appId2 + }; + const headerBase64 = Buffer.from(JSON.stringify(header)).toString("base64").replaceAll("=", "").replaceAll("+", "-").replaceAll("/", "_"); + const payloadBase64 = Buffer.from(JSON.stringify(payload)).toString("base64").replaceAll("=", "").replaceAll("+", "-").replaceAll("/", "_"); + const headerPayload = `${headerBase64}.${payloadBase64}`; + const kmsClient = new import_client_kms.KMSClient({ + requestHandler: httpRequestHandler + }); + const signInput = { + KeyId: kmsKeyId2, + Message: headerPayload, + MessageType: "RAW", + SigningAlgorithm: "RSASSA_PKCS1_V1_5_SHA_256" + }; + try { + const signCommand = new import_client_kms.SignCommand(signInput); + const signatureResponse = await kmsClient.send(signCommand); + const signatureBase64 = Buffer.from(signatureResponse.Signature).toString("base64").replaceAll("=", "").replaceAll("+", "-").replaceAll("/", "_"); + const jwt = `${headerPayload}.${signatureBase64}`; + return jwt; + } catch (error) { + console.error("Error signing JWT:", error.message); + return error; } - /** - * Return a generator yielding the values in the cache, - * in order from most recently used to least recently used. - */ - *values() { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } +} + +// lib/request.js +var import_core3 = __toESM(require_core(), 1); + +// node_modules/universal-user-agent/index.js +function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; } - /** - * Inverse order version of {@link LRUCache.values} - * - * Return a generator yielding the values in the cache, - * in order from least recently used to most recently used. - */ - *rvalues() { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } + if (typeof process === "object" && process.version !== void 0) { + return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; } - /** - * Iterating over the cache itself yields the same results as - * {@link LRUCache.entries} - */ - [Symbol.iterator]() { - return this.entries(); + return ""; +} + +// node_modules/@octokit/endpoint/dist-bundle/index.js +var VERSION = "0.0.0-development"; +var userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" } - /** - * A String value that is used in the creation of the default string description of an object. - * Called by the built-in method Object.prototype.toString. - */ - [Symbol.toStringTag] = "LRUCache"; - /** - * Find a value for which the supplied fn method returns a truthy value, - * similar to Array.find(). fn is called as fn(value, key, cache). - */ - find(fn, getOptions = {}) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - if (value === void 0) - continue; - if (fn(value, this.#keyList[i], this)) { - return this.get(this.#keyList[i], getOptions); - } - } +}; +function lowercaseKeys(object) { + if (!object) { + return {}; } - /** - * Call the supplied function on each item in the cache, in order from - * most recently used to least recently used. fn is called as - * fn(value, key, cache). Does not update age or recenty of use. - * Does not iterate over stale values. - */ - forEach(fn, thisp = this) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - if (value === void 0) - continue; - fn.call(thisp, value, this.#keyList[i], this); + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { [key]: options[key] }); } - } - /** - * The same as {@link LRUCache.forEach} but items are iterated over in - * reverse order. (ie, less recently used items are iterated over first.) - */ - rforEach(fn, thisp = this) { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - if (value === void 0) - continue; - fn.call(thisp, value, this.#keyList[i], this); + }); + return result; +} +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; } } - /** - * Delete any stale entries. Returns true if anything was removed, - * false otherwise. - */ - purgeStale() { - let deleted = false; - for (const i of this.#rindexes({ allowStale: true })) { - if (this.#isStale(i)) { - this.delete(this.#keyList[i]); - deleted = true; - } - } - return deleted; + return obj; +} +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } else { + options = Object.assign({}, route); } - /** - * Get the extended info about a given entry, to get its value, size, and - * TTL info simultaneously. Like {@link LRUCache#dump}, but just for a - * single key. Always returns stale values, if their info is found in the - * cache, so be sure to check for expired TTLs if relevant. - */ - info(key) { - const i = this.#keyMap.get(key); - if (i === void 0) - return void 0; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - if (value === void 0) - return void 0; - const entry = { value }; - if (this.#ttls && this.#starts) { - const ttl = this.#ttls[i]; - const start = this.#starts[i]; - if (ttl && start) { - const remain = ttl - (perf.now() - start); - entry.ttl = remain; - entry.start = Date.now(); - } - } - if (this.#sizes) { - entry.size = this.#sizes[i]; + options.headers = lowercaseKeys(options.headers); + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + if (options.url === "/graphql") { + if (defaults && defaults.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); } - return entry; + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); } - /** - * Return an array of [key, {@link LRUCache.Entry}] tuples which can be - * passed to cache.load() - */ - dump() { - const arr = []; - for (const i of this.#indexes({ allowStale: true })) { - const key = this.#keyList[i]; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - if (value === void 0 || key === void 0) - continue; - const entry = { value }; - if (this.#ttls && this.#starts) { - entry.ttl = this.#ttls[i]; - const age = perf.now() - this.#starts[i]; - entry.start = Math.floor(Date.now() - age); - } - if (this.#sizes) { - entry.size = this.#sizes[i]; - } - arr.unshift([key, entry]); - } - return arr; + return mergedOptions; +} +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; } - /** - * Reset the cache and load in the items in entries in the order listed. - * Note that the shape of the resulting cache may be different if the - * same options are not used in both caches. - */ - load(arr) { - this.clear(); - for (const [key, entry] of arr) { - if (entry.start) { - const age = Date.now() - entry.start; - entry.start = perf.now() - age; - } - this.set(key, entry.value, entry); + return url + separator + names.map((name) => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} +var urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; } - /** - * Add a value to the cache. - * - * Note: if `undefined` is specified as a value, this is an alias for - * {@link LRUCache#delete} - */ - set(k, v, setOptions = {}) { - if (v === void 0) { - this.delete(k); - return this; - } - const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions; - let { noUpdateTTL = this.noUpdateTTL } = setOptions; - const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); - if (this.maxEntrySize && size > this.maxEntrySize) { - if (status) { - status.set = "miss"; - status.maxEntrySizeExceeded = true; - } - this.delete(k); - return this; - } - let index = this.#size === 0 ? void 0 : this.#keyMap.get(k); - if (index === void 0) { - index = this.#size === 0 ? this.#tail : this.#free.length !== 0 ? this.#free.pop() : this.#size === this.#max ? this.#evict(false) : this.#size; - this.#keyList[index] = k; - this.#valList[index] = v; - this.#keyMap.set(k, index); - this.#next[this.#tail] = index; - this.#prev[index] = this.#tail; - this.#tail = index; - this.#size++; - this.#addItemSize(index, size, status); - if (status) - status.set = "add"; - noUpdateTTL = false; - } else { - this.#moveToTail(index); - const oldVal = this.#valList[index]; - if (v !== oldVal) { - if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { - oldVal.__abortController.abort(new Error("replaced")); - const { __staleWhileFetching: s } = oldVal; - if (s !== void 0 && !noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(s, k, "set"); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([s, k, "set"]); - } - } - } else if (!noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(oldVal, k, "set"); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([oldVal, k, "set"]); - } - } - this.#removeItemSize(index); - this.#addItemSize(index, size, status); - this.#valList[index] = v; - if (status) { - status.set = "replace"; - const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal; - if (oldValue !== void 0) - status.oldValue = oldValue; - } - } else if (status) { - status.set = "update"; - } - } - if (ttl !== 0 && !this.#ttls) { - this.#initializeTTLTracking(); - } - if (this.#ttls) { - if (!noUpdateTTL) { - this.#setItemTTL(index, ttl, start); - } - if (status) - this.#statusTTL(status, index); - } - if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while (task = dt?.shift()) { - this.#disposeAfter?.(...task); - } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} +function omit(object, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; } - return this; } - /** - * Evict the least recently used item, returning its value or - * `undefined` if cache is empty. - */ - pop() { - try { - while (this.#size) { - const val = this.#valList[this.#head]; - this.#evict(true); - if (this.#isBackgroundFetch(val)) { - if (val.__staleWhileFetching) { - return val.__staleWhileFetching; - } - } else if (val !== void 0) { - return val; - } - } - } finally { - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while (task = dt?.shift()) { - this.#disposeAfter?.(...task); - } - } + return result; +} +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); } + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; } - #evict(free) { - const head = this.#head; - const k = this.#keyList[head]; - const v = this.#valList[head]; - if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error("evicted")); - } else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, "evict"); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, "evict"]); +} +function isDefined(value) { + return value !== void 0 && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); } - } - this.#removeItemSize(head); - if (free) { - this.#keyList[head] = void 0; - this.#valList[head] = void 0; - this.#free.push(head); - } - if (this.#size === 1) { - this.#head = this.#tail = 0; - this.#free.length = 0; + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); } else { - this.#head = this.#next[head]; - } - this.#keyMap.delete(k); - this.#size--; - return head; - } - /** - * Check if a key is in the cache, without updating the recency of use. - * Will return false if the item is stale, even though it is technically - * in the cache. - * - * Will not update item age unless - * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. - */ - has(k, hasOptions = {}) { - const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; - const index = this.#keyMap.get(k); - if (index !== void 0) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v) && v.__staleWhileFetching === void 0) { - return false; - } - if (!this.#isStale(index)) { - if (updateAgeOnHas) { - this.#updateItemAge(index); - } - if (status) { - status.has = "hit"; - this.#statusTTL(status, index); - } - return true; - } else if (status) { - status.has = "stale"; - this.#statusTTL(status, index); - } - } else if (status) { - status.has = "miss"; - } - return false; - } - /** - * Like {@link LRUCache#get} but doesn't update recency or delete stale - * items. - * - * Returns `undefined` if the item is stale, unless - * {@link LRUCache.OptionsBase.allowStale} is set. - */ - peek(k, peekOptions = {}) { - const { allowStale = this.allowStale } = peekOptions; - const index = this.#keyMap.get(k); - if (index === void 0 || !allowStale && this.#isStale(index)) { - return; - } - const v = this.#valList[index]; - return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - } - #backgroundFetch(k, index, options, context) { - const v = index === void 0 ? void 0 : this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - return v; - } - const ac = new AC(); - const { signal } = options; - signal?.addEventListener("abort", () => ac.abort(signal.reason), { - signal: ac.signal - }); - const fetchOpts = { - signal: ac.signal, - options, - context - }; - const cb = (v2, updateCache = false) => { - const { aborted } = ac.signal; - const ignoreAbort = options.ignoreFetchAbort && v2 !== void 0; - if (options.status) { - if (aborted && !updateCache) { - options.status.fetchAborted = true; - options.status.fetchError = ac.signal.reason; - if (ignoreAbort) - options.status.fetchAbortIgnored = true; + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); + }); } else { - options.status.fetchResolved = true; + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); } - } - if (aborted && !ignoreAbort && !updateCache) { - return fetchFail(ac.signal.reason); - } - const bf2 = p; - if (this.#valList[index] === p) { - if (v2 === void 0) { - if (bf2.__staleWhileFetching) { - this.#valList[index] = bf2.__staleWhileFetching; - } else { - this.delete(k); - } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); } else { - if (options.status) - options.status.fetchUpdated = true; - this.set(k, v2, fetchOpts.options); - } - } - return v2; - }; - const eb = (er) => { - if (options.status) { - options.status.fetchRejected = true; - options.status.fetchError = er; - } - return fetchFail(er); - }; - const fetchFail = (er) => { - const { aborted } = ac.signal; - const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; - const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; - const noDelete = allowStale || options.noDeleteOnFetchRejection; - const bf2 = p; - if (this.#valList[index] === p) { - const del = !noDelete || bf2.__staleWhileFetching === void 0; - if (del) { - this.delete(k); - } else if (!allowStaleAborted) { - this.#valList[index] = bf2.__staleWhileFetching; + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); } - } - if (allowStale) { - if (options.status && bf2.__staleWhileFetching !== void 0) { - options.status.returnedStale = true; + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); } - return bf2.__staleWhileFetching; - } else if (bf2.__returned === bf2) { - throw er; - } - }; - const pcall = (res, rej) => { - const fmp = this.#fetchMethod?.(k, v, fetchOpts); - if (fmp && fmp instanceof Promise) { - fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej); } - ac.signal.addEventListener("abort", () => { - if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) { - res(void 0); - if (options.allowStaleOnFetchAbort) { - res = (v2) => cb(v2, true); - } - } - }); - }; - if (options.status) - options.status.fetchDispatched = true; - const p = new Promise(pcall).then(cb, eb); - const bf = Object.assign(p, { - __abortController: ac, - __staleWhileFetching: v, - __returned: void 0 - }); - if (index === void 0) { - this.set(k, bf, { ...fetchOpts.options, status: void 0 }); - index = this.#keyMap.get(k); - } else { - this.#valList[index] = bf; } - return bf; - } - #isBackgroundFetch(p) { - if (!this.#hasFetchMethod) - return false; - const b = p; - return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC; - } - async fetch(k, fetchOptions = {}) { - const { - // get options - allowStale = this.allowStale, - updateAgeOnGet = this.updateAgeOnGet, - noDeleteOnStaleGet = this.noDeleteOnStaleGet, - // set options - ttl = this.ttl, - noDisposeOnSet = this.noDisposeOnSet, - size = 0, - sizeCalculation = this.sizeCalculation, - noUpdateTTL = this.noUpdateTTL, - // fetch exclusive options - noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, - allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, - ignoreFetchAbort = this.ignoreFetchAbort, - allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, - context, - forceRefresh = false, - status, - signal - } = fetchOptions; - if (!this.#hasFetchMethod) { - if (status) - status.fetch = "get"; - return this.get(k, { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - status - }); - } - const options = { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - ttl, - noDisposeOnSet, - size, - sizeCalculation, - noUpdateTTL, - noDeleteOnFetchRejection, - allowStaleOnFetchRejection, - allowStaleOnFetchAbort, - ignoreFetchAbort, - status, - signal - }; - let index = this.#keyMap.get(k); - if (index === void 0) { - if (status) - status.fetch = "miss"; - const p = this.#backgroundFetch(k, index, options, context); - return p.__returned = p; - } else { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - const stale = allowStale && v.__staleWhileFetching !== void 0; - if (status) { - status.fetch = "inflight"; - if (stale) - status.returnedStale = true; - } - return stale ? v.__staleWhileFetching : v.__returned = v; - } - const isStale = this.#isStale(index); - if (!forceRefresh && !isStale) { - if (status) - status.fetch = "hit"; - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - if (status) - this.#statusTTL(status, index); - return v; - } - const p = this.#backgroundFetch(k, index, options, context); - const hasStale = p.__staleWhileFetching !== void 0; - const staleVal = hasStale && allowStale; - if (status) { - status.fetch = isStale ? "stale" : "refresh"; - if (staleVal && isStale) - status.returnedStale = true; + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); } - return staleVal ? p.__staleWhileFetching : p.__returned = p; + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); } } - /** - * Return a value from the cache. Will update the recency of the cache - * entry found. - * - * If the key is not found, get() will return `undefined`. - */ - get(k, getOptions = {}) { - const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions; - const index = this.#keyMap.get(k); - if (index !== void 0) { - const value = this.#valList[index]; - const fetching = this.#isBackgroundFetch(value); - if (status) - this.#statusTTL(status, index); - if (this.#isStale(index)) { - if (status) - status.get = "stale"; - if (!fetching) { - if (!noDeleteOnStaleGet) { - this.delete(k); - } - if (status && allowStale) - status.returnedStale = true; - return allowStale ? value : void 0; - } else { - if (status && allowStale && value.__staleWhileFetching !== void 0) { - status.returnedStale = true; - } - return allowStale ? value.__staleWhileFetching : void 0; - } - } else { - if (status) - status.get = "hit"; - if (fetching) { - return value.__staleWhileFetching; + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); } - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); } - return value; - } - } else if (status) { - status.get = "miss"; - } - } - #connect(p, n) { - this.#prev[n] = p; - this.#next[p] = n; - } - #moveToTail(index) { - if (index !== this.#tail) { - if (index === this.#head) { - this.#head = this.#next[index]; } else { - this.#connect(this.#prev[index], this.#next[index]); + return encodeReserved(literal); } - this.#connect(this.#tail, index); - this.#tail = index; } + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); } - /** - * Deletes a key out of the cache. - * Returns true if the key was deleted, false otherwise. - */ - delete(k) { - let deleted = false; - if (this.#size !== 0) { - const index = this.#keyMap.get(k); - if (index !== void 0) { - deleted = true; - if (this.#size === 1) { - this.clear(); - } else { - this.#removeItemSize(index); - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error("deleted")); - } else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, "delete"); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, "delete"]); - } - } - this.#keyMap.delete(k); - this.#keyList[index] = void 0; - this.#valList[index] = void 0; - if (index === this.#tail) { - this.#tail = this.#prev[index]; - } else if (index === this.#head) { - this.#head = this.#next[index]; - } else { - const pi = this.#prev[index]; - this.#next[pi] = this.#next[index]; - const ni = this.#next[index]; - this.#prev[ni] = this.#prev[index]; - } - this.#size--; - this.#free.push(index); - } - } - } - if (this.#hasDisposeAfter && this.#disposed?.length) { - const dt = this.#disposed; - let task; - while (task = dt?.shift()) { - this.#disposeAfter?.(...task); - } - } - return deleted; +} +function parse3(options) { + let method = options.method.toUpperCase(); + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; } - /** - * Clear the cache entirely, throwing away all values. - */ - clear() { - for (const index of this.#rindexes({ allowStale: true })) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error("deleted")); - } else { - const k = this.#keyList[index]; - if (this.#hasDispose) { - this.#dispose?.(v, k, "delete"); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, "delete"]); - } - } - } - this.#keyMap.clear(); - this.#valList.fill(void 0); - this.#keyList.fill(void 0); - if (this.#ttls && this.#starts) { - this.#ttls.fill(0); - this.#starts.fill(0); - } - if (this.#sizes) { - this.#sizes.fill(0); + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format) => format.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.format}` + ) + ).join(","); } - this.#head = 0; - this.#tail = 0; - this.#free.length = 0; - this.#calculatedSize = 0; - this.#size = 0; - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while (task = dt?.shift()) { - this.#disposeAfter?.(...task); + if (url.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); } } } -}; - -// node_modules/@octokit/auth-app/dist-node/index.js -async function getAppAuthentication({ - appId: appId2, - privateKey: privateKey2, - timeDifference -}) { - try { - const appAuthentication = await githubAppJwt({ - id: appId2, - privateKey: privateKey2, - now: timeDifference && Math.floor(Date.now() / 1e3) + timeDifference - }); - return { - type: "app", - token: appAuthentication.token, - appId: appAuthentication.appId, - expiresAt: new Date(appAuthentication.expiration * 1e3).toISOString() - }; - } catch (error) { - if (privateKey2 === "-----BEGIN RSA PRIVATE KEY-----") { - throw new Error( - "The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\n'" - ); - } else { - throw error; - } - } -} -function getCache() { - return new LRUCache({ - // cache max. 15000 tokens, that will use less than 10mb memory - max: 15e3, - // Cache for 1 minute less than GitHub expiry - ttl: 1e3 * 60 * 59 - }); -} -async function get(cache, options) { - const cacheKey = optionsToCacheKey(options); - const result = await cache.get(cacheKey); - if (!result) { - return; - } - const [ - token, - createdAt, - expiresAt, - repositorySelection, - permissionsString, - singleFileName - ] = result.split("|"); - const permissions = options.permissions || permissionsString.split(/,/).reduce((permissions2, string) => { - if (/!$/.test(string)) { - permissions2[string.slice(0, -1)] = "write"; + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; } else { - permissions2[string] = "read"; + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } } - return permissions2; - }, {}); - return { - token, - createdAt, - expiresAt, - permissions, - repositoryIds: options.repositoryIds, - repositoryNames: options.repositoryNames, - singleFileName, - repositorySelection - }; -} -async function set(cache, options, data) { - const key = optionsToCacheKey(options); - const permissionsString = options.permissions ? "" : Object.keys(data.permissions).map( - (name) => `${name}${data.permissions[name] === "write" ? "!" : ""}` - ).join(","); - const value = [ - data.token, - data.createdAt, - data.expiresAt, - data.repositorySelection, - permissionsString, - data.singleFileName - ].join("|"); - await cache.set(key, value); -} -function optionsToCacheKey({ - installationId, - permissions = {}, - repositoryIds = [], - repositoryNames = [] -}) { - const permissionsString = Object.keys(permissions).sort().map((name) => permissions[name] === "read" ? name : `${name}!`).join(","); - const repositoryIdsString = repositoryIds.sort().join(","); - const repositoryNamesString = repositoryNames.join(","); - return [ - installationId, - repositoryIdsString, - repositoryNamesString, - permissionsString - ].filter(Boolean).join("|"); -} -function toTokenAuthentication({ - installationId, - token, - createdAt, - expiresAt, - repositorySelection, - permissions, - repositoryIds, - repositoryNames, - singleFileName -}) { - return Object.assign( - { - type: "token", - tokenType: "installation", - token, - installationId, - permissions, - createdAt, - expiresAt, - repositorySelection - }, - repositoryIds ? { repositoryIds } : null, - repositoryNames ? { repositoryNames } : null, - singleFileName ? { singleFileName } : null - ); -} -async function getInstallationAuthentication(state, options, customRequest) { - const installationId = Number(options.installationId || state.installationId); - if (!installationId) { - throw new Error( - "[@octokit/auth-app] installationId option is required for installation authentication." - ); } - if (options.factory) { - const { type, factory, oauthApp, ...factoryAuthOptions } = { - ...state, - ...options - }; - return factory(factoryAuthOptions); + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; } - const optionsWithInstallationTokenFromState = Object.assign( - { installationId }, - options - ); - if (!options.refresh) { - const result = await get( - state.cache, - optionsWithInstallationTokenFromState - ); - if (result) { - const { - token: token2, - createdAt: createdAt2, - expiresAt: expiresAt2, - permissions: permissions2, - repositoryIds: repositoryIds2, - repositoryNames: repositoryNames2, - singleFileName: singleFileName2, - repositorySelection: repositorySelection2 - } = result; - return toTokenAuthentication({ - installationId, - token: token2, - createdAt: createdAt2, - expiresAt: expiresAt2, - permissions: permissions2, - repositorySelection: repositorySelection2, - repositoryIds: repositoryIds2, - repositoryNames: repositoryNames2, - singleFileName: singleFileName2 - }); - } - } - const appAuthentication = await getAppAuthentication(state); - const request2 = customRequest || state.request; - const { - data: { - token, - expires_at: expiresAt, - repositories: repositories2, - permissions: permissionsOptional, - repository_selection: repositorySelectionOptional, - single_file: singleFileName - } - } = await request2("POST /app/installations/{installation_id}/access_tokens", { - installation_id: installationId, - repository_ids: options.repositoryIds, - repositories: options.repositoryNames, - permissions: options.permissions, - mediaType: { - previews: ["machine-man"] - }, - headers: { - authorization: `bearer ${appAuthentication.token}` - } - }); - const permissions = permissionsOptional || {}; - const repositorySelection = repositorySelectionOptional || "all"; - const repositoryIds = repositories2 ? repositories2.map((r) => r.id) : void 0; - const repositoryNames = repositories2 ? repositories2.map((repo) => repo.name) : void 0; - const createdAt = (/* @__PURE__ */ new Date()).toISOString(); - await set(state.cache, optionsWithInstallationTokenFromState, { - token, - createdAt, - expiresAt, - repositorySelection, - permissions, - repositoryIds, - repositoryNames, - singleFileName - }); - return toTokenAuthentication({ - installationId, - token, - createdAt, - expiresAt, - repositorySelection, - permissions, - repositoryIds, - repositoryNames, - singleFileName - }); -} -async function auth4(state, authOptions) { - switch (authOptions.type) { - case "app": - return getAppAuthentication(state); - case "oauth-app": - return state.oauthApp({ type: "oauth-app" }); - case "installation": - authOptions; - return getInstallationAuthentication(state, { - ...authOptions, - type: "installation" - }); - case "oauth-user": - return state.oauthApp(authOptions); - default: - throw new Error(`Invalid auth type: ${authOptions.type}`); + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; } -} -var PATHS = [ - "/app", - "/app/hook/config", - "/app/hook/deliveries", - "/app/hook/deliveries/{delivery_id}", - "/app/hook/deliveries/{delivery_id}/attempts", - "/app/installations", - "/app/installations/{installation_id}", - "/app/installations/{installation_id}/access_tokens", - "/app/installations/{installation_id}/suspended", - "/app/installation-requests", - "/marketplace_listing/accounts/{account_id}", - "/marketplace_listing/plan", - "/marketplace_listing/plans", - "/marketplace_listing/plans/{plan_id}/accounts", - "/marketplace_listing/stubbed/accounts/{account_id}", - "/marketplace_listing/stubbed/plan", - "/marketplace_listing/stubbed/plans", - "/marketplace_listing/stubbed/plans/{plan_id}/accounts", - "/orgs/{org}/installation", - "/repos/{owner}/{repo}/installation", - "/users/{username}/installation" -]; -function routeMatcher(paths) { - const regexes = paths.map( - (p) => p.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/") + return Object.assign( + { method, url, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null ); - const regex = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})$`; - return new RegExp(regex, "i"); } -var REGEX = routeMatcher(PATHS); -function requiresAppAuth(url) { - return !!url && REGEX.test(url.split("?")[0]); +function endpointWithDefaults(defaults, route, options) { + return parse3(merge(defaults, route, options)); } -var FIVE_SECONDS_IN_MS = 5 * 1e3; -function isNotTimeSkewError(error) { - return !(error.message.match( - /'Expiration time' claim \('exp'\) must be a numeric value representing the future time at which the assertion expires/ - ) || error.message.match( - /'Issued at' claim \('iat'\) must be an Integer representing the time that the assertion was issued/ - )); +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS2 = merge(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge.bind(null, DEFAULTS2), + parse: parse3 + }); } -async function hook4(state, request2, route, parameters) { - const endpoint2 = request2.endpoint.merge(route, parameters); - const url = endpoint2.url; - if (/\/login\/oauth\/access_token$/.test(url)) { - return request2(endpoint2); - } - if (requiresAppAuth(url.replace(request2.endpoint.DEFAULTS.baseUrl, ""))) { - const { token: token2 } = await getAppAuthentication(state); - endpoint2.headers.authorization = `bearer ${token2}`; - let response; - try { - response = await request2(endpoint2); - } catch (error) { - if (isNotTimeSkewError(error)) { - throw error; - } - if (typeof error.response.headers.date === "undefined") { - throw error; - } - const diff = Math.floor( - (Date.parse(error.response.headers.date) - Date.parse((/* @__PURE__ */ new Date()).toString())) / 1e3 - ); - state.log.warn(error.message); - state.log.warn( - `[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.` - ); - const { token: token3 } = await getAppAuthentication({ - ...state, - timeDifference: diff - }); - endpoint2.headers.authorization = `bearer ${token3}`; - return request2(endpoint2); +var endpoint = withDefaults(null, DEFAULTS); + +// node_modules/@octokit/request-error/dist-src/index.js +var RequestError = class extends Error { + name; + /** + * http status code + */ + status; + /** + * Request options that lead to the error. + */ + request; + /** + * Response object if a response was received + */ + response; + constructor(message, statusCode, options) { + super(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); } - return response; - } - if (requiresBasicAuth(url)) { - const authentication = await state.oauthApp({ type: "oauth-app" }); - endpoint2.headers.authorization = authentication.headers.authorization; - return request2(endpoint2); - } - const { token, createdAt } = await getInstallationAuthentication( - state, - // @ts-expect-error TBD - {}, - request2 - ); - endpoint2.headers.authorization = `token ${token}`; - return sendRequestWithRetries( - state, - request2, - endpoint2, - createdAt - ); -} -async function sendRequestWithRetries(state, request2, options, createdAt, retries = 0) { - const timeSinceTokenCreationInMs = +/* @__PURE__ */ new Date() - +new Date(createdAt); - try { - return await request2(options); - } catch (error) { - if (error.status !== 401) { - throw error; + this.name = "HttpError"; + this.status = statusCode; + if ("response" in options) { + this.response = options.response; } - if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) { - if (retries > 0) { - error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1e3}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`; - } - throw error; + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); } - ++retries; - const awaitTime = retries * 1e3; - state.log.warn( - `[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1e3}s)` - ); - await new Promise((resolve) => setTimeout(resolve, awaitTime)); - return sendRequestWithRetries(state, request2, options, createdAt, retries); + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; } +}; + +// node_modules/@octokit/request/dist-bundle/index.js +var VERSION2 = "0.0.0-development"; +function isPlainObject2(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} +function getBufferResponse(response) { + return response.arrayBuffer(); } -var VERSION6 = "7.1.0"; -function createAppAuth(options) { - if (!options.appId) { - throw new Error("[@octokit/auth-app] appId option is required"); +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; + if (isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); } - if (!options.privateKey) { - throw new Error("[@octokit/auth-app] privateKey option is required"); + let headers = {}; + let status; + let url; + let { fetch: fetch2 } = globalThis; + if (requestOptions.request?.fetch) { + fetch2 = requestOptions.request.fetch; } - if ("installationId" in options && !options.installationId) { + if (!fetch2) { throw new Error( - "[@octokit/auth-app] installationId is set to a falsy value" + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" ); } - const log = Object.assign( - { - warn: console.warn.bind(console) - }, - options.log - ); - const request2 = options.request || request.defaults({ - headers: { - "user-agent": `octokit-auth-app.js/${VERSION6} ${getUserAgent()}` + return fetch2(requestOptions.url, { + method: requestOptions.method, + body: requestOptions.body, + redirect: requestOptions.request?.redirect, + // Header values must be `string` + headers: Object.fromEntries( + Object.entries(requestOptions.headers).map(([name, value]) => [ + name, + String(value) + ]) + ), + signal: requestOptions.request?.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }).then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; } - }); - const state = Object.assign( - { - request: request2, - cache: getCache() - }, - options, - options.installationId ? { installationId: Number(options.installationId) } : {}, - { - log, - oauthApp: createOAuthAppAuth({ - clientType: "github-app", - clientId: options.clientId || "", - clientSecret: options.clientSecret || "", - request: request2 - }) + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); } - ); - return Object.assign(auth4.bind(null, state), { - hook: hook4.bind(null, state) - }); -} - -// node_modules/p-retry/index.js -var import_retry = __toESM(require_retry2(), 1); - -// node_modules/is-network-error/index.js -var objectToString = Object.prototype.toString; -var isError = (value) => objectToString.call(value) === "[object Error]"; -var errorMessages = /* @__PURE__ */ new Set([ - "network error", - // Chrome - "Failed to fetch", - // Chrome - "NetworkError when attempting to fetch resource.", - // Firefox - "The Internet connection appears to be offline.", - // Safari 16 - "Load failed", - // Safari 17+ - "Network request failed", - // `cross-fetch` - "fetch failed", - // Undici (Node.js) - "terminated" - // Undici (Node.js) -]); -function isNetworkError(error) { - const isValid = error && isError(error) && error.name === "TypeError" && typeof error.message === "string"; - if (!isValid) { - return false; - } - if (error.message === "Load failed") { - return error.stack === void 0; - } - return errorMessages.has(error.message); -} - -// node_modules/p-retry/index.js -var AbortError = class extends Error { - constructor(message) { - super(); - if (message instanceof Error) { - this.originalError = message; - ({ message } = message); - } else { - this.originalError = new Error(message); - this.originalError.stack = this.stack; + if (status === 204 || status === 205) { + return; } - this.name = "AbortError"; - this.message = message; - } -}; -var decorateErrorWithCounts = (error, attemptNumber, options) => { - const retriesLeft = options.retries - (attemptNumber - 1); - error.attemptNumber = attemptNumber; - error.retriesLeft = retriesLeft; - return error; -}; -async function pRetry(input, options) { - return new Promise((resolve, reject) => { - options = { - onFailedAttempt() { - }, - retries: 10, - shouldRetry: () => true, - ...options - }; - const operation = import_retry.default.operation(options); - const abortHandler = () => { - operation.stop(); - reject(options.signal?.reason); - }; - if (options.signal && !options.signal.aborted) { - options.signal.addEventListener("abort", abortHandler, { once: true }); + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: void 0 + }, + request: requestOptions + }); } - const cleanUp = () => { - options.signal?.removeEventListener("abort", abortHandler); - operation.stop(); + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + return parseSuccessResponseBody ? await getResponseData(response) : response.body; + }).then((data) => { + return { + status, + url, + headers, + data }; - operation.attempt(async (attemptNumber) => { - try { - const result = await input(attemptNumber); - cleanUp(); - resolve(result); - } catch (error) { - try { - if (!(error instanceof Error)) { - throw new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`); - } - if (error instanceof AbortError) { - throw error.originalError; - } - if (error instanceof TypeError && !isNetworkError(error)) { - throw error; - } - decorateErrorWithCounts(error, attemptNumber, options); - if (!await options.shouldRetry(error)) { - operation.stop(); - reject(error); - } - await options.onFailedAttempt(error); - if (!operation.retry(error)) { - throw operation.mainError(); - } - } catch (finalError) { - decorateErrorWithCounts(finalError, attemptNumber, options); - cleanUp(); - reject(finalError); - } + }).catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + let message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) { + message = error.cause.message; + } else if (typeof error.cause === "string") { + message = error.cause; } + } + throw new RequestError(message, 500, { + request: requestOptions }); }); } - -// lib/main.js -async function main(appId2, privateKey2, owner2, repositories2, core3, createAppAuth2, request2, skipTokenRevoke2) { - let parsedOwner = ""; - let parsedRepositoryNames = ""; - if (!owner2 && !repositories2) { - [parsedOwner, parsedRepositoryNames] = String( - process.env.GITHUB_REPOSITORY - ).split("/"); - core3.info( - `owner and repositories not set, creating token for the current repository ("${parsedRepositoryNames}")` - ); - } - if (owner2 && !repositories2) { - parsedOwner = owner2; - core3.info( - `repositories not set, creating token for all repositories for given owner "${owner2}"` - ); - } - if (!owner2 && repositories2) { - parsedOwner = String(process.env.GITHUB_REPOSITORY_OWNER); - parsedRepositoryNames = repositories2; - core3.info( - `owner not set, creating owner for given repositories "${repositories2}" in current owner ("${parsedOwner}")` - ); +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json().catch(() => response.text()).catch(() => ""); } - if (owner2 && repositories2) { - parsedOwner = owner2; - parsedRepositoryNames = repositories2; - core3.info( - `owner and repositories set, creating token for repositories "${repositories2}" owned by "${owner2}"` - ); + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); } - const auth5 = createAppAuth2({ - appId: appId2, - privateKey: privateKey2, - request: request2 - }); - let authentication, installationId, appSlug; - if (parsedRepositoryNames) { - ({ authentication, installationId, appSlug } = await pRetry(() => getTokenFromRepository(request2, auth5, parsedOwner, parsedRepositoryNames), { - onFailedAttempt: (error) => { - core3.info( - `Failed to create token for "${parsedRepositoryNames}" (attempt ${error.attemptNumber}): ${error.message}` - ); - }, - retries: 3 - })); + return getBufferResponse(response); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + let suffix; + if ("documentation_url" in data) { + suffix = ` - ${data.documentation_url}`; } else { - ({ authentication, installationId, appSlug } = await pRetry(() => getTokenFromOwner(request2, auth5, parsedOwner), { - onFailedAttempt: (error) => { - core3.info( - `Failed to create token for "${parsedOwner}" (attempt ${error.attemptNumber}): ${error.message}` - ); - }, - retries: 3 - })); + suffix = ""; } - core3.setSecret(authentication.token); - core3.setOutput("token", authentication.token); - core3.setOutput("installation-id", installationId); - core3.setOutput("app-slug", appSlug); - if (!skipTokenRevoke2) { - core3.saveState("token", authentication.token); - core3.saveState("expiresAt", authentication.expiresAt); + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; + } + return `${data.message}${suffix}`; } + return `Unknown error: ${JSON.stringify(data)}`; } -async function getTokenFromOwner(request2, auth5, parsedOwner) { - const response = await request2("GET /orgs/{org}/installation", { - org: parsedOwner, - request: { - hook: auth5.hook +function withDefaults2(oldEndpoint, newDefaults) { + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint2.parse(endpointOptions)); } - }).catch((error) => { - if (error.status !== 404) throw error; - return request2("GET /users/{username}/installation", { - username: parsedOwner, - request: { - hook: auth5.hook - } + const request2 = (route2, parameters2) => { + return fetchWrapper( + endpoint2.parse(endpoint2.merge(route2, parameters2)) + ); + }; + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults2.bind(null, endpoint2) }); + return endpointOptions.request.hook(request2, endpointOptions); + }; + return Object.assign(newApi, { + endpoint: endpoint2, + defaults: withDefaults2.bind(null, endpoint2) }); - const authentication = await auth5({ - type: "installation", - installationId: response.data.id - }); - const installationId = response.data.id; - const appSlug = response.data["app_slug"]; - return { authentication, installationId, appSlug }; -} -async function getTokenFromRepository(request2, auth5, parsedOwner, parsedRepositoryNames) { - const response = await request2("GET /repos/{owner}/{repo}/installation", { - owner: parsedOwner, - repo: parsedRepositoryNames.split(",")[0], - request: { - hook: auth5.hook - } - }); - const authentication = await auth5({ - type: "installation", - installationId: response.data.id, - repositoryNames: parsedRepositoryNames.split(",") - }); - const installationId = response.data.id; - const appSlug = response.data["app_slug"]; - return { authentication, installationId, appSlug }; } +var request = withDefaults2(endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}` + } +}); // lib/request.js -var import_core = __toESM(require_core(), 1); var import_undici = __toESM(require_undici2(), 1); -var baseUrl = import_core.default.getInput("github-api-url").replace(/\/$/, ""); +var baseUrl = import_core3.default.getInput("github-api-url").replace(/\/$/, ""); var proxyUrl = process.env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY; var proxyFetch = (url, options) => { const urlHost = new URL(url).hostname; @@ -39831,31 +58694,30 @@ if (!process.env.GITHUB_REPOSITORY) { if (!process.env.GITHUB_REPOSITORY_OWNER) { throw new Error("GITHUB_REPOSITORY_OWNER missing, must be set to ''"); } -var appId = import_core2.default.getInput("app-id") || import_core2.default.getInput("app_id"); +var appId = import_core4.default.getInput("app-id") || import_core4.default.getInput("app_id"); if (!appId) { throw new Error("Input required and not supplied: app-id"); } -var privateKey = import_core2.default.getInput("private-key") || import_core2.default.getInput("private_key"); -if (!privateKey) { - throw new Error("Input required and not supplied: private-key"); +var kmsKeyId = import_core4.default.getInput("kms-key-id") || import_core4.default.getInput("kms_key_id"); +if (!kmsKeyId) { + throw new Error("Input required and not supplied: kms-key-id"); } -var owner = import_core2.default.getInput("owner"); -var repositories = import_core2.default.getInput("repositories"); +var owner = import_core4.default.getInput("owner"); +var repositories = import_core4.default.getInput("repositories"); var skipTokenRevoke = Boolean( - import_core2.default.getInput("skip-token-revoke") || import_core2.default.getInput("skip_token_revoke") + import_core4.default.getInput("skip-token-revoke") || import_core4.default.getInput("skip_token_revoke") ); main( appId, - privateKey, + kmsKeyId, owner, repositories, - import_core2.default, - createAppAuth, + import_core4.default, request_default, skipTokenRevoke ).catch((error) => { console.error(error); - import_core2.default.setFailed(error.message); + import_core4.default.setFailed(error.message); }); /*! Bundled license information: diff --git a/dist/post.cjs b/dist/post.cjs index 0307466..090c0f1 100644 --- a/dist/post.cjs +++ b/dist/post.cjs @@ -19943,6 +19943,27 @@ var require_util8 = __commonJS({ } var kEnumerableProperty = /* @__PURE__ */ Object.create(null); kEnumerableProperty.enumerable = true; + var normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + var normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); module2.exports = { kEnumerableProperty, nop, @@ -19981,6 +20002,8 @@ var require_util8 = __commonJS({ isValidHeaderValue, isTokenCharCode, parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, isValidPort, isHttpOrHttpsPrefixed, nodeMajor, @@ -20196,7 +20219,8 @@ var require_request3 = __commonJS({ isBlobLike, buildURL, validateHandler, - getServerName + getServerName, + normalizedMethodRecords } = require_util8(); var { channels } = require_diagnostics(); var { headerNameLowerCasedRecord } = require_constants6(); @@ -20223,12 +20247,12 @@ var require_request3 = __commonJS({ throw new InvalidArgumentError("path must be a string"); } else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path) !== null) { + } else if (invalidPathRegex.test(path)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { throw new InvalidArgumentError("method must be a string"); - } else if (!isValidHTTPToken(method)) { + } else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) { throw new InvalidArgumentError("invalid request method"); } if (upgrade && typeof upgrade !== "string") { @@ -20773,7 +20797,7 @@ var require_connect2 = __commonJS({ } }; } - function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); } @@ -20789,7 +20813,7 @@ var require_connect2 = __commonJS({ } servername = servername || options.servername || util.getServerName(host) || null; const sessionKey = servername || hostname; - const session = sessionCache.get(sessionKey) || null; + const session = customSession || sessionCache.get(sessionKey) || null; assert(sessionKey); socket = tls.connect({ highWaterMark: 16384, @@ -22307,7 +22331,7 @@ var require_util9 = __commonJS({ var { getGlobalOrigin } = require_global3(); var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); var { performance: performance2 } = require("node:perf_hooks"); - var { isBlobLike, ReadableStreamFrom, isValidHTTPToken } = require_util8(); + var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util8(); var assert = require("node:assert"); var { isUint8Array } = require("node:util/types"); var { webidl } = require_webidl2(); @@ -22414,7 +22438,7 @@ var require_util9 = __commonJS({ } function appendRequestOriginHeader(request2) { let serializedOrigin = request2.origin; - if (serializedOrigin === "client") { + if (serializedOrigin === "client" || serializedOrigin === void 0) { return; } if (request2.responseTainting === "cors" || request2.mode === "websocket") { @@ -22695,29 +22719,8 @@ var require_util9 = __commonJS({ function isCancelled(fetchParams) { return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; } - var normalizeMethodRecordBase = { - delete: "DELETE", - DELETE: "DELETE", - get: "GET", - GET: "GET", - head: "HEAD", - HEAD: "HEAD", - options: "OPTIONS", - OPTIONS: "OPTIONS", - post: "POST", - POST: "POST", - put: "PUT", - PUT: "PUT" - }; - var normalizeMethodRecord = { - ...normalizeMethodRecordBase, - patch: "patch", - PATCH: "PATCH" - }; - Object.setPrototypeOf(normalizeMethodRecordBase, null); - Object.setPrototypeOf(normalizeMethodRecord, null); function normalizeMethod(method) { - return normalizeMethodRecordBase[method.toLowerCase()] ?? method; + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; } function serializeJavascriptValueToJSONString(value) { const result = JSON.stringify(value); @@ -22854,7 +22857,7 @@ var require_util9 = __commonJS({ } }); } - async function fullyReadBody(body, processBody, processBodyError, shouldClone) { + async function fullyReadBody(body, processBody, processBodyError) { const successSteps = processBody; const errorSteps = processBodyError; let reader; @@ -22865,7 +22868,7 @@ var require_util9 = __commonJS({ return; } try { - successSteps(await readAllBytes(reader, shouldClone)); + successSteps(await readAllBytes(reader)); } catch (e) { errorSteps(e); } @@ -22888,19 +22891,12 @@ var require_util9 = __commonJS({ assert(!invalidIsomorphicEncodeValueRegex.test(input)); return input; } - async function readAllBytes(reader, shouldClone) { + async function readAllBytes(reader) { const bytes = []; let byteLength = 0; while (true) { const { done, value: chunk } = await reader.read(); if (done) { - if (bytes.length === 1) { - const { buffer, byteOffset, byteLength: byteLength2 } = bytes[0]; - if (shouldClone === false) { - return Buffer.from(buffer, byteOffset, byteLength2); - } - return Buffer.from(buffer.slice(byteOffset, byteOffset + byteLength2), 0, byteLength2); - } return Buffer.concat(bytes, byteLength); } if (!isUint8Array(chunk)) { @@ -23163,7 +23159,6 @@ var require_util9 = __commonJS({ urlHasHttpsScheme, urlIsHttpHttpsScheme, readAllBytes, - normalizeMethodRecord, simpleRangeHeaderValue, buildContentRange, parseMetadata, @@ -23835,18 +23830,18 @@ Content-Type: ${value.type || "application/octet-stream"}\r mimeType = serializeAMimeType(mimeType); } return new Blob2([bytes], { type: mimeType }); - }, instance, false); + }, instance); }, arrayBuffer() { return consumeBody(this, (bytes) => { - return bytes.buffer; - }, instance, true); + return new Uint8Array(bytes).buffer; + }, instance); }, text() { - return consumeBody(this, utf8DecodeBytes, instance, false); + return consumeBody(this, utf8DecodeBytes, instance); }, json() { - return consumeBody(this, parseJSONFromBytes, instance, false); + return consumeBody(this, parseJSONFromBytes, instance); }, formData() { return consumeBody(this, (value) => { @@ -23875,12 +23870,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r throw new TypeError( 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' ); - }, instance, false); + }, instance); }, bytes() { return consumeBody(this, (bytes) => { - return new Uint8Array(bytes.buffer, 0, bytes.byteLength); - }, instance, true); + return new Uint8Array(bytes); + }, instance); } }; return methods; @@ -23888,7 +23883,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r function mixinBody(prototype) { Object.assign(prototype.prototype, bodyMixinMethods(prototype)); } - async function consumeBody(object, convertBytesToJSValue, instance, shouldClone) { + async function consumeBody(object, convertBytesToJSValue, instance) { webidl.brandCheck(object, instance); if (bodyUnusable(object[kState].body)) { throw new TypeError("Body is unusable: Body has already been read"); @@ -23907,7 +23902,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r successSteps(Buffer.allocUnsafe(0)); return promise.promise; } - await fullyReadBody(object[kState].body, successSteps, errorSteps, shouldClone); + await fullyReadBody(object[kState].body, successSteps, errorSteps); return promise.promise; } function bodyUnusable(body) { @@ -24660,25 +24655,25 @@ upgrade: ${upgrade}\r channels.sendHeaders.publish({ request: request2, headers: header, socket }); } if (!body || bodyLength === 0) { - writeBuffer({ abort, body: null, client, request: request2, socket, contentLength, header, expectsPayload }); + writeBuffer(abort, null, client, request2, socket, contentLength, header, expectsPayload); } else if (util.isBuffer(body)) { - writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); + writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload); } else if (util.isBlobLike(body)) { if (typeof body.stream === "function") { - writeIterable({ abort, body: body.stream(), client, request: request2, socket, contentLength, header, expectsPayload }); + writeIterable(abort, body.stream(), client, request2, socket, contentLength, header, expectsPayload); } else { - writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); + writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload); } } else if (util.isStream(body)) { - writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); + writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload); } else if (util.isIterable(body)) { - writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); + writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload); } else { assert(false); } return true; } - function writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { + function writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); let finished = false; const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header }); @@ -24747,7 +24742,7 @@ upgrade: ${upgrade}\r setImmediate(onClose); } } - function writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { + function writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload) { try { if (!body) { if (contentLength === 0) { @@ -24778,7 +24773,7 @@ upgrade: ${upgrade}\r abort(err); } } - async function writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { + async function writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload) { assert(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) { @@ -24801,7 +24796,7 @@ upgrade: ${upgrade}\r abort(err); } } - async function writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { + async function writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { @@ -25264,81 +25259,79 @@ var require_client_h2 = __commonJS({ return true; function writeBodyH2() { if (!body || contentLength === 0) { - writeBuffer({ + writeBuffer( abort, + stream, + null, client, - request: request2, + request2, + client[kSocket], contentLength, - expectsPayload, - h2stream: stream, - body: null, - socket: client[kSocket] - }); + expectsPayload + ); } else if (util.isBuffer(body)) { - writeBuffer({ + writeBuffer( abort, + stream, + body, client, - request: request2, + request2, + client[kSocket], contentLength, - body, - expectsPayload, - h2stream: stream, - socket: client[kSocket] - }); + expectsPayload + ); } else if (util.isBlobLike(body)) { if (typeof body.stream === "function") { - writeIterable({ + writeIterable( abort, + stream, + body.stream(), client, - request: request2, + request2, + client[kSocket], contentLength, - expectsPayload, - h2stream: stream, - body: body.stream(), - socket: client[kSocket] - }); + expectsPayload + ); } else { - writeBlob({ + writeBlob( abort, + stream, body, client, - request: request2, + request2, + client[kSocket], contentLength, - expectsPayload, - h2stream: stream, - socket: client[kSocket] - }); + expectsPayload + ); } } else if (util.isStream(body)) { - writeStream({ + writeStream( abort, + client[kSocket], + expectsPayload, + stream, body, client, - request: request2, - contentLength, - expectsPayload, - socket: client[kSocket], - h2stream: stream, - header: "" - }); + request2, + contentLength + ); } else if (util.isIterable(body)) { - writeIterable({ + writeIterable( abort, + stream, body, client, - request: request2, + request2, + client[kSocket], contentLength, - expectsPayload, - header: "", - h2stream: stream, - socket: client[kSocket] - }); + expectsPayload + ); } else { assert(false); } } } - function writeBuffer({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { + function writeBuffer(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { try { if (body != null && util.isBuffer(body)) { assert(contentLength === body.byteLength, "buffer body must have content length"); @@ -25357,7 +25350,7 @@ var require_client_h2 = __commonJS({ abort(error); } } - function writeStream({ abort, socket, expectsPayload, h2stream, body, client, request: request2, contentLength }) { + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) { assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); const pipe = pipeline( body, @@ -25381,7 +25374,7 @@ var require_client_h2 = __commonJS({ request2.onBodySent(chunk); } } - async function writeBlob({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { + async function writeBlob(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { assert(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) { @@ -25402,7 +25395,7 @@ var require_client_h2 = __commonJS({ abort(err); } } - async function writeIterable({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { + async function writeIterable(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { @@ -27147,7 +27140,7 @@ var require_retry_handler = __commonJS({ this.abort( new RequestRetryError("Content-Range mismatch", statusCode, { headers, - count: this.retryCount + data: { count: this.retryCount } }) ); return false; @@ -27156,7 +27149,7 @@ var require_retry_handler = __commonJS({ this.abort( new RequestRetryError("ETag mismatch", statusCode, { headers, - count: this.retryCount + data: { count: this.retryCount } }) ); return false; @@ -30380,9 +30373,7 @@ var require_request4 = __commonJS({ var { isValidHTTPToken, sameOrigin, - normalizeMethod, - environmentSettingsObject, - normalizeMethodRecord + environmentSettingsObject } = require_util9(); var { forbiddenMethodsSet, @@ -30394,7 +30385,7 @@ var require_request4 = __commonJS({ requestCache, requestDuplex } = require_constants8(); - var { kEnumerableProperty } = util; + var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; var { kHeaders, kSignal, kState, kDispatcher } = require_symbols7(); var { webidl } = require_webidl2(); var { URLSerializer } = require_data_url(); @@ -30591,17 +30582,18 @@ var require_request4 = __commonJS({ } if (init.method !== void 0) { let method = init.method; - const mayBeNormalized = normalizeMethodRecord[method]; + const mayBeNormalized = normalizedMethodRecords[method]; if (mayBeNormalized !== void 0) { request2.method = mayBeNormalized; } else { if (!isValidHTTPToken(method)) { throw new TypeError(`'${method}' is not a valid HTTP method.`); } - if (forbiddenMethodsSet.has(method.toUpperCase())) { + const upperCase = method.toUpperCase(); + if (forbiddenMethodsSet.has(upperCase)) { throw new TypeError(`'${method}' HTTP method is unsupported.`); } - method = normalizeMethod(method); + method = normalizedMethodRecordsBase[upperCase] ?? method; request2.method = method; } if (!patchMethodWarning && request2.method === "patch") { @@ -35317,7 +35309,6 @@ var require_websocket2 = __commonJS({ var { types } = require("node:util"); var { ErrorEvent, CloseEvent } = require_events2(); var { SendQueue } = require_sender(); - var experimentalWarned = false; var WebSocket = class _WebSocket extends EventTarget { #events = { open: null, @@ -35338,12 +35329,6 @@ var require_websocket2 = __commonJS({ super(); const prefix = "WebSocket constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); - if (!experimentalWarned) { - experimentalWarned = true; - process.emitWarning("WebSockets are experimental, expect them to change at any time.", { - code: "UNDICI-WS" - }); - } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); url = webidl.converters.USVString(url, prefix, "url"); protocols = options.protocols; diff --git a/package.json b/package.json index bc3b5ed..a42090f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "create-github-app-token-aws", "private": true, "type": "module", - "version": "1.10.3", + "version": "1.0.0", "description": "GitHub Action for creating a GitHub App Installation Access Token using AWS KMS", "scripts": { "build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0 --packages=bundle", From a6dd0a0cc4b934c201e2d2cce9cdfaed43710b2e Mon Sep 17 00:00:00 2001 From: Cristian Lepadatu Date: Tue, 3 Sep 2024 00:50:19 +0300 Subject: [PATCH 11/15] workflow update --- .github/workflows/release.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ff43ac8..6fa04ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,15 +40,8 @@ jobs: with: app-id: ${{ secrets.APP_ID }} kms-key-id: ${{ secrets.KMS_KEY_ID }} - - uses: octokit/request-action@v2.x - id: get-repository - env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} - with: - route: GET /installation/repositories - - run: echo '${{ steps.get-repository.outputs.data }}' # install release dependencies and release - run: npm install --no-save @semantic-release/git semantic-release-plugin-github-breaking-version-tag - run: npx semantic-release --debug env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} From 6066cf35395fbf9b2b862e0298d792d3e5f03177 Mon Sep 17 00:00:00 2001 From: Cristian Lepadatu Date: Wed, 21 Aug 2024 15:54:49 +0300 Subject: [PATCH 12/15] First release --- .vscode/settings.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..97da669 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "cSpell.words": [ + "lepadatu" + ] +} \ No newline at end of file From 0508215ec4031e3e5521435231dcc7643b7609e6 Mon Sep 17 00:00:00 2001 From: Cristian Lepadatu Date: Wed, 4 Sep 2024 15:29:38 +0300 Subject: [PATCH 13/15] Org & README updates --- tests/snapshots/index.js.md | 321 ------------------------------------ 1 file changed, 321 deletions(-) delete mode 100644 tests/snapshots/index.js.md diff --git a/tests/snapshots/index.js.md b/tests/snapshots/index.js.md deleted file mode 100644 index d4ceba4..0000000 --- a/tests/snapshots/index.js.md +++ /dev/null @@ -1,321 +0,0 @@ -# Snapshot report for `tests/index.js` - -The actual snapshot is saved in `index.js.snap`. - -Generated by [AVA](https://avajs.dev). - -## action-deprecated-inputs.test.js - -> stderr - - '' - -> stdout - - `app_id — 'app_id' is deprecated and will be removed in a future version. Use 'app-id' instead.␊ - kms_key_id — 'kms_key_id' is deprecated and will be removed in a future version. Use 'kms-key-id' instead.␊ - skip_token_revoke — 'skip_token_revoke' is deprecated and will be removed in a future version. Use 'skip-token-revoke' instead.` - -## main-custom-github-api-url.test.js - -> stderr - - 'Error signing JWT: Region is missing' - -> stdout - -<<<<<<< HEAD - `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ -======= - `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws" owned by "lepadatu-org"␊ ->>>>>>> 1e879eb (modified the package files and workflows) - ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=installation-id::123456␊ - ␊ - ::set-output name=app-slug::github-actions␊ - ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::` - -## main-missing-app-id.test.js - -> stderr - - 'Input required and not supplied: app-id' - -> stdout - - '' - -## main-missing-kms-key-id.test.js - -> stderr - - 'Input required and not supplied: kms-key-id' - -> stdout - - '' - -## main-missing-owner.test.js - -> stderr - - 'GITHUB_REPOSITORY_OWNER missing, must be set to \'\'' - -> stdout - - '' - -## main-missing-private-key.test.js - -> stderr - - 'Input required and not supplied: kms-key-id' - -> stdout - - '' - -## main-missing-repository.test.js - -> stderr - - 'GITHUB_REPOSITORY missing, must be set to \'/\'' - -> stdout - - '' - -## main-token-get-installation-access-token-fail-response.test.js - -> stderr - - 'Error signing JWT: Region is missing' - -> stdout - -<<<<<<< HEAD - `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ -======= - `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws" owned by "lepadatu-org"␊ ->>>>>>> 1e879eb (modified the package files and workflows) - ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=installation-id::123456␊ - ␊ - ::set-output name=app-slug::github-actions␊ - ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::` - -## main-token-get-owner-set-repo-fail-response.test.js - -> stderr - - 'Error signing JWT: Region is missing' - -> stdout - - `owner and repositories set, creating token for repositories "failed-repo" owned by "actions"␊ - Failed to create token for "failed-repo" (attempt 1): GitHub API not available␊ - ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=installation-id::123456␊ - ␊ - ::set-output name=app-slug::github-actions␊ - ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::` - -## main-token-get-owner-set-repo-set-to-many.test.js - -> stderr - - 'Error signing JWT: Region is missing' - -> stdout - -<<<<<<< HEAD - `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws,actions/toolkit" owned by "lepadatu-actions"␊ -======= - `owner and repositories set, creating token for repositories "lepadatu-org/create-github-app-token-aws,actions/toolkit" owned by "lepadatu-org"␊ ->>>>>>> 1e879eb (modified the package files and workflows) - ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=installation-id::123456␊ - ␊ - ::set-output name=app-slug::github-actions␊ - ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::` - -## main-token-get-owner-set-repo-set-to-one.test.js - -> stderr - - 'Error signing JWT: Region is missing' - -> stdout - - `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ - ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=installation-id::123456␊ - ␊ - ::set-output name=app-slug::github-actions␊ - ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::` - -## main-token-get-owner-set-to-org-repo-unset.test.js - -> stderr - - 'Error signing JWT: Region is missing' - -> stdout - - `repositories not set, creating token for all repositories for given owner "lepadatu-actions"␊ - ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=installation-id::123456␊ - ␊ - ::set-output name=app-slug::github-actions␊ - ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::` - -## main-token-get-owner-set-to-user-fail-response.test.js - -> stderr - - 'Error signing JWT: Region is missing' - -> stdout - - `repositories not set, creating token for all repositories for given owner "smockle"␊ - Failed to create token for "smockle" (attempt 1): GitHub API not available␊ - ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=installation-id::123456␊ - ␊ - ::set-output name=app-slug::github-actions␊ - ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::` - -## main-token-get-owner-set-to-user-repo-unset.test.js - -> stderr - - 'Error signing JWT: Region is missing' - -> stdout - - `repositories not set, creating token for all repositories for given owner "smockle"␊ - ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=installation-id::123456␊ - ␊ - ::set-output name=app-slug::github-actions␊ - ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::` - -## main-token-get-owner-unset-repo-set.test.js - -> stderr - - 'Error signing JWT: Region is missing' - -> stdout - - `owner not set, creating owner for given repositories "lepadatu-actions/create-github-app-token-aws" in current owner ("lepadatu-actions")␊ - ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=installation-id::123456␊ - ␊ - ::set-output name=app-slug::github-actions␊ - ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::` - -## main-token-get-owner-unset-repo-unset.test.js - -> stderr - - 'Error signing JWT: Region is missing' - -> stdout - - `owner and repositories not set, creating token for the current repository ("create-github-app-token-aws")␊ - ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ␊ - ::set-output name=installation-id::123456␊ - ␊ - ::set-output name=app-slug::github-actions␊ - ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ - ::save-state name=expiresAt::` - -## post-revoke-token-fail-response.test.js - -> stderr - - '' - -> stdout - - '::warning::Token revocation failed: ' - -## post-token-expired.test.js - -> stderr - - '' - -> stdout - - 'Token expired, skipping token revocation' - -## post-token-set.test.js - -> stderr - - '' - -> stdout - - 'Token revoked' - -## post-token-skipped.test.js - -> stderr - - '' - -> stdout - - 'Token revocation was skipped' - -## post-token-unset.test.js - -> stderr - - '' - -> stdout - - 'Token is not set' From fb3c541287353a8f8fc33130130b47d0d2253e24 Mon Sep 17 00:00:00 2001 From: Cristian Lepadatu Date: Wed, 4 Sep 2024 18:54:32 +0300 Subject: [PATCH 14/15] updated --- tests/snapshots/index.js.md | 309 ++++++++++++++++++++++++++++++++++ tests/snapshots/index.js.snap | Bin 0 -> 1185 bytes 2 files changed, 309 insertions(+) create mode 100644 tests/snapshots/index.js.md create mode 100644 tests/snapshots/index.js.snap diff --git a/tests/snapshots/index.js.md b/tests/snapshots/index.js.md new file mode 100644 index 0000000..b8c5150 --- /dev/null +++ b/tests/snapshots/index.js.md @@ -0,0 +1,309 @@ +# Snapshot report for `tests/index.js` + +The actual snapshot is saved in `index.js.snap`. + +Generated by [AVA](https://avajs.dev). + +## action-deprecated-inputs.test.js + +> stderr + + '' + +> stdout + + `app_id — 'app_id' is deprecated and will be removed in a future version. Use 'app-id' instead.␊ + kms_key_id — 'kms_key_id' is deprecated and will be removed in a future version. Use 'kms-key-id' instead.␊ + skip_token_revoke — 'skip_token_revoke' is deprecated and will be removed in a future version. Use 'skip-token-revoke' instead.` + +## main-custom-github-api-url.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-missing-app-id.test.js + +> stderr + + 'Input required and not supplied: app-id' + +> stdout + + '' + +## main-missing-kms-key-id.test.js + +> stderr + + 'Input required and not supplied: kms-key-id' + +> stdout + + '' + +## main-missing-owner.test.js + +> stderr + + 'GITHUB_REPOSITORY_OWNER missing, must be set to \'\'' + +> stdout + + '' + +## main-missing-private-key.test.js + +> stderr + + 'Input required and not supplied: kms-key-id' + +> stdout + + '' + +## main-missing-repository.test.js + +> stderr + + 'GITHUB_REPOSITORY missing, must be set to \'/\'' + +> stdout + + '' + +## main-token-get-installation-access-token-fail-response.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-repo-fail-response.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories set, creating token for repositories "failed-repo" owned by "actions"␊ + Failed to create token for "failed-repo" (attempt 1): GitHub API not available␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-repo-set-to-many.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws,actions/toolkit" owned by "lepadatu-actions"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-repo-set-to-one.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-to-org-repo-unset.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `repositories not set, creating token for all repositories for given owner "lepadatu-actions"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-to-user-fail-response.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `repositories not set, creating token for all repositories for given owner "smockle"␊ + Failed to create token for "smockle" (attempt 1): GitHub API not available␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-to-user-repo-unset.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `repositories not set, creating token for all repositories for given owner "smockle"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-unset-repo-set.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner not set, creating owner for given repositories "lepadatu-actions/create-github-app-token-aws" in current owner ("lepadatu-actions")␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-unset-repo-unset.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories not set, creating token for the current repository ("create-github-app-token-aws")␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## post-revoke-token-fail-response.test.js + +> stderr + + '' + +> stdout + + '::warning::Token revocation failed: ' + +## post-token-expired.test.js + +> stderr + + '' + +> stdout + + 'Token expired, skipping token revocation' + +## post-token-set.test.js + +> stderr + + '' + +> stdout + + 'Token revoked' + +## post-token-skipped.test.js + +> stderr + + '' + +> stdout + + 'Token revocation was skipped' + +## post-token-unset.test.js + +> stderr + + '' + +> stdout + + 'Token is not set' diff --git a/tests/snapshots/index.js.snap b/tests/snapshots/index.js.snap new file mode 100644 index 0000000000000000000000000000000000000000..db02ead4913837ba141e5cbedb3938e4fa75754a GIT binary patch literal 1185 zcmV;S1YY|=RzVWL`~^t-0U%D?I3Z5l_%G1R+FnontJq24us+%A z+4sKhz0Z3d?|k2C#wv)+H_reC#_)vj0ELn?gj7So5ke|tnxR=mFu3~I2qSrFP86D_ z&%%%+|LEm~R~PK7^2);N3lQ@r#4Up%Xq_*3RQYUh$xDY7o~8{ElE1$AnpE@mRU!;2 zd=f50aw_7OG=XSHR0l#LB;ll$VWxp}KpUatDtTbQ*`UsbGzdIgU5pabh~TX6r1(6a zqbM;nf-~QliA35!6@hGM=%@&CpF@}Db8XF0XO8yGbrlpjR~hySxs-4rX^f@V4%Tgp%CgN3TRyQ{U*#E7;OvQ0jGc+AKVw1tv3l0+CIWP4=6fA$LgV?~`x z&@NyNsWJkU7GQ`0Tp@u5j@G^lj6A;U;3NePSB5jSn_qy?(F0T@N<4YxUjD&DzaiYi(<7eRBtDn_G9+`QjpD z29T-@(+r8^3B2#z&1b^aj>j=~%_c&|YW21CTN|U6+5kR~=T}+S9!8#`AQ`UeeAp1SK()fF~pQ~0K*(DlT4aeJP)?Y)EJ{Rej&N4xhAKRGx)JbKhP zeE9M1QLhVENRk<}lf(cLRHS;_*}qerO)BxErdo7t$3<}V|H-Cb@BYY`pm5()$c9on zHJLYVTQ{@j^o|ppkE%8x^+o^>0x+igZHtSTYA~si2Fht&PU~5x_1bgDxyn*2*%s}x zIs4n=?2q|4v)UnaaSUSAr{|vg-ga*e;D90j-erymNs6R)jgdWp`&pCh+&^&Big&n( zc{7F*#`$5aO@`6FK}8cTCyem(Lh*MG#a}LO3BG;>39eIzuFk^bK5 z;$ivKgXO30rfQgy{CWYzJi93&Nsws`61!%XhkqHbm59xc7@daLB~7FsJjlKsw{xE~ zoA3ns&=e0V$@0=9(n^TV0itTE40aFA{?!B4sVAGy^TpUH*Oo2Dj$Prc)4(N+ Date: Wed, 4 Sep 2024 19:03:27 +0300 Subject: [PATCH 15/15] updated --- tests/snapshots/index.js.md | 309 ++++++++++++++++++++++++++++++++++ tests/snapshots/index.js.snap | Bin 0 -> 1185 bytes 2 files changed, 309 insertions(+) create mode 100644 tests/snapshots/index.js.md create mode 100644 tests/snapshots/index.js.snap diff --git a/tests/snapshots/index.js.md b/tests/snapshots/index.js.md new file mode 100644 index 0000000..b8c5150 --- /dev/null +++ b/tests/snapshots/index.js.md @@ -0,0 +1,309 @@ +# Snapshot report for `tests/index.js` + +The actual snapshot is saved in `index.js.snap`. + +Generated by [AVA](https://avajs.dev). + +## action-deprecated-inputs.test.js + +> stderr + + '' + +> stdout + + `app_id — 'app_id' is deprecated and will be removed in a future version. Use 'app-id' instead.␊ + kms_key_id — 'kms_key_id' is deprecated and will be removed in a future version. Use 'kms-key-id' instead.␊ + skip_token_revoke — 'skip_token_revoke' is deprecated and will be removed in a future version. Use 'skip-token-revoke' instead.` + +## main-custom-github-api-url.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-missing-app-id.test.js + +> stderr + + 'Input required and not supplied: app-id' + +> stdout + + '' + +## main-missing-kms-key-id.test.js + +> stderr + + 'Input required and not supplied: kms-key-id' + +> stdout + + '' + +## main-missing-owner.test.js + +> stderr + + 'GITHUB_REPOSITORY_OWNER missing, must be set to \'\'' + +> stdout + + '' + +## main-missing-private-key.test.js + +> stderr + + 'Input required and not supplied: kms-key-id' + +> stdout + + '' + +## main-missing-repository.test.js + +> stderr + + 'GITHUB_REPOSITORY missing, must be set to \'/\'' + +> stdout + + '' + +## main-token-get-installation-access-token-fail-response.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-repo-fail-response.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories set, creating token for repositories "failed-repo" owned by "actions"␊ + Failed to create token for "failed-repo" (attempt 1): GitHub API not available␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-repo-set-to-many.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws,actions/toolkit" owned by "lepadatu-actions"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-repo-set-to-one.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories set, creating token for repositories "lepadatu-actions/create-github-app-token-aws" owned by "lepadatu-actions"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-to-org-repo-unset.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `repositories not set, creating token for all repositories for given owner "lepadatu-actions"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-to-user-fail-response.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `repositories not set, creating token for all repositories for given owner "smockle"␊ + Failed to create token for "smockle" (attempt 1): GitHub API not available␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-set-to-user-repo-unset.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `repositories not set, creating token for all repositories for given owner "smockle"␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-unset-repo-set.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner not set, creating owner for given repositories "lepadatu-actions/create-github-app-token-aws" in current owner ("lepadatu-actions")␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## main-token-get-owner-unset-repo-unset.test.js + +> stderr + + 'Error signing JWT: Region is missing' + +> stdout + + `owner and repositories not set, creating token for the current repository ("create-github-app-token-aws")␊ + ::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ␊ + ::set-output name=installation-id::123456␊ + ␊ + ::set-output name=app-slug::github-actions␊ + ::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊ + ::save-state name=expiresAt::` + +## post-revoke-token-fail-response.test.js + +> stderr + + '' + +> stdout + + '::warning::Token revocation failed: ' + +## post-token-expired.test.js + +> stderr + + '' + +> stdout + + 'Token expired, skipping token revocation' + +## post-token-set.test.js + +> stderr + + '' + +> stdout + + 'Token revoked' + +## post-token-skipped.test.js + +> stderr + + '' + +> stdout + + 'Token revocation was skipped' + +## post-token-unset.test.js + +> stderr + + '' + +> stdout + + 'Token is not set' diff --git a/tests/snapshots/index.js.snap b/tests/snapshots/index.js.snap new file mode 100644 index 0000000000000000000000000000000000000000..db02ead4913837ba141e5cbedb3938e4fa75754a GIT binary patch literal 1185 zcmV;S1YY|=RzVWL`~^t-0U%D?I3Z5l_%G1R+FnontJq24us+%A z+4sKhz0Z3d?|k2C#wv)+H_reC#_)vj0ELn?gj7So5ke|tnxR=mFu3~I2qSrFP86D_ z&%%%+|LEm~R~PK7^2);N3lQ@r#4Up%Xq_*3RQYUh$xDY7o~8{ElE1$AnpE@mRU!;2 zd=f50aw_7OG=XSHR0l#LB;ll$VWxp}KpUatDtTbQ*`UsbGzdIgU5pabh~TX6r1(6a zqbM;nf-~QliA35!6@hGM=%@&CpF@}Db8XF0XO8yGbrlpjR~hySxs-4rX^f@V4%Tgp%CgN3TRyQ{U*#E7;OvQ0jGc+AKVw1tv3l0+CIWP4=6fA$LgV?~`x z&@NyNsWJkU7GQ`0Tp@u5j@G^lj6A;U;3NePSB5jSn_qy?(F0T@N<4YxUjD&DzaiYi(<7eRBtDn_G9+`QjpD z29T-@(+r8^3B2#z&1b^aj>j=~%_c&|YW21CTN|U6+5kR~=T}+S9!8#`AQ`UeeAp1SK()fF~pQ~0K*(DlT4aeJP)?Y)EJ{Rej&N4xhAKRGx)JbKhP zeE9M1QLhVENRk<}lf(cLRHS;_*}qerO)BxErdo7t$3<}V|H-Cb@BYY`pm5()$c9on zHJLYVTQ{@j^o|ppkE%8x^+o^>0x+igZHtSTYA~si2Fht&PU~5x_1bgDxyn*2*%s}x zIs4n=?2q|4v)UnaaSUSAr{|vg-ga*e;D90j-erymNs6R)jgdWp`&pCh+&^&Big&n( zc{7F*#`$5aO@`6FK}8cTCyem(Lh*MG#a}LO3BG;>39eIzuFk^bK5 z;$ivKgXO30rfQgy{CWYzJi93&Nsws`61!%XhkqHbm59xc7@daLB~7FsJjlKsw{xE~ zoA3ns&=e0V$@0=9(n^TV0itTE40aFA{?!B4sVAGy^TpUH*Oo2Dj$Prc)4(N+