diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d50077a..b151a2c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,5 +1,5 @@ { ".release-please-manifest.json": "4.0.2", "package.json": "6.0.0", - ".": "6.2.0" + ".": "6.1.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a7c538..56f334e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,34 +2,6 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -## [6.2.0](https://github.com/aws-actions/configure-aws-credentials/compare/v6.1.3...v6.2.0) (2026-06-01) - -### Features - -* add additional session tags by default ([#1775](https://github.com/aws-actions/configure-aws-credentials/issues/1775)) ([e0ba768](https://github.com/aws-actions/configure-aws-credentials/commit/e0ba7685077379a14a82d01fefd511490344ebfc)) -* add more retry logic and better logging ([#1764](https://github.com/aws-actions/configure-aws-credentials/issues/1764)) ([540d0c1](https://github.com/aws-actions/configure-aws-credentials/commit/540d0c13aedb8d55501d220bd2f0b3cdedfe84e8)) -* add regex validation to role-session-name ([#1765](https://github.com/aws-actions/configure-aws-credentials/issues/1765)) ([e354499](https://github.com/aws-actions/configure-aws-credentials/commit/e35449909c6ede5083a48ba4b8bbfaaa1cf09ba1)) -* Allow custom session tags to be passed when assuming a role ([#1759](https://github.com/aws-actions/configure-aws-credentials/issues/1759)) ([61f50f6](https://github.com/aws-actions/configure-aws-credentials/commit/61f50f630f383628add73c1eab3f1935ba07da2b)) -* expose run id in STS client user-agent ([#1774](https://github.com/aws-actions/configure-aws-credentials/issues/1774)) ([29d1be3](https://github.com/aws-actions/configure-aws-credentials/commit/29d1be30273e7ef371d59fccf6ec54572c64ec89)) -* support custom STS endpoints ([#1762](https://github.com/aws-actions/configure-aws-credentials/issues/1762)) ([8d52d05](https://github.com/aws-actions/configure-aws-credentials/commit/8d52d05d7a4521fa52b39de50cb6114b12e5c332)) - -### Bug Fixes - -* skip credential check on output-env-credentials: false ([#1778](https://github.com/aws-actions/configure-aws-credentials/issues/1778)) ([58e7c47](https://github.com/aws-actions/configure-aws-credentials/commit/58e7c47adf77846879008deadfeeef8a6969fe6c)) -* assumeRole failing from session tag size too large ([#1808](https://github.com/aws-actions/configure-aws-credentials/issues/1808)) ([d6f5dc3](https://github.com/aws-actions/configure-aws-credentials/commit/d6f5dc331b44474b19a52caaf85fa4d637b13c8e)) - -## [6.1.3](https://github.com/aws-actions/configure-aws-credentials/compare/v6.1.2...v6.1.3) (2026-05-28) - -### Bug Fixes - -* fix: allow kubelet token symlink in [#1805](https://github.com/aws-actions/configure-aws-credentials/issues/1805) - -## [6.1.2](https://github.com/aws-actions/configure-aws-credentials/compare/v6.1.1...v6.1.2) (2026-05-26) - -### Bug Fixes - -* additional filesystem checks ([#1799](https://github.com/aws-actions/configure-aws-credentials/issues/1799)) ([c39f282](https://github.com/aws-actions/configure-aws-credentials/commit/c39f282697aca8a78c522ecf1f7da9899a31432c)) - ## [6.1.1](https://github.com/aws-actions/configure-aws-credentials/compare/v6.1.0...v6.1.1) (2026-05-05) diff --git a/README.md b/README.md index 09f4b69..df38357 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,6 @@ detail. | role-session-name | Defaults to "GitHubActions", but may be changed if required. | No | | role-skip-session-tagging | Skips session tagging if set. | No | | transitive-tag-keys | Define a list of transitive tag keys to pass when assuming a role. | No | -| custom-tags | Additional tags to apply to the assumed role session. Must be a JSON object provided as a string. Custom tags are not usable with OIDC or web identity token authentication. | No | | inline-session-policy | You may further restrict the assumed role policy by defining an inline policy here. | No | | managed-session-policies | You may further restrict the assumed role policy by specifying a managed policy here. | No | | output-credentials | When set, outputs fetched credentials as action step output. (Outputs aws-access-key-id, aws-secret-access-key, aws-session-token, aws-account-id, authenticated-arn, and aws-expiration). Defaults to false. | No | @@ -181,8 +180,6 @@ detail. | allowed-account-ids | A comma-delimited list of expected AWS account IDs. The action will fail if we receive credentials for the wrong account. | No | | force-skip-oidc | When set, the action will skip using GitHub OIDC provider even if the id-token permission is set. | No | | action-timeout-s | Global timeout for the action in seconds. If set to a value greater than 0, the action will fail if it takes longer than this time to complete. | No | -| no-proxy | Hosts to skip for the proxy configuration. | No | -| sts-endpoint | Custom STS endpoint URL. Use this to point to an STS-compatible API (e.g. MinIO, LocalStack) instead of the default AWS STS endpoint for the region. | No | @@ -353,7 +350,8 @@ documentation for `GITHUB_` environment variable definitions][gh-env-vars]) [gh-env-vars]: https://docs.github.com/en/actions/reference/workflows-and-actions/variables#default-environment-variables -**Default tags** are always emitted when session tags are used. +**Protected tags** are always emitted when session tags are used, and cannot be +overridden via `custom-tags`: | Key | Value | | ---------- | ----------------- | @@ -365,24 +363,21 @@ documentation for `GITHUB_` environment variable definitions][gh-env-vars]) | Commit | GITHUB_SHA | | Branch | GITHUB_REF | -**Droppable tags** are automatically added to the set of default session tags. -If the session tags exceed the [packed size limit][packed-size-limit], these -tags will be dropped, and the AssumeRole call will be retried. If it still -fails, the action will error out. (It is difficult to predict the packed size -before making the call, as session tags and session policies are compressed into -a binary format as part of the call.) +**Overrideable tags** are automatically added to the set of default session tags +but may be overridden via `custom-tags`. AWS has a maximum limit of 50 session +tags; tags from this list are dropped in reverse priority order if your +`custom-tags` set plus the protected set exceeds this limit. -[packed-size-limit]: - https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_know - -| Key | Value | -| --------------- | ----------------------- | -| EventName | GITHUB_EVENT_NAME | -| BaseRef | GITHUB_BASE_REF | -| HeadRef | GITHUB_HEAD_REF | -| RunId | GITHUB_RUN_ID | -| Job | GITHUB_JOB | -| TriggeringActor | GITHUB_TRIGGERING_ACTOR | +| Key | Value | Priority | +| --------------- | ----------------------- | -------- | +| EventName | GITHUB_EVENT_NAME | 1 | +| BaseRef | GITHUB_BASE_REF | 2 | +| HeadRef | GITHUB_HEAD_REF | 3 | +| RefName | GITHUB_REF_NAME | 4 | +| RunId | GITHUB_RUN_ID | 5 | +| RefType | GITHUB_REF_TYPE | 6 | +| Job | GITHUB_JOB | 7 | +| TriggeringActor | GITHUB_TRIGGERING_ACTOR | 8 | Tags whose source environment variable is unset are omitted (e.g., `BaseRef` and `HeadRef` are only set on `pull_request` events). @@ -390,21 +385,21 @@ Tags whose source environment variable is unset are omitted (e.g., `BaseRef` and _Note: all tag values must conform to [the tag requirements][sts-tag-requirements]. Values longer than 256 characters will be truncated, and characters outside the -allowed set will be replaced with an underscore (`_`)._ +allowed set will be replaced with an underscore (`_`).\_ [sts-tag-requirements]: https://docs.aws.amazon.com/STS/latest/APIReference/API_Tag.html -The action will use session tagging by default unless you are using OIDC or a -Web Identify Token File. +The action will use session tagging by default unless you are using OIDC. To [forward session tags to subsequent sessions in a role -chain][session-tag-chaining], you can use the `transitive-tag-keys` input to -specify the keys of the tags to be passed. +chain][session-tag-chaining], you can use [session-tag-chaining]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining +the `transitive-tag-keys` input to specify the keys of the tags to be passed. + _Note that all subsequent roles in the chain must have `role-skip-session-tagging` set to `true`_ @@ -421,10 +416,9 @@ with: ### Custom session tags You can add custom session tags using the `custom-tags` input, which accepts a -JSON object. Custom tags cannot override existing tags. Note that AWS allows a -maximum of 50 tags (so you can supply a maximum of 43 custom tags), although it -is likely that you will exceed the [packed size limit][packed-size-limit] -before you exceed the maximum number of tags. +JSON object. Custom tags cannot override protected tags, but they can override +overrideable tags (in which case the overrideable tag's slot is freed for the +next overrideable tag in the priority list, if any). ```yaml uses: aws-actions/configure-aws-credentials@v6 @@ -590,7 +584,7 @@ claims ([1][gh-blog-oidc], [2][sub-claim-custom]). > **Warning:** Avoid `ForAllValues:` in `Allow` statements. These operators > return true when the claim is absent or misspelled, which can lead to -> unintended access. Instead, use `StringEquals` or `StringLike` operators to +> uninended access. Instead, use `StringEquals` or `StringLike` operators to > check for specific claim values. [least-privilege]: @@ -623,35 +617,6 @@ For further information on OIDC and GitHub Actions, please see: - [GitHub docs: Configuring OpenID Connect in Amazon Web Services](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services) - [GitHub changelog: GitHub Actions: Secure cloud deployments with OpenID Connect](https://github.blog/changelog/2021-10-27-github-actions-secure-cloud-deployments-with-openid-connect/) -## Getting Credentials in AWS Self-Hosted Runners - -If you are running GitHub Actions in a self-hosted runner using an AWS Service -(such as Codebuild or EKS) and you have properly configured the service, -credentials should be available by default; the AWS CLI will fetch credentials -using the AWS_CONTAINER_CREDENTIALS_FULL_URI or -AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variables. However, you may -still want to use this action if you need to export those credentials for use -with other tools in your workflow. You may also want to use this action in -scenarios where you need to use that 'default' role to assume another role. - -To export credentials, simply run the action with `role-to-assume` set to the -default role of the container. - -To assume another role from the container's default role, use the -`role-chaining: true` flag, so that the action fetches the default credentials -from the environment before assuming the other role. - -If you are using EKS Pod Identities and encountering an error related to the -packed size of session tags, you must either run the action with -`role-skip-session-tagging: true` to disable the tags set by the action, or -[disable EKS session tagging][eks-disable-session-tagging] in the EKS settings -to disable the tags that are automatically set by the EKS Pod Identity Service. -Check the values of the action's session tags and the session tags that are -added by EKS so you can keep the set of tags which is more useful to you. - -[eks-disable-session-tagging]: - https://docs.aws.amazon.com/eks/latest/userguide/pod-id-abac.html#pod-id-abac-tags - ## Compatibility with non-GitHub Actions environments This action has been sucessfully tested with diff --git a/THIRD-PARTY b/THIRD-PARTY index 59cc215..106e016 100644 --- a/THIRD-PARTY +++ b/THIRD-PARTY @@ -644,7 +644,7 @@ Apache License The following npm package may be included in this product: - - @aws-sdk/client-sts@3.1061.0 + - @aws-sdk/client-sts@3.1049.0 This package contains the following license: @@ -854,9 +854,9 @@ Apache License The following npm packages may be included in this product: - - @aws-sdk/signature-v4-multi-region@3.996.31 - - @smithy/core@3.24.6 - - @smithy/types@4.14.3 + - @aws-sdk/signature-v4-multi-region@3.996.27 + - @smithy/core@3.24.3 + - @smithy/types@4.14.2 These packages each contain the following license: @@ -1254,7 +1254,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The following npm package may be included in this product: - - @aws-sdk/core@3.974.17 + - @aws-sdk/core@3.974.12 This package contains the following license: @@ -1674,18 +1674,18 @@ Apache License The following npm packages may be included in this product: - - @aws-sdk/credential-provider-env@3.972.43 - - @aws-sdk/credential-provider-ini@3.972.48 - - @aws-sdk/credential-provider-node@3.972.50 - - @aws-sdk/token-providers@3.1060.0 - - @aws-sdk/types@3.973.10 + - @aws-sdk/credential-provider-env@3.972.38 + - @aws-sdk/credential-provider-ini@3.972.42 + - @aws-sdk/credential-provider-node@3.972.43 + - @aws-sdk/token-providers@3.1049.0 + - @aws-sdk/types@3.973.8 - @aws-sdk/util-locate-window@3.965.5 - - @aws-sdk/xml-builder@3.972.27 - - @smithy/credential-provider-imds@4.3.7 - - @smithy/fetch-http-handler@5.4.6 + - @aws-sdk/xml-builder@3.972.24 + - @smithy/credential-provider-imds@4.3.3 + - @smithy/fetch-http-handler@5.4.3 - @smithy/is-array-buffer@2.2.0 - - @smithy/node-http-handler@4.7.6 - - @smithy/signature-v4@5.4.6 + - @smithy/node-http-handler@4.7.3 + - @smithy/signature-v4@5.4.3 - @smithy/util-buffer-from@2.2.0 - @smithy/util-utf8@2.3.0 @@ -1897,9 +1897,9 @@ Apache License The following npm packages may be included in this product: - - @aws-sdk/credential-provider-process@3.972.43 - - @aws-sdk/credential-provider-sso@3.972.47 - - @aws-sdk/credential-provider-web-identity@3.972.47 + - @aws-sdk/credential-provider-process@3.972.38 + - @aws-sdk/credential-provider-sso@3.972.42 + - @aws-sdk/credential-provider-web-identity@3.972.42 These packages each contain the following license: @@ -2109,9 +2109,9 @@ Apache License The following npm packages may be included in this product: - - @aws-sdk/credential-provider-http@3.972.45 - - @aws-sdk/credential-provider-login@3.972.47 - - @aws-sdk/nested-clients@3.997.15 + - @aws-sdk/credential-provider-http@3.972.40 + - @aws-sdk/credential-provider-login@3.972.42 + - @aws-sdk/nested-clients@3.997.10 These packages each contain the following license: @@ -2335,7 +2335,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following npm packages may be included in this product: - - @nodable/entities@2.1.1 + - @nodable/entities@2.1.0 - quickjs-wasi@2.2.0 - xml-naming@0.1.0 diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index c5606af..4256724 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -5707,7 +5707,7 @@ var require_client_h1 = __commonJS({ kResume, kHTTPContext } = require_symbols(); - var constants4 = require_constants2(); + var constants3 = require_constants2(); var EMPTY_BUF = Buffer.alloc(0); var FastBuffer = Buffer[Symbol.species]; var addListener = util.addListener; @@ -5779,7 +5779,7 @@ var require_client_h1 = __commonJS({ constructor(client, socket, { exports: exports3 }) { assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); this.llhttp = exports3; - this.ptr = this.llhttp.llhttp_alloc(constants4.TYPE.RESPONSE); + this.ptr = this.llhttp.llhttp_alloc(constants3.TYPE.RESPONSE); this.client = client; this.socket = socket; this.timeout = null; @@ -5874,19 +5874,19 @@ var require_client_h1 = __commonJS({ currentBufferRef = null; } const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; - if (ret === constants4.ERROR.PAUSED_UPGRADE) { + if (ret === constants3.ERROR.PAUSED_UPGRADE) { this.onUpgrade(data.slice(offset)); - } else if (ret === constants4.ERROR.PAUSED) { + } else if (ret === constants3.ERROR.PAUSED) { this.paused = true; socket.unshift(data.slice(offset)); - } else if (ret !== constants4.ERROR.OK) { + } else if (ret !== constants3.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, constants4.ERROR[ret], data.slice(offset)); + throw new HTTPParserError(message, constants3.ERROR[ret], data.slice(offset)); } } catch (err) { util.destroy(socket, err); @@ -6061,7 +6061,7 @@ var require_client_h1 = __commonJS({ socket[kBlocking] = false; client[kResume](); } - return pause ? constants4.ERROR.PAUSED : 0; + return pause ? constants3.ERROR.PAUSED : 0; } onBody(buf) { const { client, socket, statusCode, maxResponseSize } = this; @@ -6083,7 +6083,7 @@ var require_client_h1 = __commonJS({ } this.bytesRead += buf.length; if (request.onData(buf) === false) { - return constants4.ERROR.PAUSED; + return constants3.ERROR.PAUSED; } } onMessageComplete() { @@ -6118,13 +6118,13 @@ var require_client_h1 = __commonJS({ if (socket[kWriting]) { assert(client[kRunning] === 0); util.destroy(socket, new InformationalError("reset")); - return constants4.ERROR.PAUSED; + return constants3.ERROR.PAUSED; } else if (!shouldKeepAlive) { util.destroy(socket, new InformationalError("reset")); - return constants4.ERROR.PAUSED; + return constants3.ERROR.PAUSED; } else if (socket[kReset] && client[kRunning] === 0) { util.destroy(socket, new InformationalError("reset")); - return constants4.ERROR.PAUSED; + return constants3.ERROR.PAUSED; } else if (client[kPipelining] == null || client[kPipelining] === 1) { setImmediate(() => client[kResume]()); } else { @@ -19128,7 +19128,6 @@ function error(message, properties = {}) { } // src/helpers.ts -var fs3 = __toESM(require("node:fs")); function errorMessage(error2) { return error2 instanceof Error ? error2.message : String(error2); } @@ -19146,7 +19145,6 @@ function getBooleanInput(name, options) { Support boolean input list: \`true | True | TRUE | false | False | FALSE\`` ); } -var O_NOFOLLOW = fs3.constants.O_NOFOLLOW ?? 0; // src/cleanup/index.ts function cleanup() { diff --git a/dist/index.js b/dist/index.js index 559d31b..5b30eaf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1072,14 +1072,14 @@ var require_util = __commonJS({ } const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; - let path4 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path3 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path4 && path4[0] !== "/") { - path4 = `/${path4}`; + if (path3 && path3[0] !== "/") { + path3 = `/${path3}`; } - return new URL(`${origin}${path4}`); + return new URL(`${origin}${path3}`); } if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -1530,39 +1530,39 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path4, origin } + request: { method, path: path3, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path4); + debuglog("sending request to %s %s/%s", method, origin, path3); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path4, origin }, + request: { method, path: path3, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path4, + path3, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path4, origin } + request: { method, path: path3, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path4); + debuglog("trailers received from %s %s/%s", method, origin, path3); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path4, origin }, + request: { method, path: path3, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path4, + path3, error3.message ); }); @@ -1611,9 +1611,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path4, origin } + request: { method, path: path3, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path4); + debuglog("sending request to %s %s/%s", method, origin, path3); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -1676,7 +1676,7 @@ var require_request = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path4, + path: path3, method, body, headers, @@ -1691,11 +1691,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler) { - if (typeof path4 !== "string") { + if (typeof path3 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path4[0] !== "/" && !(path4.startsWith("http://") || path4.startsWith("https://")) && method !== "CONNECT") { + } else if (path3[0] !== "/" && !(path3.startsWith("http://") || path3.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path4)) { + } else if (invalidPathRegex.test(path3)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -1761,7 +1761,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path4, query) : path4; + this.path = query ? buildURL(path3, query) : path3; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -5710,7 +5710,7 @@ var require_client_h1 = __commonJS({ kResume, kHTTPContext } = require_symbols(); - var constants4 = require_constants2(); + var constants3 = require_constants2(); var EMPTY_BUF = Buffer.alloc(0); var FastBuffer = Buffer[Symbol.species]; var addListener = util.addListener; @@ -5782,7 +5782,7 @@ var require_client_h1 = __commonJS({ constructor(client, socket, { exports: exports3 }) { assert4(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); this.llhttp = exports3; - this.ptr = this.llhttp.llhttp_alloc(constants4.TYPE.RESPONSE); + this.ptr = this.llhttp.llhttp_alloc(constants3.TYPE.RESPONSE); this.client = client; this.socket = socket; this.timeout = null; @@ -5877,19 +5877,19 @@ var require_client_h1 = __commonJS({ currentBufferRef = null; } const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; - if (ret === constants4.ERROR.PAUSED_UPGRADE) { + if (ret === constants3.ERROR.PAUSED_UPGRADE) { this.onUpgrade(data3.slice(offset)); - } else if (ret === constants4.ERROR.PAUSED) { + } else if (ret === constants3.ERROR.PAUSED) { this.paused = true; socket.unshift(data3.slice(offset)); - } else if (ret !== constants4.ERROR.OK) { + } else if (ret !== constants3.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, constants4.ERROR[ret], data3.slice(offset)); + throw new HTTPParserError(message, constants3.ERROR[ret], data3.slice(offset)); } } catch (err) { util.destroy(socket, err); @@ -6064,7 +6064,7 @@ var require_client_h1 = __commonJS({ socket[kBlocking] = false; client[kResume](); } - return pause ? constants4.ERROR.PAUSED : 0; + return pause ? constants3.ERROR.PAUSED : 0; } onBody(buf) { const { client, socket, statusCode, maxResponseSize } = this; @@ -6086,7 +6086,7 @@ var require_client_h1 = __commonJS({ } this.bytesRead += buf.length; if (request.onData(buf) === false) { - return constants4.ERROR.PAUSED; + return constants3.ERROR.PAUSED; } } onMessageComplete() { @@ -6121,13 +6121,13 @@ var require_client_h1 = __commonJS({ if (socket[kWriting]) { assert4(client[kRunning] === 0); util.destroy(socket, new InformationalError("reset")); - return constants4.ERROR.PAUSED; + return constants3.ERROR.PAUSED; } else if (!shouldKeepAlive) { util.destroy(socket, new InformationalError("reset")); - return constants4.ERROR.PAUSED; + return constants3.ERROR.PAUSED; } else if (socket[kReset] && client[kRunning] === 0) { util.destroy(socket, new InformationalError("reset")); - return constants4.ERROR.PAUSED; + return constants3.ERROR.PAUSED; } else if (client[kPipelining] == null || client[kPipelining] === 1) { setImmediate(() => client[kResume]()); } else { @@ -6287,7 +6287,7 @@ var require_client_h1 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request) { - const { method, path: path4, host, upgrade, blocking, reset } = request; + const { method, path: path3, host, upgrade, blocking, reset } = request; let { body, headers, contentLength } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -6353,7 +6353,7 @@ var require_client_h1 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path4} HTTP/1.1\r + let header = `${method} ${path3} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -6879,7 +6879,7 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request) { const session = client[kHTTP2Session]; - const { method, path: path4, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + const { method, path: path3, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let { body } = request; if (upgrade) { util.errorRequest(client, request, new Error("Upgrade not supported for H2")); @@ -6946,7 +6946,7 @@ var require_client_h2 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path4; + headers[HTTP2_HEADER_PATH] = path3; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -7299,9 +7299,9 @@ var require_redirect_handler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume3, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path4 = search ? `${pathname}${search}` : pathname; + const path3 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path4; + this.opts.path = path3; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -8536,10 +8536,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path4 = "/", + path: path3 = "/", headers = {} } = opts; - opts.path = origin + path4; + opts.path = origin + path3; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL10(origin); headers.host = host; @@ -10460,20 +10460,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path4) { - if (typeof path4 !== "string") { - return path4; + function safeUrl(path3) { + if (typeof path3 !== "string") { + return path3; } - const pathSegments = path4.split("?"); + const pathSegments = path3.split("?"); if (pathSegments.length !== 2) { - return path4; + return path3; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path4, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path4); + function matchKey(mockDispatch2, { path: path3, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path3); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10495,7 +10495,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath2 = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path4 }) => matchValue(safeUrl(path4), resolvedPath2)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path3 }) => matchValue(safeUrl(path3), resolvedPath2)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath2}'`); } @@ -10533,9 +10533,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path4, method, body, headers, query } = opts; + const { path: path3, method, body, headers, query } = opts; return { - path: path4, + path: path3, method, body, headers, @@ -10998,10 +10998,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path4, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path3, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path4, + Path: path3, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -15882,9 +15882,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path4) { - for (let i5 = 0; i5 < path4.length; ++i5) { - const code = path4.charCodeAt(i5); + function validateCookiePath(path3) { + for (let i5 = 0; i5 < path3.length; ++i5) { + const code = path3.charCodeAt(i5); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -18561,11 +18561,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path4 = opts.path; + let path3 = opts.path; if (!opts.path.startsWith("/")) { - path4 = `/${path4}`; + path3 = `/${path3}`; } - url = new URL(util.parseOrigin(url).origin + path4); + url = new URL(util.parseOrigin(url).origin + path3); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -19049,7 +19049,7 @@ var require_dist_cjs = __commonJS({ FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; })(exports2.FieldPosition || (exports2.FieldPosition = {})); - var SMITHY_CONTEXT_KEY3 = "__smithy_context"; + var SMITHY_CONTEXT_KEY4 = "__smithy_context"; exports2.IniSectionType = void 0; (function(IniSectionType4) { IniSectionType4["PROFILE"] = "profile"; @@ -19062,142 +19062,25 @@ var require_dist_cjs = __commonJS({ RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; })(exports2.RequestHandlerProtocol || (exports2.RequestHandlerProtocol = {})); - exports2.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY3; + exports2.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY4; exports2.getDefaultClientConfiguration = getDefaultClientConfiguration2; exports2.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig2; } }); -// node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js +// node_modules/@smithy/core/dist-es/submodules/client/util-middleware/getSmithyContext.js var import_types, getSmithyContext; var init_getSmithyContext = __esm({ - "node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js"() { + "node_modules/@smithy/core/dist-es/submodules/client/util-middleware/getSmithyContext.js"() { import_types = __toESM(require_dist_cjs()); getSmithyContext = (context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}); } }); -// node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js -function cloneQuery(query) { - return Object.keys(query).reduce((carry, paramName) => { - const param = query[paramName]; - return { - ...carry, - [paramName]: Array.isArray(param) ? [...param] : param - }; - }, {}); -} -var HttpRequest; -var init_httpRequest = __esm({ - "node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js"() { - HttpRequest = class _HttpRequest { - method; - protocol; - hostname; - port; - path; - query; - headers; - username; - password; - fragment; - body; - constructor(options) { - this.method = options.method || "GET"; - this.hostname = options.hostname || "localhost"; - this.port = options.port; - this.query = options.query || {}; - this.headers = options.headers || {}; - this.body = options.body; - this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; - this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; - this.username = options.username; - this.password = options.password; - this.fragment = options.fragment; - } - static clone(request) { - const cloned = new _HttpRequest({ - ...request, - headers: { ...request.headers } - }); - if (cloned.query) { - cloned.query = cloneQuery(cloned.query); - } - return cloned; - } - static isInstance(request) { - if (!request) { - return false; - } - const req = request; - return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; - } - clone() { - return _HttpRequest.clone(this); - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js -var HttpResponse; -var init_httpResponse = __esm({ - "node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js"() { - HttpResponse = class { - statusCode; - reason; - headers; - body; - constructor(options) { - this.statusCode = options.statusCode; - this.reason = options.reason; - this.headers = options.headers || {}; - this.body = options.body; - } - static isInstance(response) { - if (!response) - return false; - const resp = response; - return typeof resp.statusCode === "number" && typeof resp.headers === "object"; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js -var VALID_HOST_LABEL_REGEX, isValidHostLabel; -var init_isValidHostLabel = __esm({ - "node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js"() { - VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); - isValidHostLabel = (value, allowSubDomains = false) => { - if (!allowSubDomains) { - return VALID_HOST_LABEL_REGEX.test(value); - } - const labels = value.split("."); - for (const label of labels) { - if (!isValidHostLabel(label)) { - return false; - } - } - return true; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} -var init_isValidHostname = __esm({ - "node_modules/@smithy/core/dist-es/submodules/transport/isValidHostname.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +// node_modules/@smithy/core/dist-es/submodules/client/util-middleware/normalizeProvider.js var normalizeProvider; var init_normalizeProvider = __esm({ - "node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js"() { + "node_modules/@smithy/core/dist-es/submodules/client/util-middleware/normalizeProvider.js"() { normalizeProvider = (input) => { if (typeof input === "function") return input; @@ -19207,97 +19090,6 @@ var init_normalizeProvider = __esm({ } }); -// node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js -function parseQueryString(querystring) { - const query = {}; - querystring = querystring.replace(/^\?/, ""); - if (querystring) { - for (const pair of querystring.split("&")) { - let [key, value = null] = pair.split("="); - key = decodeURIComponent(key); - if (value) { - value = decodeURIComponent(value); - } - if (!(key in query)) { - query[key] = value; - } else if (Array.isArray(query[key])) { - query[key].push(value); - } else { - query[key] = [query[key], value]; - } - } - } - return query; -} -var init_parseQueryString = __esm({ - "node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js"() { - } -}); - -// node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js -var parseUrl; -var init_parseUrl = __esm({ - "node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js"() { - init_parseQueryString(); - parseUrl = (url) => { - if (typeof url === "string") { - return parseUrl(new URL(url)); - } - const { hostname, pathname, port, protocol, search } = url; - let query; - if (search) { - query = parseQueryString(search); - } - return { - hostname, - port: port ? parseInt(port) : void 0, - protocol, - path: pathname, - query - }; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js -var toEndpointV1; -var init_toEndpointV1 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js"() { - init_parseUrl(); - toEndpointV1 = (endpoint) => { - if (typeof endpoint === "object") { - if ("url" in endpoint) { - const v1Endpoint = parseUrl(endpoint.url); - if (endpoint.headers) { - v1Endpoint.headers = {}; - for (const name in endpoint.headers) { - v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", "); - } - } - return v1Endpoint; - } - return endpoint; - } - return parseUrl(endpoint); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/transport/index.js -var init_transport = __esm({ - "node_modules/@smithy/core/dist-es/submodules/transport/index.js"() { - init_getSmithyContext(); - init_httpRequest(); - init_httpResponse(); - init_isValidHostLabel(); - init_isValidHostname(); - init_normalizeProvider(); - init_parseQueryString(); - init_parseUrl(); - init_toEndpointV1(); - } -}); - // node_modules/@smithy/core/dist-es/submodules/client/invalid-dependency/invalidFunction.js var invalidFunction; var init_invalidFunction = __esm({ @@ -19617,1534 +19409,6 @@ var init_deref = __esm({ } }); -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js -var operation; -var init_operation = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js"() { - operation = (namespace, name, traits, input, output) => ({ - name, - namespace, - traits, - input, - output - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js -var schemaDeserializationMiddleware, findHeader; -var init_schemaDeserializationMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() { - init_transport(); - init_operation(); - schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { - const { response } = await next(args); - const { operationSchema } = getSmithyContext(context); - const [, ns, n3, t, i5, o2] = operationSchema ?? []; - try { - const parsed = await config.protocol.deserializeResponse(operation(ns, n3, t, i5, o2), { - ...config, - ...context - }, response); - return { - response, - output: parsed - }; - } catch (error3) { - Object.defineProperty(error3, "$response", { - value: response, - enumerable: false, - writable: false, - configurable: false - }); - if (!("$metadata" in error3)) { - const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; - try { - error3.message += "\n " + hint; - } catch (e5) { - if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { - console.warn(hint); - } else { - context.logger?.warn?.(hint); - } - } - if (typeof error3.$responseBodyText !== "undefined") { - if (error3.$response) { - error3.$response.body = error3.$responseBodyText; - } - } - try { - if (HttpResponse.isInstance(response)) { - const { headers = {}, statusCode } = response; - const headerEntries = Object.entries(headers); - error3.$metadata = { - httpStatusCode: statusCode, - requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), - extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), - cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) - }; - } - } catch (e5) { - } - } - throw error3; - } - }; - findHeader = (pattern, headers) => { - return (headers.find(([k5]) => { - return k5.match(pattern); - }) || [void 0, void 0])[1]; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js -var schemaSerializationMiddleware; -var init_schemaSerializationMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() { - init_transport(); - init_operation(); - schemaSerializationMiddleware = (config) => (next, context) => async (args) => { - const { operationSchema } = getSmithyContext(context); - const [, ns, n3, t, i5, o2] = operationSchema ?? []; - const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : config.endpoint; - const request = await config.protocol.serializeRequest(operation(ns, n3, t, i5, o2), args.input, { - ...config, - ...context, - endpoint - }); - return next({ - ...args, - request - }); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js -function getSchemaSerdePlugin(config) { - return { - applyToStack: (commandStack) => { - commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption); - commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption); - config.protocol.setSerdeContext(config); - } - }; -} -var deserializerMiddlewareOption, serializerMiddlewareOption; -var init_getSchemaSerdePlugin = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() { - init_schemaDeserializationMiddleware(); - init_schemaSerializationMiddleware(); - deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true - }; - serializerMiddlewareOption = { - name: "serializerMiddleware", - step: "serialize", - tags: ["SERIALIZER"], - override: true - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js -var Schema; -var init_Schema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() { - Schema = class { - name; - namespace; - traits; - static assign(instance, values) { - const schema = Object.assign(instance, values); - return schema; - } - static [Symbol.hasInstance](lhs) { - const isPrototype = this.prototype.isPrototypeOf(lhs); - if (!isPrototype && typeof lhs === "object" && lhs !== null) { - const list2 = lhs; - return list2.symbol === this.symbol; - } - return isPrototype; - } - getName() { - return this.namespace + "#" + this.name; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js -var ListSchema, list; -var init_ListSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js"() { - init_Schema(); - ListSchema = class _ListSchema extends Schema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/lis"); - name; - traits; - valueSchema; - symbol = _ListSchema.symbol; - }; - list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), { - name, - namespace, - traits, - valueSchema - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js -var MapSchema, map; -var init_MapSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js"() { - init_Schema(); - MapSchema = class _MapSchema extends Schema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/map"); - name; - traits; - keySchema; - valueSchema; - symbol = _MapSchema.symbol; - }; - map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), { - name, - namespace, - traits, - keySchema, - valueSchema - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js -var OperationSchema, op; -var init_OperationSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js"() { - init_Schema(); - OperationSchema = class _OperationSchema extends Schema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/ope"); - name; - traits; - input; - output; - symbol = _OperationSchema.symbol; - }; - op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), { - name, - namespace, - traits, - input, - output - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js -var StructureSchema, struct; -var init_StructureSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() { - init_Schema(); - StructureSchema = class _StructureSchema extends Schema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/str"); - name; - traits; - memberNames; - memberList; - symbol = _StructureSchema.symbol; - }; - struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), { - name, - namespace, - traits, - memberNames, - memberList - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js -var ErrorSchema, error2; -var init_ErrorSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() { - init_Schema(); - init_StructureSchema(); - ErrorSchema = class _ErrorSchema extends StructureSchema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/err"); - ctor; - symbol = _ErrorSchema.symbol; - }; - error2 = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { - name, - namespace, - traits, - memberNames, - memberList, - ctor: null - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js -function translateTraits(indicator) { - if (typeof indicator === "object") { - return indicator; - } - indicator = indicator | 0; - if (traitsCache[indicator]) { - return traitsCache[indicator]; - } - const traits = {}; - let i5 = 0; - for (const trait of [ - "httpLabel", - "idempotent", - "idempotencyToken", - "sensitive", - "httpPayload", - "httpResponseCode", - "httpQueryParams" - ]) { - if ((indicator >> i5++ & 1) === 1) { - traits[trait] = 1; - } - } - return traitsCache[indicator] = traits; -} -var traitsCache; -var init_translateTraits = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js"() { - traitsCache = []; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js -function member(memberSchema, memberName) { - if (memberSchema instanceof NormalizedSchema) { - return Object.assign(memberSchema, { - memberName, - _isMemberSchema: true - }); - } - const internalCtorAccess = NormalizedSchema; - return new internalCtorAccess(memberSchema, memberName); -} -var anno, simpleSchemaCacheN, simpleSchemaCacheS, NormalizedSchema, isMemberSchema, isStaticSchema; -var init_NormalizedSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() { - init_deref(); - init_translateTraits(); - anno = { - it: /* @__PURE__ */ Symbol.for("@smithy/nor-struct-it"), - ns: /* @__PURE__ */ Symbol.for("@smithy/ns") - }; - simpleSchemaCacheN = []; - simpleSchemaCacheS = {}; - NormalizedSchema = class _NormalizedSchema { - ref; - memberName; - static symbol = /* @__PURE__ */ Symbol.for("@smithy/nor"); - symbol = _NormalizedSchema.symbol; - name; - schema; - _isMemberSchema; - traits; - memberTraits; - normalizedTraits; - constructor(ref, memberName) { - this.ref = ref; - this.memberName = memberName; - const traitStack = []; - let _ref = ref; - let schema = ref; - this._isMemberSchema = false; - while (isMemberSchema(_ref)) { - traitStack.push(_ref[1]); - _ref = _ref[0]; - schema = deref(_ref); - this._isMemberSchema = true; - } - if (traitStack.length > 0) { - this.memberTraits = {}; - for (let i5 = traitStack.length - 1; i5 >= 0; --i5) { - const traitSet = traitStack[i5]; - Object.assign(this.memberTraits, translateTraits(traitSet)); - } - } else { - this.memberTraits = 0; - } - if (schema instanceof _NormalizedSchema) { - const computedMemberTraits = this.memberTraits; - Object.assign(this, schema); - this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits()); - this.normalizedTraits = void 0; - this.memberName = memberName ?? schema.memberName; - return; - } - this.schema = deref(schema); - if (isStaticSchema(this.schema)) { - this.name = `${this.schema[1]}#${this.schema[2]}`; - this.traits = this.schema[3]; - } else { - this.name = this.memberName ?? String(schema); - this.traits = 0; - } - if (this._isMemberSchema && !memberName) { - throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); - } - } - static [Symbol.hasInstance](lhs) { - const isPrototype = this.prototype.isPrototypeOf(lhs); - if (!isPrototype && typeof lhs === "object" && lhs !== null) { - const ns = lhs; - return ns.symbol === this.symbol; - } - return isPrototype; - } - static of(ref) { - const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null; - if (typeof ref === "number") { - if (simpleSchemaCacheN[ref]) { - return simpleSchemaCacheN[ref]; - } - } else if (typeof ref === "string") { - if (simpleSchemaCacheS[ref]) { - return simpleSchemaCacheS[ref]; - } - } else if (keyAble) { - if (ref[anno.ns]) { - return ref[anno.ns]; - } - } - const sc = deref(ref); - if (sc instanceof _NormalizedSchema) { - return sc; - } - if (isMemberSchema(sc)) { - const [ns2, traits] = sc; - if (ns2 instanceof _NormalizedSchema) { - Object.assign(ns2.getMergedTraits(), translateTraits(traits)); - return ns2; - } - throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`); - } - const ns = new _NormalizedSchema(sc); - if (keyAble) { - return ref[anno.ns] = ns; - } - if (typeof sc === "string") { - return simpleSchemaCacheS[sc] = ns; - } - if (typeof sc === "number") { - return simpleSchemaCacheN[sc] = ns; - } - return ns; - } - getSchema() { - const sc = this.schema; - if (Array.isArray(sc) && sc[0] === 0) { - return sc[4]; - } - return sc; - } - getName(withNamespace = false) { - const { name } = this; - const short = !withNamespace && name && name.includes("#"); - return short ? name.split("#")[1] : name || void 0; - } - getMemberName() { - return this.memberName; - } - isMemberSchema() { - return this._isMemberSchema; - } - isListSchema() { - const sc = this.getSchema(); - return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1; - } - isMapSchema() { - const sc = this.getSchema(); - return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2; - } - isStructSchema() { - const sc = this.getSchema(); - if (typeof sc !== "object") { - return false; - } - const id = sc[0]; - return id === 3 || id === -3 || id === 4; - } - isUnionSchema() { - const sc = this.getSchema(); - if (typeof sc !== "object") { - return false; - } - return sc[0] === 4; - } - isBlobSchema() { - const sc = this.getSchema(); - return sc === 21 || sc === 42; - } - isTimestampSchema() { - const sc = this.getSchema(); - return typeof sc === "number" && sc >= 4 && sc <= 7; - } - isUnitSchema() { - return this.getSchema() === "unit"; - } - isDocumentSchema() { - return this.getSchema() === 15; - } - isStringSchema() { - return this.getSchema() === 0; - } - isBooleanSchema() { - return this.getSchema() === 2; - } - isNumericSchema() { - return this.getSchema() === 1; - } - isBigIntegerSchema() { - return this.getSchema() === 17; - } - isBigDecimalSchema() { - return this.getSchema() === 19; - } - isStreaming() { - const { streaming } = this.getMergedTraits(); - return !!streaming || this.getSchema() === 42; - } - isIdempotencyToken() { - return !!this.getMergedTraits().idempotencyToken; - } - getMergedTraits() { - return this.normalizedTraits ?? (this.normalizedTraits = { - ...this.getOwnTraits(), - ...this.getMemberTraits() - }); - } - getMemberTraits() { - return translateTraits(this.memberTraits); - } - getOwnTraits() { - return translateTraits(this.traits); - } - getKeySchema() { - const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()]; - if (!isDoc && !isMap) { - throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`); - } - const schema = this.getSchema(); - const memberSchema = isDoc ? 15 : schema[4] ?? 0; - return member([memberSchema, 0], "key"); - } - getValueSchema() { - const sc = this.getSchema(); - const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; - const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0; - if (memberSchema != null) { - return member([memberSchema, 0], isMap ? "value" : "member"); - } - throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); - } - getMemberSchema(memberName) { - const struct2 = this.getSchema(); - if (this.isStructSchema() && struct2[4].includes(memberName)) { - const i5 = struct2[4].indexOf(memberName); - const memberSchema = struct2[5][i5]; - return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); - } - if (this.isDocumentSchema()) { - return member([15, 0], memberName); - } - throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`); - } - getMemberSchemas() { - const buffer = {}; - try { - for (const [k5, v] of this.structIterator()) { - buffer[k5] = v; - } - } catch (ignored) { - } - return buffer; - } - getEventStreamMember() { - if (this.isStructSchema()) { - for (const [memberName, memberSchema] of this.structIterator()) { - if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { - return memberName; - } - } - } - return ""; - } - *structIterator() { - if (this.isUnitSchema()) { - return; - } - if (!this.isStructSchema()) { - throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); - } - const struct2 = this.getSchema(); - const z = struct2[4].length; - let it = struct2[anno.it]; - if (it && z === it.length) { - yield* it; - return; - } - it = Array(z); - for (let i5 = 0; i5 < z; ++i5) { - const k5 = struct2[4][i5]; - const v = member([struct2[5][i5], 0], k5); - yield it[i5] = [k5, v]; - } - struct2[anno.it] = it; - } - }; - isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; - isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js -var SimpleSchema, sim, simAdapter; -var init_SimpleSchema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() { - init_Schema(); - SimpleSchema = class _SimpleSchema extends Schema { - static symbol = /* @__PURE__ */ Symbol.for("@smithy/sim"); - name; - schemaRef; - traits; - symbol = _SimpleSchema.symbol; - }; - sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef - }); - simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { - name, - namespace, - traits, - schemaRef - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js -var SCHEMA; -var init_sentinels = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"() { - SCHEMA = { - BLOB: 21, - STREAMING_BLOB: 42, - BOOLEAN: 2, - STRING: 0, - NUMERIC: 1, - BIG_INTEGER: 17, - BIG_DECIMAL: 19, - DOCUMENT: 15, - TIMESTAMP_DEFAULT: 4, - TIMESTAMP_DATE_TIME: 5, - TIMESTAMP_HTTP_DATE: 6, - TIMESTAMP_EPOCH_SECONDS: 7, - LIST_MODIFIER: 64, - MAP_MODIFIER: 128 - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js -var TypeRegistry; -var init_TypeRegistry = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() { - TypeRegistry = class _TypeRegistry { - namespace; - schemas; - exceptions; - static registries = /* @__PURE__ */ new Map(); - constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) { - this.namespace = namespace; - this.schemas = schemas; - this.exceptions = exceptions; - } - static for(namespace) { - if (!_TypeRegistry.registries.has(namespace)) { - _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace)); - } - return _TypeRegistry.registries.get(namespace); - } - copyFrom(other) { - const { schemas, exceptions } = this; - for (const [k5, v] of other.schemas) { - if (!schemas.has(k5)) { - schemas.set(k5, v); - } - } - for (const [k5, v] of other.exceptions) { - if (!exceptions.has(k5)) { - exceptions.set(k5, v); - } - } - } - register(shapeId, schema) { - const qualifiedName = this.normalizeShapeId(shapeId); - for (const r5 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) { - r5.schemas.set(qualifiedName, schema); - } - } - getSchema(shapeId) { - const id = this.normalizeShapeId(shapeId); - if (!this.schemas.has(id)) { - if (!shapeId.includes("#")) { - const suffix = "#" + shapeId; - const candidates = []; - for (const [shapeId2, schema] of this.schemas.entries()) { - if (shapeId2.endsWith(suffix)) { - candidates.push(schema); - } - } - if (candidates.length === 1) { - return candidates[0]; - } - } - throw new Error(`@smithy/core/schema - schema not found for ${id}`); - } - return this.schemas.get(id); - } - registerError(es, ctor) { - const $error = es; - const ns = $error[1]; - for (const r5 of [this, _TypeRegistry.for(ns)]) { - r5.schemas.set(ns + "#" + $error[2], $error); - r5.exceptions.set($error, ctor); - } - } - getErrorCtor(es) { - const $error = es; - if (this.exceptions.has($error)) { - return this.exceptions.get($error); - } - const registry = _TypeRegistry.for($error[1]); - return registry.exceptions.get($error); - } - getBaseException() { - for (const exceptionKey of this.exceptions.keys()) { - if (Array.isArray(exceptionKey)) { - const [, ns, name] = exceptionKey; - const id = ns + "#" + name; - if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { - return exceptionKey; - } - } - } - return void 0; - } - find(predicate) { - for (const schema of this.schemas.values()) { - if (predicate(schema)) { - return schema; - } - } - return void 0; - } - clear() { - this.schemas.clear(); - this.exceptions.clear(); - } - normalizeShapeId(shapeId) { - if (shapeId.includes("#")) { - return shapeId; - } - return this.namespace + "#" + shapeId; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/schema/index.js -var schema_exports = {}; -__export(schema_exports, { - ErrorSchema: () => ErrorSchema, - ListSchema: () => ListSchema, - MapSchema: () => MapSchema, - NormalizedSchema: () => NormalizedSchema, - OperationSchema: () => OperationSchema, - SCHEMA: () => SCHEMA, - Schema: () => Schema, - SimpleSchema: () => SimpleSchema, - StructureSchema: () => StructureSchema, - TypeRegistry: () => TypeRegistry, - deref: () => deref, - deserializerMiddlewareOption: () => deserializerMiddlewareOption, - error: () => error2, - getSchemaSerdePlugin: () => getSchemaSerdePlugin, - isStaticSchema: () => isStaticSchema, - list: () => list, - map: () => map, - op: () => op, - operation: () => operation, - serializerMiddlewareOption: () => serializerMiddlewareOption, - sim: () => sim, - simAdapter: () => simAdapter, - simpleSchemaCacheN: () => simpleSchemaCacheN, - simpleSchemaCacheS: () => simpleSchemaCacheS, - struct: () => struct, - traitsCache: () => traitsCache, - translateTraits: () => translateTraits -}); -var init_schema = __esm({ - "node_modules/@smithy/core/dist-es/submodules/schema/index.js"() { - init_deref(); - init_getSchemaSerdePlugin(); - init_ListSchema(); - init_MapSchema(); - init_OperationSchema(); - init_operation(); - init_ErrorSchema(); - init_NormalizedSchema(); - init_Schema(); - init_SimpleSchema(); - init_StructureSchema(); - init_sentinels(); - init_translateTraits(); - init_TypeRegistry(); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js -function schemaLogFilter(schema, data3) { - if (data3 == null) { - return data3; - } - const ns = NormalizedSchema.of(schema); - if (ns.getMergedTraits().sensitive) { - return SENSITIVE_STRING; - } - if (ns.isListSchema()) { - const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; - if (isSensitive) { - return SENSITIVE_STRING; - } - } else if (ns.isMapSchema()) { - const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; - if (isSensitive) { - return SENSITIVE_STRING; - } - } else if (ns.isStructSchema() && typeof data3 === "object") { - const object = data3; - const newObject = {}; - for (const [member2, memberNs] of ns.structIterator()) { - if (object[member2] != null) { - newObject[member2] = schemaLogFilter(memberNs, object[member2]); - } - } - return newObject; - } - return data3; -} -var SENSITIVE_STRING; -var init_schemaLogFilter = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js"() { - init_schema(); - SENSITIVE_STRING = "***SensitiveInformation***"; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js -var import_types2, Command2, ClassBuilder; -var init_command = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js"() { - import_types2 = __toESM(require_dist_cjs()); - init_MiddlewareStack(); - init_schemaLogFilter(); - Command2 = class { - middlewareStack = constructStack(); - schema; - static classBuilder() { - return new ClassBuilder(); - } - resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) { - for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { - this.middlewareStack.use(mw); - } - const stack = clientStack.concat(this.middlewareStack); - const { logger: logger2 } = configuration; - const handlerExecutionContext = { - logger: logger2, - clientName, - commandName, - inputFilterSensitiveLog, - outputFilterSensitiveLog, - [import_types2.SMITHY_CONTEXT_KEY]: { - commandInstance: this, - ...smithyContext - }, - ...additionalContext - }; - const { requestHandler } = configuration; - let requestOptions = options ?? {}; - if (smithyContext.eventStream) { - requestOptions = { - isEventStream: true, - ...requestOptions - }; - } - return stack.resolve((request) => requestHandler.handle(request.request, requestOptions), handlerExecutionContext); - } - }; - ClassBuilder = class { - _init = () => { - }; - _ep = {}; - _middlewareFn = () => []; - _commandName = ""; - _clientName = ""; - _additionalContext = {}; - _smithyContext = {}; - _inputFilterSensitiveLog = void 0; - _outputFilterSensitiveLog = void 0; - _serializer = null; - _deserializer = null; - _operationSchema; - init(cb) { - this._init = cb; - } - ep(endpointParameterInstructions) { - this._ep = endpointParameterInstructions; - return this; - } - m(middlewareSupplier) { - this._middlewareFn = middlewareSupplier; - return this; - } - s(service, operation2, smithyContext = {}) { - this._smithyContext = { - service, - operation: operation2, - ...smithyContext - }; - return this; - } - c(additionalContext = {}) { - this._additionalContext = additionalContext; - return this; - } - n(clientName, commandName) { - this._clientName = clientName; - this._commandName = commandName; - return this; - } - f(inputFilter = (_) => _, outputFilter = (_) => _) { - this._inputFilterSensitiveLog = inputFilter; - this._outputFilterSensitiveLog = outputFilter; - return this; - } - ser(serializer) { - this._serializer = serializer; - return this; - } - de(deserializer) { - this._deserializer = deserializer; - return this; - } - sc(operation2) { - this._operationSchema = operation2; - this._smithyContext.operationSchema = operation2; - return this; - } - build() { - const closure = this; - let CommandRef; - return CommandRef = class extends Command2 { - input; - static getEndpointParameterInstructions() { - return closure._ep; - } - constructor(...[input]) { - super(); - this.input = input ?? {}; - closure._init(this); - this.schema = closure._operationSchema; - } - resolveMiddleware(stack, configuration, options) { - const op2 = closure._operationSchema; - const input = op2?.[4] ?? op2?.input; - const output = op2?.[5] ?? op2?.output; - return this.resolveMiddlewareWithContext(stack, configuration, options, { - CommandCtor: CommandRef, - middlewareFn: closure._middlewareFn, - clientName: closure._clientName, - commandName: closure._commandName, - inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, input) : (_) => _), - outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, output) : (_) => _), - smithyContext: closure._smithyContext, - additionalContext: closure._additionalContext - }); - } - serialize = closure._serializer; - deserialize = closure._deserializer; - }; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js -var SENSITIVE_STRING2; -var init_constants = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js"() { - SENSITIVE_STRING2 = "***SensitiveInformation***"; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js -var createAggregatedClient; -var init_create_aggregated_client = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js"() { - createAggregatedClient = (commands5, Client3, options) => { - for (const [command, CommandCtor] of Object.entries(commands5)) { - const methodImpl = async function(args, optionsOrCb, cb) { - const command2 = new CommandCtor(args); - if (typeof optionsOrCb === "function") { - this.send(command2, optionsOrCb); - } else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expected http options but got ${typeof optionsOrCb}`); - this.send(command2, optionsOrCb || {}, cb); - } else { - return this.send(command2, optionsOrCb); - } - }; - const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); - Client3.prototype[methodName] = methodImpl; - } - const { paginators = {}, waiters = {} } = options ?? {}; - for (const [paginatorName, paginatorFn] of Object.entries(paginators)) { - if (Client3.prototype[paginatorName] === void 0) { - Client3.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) { - return paginatorFn({ - ...paginationConfiguration, - client: this - }, commandInput, ...rest); - }; - } - } - for (const [waiterName, waiterFn] of Object.entries(waiters)) { - if (Client3.prototype[waiterName] === void 0) { - Client3.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) { - let config = waiterConfiguration; - if (typeof waiterConfiguration === "number") { - config = { - maxWaitTime: waiterConfiguration - }; - } - return waiterFn({ - ...config, - client: this - }, commandInput, ...rest); - }; - } - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js -var ServiceException, decorateServiceException; -var init_exceptions = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js"() { - ServiceException = class _ServiceException extends Error { - $fault; - $response; - $retryable; - $metadata; - constructor(options) { - super(options.message); - Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); - this.name = options.name; - this.$fault = options.$fault; - this.$metadata = options.$metadata; - } - static isInstance(value) { - if (!value) - return false; - const candidate = value; - return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); - } - static [Symbol.hasInstance](instance) { - if (!instance) - return false; - const candidate = instance; - if (this === _ServiceException) { - return _ServiceException.isInstance(instance); - } - if (_ServiceException.isInstance(instance)) { - if (candidate.name && this.name) { - return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; - } - return this.prototype.isPrototypeOf(instance); - } - return false; - } - }; - decorateServiceException = (exception, additions = {}) => { - Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k5, v]) => { - if (exception[k5] == void 0 || exception[k5] === "") { - exception[k5] = v; - } - }); - const message = exception.message || exception.Message || "UnknownError"; - exception.message = message; - delete exception.Message; - return exception; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js -var throwDefaultError, withBaseException, deserializeMetadata; -var init_default_error_handler = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js"() { - init_exceptions(); - throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => { - const $metadata = deserializeMetadata(output); - const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; - const response = new exceptionCtor({ - name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", - $fault: "client", - $metadata - }); - throw decorateServiceException(response, parsedBody); - }; - withBaseException = (ExceptionCtor) => { - return ({ output, parsedBody, errorCode }) => { - throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); - }; - }; - deserializeMetadata = (output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] - }); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js -var loadConfigsForDefaultMode; -var init_defaults_mode = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js"() { - loadConfigsForDefaultMode = (mode) => { - switch (mode) { - case "standard": - return { - retryMode: "standard", - connectionTimeout: 3100 - }; - case "in-region": - return { - retryMode: "standard", - connectionTimeout: 1100 - }; - case "cross-region": - return { - retryMode: "standard", - connectionTimeout: 3100 - }; - case "mobile": - return { - retryMode: "standard", - connectionTimeout: 3e4 - }; - default: - return {}; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js -var warningEmitted, emitWarningIfUnsupportedVersion2; -var init_emitWarningIfUnsupportedVersion2 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js"() { - warningEmitted = false; - emitWarningIfUnsupportedVersion2 = (version) => { - if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { - warningEmitted = true; - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js -var import_types3, knownAlgorithms, getChecksumConfiguration, resolveChecksumRuntimeConfig; -var init_checksum = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js"() { - import_types3 = __toESM(require_dist_cjs()); - knownAlgorithms = Object.values(import_types3.AlgorithmId); - getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - for (const id in import_types3.AlgorithmId) { - const algorithmId = import_types3.AlgorithmId[id]; - if (runtimeConfig[algorithmId] === void 0) { - continue; - } - checksumAlgorithms.push({ - algorithmId: () => algorithmId, - checksumConstructor: () => runtimeConfig[algorithmId] - }); - } - for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) { - checksumAlgorithms.push({ - algorithmId: () => id, - checksumConstructor: () => ChecksumCtor - }); - } - return { - addChecksumAlgorithm(algo) { - runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {}; - const id = algo.algorithmId(); - const ctor = algo.checksumConstructor(); - if (knownAlgorithms.includes(id)) { - runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor; - } else { - runtimeConfig.checksumAlgorithms[id] = ctor; - } - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - } - }; - }; - resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - const id = checksumAlgorithm.algorithmId(); - if (knownAlgorithms.includes(id)) { - runtimeConfig[id] = checksumAlgorithm.checksumConstructor(); - } - }); - return runtimeConfig; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js -var getRetryConfiguration, resolveRetryRuntimeConfig; -var init_retry = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js"() { - getRetryConfiguration = (runtimeConfig) => { - return { - setRetryStrategy(retryStrategy) { - runtimeConfig.retryStrategy = retryStrategy; - }, - retryStrategy() { - return runtimeConfig.retryStrategy; - } - }; - }; - resolveRetryRuntimeConfig = (retryStrategyConfiguration) => { - const runtimeConfig = {}; - runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); - return runtimeConfig; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js -var getDefaultExtensionConfiguration, getDefaultClientConfiguration, resolveDefaultRuntimeConfig; -var init_defaultExtensionConfiguration = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js"() { - init_checksum(); - init_retry(); - getDefaultExtensionConfiguration = (runtimeConfig) => { - return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); - }; - getDefaultClientConfiguration = getDefaultExtensionConfiguration; - resolveDefaultRuntimeConfig = (config) => { - return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config)); - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js -var getArrayIfSingleItem; -var init_get_array_if_single_item = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js"() { - getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js -var getValueFromTextNode; -var init_get_value_from_text_node = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js"() { - getValueFromTextNode = (obj) => { - const textNodeName = "#text"; - for (const key in obj) { - if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { - obj[key] = obj[key][textNodeName]; - } else if (typeof obj[key] === "object" && obj[key] !== null) { - obj[key] = getValueFromTextNode(obj[key]); - } - } - return obj; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js -var isSerializableHeaderValue; -var init_is_serializable_header_value = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js"() { - isSerializableHeaderValue = (value) => { - return value != null; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js -var NoOpLogger; -var init_NoOpLogger = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js"() { - NoOpLogger = class { - trace() { - } - debug() { - } - info() { - } - warn() { - } - error() { - } - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js -function map2(arg0, arg1, arg2) { - let target; - let filter; - let instructions; - if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { - target = {}; - instructions = arg0; - } else { - target = arg0; - if (typeof arg1 === "function") { - filter = arg1; - instructions = arg2; - return mapWithFilter(target, filter, instructions); - } else { - instructions = arg1; - } - } - for (const key of Object.keys(instructions)) { - if (!Array.isArray(instructions[key])) { - target[key] = instructions[key]; - continue; - } - applyInstruction(target, null, instructions, key); - } - return target; -} -var convertMap, take, mapWithFilter, applyInstruction, nonNullish, pass; -var init_object_mapping = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js"() { - convertMap = (target) => { - const output = {}; - for (const [k5, v] of Object.entries(target || {})) { - output[k5] = [, v]; - } - return output; - }; - take = (source, instructions) => { - const out = {}; - for (const key in instructions) { - applyInstruction(out, source, instructions, key); - } - return out; - }; - mapWithFilter = (target, filter, instructions) => { - return map2(target, Object.entries(instructions).reduce((_instructions, [key, value]) => { - if (Array.isArray(value)) { - _instructions[key] = value; - } else { - if (typeof value === "function") { - _instructions[key] = [filter, value()]; - } else { - _instructions[key] = [filter, value]; - } - } - return _instructions; - }, {})); - }; - applyInstruction = (target, source, instructions, targetKey) => { - if (source !== null) { - let instruction = instructions[targetKey]; - if (typeof instruction === "function") { - instruction = [, instruction]; - } - const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; - if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) { - target[targetKey] = valueFn(source[sourceKey]); - } - return; - } - let [filter, value] = instructions[targetKey]; - if (typeof value === "function") { - let _value; - const defaultFilterPassed = filter === void 0 && (_value = value()) != null; - const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter; - if (defaultFilterPassed) { - target[targetKey] = _value; - } else if (customFilterPassed) { - target[targetKey] = value(); - } - } else { - const defaultFilterPassed = filter === void 0 && value != null; - const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; - if (defaultFilterPassed || customFilterPassed) { - target[targetKey] = value; - } - } - }; - nonNullish = (_) => _ != null; - pass = (_) => _; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js -var serializeFloat, serializeDateTime; -var init_ser_utils = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js"() { - serializeFloat = (value) => { - if (value !== value) { - return "NaN"; - } - switch (value) { - case Infinity: - return "Infinity"; - case -Infinity: - return "-Infinity"; - default: - return value; - } - }; - serializeDateTime = (date2) => date2.toISOString().replace(".000Z", "Z"); - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js -var _json; -var init_serde_json = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js"() { - _json = (obj) => { - if (obj == null) { - return {}; - } - if (Array.isArray(obj)) { - return obj.filter((_) => _ != null).map(_json); - } - if (typeof obj === "object") { - const target = {}; - for (const key of Object.keys(obj)) { - if (obj[key] == null) { - continue; - } - target[key] = _json(obj[key]); - } - return target; - } - return obj; - }; - } -}); - -// node_modules/@smithy/core/dist-es/submodules/client/index.js -var client_exports = {}; -__export(client_exports, { - AlgorithmId: () => import_types3.AlgorithmId, - Client: () => Client, - Command: () => Command2, - NoOpLogger: () => NoOpLogger, - SENSITIVE_STRING: () => SENSITIVE_STRING2, - ServiceException: () => ServiceException, - WaiterState: () => WaiterState, - _json: () => _json, - checkExceptions: () => checkExceptions, - constructStack: () => constructStack, - convertMap: () => convertMap, - createAggregatedClient: () => createAggregatedClient, - createWaiter: () => createWaiter, - decorateServiceException: () => decorateServiceException, - emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion2, - getArrayIfSingleItem: () => getArrayIfSingleItem, - getChecksumConfiguration: () => getChecksumConfiguration, - getDefaultClientConfiguration: () => getDefaultClientConfiguration, - getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, - getRetryConfiguration: () => getRetryConfiguration, - getSmithyContext: () => getSmithyContext, - getValueFromTextNode: () => getValueFromTextNode, - invalidFunction: () => invalidFunction, - invalidProvider: () => invalidProvider, - isSerializableHeaderValue: () => isSerializableHeaderValue, - loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, - map: () => map2, - normalizeProvider: () => normalizeProvider, - resolveChecksumRuntimeConfig: () => resolveChecksumRuntimeConfig, - resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, - resolveRetryRuntimeConfig: () => resolveRetryRuntimeConfig, - schemaLogFilter: () => schemaLogFilter, - serializeDateTime: () => serializeDateTime, - serializeFloat: () => serializeFloat, - take: () => take, - throwDefaultError: () => throwDefaultError, - waiterServiceDefaults: () => waiterServiceDefaults, - withBaseException: () => withBaseException -}); -var init_client2 = __esm({ - "node_modules/@smithy/core/dist-es/submodules/client/index.js"() { - init_MiddlewareStack(); - init_transport(); - init_transport(); - init_invalidFunction(); - init_invalidProvider(); - init_createWaiter(); - init_waiter(); - init_client(); - init_command(); - init_constants(); - init_create_aggregated_client(); - init_default_error_handler(); - init_defaults_mode(); - init_emitWarningIfUnsupportedVersion2(); - init_exceptions(); - init_defaultExtensionConfiguration(); - init_checksum(); - init_retry(); - init_get_array_if_single_item(); - init_get_value_from_text_node(); - init_is_serializable_header_value(); - init_NoOpLogger(); - init_object_mapping(); - init_schemaLogFilter(); - init_ser_utils(); - init_serde_json(); - } -}); - // node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js var isArrayBuffer; var init_is_array_buffer = __esm({ @@ -22067,10 +20331,10 @@ var init_toUint8Array = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js -var deserializerMiddleware, findHeader2; +var deserializerMiddleware, findHeader; var init_deserializerMiddleware = __esm({ "node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js"() { - init_transport(); + init_protocols(); deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { const { response } = await next(args); try { @@ -22108,9 +20372,9 @@ var init_deserializerMiddleware = __esm({ const headerEntries = Object.entries(headers); error3.$metadata = { httpStatusCode: response.statusCode, - requestId: findHeader2(/^x-[\w-]+-request-?id$/, headerEntries), - extendedRequestId: findHeader2(/^x-[\w-]+-id-2$/, headerEntries), - cfId: findHeader2(/^x-[\w-]+-cf-id$/, headerEntries) + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) }; } } catch (e5) { @@ -22119,7 +20383,7 @@ var init_deserializerMiddleware = __esm({ throw error3; } }; - findHeader2 = (pattern, headers) => { + findHeader = (pattern, headers) => { return (headers.find(([k5]) => { return k5.match(pattern); }) || [void 0, void 0])[1]; @@ -22389,27 +20653,27 @@ var init_getSSOTokenFromFile = __esm({ // node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js var CONFIG_PREFIX_SEPARATOR; -var init_constants2 = __esm({ +var init_constants = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js"() { CONFIG_PREFIX_SEPARATOR = "."; } }); // node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js -var import_types4, getConfigData; +var import_types2, getConfigData; var init_getConfigData = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js"() { - import_types4 = __toESM(require_dist_cjs()); - init_constants2(); + import_types2 = __toESM(require_dist_cjs()); + init_constants(); getConfigData = (data3) => Object.entries(data3).filter(([key]) => { const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); if (indexOfSeparator === -1) { return false; } - return Object.values(import_types4.IniSectionType).includes(key.substring(0, indexOfSeparator)); + return Object.values(import_types2.IniSectionType).includes(key.substring(0, indexOfSeparator)); }).reduce((acc, [key, value]) => { const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === import_types4.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + const updatedKey = key.substring(0, indexOfSeparator) === import_types2.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; acc[updatedKey] = value; return acc; }, { @@ -22441,11 +20705,11 @@ var init_getCredentialsFilepath = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js -var import_types5, prefixKeyRegex, profileNameBlockList, parseIni; +var import_types3, prefixKeyRegex, profileNameBlockList, parseIni; var init_parseIni = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js"() { - import_types5 = __toESM(require_dist_cjs()); - init_constants2(); + import_types3 = __toESM(require_dist_cjs()); + init_constants(); prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; profileNameBlockList = ["__proto__", "profile __proto__"]; parseIni = (iniData) => { @@ -22462,7 +20726,7 @@ var init_parseIni = __esm({ const matches = prefixKeyRegex.exec(sectionName); if (matches) { const [, prefix, , name] = matches; - if (Object.values(import_types5.IniSectionType).includes(prefix)) { + if (Object.values(import_types3.IniSectionType).includes(prefix)) { currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); } } else { @@ -22503,14 +20767,14 @@ var init_readFile = __esm({ import_promises2 = require("node:fs/promises"); filePromises = {}; fileIntercept = {}; - readFile2 = (path4, options) => { - if (fileIntercept[path4] !== void 0) { - return fileIntercept[path4]; + readFile2 = (path3, options) => { + if (fileIntercept[path3] !== void 0) { + return fileIntercept[path3]; } - if (!filePromises[path4] || options?.ignoreCache) { - filePromises[path4] = (0, import_promises2.readFile)(path4, "utf8"); + if (!filePromises[path3] || options?.ignoreCache) { + filePromises[path3] = (0, import_promises2.readFile)(path3, "utf8"); } - return filePromises[path4]; + return filePromises[path3]; }; } }); @@ -22526,7 +20790,7 @@ var init_loadSharedConfigFiles = __esm({ init_getHomeDir(); init_parseIni(); init_readFile(); - init_constants2(); + init_constants(); swallowError = () => ({}); loadSharedConfigFiles = async (init = {}) => { const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; @@ -22557,12 +20821,12 @@ var init_loadSharedConfigFiles = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js -var import_types6, getSsoSessionData; +var import_types4, getSsoSessionData; var init_getSsoSessionData = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js"() { - import_types6 = __toESM(require_dist_cjs()); + import_types4 = __toESM(require_dist_cjs()); init_loadSharedConfigFiles(); - getSsoSessionData = (data3) => Object.entries(data3).filter(([key]) => key.startsWith(import_types6.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); + getSsoSessionData = (data3) => Object.entries(data3).filter(([key]) => key.startsWith(import_types4.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); } }); @@ -22622,8 +20886,8 @@ var init_externalDataInterceptor = __esm({ getFileRecord() { return fileIntercept; }, - interceptFile(path4, contents) { - fileIntercept[path4] = Promise.resolve(contents); + interceptFile(path3, contents) { + fileIntercept[path3] = Promise.resolve(contents); }, getTokenRecord() { return tokenIntercept; @@ -22638,11 +20902,11 @@ var init_externalDataInterceptor = __esm({ // node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/getSelectorName.js function getSelectorName(functionString) { try { - const constants4 = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); - constants4.delete("CONFIG"); - constants4.delete("CONFIG_PREFIX_SEPARATOR"); - constants4.delete("ENV"); - return [...constants4].join(", "); + const constants3 = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); + constants3.delete("CONFIG"); + constants3.delete("CONFIG_PREFIX_SEPARATOR"); + constants3.delete("ENV"); + return [...constants3].join(", "); } catch (e5) { return functionString; } @@ -22852,7 +21116,7 @@ var init_config = __esm({ var validRegions, checkRegion; var init_checkRegion = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js"() { - init_transport(); + init_endpoints(); validRegions = /* @__PURE__ */ new Set(); checkRegion = (region, check = isValidHostLabel) => { if (!validRegions.has(region) && !check(region)) { @@ -22996,7 +21260,7 @@ var init_getRegionInfo = __esm({ // node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js var AWS_EXECUTION_ENV, AWS_REGION_ENV, AWS_DEFAULT_REGION_ENV, ENV_IMDS_DISABLED, DEFAULTS_MODE_OPTIONS, IMDS_REGION_PATH; -var init_constants3 = __esm({ +var init_constants2 = __esm({ "node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js"() { AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; AWS_REGION_ENV = "AWS_REGION"; @@ -23032,7 +21296,7 @@ var init_resolveDefaultsModeConfig = __esm({ init_config(); init_configLoader(); init_memoize(); - init_constants3(); + init_constants2(); init_defaultsModeConfig(); resolveDefaultsModeConfig = ({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => memoize(async () => { const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; @@ -23090,13 +21354,13 @@ var init_resolveDefaultsModeConfig = __esm({ } return { hostname: "169.254.169.254", path: "/" }; }; - imdsHttpGet = async ({ hostname, path: path4 }) => { + imdsHttpGet = async ({ hostname, path: path3 }) => { const { request } = await import("node:http"); return new Promise((resolve, reject) => { const req = request({ method: "GET", hostname: hostname.replace(/^\[(.+)]$/, "$1"), - path: path4, + path: path3, timeout: 1e3, signal: AbortSignal.timeout(1e3) }); @@ -23189,7 +21453,7 @@ var init_config2 = __esm({ init_getProfileName(); init_getSSOTokenFilepath(); init_getSSOTokenFromFile(); - init_constants2(); + init_constants(); init_loadSharedConfigFiles(); init_loadSsoSessionData(); init_parseKnownFiles(); @@ -23345,8 +21609,8 @@ var init_createConfigValueProvider = __esm({ return endpoint.url.href; } if ("hostname" in endpoint) { - const { protocol, hostname, port, path: path4 } = endpoint; - return `${protocol}//${hostname}${port ? ":" + port : ""}${path4}`; + const { protocol, hostname, port, path: path3 } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path3}`; } } return endpoint; @@ -23357,10 +21621,34 @@ var init_createConfigValueProvider = __esm({ } }); +// node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +var toEndpointV1; +var init_toEndpointV1 = __esm({ + "node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js"() { + init_protocols(); + toEndpointV1 = (endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + const v1Endpoint = parseUrl(endpoint.url); + if (endpoint.headers) { + v1Endpoint.headers = {}; + for (const name in endpoint.headers) { + v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", "); + } + } + return v1Endpoint; + } + return endpoint; + } + return parseUrl(endpoint); + }; + } +}); + // node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js var init_toEndpointV12 = __esm({ "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js"() { - init_transport(); + init_toEndpointV1(); } }); @@ -23499,11 +21787,11 @@ function bindGetEndpointPlugin(getEndpointFromConfig2) { } }); } -var serializerMiddlewareOption2, endpointMiddlewareOptions; +var serializerMiddlewareOption, endpointMiddlewareOptions; var init_getEndpointPlugin = __esm({ "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/getEndpointPlugin.js"() { init_endpointMiddleware(); - serializerMiddlewareOption2 = { + serializerMiddlewareOption = { name: "serializerMiddleware", step: "serialize", tags: ["SERIALIZER"], @@ -23515,7 +21803,7 @@ var init_getEndpointPlugin = __esm({ name: "endpointV2Middleware", override: true, relation: "before", - toMiddleware: serializerMiddlewareOption2.name + toMiddleware: serializerMiddlewareOption.name }; } }); @@ -23546,7 +21834,7 @@ function bindResolveEndpointConfig(getEndpointFromConfig2) { } var init_resolveEndpointConfig = __esm({ "node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js"() { - init_transport(); + init_client2(); init_toEndpointV12(); } }); @@ -23761,18 +22049,18 @@ var getAttrPathList; var init_getAttrPathList = __esm({ "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js"() { init_types2(); - getAttrPathList = (path4) => { - const parts = path4.split("."); + getAttrPathList = (path3) => { + const parts = path3.split("."); const pathList = []; for (const part of parts) { const squareBracketIndex = part.indexOf("["); if (squareBracketIndex !== -1) { if (part.indexOf("]") !== part.length - 1) { - throw new EndpointError(`Path: '${path4}' does not end with ']'`); + throw new EndpointError(`Path: '${path3}' does not end with ']'`); } const arrayIndex = part.slice(squareBracketIndex + 1, -1); if (Number.isNaN(parseInt(arrayIndex))) { - throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path4}'`); + throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path3}'`); } if (squareBracketIndex !== 0) { pathList.push(part.slice(0, squareBracketIndex)); @@ -23793,9 +22081,9 @@ var init_getAttr = __esm({ "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js"() { init_types2(); init_getAttrPathList(); - getAttr = (value, path4) => getAttrPathList(path4).reduce((acc, index) => { + getAttr = (value, path3) => getAttrPathList(path3).reduce((acc, index) => { if (typeof acc !== "object") { - throw new EndpointError(`Index '${index}' in '${path4}' not found in '${JSON.stringify(value)}'`); + throw new EndpointError(`Index '${index}' in '${path3}' not found in '${JSON.stringify(value)}'`); } else if (Array.isArray(acc)) { const i5 = parseInt(index); return acc[i5 < 0 ? acc.length + i5 : i5]; @@ -23813,6 +22101,26 @@ var init_isSet = __esm({ } }); +// node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isValidHostLabel.js +var VALID_HOST_LABEL_REGEX, isValidHostLabel; +var init_isValidHostLabel = __esm({ + "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/isValidHostLabel.js"() { + VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); + isValidHostLabel = (value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); + } + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; + } + } + return true; + }; + } +}); + // node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/ite.js function ite(condition, trueValue, falseValue) { return condition ? trueValue : falseValue; @@ -23840,14 +22148,14 @@ var init_isIpAddress = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/parseURL.js -var import_types12, DEFAULT_PORTS, parseURL; +var import_types10, DEFAULT_PORTS, parseURL; var init_parseURL = __esm({ "node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/parseURL.js"() { - import_types12 = __toESM(require_dist_cjs()); + import_types10 = __toESM(require_dist_cjs()); init_isIpAddress(); DEFAULT_PORTS = { - [import_types12.EndpointURLScheme.HTTP]: 80, - [import_types12.EndpointURLScheme.HTTPS]: 443 + [import_types10.EndpointURLScheme.HTTP]: 80, + [import_types10.EndpointURLScheme.HTTPS]: 443 }; parseURL = (value) => { const whatwgURL = (() => { @@ -23856,8 +22164,8 @@ var init_parseURL = __esm({ return value; } if (typeof value === "object" && "hostname" in value) { - const { hostname: hostname2, port, protocol: protocol2 = "", path: path4 = "", query = {} } = value; - const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path4}`); + const { hostname: hostname2, port, protocol: protocol2 = "", path: path3 = "", query = {} } = value; + const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path3}`); url.search = Object.entries(query).map(([k5, v]) => `${k5}=${v}`).join("&"); return url; } @@ -23876,7 +22184,7 @@ var init_parseURL = __esm({ return null; } const scheme = protocol.slice(0, -1); - if (!Object.values(import_types12.EndpointURLScheme).includes(scheme)) { + if (!Object.values(import_types10.EndpointURLScheme).includes(scheme)) { return null; } const isIp = isIpAddress(hostname); @@ -23951,7 +22259,7 @@ var init_lib = __esm({ init_coalesce(); init_getAttr(); init_isSet(); - init_transport(); + init_isValidHostLabel(); init_ite(); init_not(); init_parseURL(); @@ -24451,12 +22759,12 @@ var init_endpoints = __esm({ init_endpointMiddleware(); init_getEndpointPlugin(); init_resolveEndpointConfig(); - init_transport(); + init_toEndpointV1(); init_BinaryDecisionDiagram(); init_EndpointCache(); init_decideEndpoint(); init_isIpAddress(); - init_transport(); + init_isValidHostLabel(); init_customEndpointFunctions(); init_resolveEndpoint(); init_types2(); @@ -24495,23 +22803,23 @@ var init_serializerMiddleware = __esm({ function getSerdePlugin(config, serializer, deserializer) { return { applyToStack: (commandStack) => { - commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption2); - commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption3); + commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); + commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption2); } }; } -var deserializerMiddlewareOption2, serializerMiddlewareOption3; +var deserializerMiddlewareOption, serializerMiddlewareOption2; var init_serdePlugin = __esm({ "node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/serdePlugin.js"() { init_deserializerMiddleware(); init_serializerMiddleware(); - deserializerMiddlewareOption2 = { + deserializerMiddlewareOption = { name: "deserializerMiddleware", step: "deserialize", tags: ["DESERIALIZER"], override: true }; - serializerMiddlewareOption3 = { + serializerMiddlewareOption2 = { name: "serializerMiddleware", step: "serialize", tags: ["SERIALIZER"], @@ -25467,7 +23775,7 @@ __export(serde_exports, { createChecksumStream: () => createChecksumStream2, dateToUtcString: () => dateToUtcString, deserializerMiddleware: () => deserializerMiddleware, - deserializerMiddlewareOption: () => deserializerMiddlewareOption2, + deserializerMiddlewareOption: () => deserializerMiddlewareOption, expectBoolean: () => expectBoolean, expectByte: () => expectByte, expectFloat32: () => expectFloat32, @@ -25506,7 +23814,7 @@ __export(serde_exports, { quoteHeader: () => quoteHeader, sdkStreamMixin: () => sdkStreamMixin2, serializerMiddleware: () => serializerMiddleware, - serializerMiddlewareOption: () => serializerMiddlewareOption3, + serializerMiddlewareOption: () => serializerMiddlewareOption2, splitEvery: () => splitEvery, splitHeader: () => splitHeader, splitStream: () => splitStream2, @@ -25610,6 +23918,93 @@ var init_SerdeContext = __esm({ } }); +// node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/httpRequest.js +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); +} +var HttpRequest; +var init_httpRequest = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/httpRequest.js"() { + HttpRequest = class _HttpRequest { + method; + protocol; + hostname; + port; + path; + query; + headers; + username; + password; + fragment; + body; + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + static clone(request) { + const cloned = new _HttpRequest({ + ...request, + headers: { ...request.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; + } + static isInstance(request) { + if (!request) { + return false; + } + const req = request; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + clone() { + return _HttpRequest.clone(this); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/httpResponse.js +var HttpResponse; +var init_httpResponse = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/httpResponse.js"() { + HttpResponse = class { + statusCode; + reason; + headers; + body; + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } + }; + } +}); + // node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { @@ -26039,13 +24434,13 @@ function __disposeResources(env2) { } return next(); } -function __rewriteRelativeImportExtension(path4, preserveJsx) { - if (typeof path4 === "string" && /^\.\.?\//.test(path4)) { - return path4.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m3, tsx, d5, ext, cm) { +function __rewriteRelativeImportExtension(path3, preserveJsx) { + if (typeof path3 === "string" && /^\.\.?\//.test(path3)) { + return path3.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m3, tsx, d5, ext, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d5 && (!ext || !cm) ? m3 : d5 + ext + "." + cm.toLowerCase() + "js"; }); } - return path4; + return path3; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -27707,8 +26102,9 @@ var HttpProtocol; var init_HttpProtocol = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"() { init_schema(); - init_transport(); init_SerdeContext(); + init_httpRequest(); + init_httpResponse(); HttpProtocol = class extends SerdeContext { options; compositeErrorRegistry; @@ -27856,10 +26252,10 @@ var init_HttpBindingProtocol = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"() { init_schema(); init_serde(); - init_transport(); init_HttpProtocol(); init_collect_stream_body(); init_extended_encode_uri_component(); + init_httpRequest(); HttpBindingProtocol = class extends HttpProtocol { async serializeRequest(operationSchema, _input, context) { const input = _input && typeof _input === "object" ? _input : {}; @@ -27888,11 +26284,11 @@ var init_HttpBindingProtocol = __esm({ const opTraits = translateTraits(operationSchema.traits); if (opTraits.http) { request.method = opTraits.http[0]; - const [path4, search] = opTraits.http[1].split("?"); + const [path3, search] = opTraits.http[1].split("?"); if (request.path == "/") { - request.path = path4; + request.path = path3; } else { - request.path += path4; + request.path += path3; } const traitSearchParams = new URLSearchParams(search ?? ""); for (const [key, value] of traitSearchParams) { @@ -28130,9 +26526,9 @@ var RpcProtocol; var init_RpcProtocol = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js"() { init_schema(); - init_transport(); init_HttpProtocol(); init_collect_stream_body(); + init_httpRequest(); RpcProtocol = class extends HttpProtocol { async serializeRequest(operationSchema, _input, context) { const serializer = this.serializer; @@ -28249,7 +26645,7 @@ function requestBuilder(input, context) { var RequestBuilder; var init_requestBuilder = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"() { - init_transport(); + init_httpRequest(); init_resolve_path(); RequestBuilder = class { input; @@ -28293,8 +26689,8 @@ var init_requestBuilder = __esm({ return this; } p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { - this.resolvePathStack.push((path4) => { - this.path = resolvedPath(path4, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + this.resolvePathStack.push((path3) => { + this.path = resolvedPath(path3, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); }); return this; } @@ -28590,15 +26986,15 @@ var init_HttpInterceptingShapeSerializer = __esm({ }); // node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Field.js -var import_types22, Field; +var import_types20, Field; var init_Field = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/Field.js"() { - import_types22 = __toESM(require_dist_cjs()); + import_types20 = __toESM(require_dist_cjs()); Field = class { name; kind; values; - constructor({ name, kind = import_types22.FieldPosition.HEADER, values = [] }) { + constructor({ name, kind = import_types20.FieldPosition.HEADER, values = [] }) { this.name = name; this.kind = kind; this.values = values; @@ -28649,6 +27045,16 @@ var init_Fields = __esm({ } }); +// node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/isValidHostname.js +function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); +} +var init_isValidHostname = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/isValidHostname.js"() { + } +}); + // node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js var getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig; var init_httpExtensionConfiguration = __esm({ @@ -28703,7 +27109,7 @@ function contentLengthMiddleware(bodyLengthChecker) { var CONTENT_LENGTH_HEADER, contentLengthMiddlewareOptions, getContentLengthPlugin; var init_contentLengthMiddleware = __esm({ "node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js"() { - init_transport(); + init_httpRequest(); CONTENT_LENGTH_HEADER = "content-length"; contentLengthMiddlewareOptions = { step: "build", @@ -28763,6 +27169,58 @@ var init_buildQueryString = __esm({ } }); +// node_modules/@smithy/core/dist-es/submodules/protocols/querystring-parser/parseQueryString.js +function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } + } + return query; +} +var init_parseQueryString = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/querystring-parser/parseQueryString.js"() { + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/url-parser/parseUrl.js +var parseUrl; +var init_parseUrl = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/url-parser/parseUrl.js"() { + init_parseQueryString(); + parseUrl = (url) => { + if (typeof url === "string") { + return parseUrl(new URL(url)); + } + const { hostname, pathname, port, protocol, search } = url; + let query; + if (search) { + query = parseQueryString(search); + } + return { + hostname, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; + }; + } +}); + // node_modules/@smithy/core/dist-es/submodules/protocols/index.js var protocols_exports = {}; __export(protocols_exports, { @@ -28813,16 +27271,1546 @@ var init_protocols = __esm({ init_SerdeContext(); init_Field(); init_Fields(); - init_transport(); - init_transport(); - init_transport(); + init_httpRequest(); + init_httpResponse(); + init_isValidHostname(); init_httpExtensionConfiguration(); init_contentLengthMiddleware(); init_escape_uri(); init_escape_uri_path(); init_buildQueryString(); - init_transport(); - init_transport(); + init_parseQueryString(); + init_parseUrl(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js +var operation; +var init_operation = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js"() { + operation = (namespace, name, traits, input, output) => ({ + name, + namespace, + traits, + input, + output + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +var schemaDeserializationMiddleware, findHeader2; +var init_schemaDeserializationMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() { + init_client2(); + init_protocols(); + init_operation(); + schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { + const { response } = await next(args); + const { operationSchema } = getSmithyContext(context); + const [, ns, n3, t, i5, o2] = operationSchema ?? []; + try { + const parsed = await config.protocol.deserializeResponse(operation(ns, n3, t, i5, o2), { + ...config, + ...context + }, response); + return { + response, + output: parsed + }; + } catch (error3) { + Object.defineProperty(error3, "$response", { + value: response, + enumerable: false, + writable: false, + configurable: false + }); + if (!("$metadata" in error3)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error3.message += "\n " + hint; + } catch (e5) { + if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } else { + context.logger?.warn?.(hint); + } + } + if (typeof error3.$responseBodyText !== "undefined") { + if (error3.$response) { + error3.$response.body = error3.$responseBodyText; + } + } + try { + if (HttpResponse.isInstance(response)) { + const { headers = {} } = response; + const headerEntries = Object.entries(headers); + error3.$metadata = { + httpStatusCode: response.statusCode, + requestId: findHeader2(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader2(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader2(/^x-[\w-]+-cf-id$/, headerEntries) + }; + } + } catch (e5) { + } + } + throw error3; + } + }; + findHeader2 = (pattern, headers) => { + return (headers.find(([k5]) => { + return k5.match(pattern); + }) || [void 0, void 0])[1]; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +var schemaSerializationMiddleware; +var init_schemaSerializationMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() { + init_client2(); + init_endpoints(); + init_operation(); + schemaSerializationMiddleware = (config) => (next, context) => async (args) => { + const { operationSchema } = getSmithyContext(context); + const [, ns, n3, t, i5, o2] = operationSchema ?? []; + const endpoint = context.endpointV2 ? async () => toEndpointV1(context.endpointV2) : config.endpoint; + const request = await config.protocol.serializeRequest(operation(ns, n3, t, i5, o2), args.input, { + ...config, + ...context, + endpoint + }); + return next({ + ...args, + request + }); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js +function getSchemaSerdePlugin(config) { + return { + applyToStack: (commandStack) => { + commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption3); + commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption2); + config.protocol.setSerdeContext(config); + } + }; +} +var deserializerMiddlewareOption2, serializerMiddlewareOption3; +var init_getSchemaSerdePlugin = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() { + init_schemaDeserializationMiddleware(); + init_schemaSerializationMiddleware(); + deserializerMiddlewareOption2 = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true + }; + serializerMiddlewareOption3 = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +var Schema; +var init_Schema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() { + Schema = class { + name; + namespace; + traits; + static assign(instance, values) { + const schema = Object.assign(instance, values); + return schema; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const list2 = lhs; + return list2.symbol === this.symbol; + } + return isPrototype; + } + getName() { + return this.namespace + "#" + this.name; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +var ListSchema, list; +var init_ListSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js"() { + init_Schema(); + ListSchema = class _ListSchema extends Schema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/lis"); + name; + traits; + valueSchema; + symbol = _ListSchema.symbol; + }; + list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema(), { + name, + namespace, + traits, + valueSchema + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +var MapSchema, map; +var init_MapSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js"() { + init_Schema(); + MapSchema = class _MapSchema extends Schema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/map"); + name; + traits; + keySchema; + valueSchema; + symbol = _MapSchema.symbol; + }; + map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema(), { + name, + namespace, + traits, + keySchema, + valueSchema + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +var OperationSchema, op; +var init_OperationSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js"() { + init_Schema(); + OperationSchema = class _OperationSchema extends Schema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/ope"); + name; + traits; + input; + output; + symbol = _OperationSchema.symbol; + }; + op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema(), { + name, + namespace, + traits, + input, + output + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +var StructureSchema, struct; +var init_StructureSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() { + init_Schema(); + StructureSchema = class _StructureSchema extends Schema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/str"); + name; + traits; + memberNames; + memberList; + symbol = _StructureSchema.symbol; + }; + struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), { + name, + namespace, + traits, + memberNames, + memberList + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js +var ErrorSchema, error2; +var init_ErrorSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() { + init_Schema(); + init_StructureSchema(); + ErrorSchema = class _ErrorSchema extends StructureSchema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/err"); + ctor; + symbol = _ErrorSchema.symbol; + }; + error2 = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { + name, + namespace, + traits, + memberNames, + memberList, + ctor: null + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +function translateTraits(indicator) { + if (typeof indicator === "object") { + return indicator; + } + indicator = indicator | 0; + if (traitsCache[indicator]) { + return traitsCache[indicator]; + } + const traits = {}; + let i5 = 0; + for (const trait of [ + "httpLabel", + "idempotent", + "idempotencyToken", + "sensitive", + "httpPayload", + "httpResponseCode", + "httpQueryParams" + ]) { + if ((indicator >> i5++ & 1) === 1) { + traits[trait] = 1; + } + } + return traitsCache[indicator] = traits; +} +var traitsCache; +var init_translateTraits = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js"() { + traitsCache = []; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +function member(memberSchema, memberName) { + if (memberSchema instanceof NormalizedSchema) { + return Object.assign(memberSchema, { + memberName, + _isMemberSchema: true + }); + } + const internalCtorAccess = NormalizedSchema; + return new internalCtorAccess(memberSchema, memberName); +} +var anno, simpleSchemaCacheN, simpleSchemaCacheS, NormalizedSchema, isMemberSchema, isStaticSchema; +var init_NormalizedSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() { + init_deref(); + init_translateTraits(); + anno = { + it: /* @__PURE__ */ Symbol.for("@smithy/nor-struct-it"), + ns: /* @__PURE__ */ Symbol.for("@smithy/ns") + }; + simpleSchemaCacheN = []; + simpleSchemaCacheS = {}; + NormalizedSchema = class _NormalizedSchema { + ref; + memberName; + static symbol = /* @__PURE__ */ Symbol.for("@smithy/nor"); + symbol = _NormalizedSchema.symbol; + name; + schema; + _isMemberSchema; + traits; + memberTraits; + normalizedTraits; + constructor(ref, memberName) { + this.ref = ref; + this.memberName = memberName; + const traitStack = []; + let _ref = ref; + let schema = ref; + this._isMemberSchema = false; + while (isMemberSchema(_ref)) { + traitStack.push(_ref[1]); + _ref = _ref[0]; + schema = deref(_ref); + this._isMemberSchema = true; + } + if (traitStack.length > 0) { + this.memberTraits = {}; + for (let i5 = traitStack.length - 1; i5 >= 0; --i5) { + const traitSet = traitStack[i5]; + Object.assign(this.memberTraits, translateTraits(traitSet)); + } + } else { + this.memberTraits = 0; + } + if (schema instanceof _NormalizedSchema) { + const computedMemberTraits = this.memberTraits; + Object.assign(this, schema); + this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits()); + this.normalizedTraits = void 0; + this.memberName = memberName ?? schema.memberName; + return; + } + this.schema = deref(schema); + if (isStaticSchema(this.schema)) { + this.name = `${this.schema[1]}#${this.schema[2]}`; + this.traits = this.schema[3]; + } else { + this.name = this.memberName ?? String(schema); + this.traits = 0; + } + if (this._isMemberSchema && !memberName) { + throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); + } + } + static [Symbol.hasInstance](lhs) { + const isPrototype = this.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const ns = lhs; + return ns.symbol === this.symbol; + } + return isPrototype; + } + static of(ref) { + const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null; + if (typeof ref === "number") { + if (simpleSchemaCacheN[ref]) { + return simpleSchemaCacheN[ref]; + } + } else if (typeof ref === "string") { + if (simpleSchemaCacheS[ref]) { + return simpleSchemaCacheS[ref]; + } + } else if (keyAble) { + if (ref[anno.ns]) { + return ref[anno.ns]; + } + } + const sc = deref(ref); + if (sc instanceof _NormalizedSchema) { + return sc; + } + if (isMemberSchema(sc)) { + const [ns2, traits] = sc; + if (ns2 instanceof _NormalizedSchema) { + Object.assign(ns2.getMergedTraits(), translateTraits(traits)); + return ns2; + } + throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`); + } + const ns = new _NormalizedSchema(sc); + if (keyAble) { + return ref[anno.ns] = ns; + } + if (typeof sc === "string") { + return simpleSchemaCacheS[sc] = ns; + } + if (typeof sc === "number") { + return simpleSchemaCacheN[sc] = ns; + } + return ns; + } + getSchema() { + const sc = this.schema; + if (Array.isArray(sc) && sc[0] === 0) { + return sc[4]; + } + return sc; + } + getName(withNamespace = false) { + const { name } = this; + const short = !withNamespace && name && name.includes("#"); + return short ? name.split("#")[1] : name || void 0; + } + getMemberName() { + return this.memberName; + } + isMemberSchema() { + return this._isMemberSchema; + } + isListSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1; + } + isMapSchema() { + const sc = this.getSchema(); + return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2; + } + isStructSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + const id = sc[0]; + return id === 3 || id === -3 || id === 4; + } + isUnionSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + return sc[0] === 4; + } + isBlobSchema() { + const sc = this.getSchema(); + return sc === 21 || sc === 42; + } + isTimestampSchema() { + const sc = this.getSchema(); + return typeof sc === "number" && sc >= 4 && sc <= 7; + } + isUnitSchema() { + return this.getSchema() === "unit"; + } + isDocumentSchema() { + return this.getSchema() === 15; + } + isStringSchema() { + return this.getSchema() === 0; + } + isBooleanSchema() { + return this.getSchema() === 2; + } + isNumericSchema() { + return this.getSchema() === 1; + } + isBigIntegerSchema() { + return this.getSchema() === 17; + } + isBigDecimalSchema() { + return this.getSchema() === 19; + } + isStreaming() { + const { streaming } = this.getMergedTraits(); + return !!streaming || this.getSchema() === 42; + } + isIdempotencyToken() { + return !!this.getMergedTraits().idempotencyToken; + } + getMergedTraits() { + return this.normalizedTraits ?? (this.normalizedTraits = { + ...this.getOwnTraits(), + ...this.getMemberTraits() + }); + } + getMemberTraits() { + return translateTraits(this.memberTraits); + } + getOwnTraits() { + return translateTraits(this.traits); + } + getKeySchema() { + const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()]; + if (!isDoc && !isMap) { + throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`); + } + const schema = this.getSchema(); + const memberSchema = isDoc ? 15 : schema[4] ?? 0; + return member([memberSchema, 0], "key"); + } + getValueSchema() { + const sc = this.getSchema(); + const [isDoc, isMap, isList] = [this.isDocumentSchema(), this.isMapSchema(), this.isListSchema()]; + const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0; + if (memberSchema != null) { + return member([memberSchema, 0], isMap ? "value" : "member"); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`); + } + getMemberSchema(memberName) { + const struct2 = this.getSchema(); + if (this.isStructSchema() && struct2[4].includes(memberName)) { + const i5 = struct2[4].indexOf(memberName); + const memberSchema = struct2[5][i5]; + return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); + } + if (this.isDocumentSchema()) { + return member([15, 0], memberName); + } + throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`); + } + getMemberSchemas() { + const buffer = {}; + try { + for (const [k5, v] of this.structIterator()) { + buffer[k5] = v; + } + } catch (ignored) { + } + return buffer; + } + getEventStreamMember() { + if (this.isStructSchema()) { + for (const [memberName, memberSchema] of this.structIterator()) { + if (memberSchema.isStreaming() && memberSchema.isStructSchema()) { + return memberName; + } + } + } + return ""; + } + *structIterator() { + if (this.isUnitSchema()) { + return; + } + if (!this.isStructSchema()) { + throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); + } + const struct2 = this.getSchema(); + const z = struct2[4].length; + let it = struct2[anno.it]; + if (it && z === it.length) { + yield* it; + return; + } + it = Array(z); + for (let i5 = 0; i5 < z; ++i5) { + const k5 = struct2[4][i5]; + const v = member([struct2[5][i5], 0], k5); + yield it[i5] = [k5, v]; + } + struct2[anno.it] = it; + } + }; + isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; + isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +var SimpleSchema, sim, simAdapter; +var init_SimpleSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() { + init_Schema(); + SimpleSchema = class _SimpleSchema extends Schema { + static symbol = /* @__PURE__ */ Symbol.for("@smithy/sim"); + name; + schemaRef; + traits; + symbol = _SimpleSchema.symbol; + }; + sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { + name, + namespace, + traits, + schemaRef + }); + simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { + name, + namespace, + traits, + schemaRef + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js +var SCHEMA; +var init_sentinels = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"() { + SCHEMA = { + BLOB: 21, + STREAMING_BLOB: 42, + BOOLEAN: 2, + STRING: 0, + NUMERIC: 1, + BIG_INTEGER: 17, + BIG_DECIMAL: 19, + DOCUMENT: 15, + TIMESTAMP_DEFAULT: 4, + TIMESTAMP_DATE_TIME: 5, + TIMESTAMP_HTTP_DATE: 6, + TIMESTAMP_EPOCH_SECONDS: 7, + LIST_MODIFIER: 64, + MAP_MODIFIER: 128 + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +var TypeRegistry; +var init_TypeRegistry = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() { + TypeRegistry = class _TypeRegistry { + namespace; + schemas; + exceptions; + static registries = /* @__PURE__ */ new Map(); + constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) { + this.namespace = namespace; + this.schemas = schemas; + this.exceptions = exceptions; + } + static for(namespace) { + if (!_TypeRegistry.registries.has(namespace)) { + _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace)); + } + return _TypeRegistry.registries.get(namespace); + } + copyFrom(other) { + const { schemas, exceptions } = this; + for (const [k5, v] of other.schemas) { + if (!schemas.has(k5)) { + schemas.set(k5, v); + } + } + for (const [k5, v] of other.exceptions) { + if (!exceptions.has(k5)) { + exceptions.set(k5, v); + } + } + } + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + for (const r5 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) { + r5.schemas.set(qualifiedName, schema); + } + } + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + if (!shapeId.includes("#")) { + const suffix = "#" + shapeId; + const candidates = []; + for (const [shapeId2, schema] of this.schemas.entries()) { + if (shapeId2.endsWith(suffix)) { + candidates.push(schema); + } + } + if (candidates.length === 1) { + return candidates[0]; + } + } + throw new Error(`@smithy/core/schema - schema not found for ${id}`); + } + return this.schemas.get(id); + } + registerError(es, ctor) { + const $error = es; + const ns = $error[1]; + for (const r5 of [this, _TypeRegistry.for(ns)]) { + r5.schemas.set(ns + "#" + $error[2], $error); + r5.exceptions.set($error, ctor); + } + } + getErrorCtor(es) { + const $error = es; + if (this.exceptions.has($error)) { + return this.exceptions.get($error); + } + const registry = _TypeRegistry.for($error[1]); + return registry.exceptions.get($error); + } + getBaseException() { + for (const exceptionKey of this.exceptions.keys()) { + if (Array.isArray(exceptionKey)) { + const [, ns, name] = exceptionKey; + const id = ns + "#" + name; + if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { + return exceptionKey; + } + } + } + return void 0; + } + find(predicate) { + for (const schema of this.schemas.values()) { + if (predicate(schema)) { + return schema; + } + } + return void 0; + } + clear() { + this.schemas.clear(); + this.exceptions.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/index.js +var schema_exports = {}; +__export(schema_exports, { + ErrorSchema: () => ErrorSchema, + ListSchema: () => ListSchema, + MapSchema: () => MapSchema, + NormalizedSchema: () => NormalizedSchema, + OperationSchema: () => OperationSchema, + SCHEMA: () => SCHEMA, + Schema: () => Schema, + SimpleSchema: () => SimpleSchema, + StructureSchema: () => StructureSchema, + TypeRegistry: () => TypeRegistry, + deref: () => deref, + deserializerMiddlewareOption: () => deserializerMiddlewareOption2, + error: () => error2, + getSchemaSerdePlugin: () => getSchemaSerdePlugin, + isStaticSchema: () => isStaticSchema, + list: () => list, + map: () => map, + op: () => op, + operation: () => operation, + serializerMiddlewareOption: () => serializerMiddlewareOption3, + sim: () => sim, + simAdapter: () => simAdapter, + simpleSchemaCacheN: () => simpleSchemaCacheN, + simpleSchemaCacheS: () => simpleSchemaCacheS, + struct: () => struct, + traitsCache: () => traitsCache, + translateTraits: () => translateTraits +}); +var init_schema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/index.js"() { + init_deref(); + init_getSchemaSerdePlugin(); + init_ListSchema(); + init_MapSchema(); + init_OperationSchema(); + init_operation(); + init_ErrorSchema(); + init_NormalizedSchema(); + init_Schema(); + init_SimpleSchema(); + init_StructureSchema(); + init_sentinels(); + init_translateTraits(); + init_TypeRegistry(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +function schemaLogFilter(schema, data3) { + if (data3 == null) { + return data3; + } + const ns = NormalizedSchema.of(schema); + if (ns.getMergedTraits().sensitive) { + return SENSITIVE_STRING; + } + if (ns.isListSchema()) { + const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isMapSchema()) { + const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING; + } + } else if (ns.isStructSchema() && typeof data3 === "object") { + const object = data3; + const newObject = {}; + for (const [member2, memberNs] of ns.structIterator()) { + if (object[member2] != null) { + newObject[member2] = schemaLogFilter(memberNs, object[member2]); + } + } + return newObject; + } + return data3; +} +var SENSITIVE_STRING; +var init_schemaLogFilter = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js"() { + init_schema(); + SENSITIVE_STRING = "***SensitiveInformation***"; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +var import_types21, Command2, ClassBuilder; +var init_command = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js"() { + import_types21 = __toESM(require_dist_cjs()); + init_MiddlewareStack(); + init_schemaLogFilter(); + Command2 = class { + middlewareStack = constructStack(); + schema; + static classBuilder() { + return new ClassBuilder(); + } + resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger: logger2 } = configuration; + const handlerExecutionContext = { + logger: logger2, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [import_types21.SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + let requestOptions = options ?? {}; + if (smithyContext.eventStream) { + requestOptions = { + isEventStream: true, + ...requestOptions + }; + } + return stack.resolve((request) => requestHandler.handle(request.request, requestOptions), handlerExecutionContext); + } + }; + ClassBuilder = class { + _init = () => { + }; + _ep = {}; + _middlewareFn = () => []; + _commandName = ""; + _clientName = ""; + _additionalContext = {}; + _smithyContext = {}; + _inputFilterSensitiveLog = void 0; + _outputFilterSensitiveLog = void 0; + _serializer = null; + _deserializer = null; + _operationSchema; + init(cb) { + this._init = cb; + } + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + s(service, operation2, smithyContext = {}) { + this._smithyContext = { + service, + operation: operation2, + ...smithyContext + }; + return this; + } + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + ser(serializer) { + this._serializer = serializer; + return this; + } + de(deserializer) { + this._deserializer = deserializer; + return this; + } + sc(operation2) { + this._operationSchema = operation2; + this._smithyContext.operationSchema = operation2; + return this; + } + build() { + const closure = this; + let CommandRef; + return CommandRef = class extends Command2 { + input; + static getEndpointParameterInstructions() { + return closure._ep; + } + constructor(...[input]) { + super(); + this.input = input ?? {}; + closure._init(this); + this.schema = closure._operationSchema; + } + resolveMiddleware(stack, configuration, options) { + const op2 = closure._operationSchema; + const input = op2?.[4] ?? op2?.input; + const output = op2?.[5] ?? op2?.output; + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, input) : (_) => _), + outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op2 ? schemaLogFilter.bind(null, output) : (_) => _), + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); + } + serialize = closure._serializer; + deserialize = closure._deserializer; + }; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js +var SENSITIVE_STRING2; +var init_constants3 = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/constants.js"() { + SENSITIVE_STRING2 = "***SensitiveInformation***"; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +var createAggregatedClient; +var init_create_aggregated_client = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js"() { + createAggregatedClient = (commands5, Client3, options) => { + for (const [command, CommandCtor] of Object.entries(commands5)) { + const methodImpl = async function(args, optionsOrCb, cb) { + const command2 = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command2, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command2, optionsOrCb || {}, cb); + } else { + return this.send(command2, optionsOrCb); + } + }; + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client3.prototype[methodName] = methodImpl; + } + const { paginators = {}, waiters = {} } = options ?? {}; + for (const [paginatorName, paginatorFn] of Object.entries(paginators)) { + if (Client3.prototype[paginatorName] === void 0) { + Client3.prototype[paginatorName] = function(commandInput = {}, paginationConfiguration, ...rest) { + return paginatorFn({ + ...paginationConfiguration, + client: this + }, commandInput, ...rest); + }; + } + } + for (const [waiterName, waiterFn] of Object.entries(waiters)) { + if (Client3.prototype[waiterName] === void 0) { + Client3.prototype[waiterName] = async function(commandInput = {}, waiterConfiguration, ...rest) { + let config = waiterConfiguration; + if (typeof waiterConfiguration === "number") { + config = { + maxWaitTime: waiterConfiguration + }; + } + return waiterFn({ + ...config, + client: this + }, commandInput, ...rest); + }; + } + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +var ServiceException, decorateServiceException; +var init_exceptions = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js"() { + ServiceException = class _ServiceException extends Error { + $fault; + $response; + $retryable; + $metadata; + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } + static isInstance(value) { + if (!value) + return false; + const candidate = value; + return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); + } + static [Symbol.hasInstance](instance) { + if (!instance) + return false; + const candidate = instance; + if (this === _ServiceException) { + return _ServiceException.isInstance(instance); + } + if (_ServiceException.isInstance(instance)) { + if (candidate.name && this.name) { + return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; + } + return this.prototype.isPrototypeOf(instance); + } + return false; + } + }; + decorateServiceException = (exception, additions = {}) => { + Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k5, v]) => { + if (exception[k5] == void 0 || exception[k5] === "") { + exception[k5] = v; + } + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js +var throwDefaultError, withBaseException, deserializeMetadata; +var init_default_error_handler = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/default-error-handler.js"() { + init_exceptions(); + throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; + const response = new exceptionCtor({ + name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata + }); + throw decorateServiceException(response, parsedBody); + }; + withBaseException = (ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; + }; + deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js +var loadConfigsForDefaultMode; +var init_defaults_mode = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/defaults-mode.js"() { + loadConfigsForDefaultMode = (mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100 + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 3e4 + }; + default: + return {}; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js +var warningEmitted, emitWarningIfUnsupportedVersion2; +var init_emitWarningIfUnsupportedVersion2 = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/emitWarningIfUnsupportedVersion.js"() { + warningEmitted = false; + emitWarningIfUnsupportedVersion2 = (version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { + warningEmitted = true; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +var import_types22, knownAlgorithms, getChecksumConfiguration, resolveChecksumRuntimeConfig; +var init_checksum = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js"() { + import_types22 = __toESM(require_dist_cjs()); + knownAlgorithms = Object.values(import_types22.AlgorithmId); + getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in import_types22.AlgorithmId) { + const algorithmId = import_types22.AlgorithmId[id]; + if (runtimeConfig[algorithmId] === void 0) { + continue; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); + } + for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) { + checksumAlgorithms.push({ + algorithmId: () => id, + checksumConstructor: () => ChecksumCtor + }); + } + return { + addChecksumAlgorithm(algo) { + runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {}; + const id = algo.algorithmId(); + const ctor = algo.checksumConstructor(); + if (knownAlgorithms.includes(id)) { + runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor; + } else { + runtimeConfig.checksumAlgorithms[id] = ctor; + } + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + } + }; + }; + resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + const id = checksumAlgorithm.algorithmId(); + if (knownAlgorithms.includes(id)) { + runtimeConfig[id] = checksumAlgorithm.checksumConstructor(); + } + }); + return runtimeConfig; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js +var getRetryConfiguration, resolveRetryRuntimeConfig; +var init_retry = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/retry.js"() { + getRetryConfiguration = (runtimeConfig) => { + return { + setRetryStrategy(retryStrategy) { + runtimeConfig.retryStrategy = retryStrategy; + }, + retryStrategy() { + return runtimeConfig.retryStrategy; + } + }; + }; + resolveRetryRuntimeConfig = (retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js +var getDefaultExtensionConfiguration, getDefaultClientConfiguration, resolveDefaultRuntimeConfig; +var init_defaultExtensionConfiguration = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.js"() { + init_checksum(); + init_retry(); + getDefaultExtensionConfiguration = (runtimeConfig) => { + return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); + }; + getDefaultClientConfiguration = getDefaultExtensionConfiguration; + resolveDefaultRuntimeConfig = (config) => { + return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config)); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js +var getArrayIfSingleItem; +var init_get_array_if_single_item = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-array-if-single-item.js"() { + getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +var getValueFromTextNode; +var init_get_value_from_text_node = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js"() { + getValueFromTextNode = (obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode(obj[key]); + } + } + return obj; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js +var isSerializableHeaderValue; +var init_is_serializable_header_value = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/is-serializable-header-value.js"() { + isSerializableHeaderValue = (value) => { + return value != null; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js +var NoOpLogger; +var init_NoOpLogger = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/NoOpLogger.js"() { + NoOpLogger = class { + trace() { + } + debug() { + } + info() { + } + warn() { + } + error() { + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +function map2(arg0, arg1, arg2) { + let target; + let filter; + let instructions; + if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { + target = {}; + instructions = arg0; + } else { + target = arg0; + if (typeof arg1 === "function") { + filter = arg1; + instructions = arg2; + return mapWithFilter(target, filter, instructions); + } else { + instructions = arg1; + } + } + for (const key of Object.keys(instructions)) { + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; + } + applyInstruction(target, null, instructions, key); + } + return target; +} +var convertMap, take, mapWithFilter, applyInstruction, nonNullish, pass; +var init_object_mapping = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js"() { + convertMap = (target) => { + const output = {}; + for (const [k5, v] of Object.entries(target || {})) { + output[k5] = [, v]; + } + return output; + }; + take = (source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; + }; + mapWithFilter = (target, filter, instructions) => { + return map2(target, Object.entries(instructions).reduce((_instructions, [key, value]) => { + if (Array.isArray(value)) { + _instructions[key] = value; + } else { + if (typeof value === "function") { + _instructions[key] = [filter, value()]; + } else { + _instructions[key] = [filter, value]; + } + } + return _instructions; + }, {})); + }; + applyInstruction = (target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; + } + const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; + if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) { + target[targetKey] = valueFn(source[sourceKey]); + } + return; + } + let [filter, value] = instructions[targetKey]; + if (typeof value === "function") { + let _value; + const defaultFilterPassed = filter === void 0 && (_value = value()) != null; + const customFilterPassed = typeof filter === "function" && !!filter(void 0) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed) { + target[targetKey] = _value; + } else if (customFilterPassed) { + target[targetKey] = value(); + } + } else { + const defaultFilterPassed = filter === void 0 && value != null; + const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter; + if (defaultFilterPassed || customFilterPassed) { + target[targetKey] = value; + } + } + }; + nonNullish = (_) => _ != null; + pass = (_) => _; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js +var serializeFloat, serializeDateTime; +var init_ser_utils = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/ser-utils.js"() { + serializeFloat = (value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } + }; + serializeDateTime = (date2) => date2.toISOString().replace(".000Z", "Z"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +var _json; +var init_serde_json = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js"() { + _json = (obj) => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_) => _ != null).map(_json); + } + if (typeof obj === "object") { + const target = {}; + for (const key of Object.keys(obj)) { + if (obj[key] == null) { + continue; + } + target[key] = _json(obj[key]); + } + return target; + } + return obj; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/client/index.js +var client_exports = {}; +__export(client_exports, { + AlgorithmId: () => import_types22.AlgorithmId, + Client: () => Client, + Command: () => Command2, + NoOpLogger: () => NoOpLogger, + SENSITIVE_STRING: () => SENSITIVE_STRING2, + ServiceException: () => ServiceException, + WaiterState: () => WaiterState, + _json: () => _json, + checkExceptions: () => checkExceptions, + constructStack: () => constructStack, + convertMap: () => convertMap, + createAggregatedClient: () => createAggregatedClient, + createWaiter: () => createWaiter, + decorateServiceException: () => decorateServiceException, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion2, + getArrayIfSingleItem: () => getArrayIfSingleItem, + getChecksumConfiguration: () => getChecksumConfiguration, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration, + getRetryConfiguration: () => getRetryConfiguration, + getSmithyContext: () => getSmithyContext, + getValueFromTextNode: () => getValueFromTextNode, + invalidFunction: () => invalidFunction, + invalidProvider: () => invalidProvider, + isSerializableHeaderValue: () => isSerializableHeaderValue, + loadConfigsForDefaultMode: () => loadConfigsForDefaultMode, + map: () => map2, + normalizeProvider: () => normalizeProvider, + resolveChecksumRuntimeConfig: () => resolveChecksumRuntimeConfig, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig, + resolveRetryRuntimeConfig: () => resolveRetryRuntimeConfig, + schemaLogFilter: () => schemaLogFilter, + serializeDateTime: () => serializeDateTime, + serializeFloat: () => serializeFloat, + take: () => take, + throwDefaultError: () => throwDefaultError, + waiterServiceDefaults: () => waiterServiceDefaults, + withBaseException: () => withBaseException +}); +var init_client2 = __esm({ + "node_modules/@smithy/core/dist-es/submodules/client/index.js"() { + init_MiddlewareStack(); + init_getSmithyContext(); + init_normalizeProvider(); + init_invalidFunction(); + init_invalidProvider(); + init_createWaiter(); + init_waiter(); + init_client(); + init_command(); + init_constants3(); + init_create_aggregated_client(); + init_default_error_handler(); + init_defaults_mode(); + init_emitWarningIfUnsupportedVersion2(); + init_exceptions(); + init_defaultExtensionConfiguration(); + init_checksum(); + init_retry(); + init_get_array_if_single_item(); + init_get_value_from_text_node(); + init_is_serializable_header_value(); + init_NoOpLogger(); + init_object_mapping(); + init_schemaLogFilter(); + init_ser_utils(); + init_serde_json(); } }); @@ -28857,7 +28845,7 @@ var init_constants4 = __esm({ TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; - NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND", "EAI_AGAIN"]; + NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; } }); @@ -29019,6 +29007,9 @@ function bindRetryMiddleware(isStreamingPayload2) { try { retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); } catch (refreshError) { + if (typeof refreshError.$backoff === "number") { + await cooldown(refreshError.$backoff); + } if (!lastError.$metadata) { lastError.$metadata = {}; } @@ -29028,10 +29019,8 @@ function bindRetryMiddleware(isStreamingPayload2) { } attempts = retryToken.getRetryCount(); const delay = retryToken.getRetryDelay(); - totalRetryDelay += (retryToken?.$retryLog?.acquisitionDelay ?? 0) + delay; - if (delay > 0) { - await cooldown(delay); - } + totalRetryDelay += delay; + await cooldown(delay); } } } else { @@ -29266,9 +29255,6 @@ var init_DefaultRetryToken = __esm({ count; cost; longPoll; - $retryLog = { - acquisitionDelay: 0 - }; constructor(delay, count, cost, longPoll) { this.delay = delay; this.count = count; @@ -29320,8 +29306,8 @@ var init_StandardRetryStrategy = __esm({ }; StandardRetryStrategy = class { mode = RETRY_MODES.STANDARD; - retryBackoffStrategy; capacity = INITIAL_RETRY_TOKENS; + retryBackoffStrategy; maxAttemptsProvider; baseDelay; constructor(arg1) { @@ -29355,17 +29341,13 @@ var init_StandardRetryStrategy = __esm({ retryDelay = Math.max(delayFromErrorType, Math.min(errorInfo.retryAfterHint.getTime() - Date.now(), delayFromErrorType + 5e3)); } if (!shouldRetry) { - const longPollBackoff = Retry.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0; - if (longPollBackoff > 0) { - await new Promise((r5) => setTimeout(r5, longPollBackoff)); - } + throw Object.assign(new Error("No retry token available"), { + $backoff: Retry.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0 + }); } else { const capacityCost = this.getCapacityCost(errorType); this.capacity -= capacityCost; - const nextToken = new DefaultRetryToken(0, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false); - await new Promise((r5) => setTimeout(r5, retryDelay)); - nextToken.$retryLog.acquisitionDelay = retryDelay; - return nextToken; + return new DefaultRetryToken(retryDelay, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false); } } throw new Error("No retry token available"); @@ -29460,10 +29442,11 @@ var init_ConfiguredRetryStrategy = __esm({ } else { this.computeNextBackoffDelay = computeNextBackoffDelay; } - this.retryBackoffStrategy.computeNextBackoffDelay = (completedAttempt) => { - const nextAttempt = completedAttempt + 1; - return this.computeNextBackoffDelay(nextAttempt); - }; + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); + return token; } }; } @@ -29663,7 +29646,6 @@ var init_configurations = __esm({ init_AdaptiveRetryStrategy(); init_StandardRetryStrategy(); init_config3(); - init_retries_2026_config(); ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; CONFIG_MAX_ATTEMPTS = "max_attempts"; NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { @@ -29689,27 +29671,13 @@ var init_configurations = __esm({ }, default: DEFAULT_MAX_ATTEMPTS }; - resolveRetryConfig = (input, defaults) => { + resolveRetryConfig = (input) => { const { retryStrategy, retryMode } = input; - const { defaultMaxAttempts = DEFAULT_MAX_ATTEMPTS, defaultBaseDelay = Retry.delay() } = defaults ?? {}; - const maxAttemptsProvider = normalizeProvider(input.maxAttempts ?? defaultMaxAttempts); + const maxAttempts = normalizeProvider(input.maxAttempts ?? DEFAULT_MAX_ATTEMPTS); let controller = retryStrategy ? Promise.resolve(retryStrategy) : void 0; - const getDefault = async () => { - const maxAttempts = await maxAttemptsProvider(); - const adaptive = await normalizeProvider(retryMode)() === RETRY_MODES.ADAPTIVE; - if (adaptive) { - return new AdaptiveRetryStrategy(maxAttemptsProvider, { - maxAttempts, - baseDelay: defaultBaseDelay - }); - } - return new StandardRetryStrategy({ - maxAttempts, - baseDelay: defaultBaseDelay - }); - }; + const getDefault = async () => await normalizeProvider(retryMode)() === RETRY_MODES.ADAPTIVE ? new AdaptiveRetryStrategy(maxAttempts) : new StandardRetryStrategy(maxAttempts); return Object.assign(input, { - maxAttempts: maxAttemptsProvider, + maxAttempts, retryStrategy: () => controller ??= getDefault() }); }; @@ -30121,10 +30089,19 @@ var init_getRecursionDetectionPlugin = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/resolveAuthOptions.js +// node_modules/@smithy/core/dist-es/getSmithyContext.js +var import_types23, getSmithyContext2; +var init_getSmithyContext2 = __esm({ + "node_modules/@smithy/core/dist-es/getSmithyContext.js"() { + import_types23 = __toESM(require_dist_cjs()); + getSmithyContext2 = (context) => context[import_types23.SMITHY_CONTEXT_KEY] || (context[import_types23.SMITHY_CONTEXT_KEY] = {}); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js var resolveAuthOptions; var init_resolveAuthOptions = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/resolveAuthOptions.js"() { + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js"() { resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => { if (!authSchemePreference || authSchemePreference.length === 0) { return candidateAuthOptions; @@ -30148,7 +30125,7 @@ var init_resolveAuthOptions = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js function convertHttpAuthSchemesToMap(httpAuthSchemes) { const map3 = /* @__PURE__ */ new Map(); for (const scheme of httpAuthSchemes) { @@ -30158,7 +30135,7 @@ function convertHttpAuthSchemesToMap(httpAuthSchemes) { } var httpAuthSchemeMiddleware; var init_httpAuthSchemeMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { init_client2(); init_resolveAuthOptions(); httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => { @@ -30197,10 +30174,10 @@ var init_httpAuthSchemeMiddleware = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js var httpAuthSchemeEndpointRuleSetMiddlewareOptions, getHttpAuthSchemeEndpointRuleSetPlugin; var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() { + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() { init_httpAuthSchemeMiddleware(); httpAuthSchemeEndpointRuleSetMiddlewareOptions = { step: "serialize", @@ -30221,10 +30198,10 @@ var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js var httpAuthSchemeMiddlewareOptions, getHttpAuthSchemePlugin; var init_getHttpAuthSchemePlugin = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() { + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() { init_httpAuthSchemeMiddleware(); httpAuthSchemeMiddlewareOptions = { step: "serialize", @@ -30245,19 +30222,19 @@ var init_getHttpAuthSchemePlugin = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/index.js +// 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/legacy-root-exports/middleware-http-auth-scheme/index.js"() { + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js"() { init_httpAuthSchemeMiddleware(); init_getHttpAuthSchemeEndpointRuleSetPlugin(); init_getHttpAuthSchemePlugin(); } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js +// node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js var defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware; var init_httpSigningMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js"() { + "node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() { init_client2(); init_protocols(); defaultErrorHandler = (signingProperties) => (error3) => { @@ -30285,10 +30262,10 @@ var init_httpSigningMiddleware = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/getHttpSigningMiddleware.js +// node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js var httpSigningMiddlewareOptions, getHttpSigningPlugin; var init_getHttpSigningMiddleware = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/getHttpSigningMiddleware.js"() { + "node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() { init_httpSigningMiddleware(); httpSigningMiddlewareOptions = { step: "finalizeRequest", @@ -30307,9 +30284,9 @@ var init_getHttpSigningMiddleware = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/index.js +// node_modules/@smithy/core/dist-es/middleware-http-signing/index.js var init_middleware_http_signing = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/index.js"() { + "node_modules/@smithy/core/dist-es/middleware-http-signing/index.js"() { init_httpSigningMiddleware(); init_getHttpSigningMiddleware(); } @@ -30328,7 +30305,7 @@ var init_normalizeProvider2 = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/pagination/createPaginator.js +// node_modules/@smithy/core/dist-es/pagination/createPaginator.js function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { return async function* paginateOperation(config, input, ...additionalArguments) { const _input = input; @@ -30355,15 +30332,15 @@ function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenNam } var makePagedClientRequest, get; var init_createPaginator = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/pagination/createPaginator.js"() { + "node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() { makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => { let command = new CommandCtor(input); command = withCommand(command) ?? command; return await client.send(command, ...args); }; - get = (fromObject, path4) => { + get = (fromObject, path3) => { let cursor2 = fromObject; - const pathComponents = path4.split("."); + const pathComponents = path3.split("."); for (const step of pathComponents) { if (!cursor2 || typeof cursor2 !== "object") { return void 0; @@ -30375,6 +30352,13 @@ var init_createPaginator = __esm({ } }); +// node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js +var init_requestBuilder2 = __esm({ + "node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js"() { + init_protocols(); + } +}); + // node_modules/@smithy/core/dist-es/setFeature.js function setFeature3(context, feature, value) { if (!context.__smithy_context) { @@ -30391,10 +30375,10 @@ var init_setFeature2 = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +// node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js var DefaultIdentityProviderConfig; var init_DefaultIdentityProviderConfig = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js"() { + "node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"() { DefaultIdentityProviderConfig = class { authSchemes = /* @__PURE__ */ new Map(); constructor(config) { @@ -30412,12 +30396,12 @@ var init_DefaultIdentityProviderConfig = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js -var import_types23, HttpApiKeyAuthSigner; +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +var import_types24, HttpApiKeyAuthSigner; var init_httpApiKeyAuth = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { init_protocols(); - import_types23 = __toESM(require_dist_cjs()); + import_types24 = __toESM(require_dist_cjs()); HttpApiKeyAuthSigner = class { async sign(httpRequest, identity, signingProperties) { if (!signingProperties) { @@ -30433,9 +30417,9 @@ var init_httpApiKeyAuth = __esm({ throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); } const clonedRequest = HttpRequest.clone(httpRequest); - if (signingProperties.in === import_types23.HttpApiKeyAuthLocation.QUERY) { + if (signingProperties.in === import_types24.HttpApiKeyAuthLocation.QUERY) { clonedRequest.query[signingProperties.name] = identity.apiKey; - } else if (signingProperties.in === import_types23.HttpApiKeyAuthLocation.HEADER) { + } else if (signingProperties.in === import_types24.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 + "`"); @@ -30446,10 +30430,10 @@ var init_httpApiKeyAuth = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js var HttpBearerAuthSigner; var init_httpBearerAuth = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { init_protocols(); HttpBearerAuthSigner = class { async sign(httpRequest, identity, signingProperties) { @@ -30464,10 +30448,10 @@ var init_httpBearerAuth = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/noAuth.js +// 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/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/noAuth.js"() { + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js"() { NoAuthSigner = class { async sign(httpRequest, identity, signingProperties) { return httpRequest; @@ -30476,19 +30460,19 @@ var init_noAuth = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/index.js +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js var init_httpAuthSchemes = __esm({ - "node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/index.js"() { + "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/legacy-root-exports/util-identity-and-auth/memoizeIdentityProvider.js +// 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/legacy-root-exports/util-identity-and-auth/memoizeIdentityProvider.js"() { + "node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js"() { createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired2(identity) { return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; }; @@ -30546,9 +30530,9 @@ var init_memoizeIdentityProvider = __esm({ } }); -// node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/index.js +// 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/legacy-root-exports/util-identity-and-auth/index.js"() { + "node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js"() { init_DefaultIdentityProviderConfig(); init_httpAuthSchemes(); init_memoizeIdentityProvider(); @@ -30569,7 +30553,7 @@ __export(dist_es_exports, { getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, getHttpSigningPlugin: () => getHttpSigningPlugin, - getSmithyContext: () => getSmithyContext, + getSmithyContext: () => getSmithyContext2, httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, @@ -30583,12 +30567,12 @@ __export(dist_es_exports, { }); var init_dist_es = __esm({ "node_modules/@smithy/core/dist-es/index.js"() { - init_transport(); + init_getSmithyContext2(); init_middleware_http_auth_scheme(); init_middleware_http_signing(); init_normalizeProvider2(); init_createPaginator(); - init_protocols(); + init_requestBuilder2(); init_setFeature2(); init_util_identity_and_auth(); } @@ -30878,12 +30862,12 @@ var import_node_path6, getNodeModulesParentDirs; var init_getNodeModulesParentDirs = __esm({ "node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getNodeModulesParentDirs.js"() { import_node_path6 = require("node:path"); - getNodeModulesParentDirs = (dirname4) => { + getNodeModulesParentDirs = (dirname3) => { const cwd = process.cwd(); - if (!dirname4) { + if (!dirname3) { return [cwd]; } - const normalizedPath = (0, import_node_path6.normalize)(dirname4); + const normalizedPath = (0, import_node_path6.normalize)(dirname3); const parts = normalizedPath.split(import_node_path6.sep); const nodeModulesIndex = parts.indexOf("node_modules"); const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(import_node_path6.sep) : normalizedPath; @@ -30958,8 +30942,8 @@ var init_getTypeScriptUserAgentPair = __esm({ tscVersion = null; return void 0; } - const dirname4 = typeof __dirname !== "undefined" ? __dirname : void 0; - const nodeModulesParentDirs = getNodeModulesParentDirs(dirname4); + const dirname3 = typeof __dirname !== "undefined" ? __dirname : void 0; + const nodeModulesParentDirs = getNodeModulesParentDirs(dirname3); let versionFromApp; for (const nodeModulesParentDir of nodeModulesParentDirs) { try { @@ -32698,10 +32682,10 @@ ${longDate} ${credentialScope} ${serde.toHex(hashedRequest)}`; } - getCanonicalPath({ path: path4 }) { + getCanonicalPath({ path: path3 }) { if (this.uriEscapePath) { const normalizedPathSegments = []; - for (const pathSegment of path4.split("/")) { + for (const pathSegment of path3.split("/")) { if (pathSegment?.length === 0) continue; if (pathSegment === ".") @@ -32712,11 +32696,11 @@ ${serde.toHex(hashedRequest)}`; normalizedPathSegments.push(pathSegment); } } - const normalizedPath = `${path4?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path4?.endsWith("/") ? "/" : ""}`; + const normalizedPath = `${path3?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path3?.endsWith("/") ? "/" : ""}`; const doubleEncoded = protocols2.escapeUri(normalizedPath); return doubleEncoded.replace(/%2F/g, "/"); } - return path4; + return path3; } validateResolvedCredentials(credentials) { if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") { @@ -33645,7 +33629,7 @@ var require_package = __commonJS({ module2.exports = { name: "@aws-sdk/client-sts", description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native", - version: "3.1061.0", + version: "3.1049.0", scripts: { build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs", "build:cjs": "node ../../scripts/compilation/inline client-sts", @@ -33671,18 +33655,18 @@ var require_package = __commonJS({ dependencies: { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/credential-provider-node": "^3.972.50", - "@aws-sdk/signature-v4-multi-region": "^3.996.31", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/fetch-http-handler": "^5.4.6", - "@smithy/node-http-handler": "^4.7.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/credential-provider-node": "^3.972.43", + "@aws-sdk/signature-v4-multi-region": "^3.996.27", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/fetch-http-handler": "^5.4.2", + "@smithy/node-http-handler": "^4.7.2", + "@smithy/types": "^4.14.1", tslib: "^2.6.2" }, devDependencies: { - "@smithy/snapshot-testing": "^2.1.7", + "@smithy/snapshot-testing": "^2.1.2", "@tsconfig/node20": "20.1.8", "@types/node": "^20.14.8", concurrently: "7.0.0", @@ -33773,6 +33757,7 @@ var require_dist_cjs7 = __commonJS({ var require_dist_cjs8 = __commonJS({ "node_modules/@smithy/credential-provider-imds/dist-cjs/index.js"(exports2) { "use strict"; + var node_url = require("node:url"); var config = (init_config2(), __toCommonJS(config_exports)); var node_http = require("node:http"); var protocols2 = (init_protocols(), __toCommonJS(protocols_exports)); @@ -33857,8 +33842,14 @@ var require_dist_cjs8 = __commonJS({ return buffer.toString(); }; var CMDS_IP = "169.254.170.2"; - var GREENGRASS_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1"]); - var GREENGRASS_PROTOCOLS = /* @__PURE__ */ new Set(["http:", "https:"]); + var GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true + }; + var GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true + }; var getCmdsUri = async ({ logger: logger2 }) => { if (process.env[ENV_CMDS_RELATIVE_URI]) { return { @@ -33867,28 +33858,21 @@ var require_dist_cjs8 = __commonJS({ }; } if (process.env[ENV_CMDS_FULL_URI]) { - let parsed; - try { - parsed = new URL(process.env[ENV_CMDS_FULL_URI]); - } catch { - throw new config.CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger: logger2 }); - } - if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) { + const parsed = node_url.parse(process.env[ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { throw new config.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { tryNextLink: false, logger: logger2 }); } - if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) { + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { throw new config.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { tryNextLink: false, logger: logger2 }); } return { - protocol: parsed.protocol, - hostname: parsed.hostname, - path: parsed.pathname + parsed.search, + ...parsed, port: parsed.port ? parseInt(parsed.port, 10) : void 0 }; } @@ -34411,12 +34395,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf const password = request.password ?? ""; auth = `${username}:${password}`; } - let path4 = request.path; + let path3 = request.path; if (queryString) { - path4 += `?${queryString}`; + path3 += `?${queryString}`; } if (request.fragment) { - path4 += `#${request.fragment}`; + path3 += `#${request.fragment}`; } let hostname = request.hostname ?? ""; if (hostname[0] === "[" && hostname.endsWith("]")) { @@ -34428,7 +34412,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf headers: request.headers, host: hostname, method: request.method, - path: path4, + path: path3, port: request.port, agent, auth @@ -34829,16 +34813,16 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf reject(err); }; const queryString = query ? protocols2.buildQueryString(query) : ""; - let path4 = request.path; + let path3 = request.path; if (queryString) { - path4 += `?${queryString}`; + path3 += `?${queryString}`; } if (request.fragment) { - path4 += `#${request.fragment}`; + path3 += `#${request.fragment}`; } const clientHttp2Stream = session.request({ ...request.headers, - [http22.constants.HTTP2_HEADER_PATH]: path4, + [http22.constants.HTTP2_HEADER_PATH]: path3, [http22.constants.HTTP2_HEADER_METHOD]: method }); if (effectiveRequestTimeout) { @@ -35127,9 +35111,11 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI } const url = new URL(host); (0, checkUrl_1.checkUrl)(url, options.logger); - const requestHandler = node_http_handler_1.NodeHttpHandler.create({ connectionTimeout: options.timeout ?? 1e3 }); - const requestTimeout = options.timeout ?? 1e3; - const provider = (0, retry_wrapper_1.retryWrapper)(async () => { + const requestHandler = node_http_handler_1.NodeHttpHandler.create({ + requestTimeout: options.timeout ?? 1e3, + connectionTimeout: options.timeout ?? 1e3 + }); + return (0, retry_wrapper_1.retryWrapper)(async () => { const request = (0, requestHelpers_1.createGetRequest)(url); if (token) { request.headers.Authorization = token; @@ -35137,19 +35123,12 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); } try { - const result = await requestHandler.handle(request, { requestTimeout }); + const result = await requestHandler.handle(request); return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z")); } catch (e5) { throw new config_1.CredentialsProviderError(String(e5), { logger: options.logger }); } }, options.maxRetries ?? 3, options.timeout ?? 1e3); - return async () => { - try { - return await provider(); - } finally { - requestHandler.destroy?.(); - } - }; }; exports2.fromHttp = fromHttp; } @@ -35246,7 +35225,7 @@ var init_package = __esm({ "node_modules/@aws-sdk/nested-clients/package.json"() { package_default = { name: "@aws-sdk/nested-clients", - version: "3.997.15", + version: "3.997.10", description: "Nested clients for AWS SDK packages.", main: "./dist-cjs/index.js", module: "./dist-es/index.js", @@ -35275,13 +35254,13 @@ var init_package = __esm({ dependencies: { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/signature-v4-multi-region": "^3.996.31", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/fetch-http-handler": "^5.4.6", - "@smithy/node-http-handler": "^4.7.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/signature-v4-multi-region": "^3.996.27", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/fetch-http-handler": "^5.4.2", + "@smithy/node-http-handler": "^4.7.2", + "@smithy/types": "^4.14.1", tslib: "^2.6.2" }, devDependencies: { @@ -36333,11 +36312,11 @@ var init_SmithyRpcV2CborProtocol = __esm({ } } const { service, operation: operation2 } = getSmithyContext(context); - const path4 = `/service/${service}/operation/${operation2}`; + const path3 = `/service/${service}/operation/${operation2}`; if (request.path.endsWith("/")) { - request.path += path4.slice(1); + request.path += path3.slice(1); } else { - request.path += path4; + request.path += path3; } return request; } @@ -44838,18 +44817,9 @@ var require_dist_cjs18 = __commonJS({ let activeLock; let passiveLock; let credentials; - let forceRefreshLock; const provider = async (options) => { if (options?.forceRefresh) { - if (!forceRefreshLock) { - forceRefreshLock = chain2(options).then((c5) => { - credentials = c5; - }).finally(() => { - forceRefreshLock = void 0; - }); - } - await forceRefreshLock; - return credentials; + return await chain2(options); } if (credentials?.expiration) { if (credentials?.expiration?.getTime() < Date.now()) { @@ -45020,7 +44990,7 @@ var require_errors2 = __commonJS({ } }; exports2.MalformedPolicyDocumentException = MalformedPolicyDocumentException2; - var PackedPolicyTooLargeException3 = class _PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException { + var PackedPolicyTooLargeException2 = class _PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException { name = "PackedPolicyTooLargeException"; $fault = "client"; constructor(opts) { @@ -45032,7 +45002,7 @@ var require_errors2 = __commonJS({ Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype); } }; - exports2.PackedPolicyTooLargeException = PackedPolicyTooLargeException3; + exports2.PackedPolicyTooLargeException = PackedPolicyTooLargeException2; var RegionDisabledException2 = class _RegionDisabledException extends STSServiceException_1.STSServiceException { name = "RegionDisabledException"; $fault = "client"; @@ -48904,12 +48874,12 @@ var require_ipv4 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Address4 = void 0; var common = __importStar2(require_common2()); - var constants4 = __importStar2(require_constants7()); + var constants3 = __importStar2(require_constants7()); var address_error_1 = require_address_error(); - var isCorrect4 = common.isCorrect(constants4.BITS); + var isCorrect4 = common.isCorrect(constants3.BITS); var Address4 = class _Address4 { constructor(address) { - this.groups = constants4.GROUPS; + this.groups = constants3.GROUPS; this.parsedAddress = []; this.parsedSubnet = ""; this.subnet = "/32"; @@ -48918,15 +48888,15 @@ var require_ipv4 = __commonJS({ this.isCorrect = isCorrect4; this.isInSubnet = common.isInSubnet; this.address = address; - const subnet = constants4.RE_SUBNET_STRING.exec(address); + const subnet = constants3.RE_SUBNET_STRING.exec(address); if (subnet) { this.parsedSubnet = subnet[0].replace("/", ""); this.subnetMask = parseInt(this.parsedSubnet, 10); this.subnet = `/${this.subnetMask}`; - if (this.subnetMask < 0 || this.subnetMask > constants4.BITS) { + if (this.subnetMask < 0 || this.subnetMask > constants3.BITS) { throw new address_error_1.AddressError("Invalid subnet mask."); } - address = address.replace(constants4.RE_SUBNET_STRING, ""); + address = address.replace(constants3.RE_SUBNET_STRING, ""); } this.addressMinusSuffix = address; this.parsedAddress = this.parse(address); @@ -48954,7 +48924,7 @@ var require_ipv4 = __commonJS({ */ parse(address) { const groups = address.split("."); - if (!address.match(constants4.RE_ADDRESS)) { + if (!address.match(constants3.RE_ADDRESS)) { throw new address_error_1.AddressError("Invalid IPv4 address."); } return groups; @@ -48977,7 +48947,7 @@ var require_ipv4 = __commonJS({ * address.subnetMask; // 24 */ static fromAddressAndMask(address, mask) { - const bits = common.prefixLengthFromMask(new _Address4(mask).bigInt(), constants4.BITS); + const bits = common.prefixLengthFromMask(new _Address4(mask).bigInt(), constants3.BITS); return new _Address4(`${address}/${bits}`); } /** @@ -48991,9 +48961,9 @@ var require_ipv4 = __commonJS({ */ static fromAddressAndWildcardMask(address, wildcardMask) { const wildcard = new _Address4(wildcardMask).bigInt(); - const allOnes = (BigInt(1) << BigInt(constants4.BITS)) - BigInt(1); + const allOnes = (BigInt(1) << BigInt(constants3.BITS)) - BigInt(1); const mask = wildcard ^ allOnes; - const bits = common.prefixLengthFromMask(mask, constants4.BITS); + const bits = common.prefixLengthFromMask(mask, constants3.BITS); return new _Address4(`${address}/${bits}`); } /** @@ -49011,7 +48981,7 @@ var require_ipv4 = __commonJS({ */ static fromWildcard(input) { const groups = input.split("."); - if (groups.length !== constants4.GROUPS) { + if (groups.length !== constants3.GROUPS) { throw new address_error_1.AddressError("Wildcard pattern must have 4 octets"); } let firstWildcard = -1; @@ -49026,7 +48996,7 @@ var require_ipv4 = __commonJS({ } const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard; const replaced = groups.map((g5) => g5 === "*" ? "0" : g5); - const subnetBits = constants4.BITS - trailing * 8; + const subnetBits = constants3.BITS - trailing * 8; return new _Address4(`${replaced.join(".")}/${subnetBits}`); } /** @@ -49096,7 +49066,7 @@ var require_ipv4 = __commonJS({ toGroup6() { const output = []; let i5; - for (i5 = 0; i5 < constants4.GROUPS; i5 += 2) { + for (i5 = 0; i5 < constants3.GROUPS; i5 += 2) { output.push(`${common.stringToPaddedHex(this.parsedAddress[i5])}${common.stringToPaddedHex(this.parsedAddress[i5 + 1])}`); } return output.join(":"); @@ -49113,7 +49083,7 @@ var require_ipv4 = __commonJS({ * @returns {bigint} */ _startAddress() { - return BigInt(`0b${this.mask() + "0".repeat(constants4.BITS - this.subnetMask)}`); + return BigInt(`0b${this.mask() + "0".repeat(constants3.BITS - this.subnetMask)}`); } /** * The first address in the range given by this address' subnet. @@ -49137,7 +49107,7 @@ var require_ipv4 = __commonJS({ * @returns {bigint} */ _endAddress() { - return BigInt(`0b${this.mask() + "1".repeat(constants4.BITS - this.subnetMask)}`); + return BigInt(`0b${this.mask() + "1".repeat(constants3.BITS - this.subnetMask)}`); } /** * The last address in the range given by this address' subnet @@ -49162,7 +49132,7 @@ var require_ipv4 = __commonJS({ * @returns {Address4} */ subnetMaskAddress() { - return _Address4.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(constants4.BITS - this.subnetMask)}`)); + return _Address4.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(constants3.BITS - this.subnetMask)}`)); } /** * The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is @@ -49171,7 +49141,7 @@ var require_ipv4 = __commonJS({ * @returns {Address4} */ wildcardMask() { - return _Address4.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(constants4.BITS - this.subnetMask)}`)); + return _Address4.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(constants3.BITS - this.subnetMask)}`)); } /** * The network address in CIDR string form, e.g. `192.168.1.0/24` for @@ -49313,7 +49283,7 @@ var require_ipv4 = __commonJS({ */ binaryZeroPad() { if (this._binaryZeroPad === void 0) { - this._binaryZeroPad = this.bigInt().toString(2).padStart(constants4.BITS, "0"); + this._binaryZeroPad = this.bigInt().toString(2).padStart(constants3.BITS, "0"); } return this._binaryZeroPad; } @@ -49323,7 +49293,7 @@ var require_ipv4 = __commonJS({ */ groupForV6() { const segments = this.parsedAddress; - return this.address.replace(constants4.RE_ADDRESS, `${segments.slice(0, 2).join(".")}.${segments.slice(2, 4).join(".")}`); + return this.address.replace(constants3.RE_ADDRESS, `${segments.slice(0, 2).join(".")}.${segments.slice(2, 4).join(".")}`); } }; exports2.Address4 = Address4; @@ -53501,8 +53471,8 @@ var require_Client = __commonJS({ /** * Set the working directory. */ - async cd(path4) { - const validPath = await this.protectWhitespace(path4); + async cd(path3) { + const validPath = await this.protectWhitespace(path3); return this.send("CWD " + validPath); } /** @@ -53515,8 +53485,8 @@ var require_Client = __commonJS({ * Get the last modified time of a file. This is not supported by every FTP server, in which case * calling this method will throw an exception. */ - async lastMod(path4) { - const validPath = await this.protectWhitespace(path4); + async lastMod(path3) { + const validPath = await this.protectWhitespace(path3); const res = await this.send(`MDTM ${validPath}`); const date2 = res.message.slice(4); return (0, parseListMLSD_1.parseMLSxDate)(date2); @@ -53524,8 +53494,8 @@ var require_Client = __commonJS({ /** * Get the size of a file. */ - async size(path4) { - const validPath = await this.protectWhitespace(path4); + async size(path3) { + const validPath = await this.protectWhitespace(path3); const command = `SIZE ${validPath}`; const res = await this.send(command); const size = parseInt(res.message.slice(4), 10); @@ -53552,8 +53522,8 @@ var require_Client = __commonJS({ * You can ignore FTP error return codes which won't throw an exception if e.g. * the file doesn't exist. */ - async remove(path4, ignoreErrorCodes = false) { - const validPath = await this.protectWhitespace(path4); + async remove(path3, ignoreErrorCodes = false) { + const validPath = await this.protectWhitespace(path3); if (ignoreErrorCodes) { return this.sendIgnoringError(`DELE ${validPath}`); } @@ -53707,8 +53677,8 @@ var require_Client = __commonJS({ * * @param [path] Path to remote file or directory. */ - async list(path4 = "") { - const validPath = await this.protectWhitespace(path4); + async list(path3 = "") { + const validPath = await this.protectWhitespace(path3); let lastError; for (const candidate of this.availableListCommands) { const command = validPath === "" ? candidate : `${candidate} ${validPath}`; @@ -53878,21 +53848,21 @@ var require_Client = __commonJS({ /** * Remove an empty directory, will fail if not empty. */ - async removeEmptyDir(path4) { - const validPath = await this.protectWhitespace(path4); + async removeEmptyDir(path3) { + const validPath = await this.protectWhitespace(path3); return this.send(`RMD ${validPath}`); } /** * FTP servers can't handle filenames that have leading whitespace. This method transforms * a given path to fix that issue for most cases. */ - async protectWhitespace(path4) { - if (!path4.startsWith(" ")) { - return path4; + async protectWhitespace(path3) { + if (!path3.startsWith(" ")) { + return path3; } const pwd = await this.pwd(); const absolutePathPrefix = pwd.endsWith("/") ? pwd : pwd + "/"; - return absolutePathPrefix + path4; + return absolutePathPrefix + path3; } async _exitAtCurrentDirectory(func) { const userDir = await this.pwd(); @@ -53969,11 +53939,11 @@ var require_Client = __commonJS({ } }; exports2.Client = Client3; - async function ensureLocalDirectory(path4) { + async function ensureLocalDirectory(path3) { try { - await fsStat(path4); + await fsStat(path3); } catch (_a2) { - await fsMkDir(path4, { recursive: true }); + await fsMkDir(path3, { recursive: true }); } } async function ignoreError(func) { @@ -54543,23 +54513,23 @@ var require_estraverse = __commonJS({ return false; } }; - function Element(node, path4, wrap, ref) { + function Element(node, path3, wrap, ref) { this.node = node; - this.path = path4; + this.path = path3; this.wrap = wrap; this.ref = ref; } function Controller() { } - Controller.prototype.path = function path4() { + Controller.prototype.path = function path3() { var i5, iz, j5, jz, result, element; - function addToPath(result2, path5) { - if (Array.isArray(path5)) { - for (j5 = 0, jz = path5.length; j5 < jz; ++j5) { - result2.push(path5[j5]); + function addToPath(result2, path4) { + if (Array.isArray(path4)) { + for (j5 = 0, jz = path4.length; j5 < jz; ++j5) { + result2.push(path4[j5]); } } else { - result2.push(path5); + result2.push(path4); } } if (!this.__current.path) { @@ -55444,16 +55414,16 @@ var require_util10 = __commonJS({ } exports2.urlGenerate = urlGenerate; function normalize2(aPath) { - var path4 = aPath; + var path3 = aPath; var url = urlParse(aPath); if (url) { if (!url.path) { return aPath; } - path4 = url.path; + path3 = url.path; } - var isAbsolute = exports2.isAbsolute(path4); - var parts = path4.split(/\/+/); + var isAbsolute = exports2.isAbsolute(path3); + var parts = path3.split(/\/+/); for (var part, up = 0, i5 = parts.length - 1; i5 >= 0; i5--) { part = parts[i5]; if (part === ".") { @@ -55470,15 +55440,15 @@ var require_util10 = __commonJS({ } } } - path4 = parts.join("/"); - if (path4 === "") { - path4 = isAbsolute ? "/" : "."; + path3 = parts.join("/"); + if (path3 === "") { + path3 = isAbsolute ? "/" : "."; } if (url) { - url.path = path4; + url.path = path3; return urlGenerate(url); } - return path4; + return path3; } exports2.normalize = normalize2; function join7(aRoot, aPath) { @@ -66150,16 +66120,16 @@ var require_path = __commonJS({ this.__childCache = null; }; var Pp = Path.prototype; - function getChildCache(path4) { - return path4.__childCache || (path4.__childCache = /* @__PURE__ */ Object.create(null)); + function getChildCache(path3) { + return path3.__childCache || (path3.__childCache = /* @__PURE__ */ Object.create(null)); } - function getChildPath(path4, name) { - var cache5 = getChildCache(path4); - var actualChildValue = path4.getValueProperty(name); + function getChildPath(path3, name) { + var cache5 = getChildCache(path3); + var actualChildValue = path3.getValueProperty(name); var childPath = cache5[name]; if (!hasOwn.call(cache5, name) || // Ensure consistency between cache and reality. childPath.value !== actualChildValue) { - childPath = cache5[name] = new path4.constructor(actualChildValue, path4, name); + childPath = cache5[name] = new path3.constructor(actualChildValue, path3, name); } return childPath; } @@ -66171,12 +66141,12 @@ var require_path = __commonJS({ for (var _i = 0; _i < arguments.length; _i++) { names[_i] = arguments[_i]; } - var path4 = this; + var path3 = this; var count = names.length; for (var i5 = 0; i5 < count; ++i5) { - path4 = getChildPath(path4, names[i5]); + path3 = getChildPath(path3, names[i5]); } - return path4; + return path3; }; Pp.each = function each(callback, context) { var childPaths = []; @@ -66212,12 +66182,12 @@ var require_path = __commonJS({ }; function emptyMoves() { } - function getMoves(path4, offset, start, end) { - isArray.assert(path4.value); + function getMoves(path3, offset, start, end) { + isArray.assert(path3.value); if (offset === 0) { return emptyMoves; } - var length = path4.value.length; + var length = path3.value.length; if (length < 1) { return emptyMoves; } @@ -66235,10 +66205,10 @@ var require_path = __commonJS({ isNumber.assert(start); isNumber.assert(end); var moves = /* @__PURE__ */ Object.create(null); - var cache5 = getChildCache(path4); + var cache5 = getChildCache(path3); for (var i5 = start; i5 < end; ++i5) { - if (hasOwn.call(path4.value, i5)) { - var childPath = path4.get(i5); + if (hasOwn.call(path3.value, i5)) { + var childPath = path3.get(i5); if (childPath.name !== i5) { throw new Error(""); } @@ -66256,7 +66226,7 @@ var require_path = __commonJS({ throw new Error(""); } cache5[newIndex2] = childPath2; - path4.value[newIndex2] = childPath2.value; + path3.value[newIndex2] = childPath2.value; } }; } @@ -66331,34 +66301,34 @@ var require_path = __commonJS({ } return pp.insertAt.apply(pp, insertAtArgs); }; - function repairRelationshipWithParent(path4) { - if (!(path4 instanceof Path)) { + function repairRelationshipWithParent(path3) { + if (!(path3 instanceof Path)) { throw new Error(""); } - var pp = path4.parentPath; + var pp = path3.parentPath; if (!pp) { - return path4; + return path3; } var parentValue = pp.value; var parentCache = getChildCache(pp); - if (parentValue[path4.name] === path4.value) { - parentCache[path4.name] = path4; + if (parentValue[path3.name] === path3.value) { + parentCache[path3.name] = path3; } else if (isArray.check(parentValue)) { - var i5 = parentValue.indexOf(path4.value); + var i5 = parentValue.indexOf(path3.value); if (i5 >= 0) { - parentCache[path4.name = i5] = path4; + parentCache[path3.name = i5] = path3; } } else { - parentValue[path4.name] = path4.value; - parentCache[path4.name] = path4; + parentValue[path3.name] = path3.value; + parentCache[path3.name] = path3; } - if (parentValue[path4.name] !== path4.value) { + if (parentValue[path3.name] !== path3.value) { throw new Error(""); } - if (path4.parentPath.get(path4.name) !== path4) { + if (path3.parentPath.get(path3.name) !== path3) { throw new Error(""); } - return path4; + return path3; } Pp.replace = function replace(replacement) { var results = []; @@ -66438,11 +66408,11 @@ var require_scope = __commonJS({ var Expression = namedTypes.Expression; var isArray = types3.builtInTypes.array; var b6 = types3.builders; - var Scope = function Scope2(path4, parentScope) { + var Scope = function Scope2(path3, parentScope) { if (!(this instanceof Scope2)) { throw new Error("Scope constructor cannot be invoked without 'new'"); } - ScopeType.assert(path4.value); + ScopeType.assert(path3.value); var depth; if (parentScope) { if (!(parentScope instanceof Scope2)) { @@ -66454,8 +66424,8 @@ var require_scope = __commonJS({ depth = 0; } Object.defineProperties(this, { - path: { value: path4 }, - node: { value: path4.value }, + path: { value: path3 }, + node: { value: path3.value }, isGlobal: { value: !parentScope, enumerable: true }, depth: { value: depth }, parent: { value: parentScope }, @@ -66530,50 +66500,50 @@ var require_scope = __commonJS({ this.scan(); return this.types; }; - function scanScope(path4, bindings, scopeTypes2) { - var node = path4.value; + function scanScope(path3, bindings, scopeTypes2) { + var node = path3.value; ScopeType.assert(node); if (namedTypes.CatchClause.check(node)) { - var param = path4.get("param"); + var param = path3.get("param"); if (param.value) { addPattern(param, bindings); } } else { - recursiveScanScope(path4, bindings, scopeTypes2); + recursiveScanScope(path3, bindings, scopeTypes2); } } - function recursiveScanScope(path4, bindings, scopeTypes2) { - var node = path4.value; - if (path4.parent && namedTypes.FunctionExpression.check(path4.parent.node) && path4.parent.node.id) { - addPattern(path4.parent.get("id"), bindings); + function recursiveScanScope(path3, bindings, scopeTypes2) { + var node = path3.value; + if (path3.parent && namedTypes.FunctionExpression.check(path3.parent.node) && path3.parent.node.id) { + addPattern(path3.parent.get("id"), bindings); } if (!node) { } else if (isArray.check(node)) { - path4.each(function(childPath) { + path3.each(function(childPath) { recursiveScanChild(childPath, bindings, scopeTypes2); }); } else if (namedTypes.Function.check(node)) { - path4.get("params").each(function(paramPath) { + path3.get("params").each(function(paramPath) { addPattern(paramPath, bindings); }); - recursiveScanChild(path4.get("body"), bindings, scopeTypes2); + recursiveScanChild(path3.get("body"), bindings, scopeTypes2); } else if (namedTypes.TypeAlias && namedTypes.TypeAlias.check(node) || namedTypes.InterfaceDeclaration && namedTypes.InterfaceDeclaration.check(node) || namedTypes.TSTypeAliasDeclaration && namedTypes.TSTypeAliasDeclaration.check(node) || namedTypes.TSInterfaceDeclaration && namedTypes.TSInterfaceDeclaration.check(node)) { - addTypePattern(path4.get("id"), scopeTypes2); + addTypePattern(path3.get("id"), scopeTypes2); } else if (namedTypes.VariableDeclarator.check(node)) { - addPattern(path4.get("id"), bindings); - recursiveScanChild(path4.get("init"), bindings, scopeTypes2); + addPattern(path3.get("id"), bindings); + recursiveScanChild(path3.get("init"), bindings, scopeTypes2); } else if (node.type === "ImportSpecifier" || node.type === "ImportNamespaceSpecifier" || node.type === "ImportDefaultSpecifier") { addPattern( // Esprima used to use the .name field to refer to the local // binding identifier for ImportSpecifier nodes, but .id for // ImportNamespaceSpecifier and ImportDefaultSpecifier nodes. // ESTree/Acorn/ESpree use .local for all three node types. - path4.get(node.local ? "local" : node.name ? "name" : "id"), + path3.get(node.local ? "local" : node.name ? "name" : "id"), bindings ); } else if (Node.check(node) && !Expression.check(node)) { types3.eachField(node, function(name, child) { - var childPath = path4.get(name); + var childPath = path3.get(name); if (!pathHasValue(childPath, child)) { throw new Error(""); } @@ -66581,34 +66551,34 @@ var require_scope = __commonJS({ }); } } - function pathHasValue(path4, value) { - if (path4.value === value) { + function pathHasValue(path3, value) { + if (path3.value === value) { return true; } - if (Array.isArray(path4.value) && path4.value.length === 0 && Array.isArray(value) && value.length === 0) { + if (Array.isArray(path3.value) && path3.value.length === 0 && Array.isArray(value) && value.length === 0) { return true; } return false; } - function recursiveScanChild(path4, bindings, scopeTypes2) { - var node = path4.value; + function recursiveScanChild(path3, bindings, scopeTypes2) { + var node = path3.value; if (!node || Expression.check(node)) { } else if (namedTypes.FunctionDeclaration.check(node) && node.id !== null) { - addPattern(path4.get("id"), bindings); + addPattern(path3.get("id"), bindings); } else if (namedTypes.ClassDeclaration && namedTypes.ClassDeclaration.check(node)) { - addPattern(path4.get("id"), bindings); + addPattern(path3.get("id"), bindings); } else if (ScopeType.check(node)) { if (namedTypes.CatchClause.check(node) && // TODO Broaden this to accept any pattern. namedTypes.Identifier.check(node.param)) { var catchParamName = node.param.name; var hadBinding = hasOwn.call(bindings, catchParamName); - recursiveScanScope(path4.get("body"), bindings, scopeTypes2); + recursiveScanScope(path3.get("body"), bindings, scopeTypes2); if (!hadBinding) { delete bindings[catchParamName]; } } } else { - recursiveScanScope(path4, bindings, scopeTypes2); + recursiveScanScope(path3, bindings, scopeTypes2); } } function addPattern(patternPath, bindings) { @@ -66944,53 +66914,53 @@ var require_node_path = __commonJS({ NPp.firstInStatement = function() { return firstInStatement(this); }; - function firstInStatement(path4) { - for (var node, parent; path4.parent; path4 = path4.parent) { - node = path4.node; - parent = path4.parent.node; - if (n3.BlockStatement.check(parent) && path4.parent.name === "body" && path4.name === 0) { + function firstInStatement(path3) { + for (var node, parent; path3.parent; path3 = path3.parent) { + node = path3.node; + parent = path3.parent.node; + if (n3.BlockStatement.check(parent) && path3.parent.name === "body" && path3.name === 0) { if (parent.body[0] !== node) { throw new Error("Nodes must be equal"); } return true; } - if (n3.ExpressionStatement.check(parent) && path4.name === "expression") { + if (n3.ExpressionStatement.check(parent) && path3.name === "expression") { if (parent.expression !== node) { throw new Error("Nodes must be equal"); } return true; } - if (n3.SequenceExpression.check(parent) && path4.parent.name === "expressions" && path4.name === 0) { + if (n3.SequenceExpression.check(parent) && path3.parent.name === "expressions" && path3.name === 0) { if (parent.expressions[0] !== node) { throw new Error("Nodes must be equal"); } continue; } - if (n3.CallExpression.check(parent) && path4.name === "callee") { + if (n3.CallExpression.check(parent) && path3.name === "callee") { if (parent.callee !== node) { throw new Error("Nodes must be equal"); } continue; } - if (n3.MemberExpression.check(parent) && path4.name === "object") { + if (n3.MemberExpression.check(parent) && path3.name === "object") { if (parent.object !== node) { throw new Error("Nodes must be equal"); } continue; } - if (n3.ConditionalExpression.check(parent) && path4.name === "test") { + if (n3.ConditionalExpression.check(parent) && path3.name === "test") { if (parent.test !== node) { throw new Error("Nodes must be equal"); } continue; } - if (isBinary(parent) && path4.name === "left") { + if (isBinary(parent) && path3.name === "left") { if (parent.left !== node) { throw new Error("Nodes must be equal"); } continue; } - if (n3.UnaryExpression.check(parent) && !parent.prefix && path4.name === "argument") { + if (n3.UnaryExpression.check(parent) && !parent.prefix && path3.name === "argument") { if (parent.argument !== node) { throw new Error("Nodes must be equal"); } @@ -67160,36 +67130,36 @@ var require_path_visitor = __commonJS({ }; PVp.reset = function(_path) { }; - PVp.visitWithoutReset = function(path4) { + PVp.visitWithoutReset = function(path3) { if (this instanceof this.Context) { - return this.visitor.visitWithoutReset(path4); + return this.visitor.visitWithoutReset(path3); } - if (!(path4 instanceof NodePath)) { + if (!(path3 instanceof NodePath)) { throw new Error(""); } - var value = path4.value; + var value = path3.value; var methodName = value && typeof value === "object" && typeof value.type === "string" && this._methodNameTable[value.type]; if (methodName) { - var context = this.acquireContext(path4); + var context = this.acquireContext(path3); try { return context.invokeVisitorMethod(methodName); } finally { this.releaseContext(context); } } else { - return visitChildren(path4, this); + return visitChildren(path3, this); } }; - function visitChildren(path4, visitor) { - if (!(path4 instanceof NodePath)) { + function visitChildren(path3, visitor) { + if (!(path3 instanceof NodePath)) { throw new Error(""); } if (!(visitor instanceof PathVisitor)) { throw new Error(""); } - var value = path4.value; + var value = path3.value; if (isArray.check(value)) { - path4.each(visitor.visitWithoutReset, visitor); + path3.each(visitor.visitWithoutReset, visitor); } else if (!isObject.check(value)) { } else { var childNames = types3.getFieldNames(value); @@ -67203,19 +67173,19 @@ var require_path_visitor = __commonJS({ if (!hasOwn.call(value, childName)) { value[childName] = types3.getFieldValue(value, childName); } - childPaths.push(path4.get(childName)); + childPaths.push(path3.get(childName)); } for (var i5 = 0; i5 < childCount; ++i5) { visitor.visitWithoutReset(childPaths[i5]); } } - return path4.value; + return path3.value; } - PVp.acquireContext = function(path4) { + PVp.acquireContext = function(path3) { if (this._reusableContextStack.length === 0) { - return new this.Context(path4); + return new this.Context(path3); } - return this._reusableContextStack.pop().reset(path4); + return this._reusableContextStack.pop().reset(path3); }; PVp.releaseContext = function(context) { if (!(context instanceof this.Context)) { @@ -67231,14 +67201,14 @@ var require_path_visitor = __commonJS({ return this._changeReported; }; function makeContextConstructor(visitor) { - function Context(path4) { + function Context(path3) { if (!(this instanceof Context)) { throw new Error(""); } if (!(this instanceof PathVisitor)) { throw new Error(""); } - if (!(path4 instanceof NodePath)) { + if (!(path3 instanceof NodePath)) { throw new Error(""); } Object.defineProperty(this, "visitor", { @@ -67247,7 +67217,7 @@ var require_path_visitor = __commonJS({ enumerable: true, configurable: false }); - this.currentPath = path4; + this.currentPath = path3; this.needToCallTraverse = true; Object.seal(this); } @@ -67260,14 +67230,14 @@ var require_path_visitor = __commonJS({ return Context; } var sharedContextProtoMethods = /* @__PURE__ */ Object.create(null); - sharedContextProtoMethods.reset = function reset(path4) { + sharedContextProtoMethods.reset = function reset(path3) { if (!(this instanceof this.Context)) { throw new Error(""); } - if (!(path4 instanceof NodePath)) { + if (!(path3 instanceof NodePath)) { throw new Error(""); } - this.currentPath = path4; + this.currentPath = path3; this.needToCallTraverse = true; return this; }; @@ -67290,34 +67260,34 @@ var require_path_visitor = __commonJS({ if (this.needToCallTraverse !== false) { throw new Error("Must either call this.traverse or return false in " + methodName); } - var path4 = this.currentPath; - return path4 && path4.value; + var path3 = this.currentPath; + return path3 && path3.value; }; - sharedContextProtoMethods.traverse = function traverse(path4, newVisitor) { + sharedContextProtoMethods.traverse = function traverse(path3, newVisitor) { if (!(this instanceof this.Context)) { throw new Error(""); } - if (!(path4 instanceof NodePath)) { + if (!(path3 instanceof NodePath)) { throw new Error(""); } if (!(this.currentPath instanceof NodePath)) { throw new Error(""); } this.needToCallTraverse = false; - return visitChildren(path4, PathVisitor.fromMethodsObject(newVisitor || this.visitor)); + return visitChildren(path3, PathVisitor.fromMethodsObject(newVisitor || this.visitor)); }; - sharedContextProtoMethods.visit = function visit2(path4, newVisitor) { + sharedContextProtoMethods.visit = function visit2(path3, newVisitor) { if (!(this instanceof this.Context)) { throw new Error(""); } - if (!(path4 instanceof NodePath)) { + if (!(path3 instanceof NodePath)) { throw new Error(""); } if (!(this.currentPath instanceof NodePath)) { throw new Error(""); } this.needToCallTraverse = false; - return PathVisitor.fromMethodsObject(newVisitor || this.visitor).visitWithoutReset(path4); + return PathVisitor.fromMethodsObject(newVisitor || this.visitor).visitWithoutReset(path3); }; sharedContextProtoMethods.reportChanged = function reportChanged() { this.visitor.reportChanged(); @@ -68522,10 +68492,10 @@ function degenerator(code, _names) { do { lastNamesLength = names.length; (0, import_ast_types.visit)(ast, { - visitVariableDeclaration(path4) { - if (path4.node.declarations) { - for (let i5 = 0; i5 < path4.node.declarations.length; i5++) { - const declaration = path4.node.declarations[i5]; + visitVariableDeclaration(path3) { + if (path3.node.declarations) { + for (let i5 = 0; i5 < path3.node.declarations.length; i5++) { + const declaration = path3.node.declarations[i5]; if (import_ast_types.namedTypes.VariableDeclarator.check(declaration) && import_ast_types.namedTypes.Identifier.check(declaration.init) && import_ast_types.namedTypes.Identifier.check(declaration.id) && checkName(declaration.init.name, names) && !checkName(declaration.id.name, names)) { names.push(declaration.id.name); } @@ -68533,18 +68503,18 @@ function degenerator(code, _names) { } return false; }, - visitAssignmentExpression(path4) { - if (import_ast_types.namedTypes.Identifier.check(path4.node.left) && import_ast_types.namedTypes.Identifier.check(path4.node.right) && checkName(path4.node.right.name, names) && !checkName(path4.node.left.name, names)) { - names.push(path4.node.left.name); + visitAssignmentExpression(path3) { + if (import_ast_types.namedTypes.Identifier.check(path3.node.left) && import_ast_types.namedTypes.Identifier.check(path3.node.right) && checkName(path3.node.right.name, names) && !checkName(path3.node.left.name, names)) { + names.push(path3.node.left.name); } return false; }, - visitFunction(path4) { - if (path4.node.id) { + visitFunction(path3) { + if (path3.node.id) { let shouldDegenerate = false; - (0, import_ast_types.visit)(path4.node, { - visitCallExpression(path5) { - if (checkNames(path5.node, names)) { + (0, import_ast_types.visit)(path3.node, { + visitCallExpression(path4) { + if (checkNames(path4.node, names)) { shouldDegenerate = true; } return false; @@ -68553,28 +68523,28 @@ function degenerator(code, _names) { if (!shouldDegenerate) { return false; } - path4.node.async = true; - if (!checkName(path4.node.id.name, names)) { - names.push(path4.node.id.name); + path3.node.async = true; + if (!checkName(path3.node.id.name, names)) { + names.push(path3.node.id.name); } } - this.traverse(path4); + this.traverse(path3); } }); } while (lastNamesLength !== names.length); (0, import_ast_types.visit)(ast, { - visitCallExpression(path4) { - if (checkNames(path4.node, names)) { + visitCallExpression(path3) { + if (checkNames(path3.node, names)) { const delegate = false; - const { name, parent: { node: pNode } } = path4; - const expr = import_ast_types.builders.awaitExpression(path4.node, delegate); + const { name, parent: { node: pNode } } = path3; + const expr = import_ast_types.builders.awaitExpression(path3.node, delegate); if (import_ast_types.namedTypes.CallExpression.check(pNode)) { pNode.arguments[name] = expr; } else { pNode[name] = expr; } } - this.traverse(path4); + this.traverse(path3); } }); return (0, import_escodegen.generate)(ast); @@ -73760,12 +73730,11 @@ function getIDToken(aud) { // src/assumeRole.ts var import_node_assert = __toESM(require("node:assert")); +var import_node_fs2 = __toESM(require("node:fs")); var import_node_path8 = __toESM(require("node:path")); var import_client_sts2 = __toESM(require_dist_cjs19()); // src/helpers.ts -var fs3 = __toESM(require("node:fs")); -var path = __toESM(require("node:path")); var import_client_sts = __toESM(require_dist_cjs19()); var MAX_TAG_VALUE_LENGTH = 256; var SANITIZATION_CHARACTER = "_"; @@ -73982,88 +73951,6 @@ function getBooleanInput(name, options) { Support boolean input list: \`true | True | TRUE | false | False | FALSE\`` ); } -var O_NOFOLLOW = fs3.constants.O_NOFOLLOW ?? 0; -function isAllowListed(filePath) { - const KUBERNETES_TOKEN_PATH_REGEX = /^\/var\/run\/secrets\/[^/]+\/serviceaccount\/token$/; - if (process.platform !== "win32") { - return KUBERNETES_TOKEN_PATH_REGEX.test(path.posix.normalize(filePath)); - } - return false; -} -function isSymlink(filePath) { - try { - return fs3.lstatSync(filePath).isSymbolicLink(); - } catch (err) { - if (err.code === "ENOENT") return false; - throw err; - } -} -function refuseSymlinkOnPath(filePath) { - const parent = path.dirname(filePath); - if (parent !== filePath && isSymlink(parent)) { - throw new Error(`Refusing ${filePath} (parent directory is a symbolic link)`); - } - if (isSymlink(filePath)) { - throw new Error(`Refusing ${filePath} (path is a symbolic link)`); - } -} -function assertRegularFile(fd, filePath) { - const stats = fs3.fstatSync(fd); - if (!stats.isFile()) { - throw new Error(`${filePath} (path is not a regular file)`); - } -} -function readFileUtf8(filePath) { - const allowSymlink = isAllowListed(filePath); - if (!allowSymlink) { - refuseSymlinkOnPath(filePath); - } - const openFlags = fs3.constants.O_RDONLY | (allowSymlink ? 0 : O_NOFOLLOW); - let fd; - try { - fd = fs3.openSync(filePath, openFlags); - } catch (err) { - const code = err.code; - if (code === "ENOENT") return null; - if (code === "ELOOP") { - throw new Error(`Refusing ${filePath} (path is a symbolic link)`); - } - throw err; - } - try { - assertRegularFile(fd, filePath); - return fs3.readFileSync(fd, "utf-8"); - } finally { - fs3.closeSync(fd); - } -} -function writeFileUtf8(filePath, content, mode = 384) { - refuseSymlinkOnPath(filePath); - let fd; - try { - fd = fs3.openSync(filePath, fs3.constants.O_WRONLY | fs3.constants.O_CREAT | fs3.constants.O_TRUNC | O_NOFOLLOW, mode); - } catch (err) { - if (err.code === "ELOOP") { - throw new Error(`Refusing ${filePath} (path is a symbolic link)`); - } - throw err; - } - try { - assertRegularFile(fd, filePath); - if (process.platform !== "win32") { - fs3.fchmodSync(fd, mode); - } - fs3.writeFileSync(fd, content); - } finally { - fs3.closeSync(fd); - } -} -function mkdir2(dir, mode = 448) { - fs3.mkdirSync(dir, { recursive: true, mode }); - if (isSymlink(dir)) { - throw new Error(`Refusing ${dir} (path is a symbolic link)`); - } -} // src/assumeRole.ts async function assumeRoleWithOIDC(params, client, webIdentityToken) { @@ -74087,14 +73974,13 @@ async function assumeRoleWithWebIdentityTokenFile(params, client, webIdentityTok "webIdentityTokenFile provided. Will call sts:AssumeRoleWithWebIdentity and take session tags from token contents." ); const webIdentityTokenFilePath = import_node_path8.default.isAbsolute(webIdentityTokenFile) ? webIdentityTokenFile : import_node_path8.default.join(workspace, webIdentityTokenFile); - const webIdentityToken = readFileUtf8(webIdentityTokenFilePath); - if (webIdentityToken === null) { + if (!import_node_fs2.default.existsSync(webIdentityTokenFilePath)) { throw new Error(`Web identity token file does not exist: ${webIdentityTokenFilePath}`); } info("Assuming role with web identity token file"); try { + const webIdentityToken = import_node_fs2.default.readFileSync(webIdentityTokenFilePath, "utf8"); delete params.Tags; - delete params.TransitiveTagKeys; const creds = await client.send( new import_client_sts2.AssumeRoleWithWebIdentityCommand({ ...params, @@ -74112,13 +73998,6 @@ async function assumeRoleWithCredentials(params, client) { const creds = await client.send(new import_client_sts2.AssumeRoleCommand({ ...params })); return creds; } catch (error3) { - if (error3 instanceof import_client_sts2.PackedPolicyTooLargeException) { - info("Session tag size is too large; dropping droppable tags and retrying."); - const droppableKeys = new Set(DROPPABLE_TAG_SOURCES.map((s) => s.key)); - params.Tags = params.Tags?.filter((tag2) => !droppableKeys.has(tag2.Key ?? "")); - const creds = await client.send(new import_client_sts2.AssumeRoleCommand({ ...params })); - return creds; - } throw new Error(`Could not assume role with user credentials: ${errorMessage(error3)}`); } } @@ -74127,7 +74006,7 @@ var TAG_VALUE_REGEX = /^[\p{L}\p{Z}\p{N}_.:/=+\-@]*$/u; var MAX_TAG_KEY_LENGTH = 128; var MAX_TAG_VALUE_LENGTH2 = 256; var MAX_SESSION_TAGS = 50; -var NON_DROPPABLE_TAG_SOURCES = [ +var PROTECTED_TAG_SOURCES = [ { key: "Repository", envVar: "GITHUB_REPOSITORY" }, { key: "Workflow", envVar: "GITHUB_WORKFLOW" }, { key: "Action", envVar: "GITHUB_ACTION" }, @@ -74135,19 +74014,17 @@ var NON_DROPPABLE_TAG_SOURCES = [ { key: "Commit", envVar: "GITHUB_SHA" }, { key: "Branch", envVar: "GITHUB_REF" } ]; -var DROPPABLE_TAG_SOURCES = [ +var OVERRIDEABLE_TAG_SOURCES_BY_PRIORITY = [ { key: "EventName", envVar: "GITHUB_EVENT_NAME" }, { key: "BaseRef", envVar: "GITHUB_BASE_REF" }, { key: "HeadRef", envVar: "GITHUB_HEAD_REF" }, + { key: "RefName", envVar: "GITHUB_REF_NAME" }, { key: "RunId", envVar: "GITHUB_RUN_ID" }, + { key: "RefType", envVar: "GITHUB_REF_TYPE" }, { key: "Job", envVar: "GITHUB_JOB" }, { key: "TriggeringActor", envVar: "GITHUB_TRIGGERING_ACTOR" } ]; -var PROTECTED_TAG_KEYS = /* @__PURE__ */ new Set([ - "GitHub", - ...NON_DROPPABLE_TAG_SOURCES.map((s) => s.key), - ...DROPPABLE_TAG_SOURCES.map((s) => s.key) -]); +var PROTECTED_TAG_KEYS = /* @__PURE__ */ new Set(["GitHub", ...PROTECTED_TAG_SOURCES.map((s) => s.key)]); function parseAndValidateCustomTags(customTags, existingTags) { let parsed; try { @@ -74219,26 +74096,30 @@ async function assumeRole(params) { throw new Error("Missing required environment variables. Are you running in GitHub Actions?"); } const protectedTags = [{ Key: "GitHub", Value: "Actions" }]; - for (const { key, envVar } of NON_DROPPABLE_TAG_SOURCES) { - const value = process.env[envVar]; - if (value) { - protectedTags.push({ Key: key, Value: sanitizeGitHubVariables(value) }); - } - } - for (const { key, envVar } of DROPPABLE_TAG_SOURCES) { + for (const { key, envVar } of PROTECTED_TAG_SOURCES) { const value = process.env[envVar]; if (value) { protectedTags.push({ Key: key, Value: sanitizeGitHubVariables(value) }); } } const parsedCustomTags = customTags ? parseAndValidateCustomTags(customTags, protectedTags) : []; - const tagArray = [...protectedTags, ...parsedCustomTags]; + const customTagKeys = new Set(parsedCustomTags.map((t) => t.Key)); + const availableOverrideableSlots = MAX_SESSION_TAGS - protectedTags.length - parsedCustomTags.length; + const overrideableTags = []; + for (const { key, envVar } of OVERRIDEABLE_TAG_SOURCES_BY_PRIORITY) { + if (overrideableTags.length >= availableOverrideableSlots) break; + if (customTagKeys.has(key)) continue; + const value = process.env[envVar]; + if (value) { + overrideableTags.push({ Key: key, Value: sanitizeGitHubVariables(value) }); + } + } + const tagArray = [...protectedTags, ...overrideableTags, ...parsedCustomTags]; const tags = roleSkipSessionTagging ? void 0 : tagArray; if (!tags) { debug("Role session tagging has been skipped."); } else { debug(`${tags.length} role session tags are being used:`); - debug(JSON.stringify(tagArray)); } const transitiveTagKeysArray = roleSkipSessionTagging ? void 0 : transitiveTagKeys?.filter((key) => tags?.some((tag2) => tag2.Key === key)); let roleArn = roleToAssume; @@ -75563,8 +75444,9 @@ var CredentialsClient = class { }; // src/profileManager.ts +var fs4 = __toESM(require("node:fs")); var os6 = __toESM(require("node:os")); -var path3 = __toESM(require("node:path")); +var path2 = __toESM(require("node:path")); function parseIni2(iniData) { const result = {}; let currentSection; @@ -75612,17 +75494,19 @@ function stringifyIni(data3) { `; } function getProfileFilePaths() { - const credentialsPath = process.env.AWS_SHARED_CREDENTIALS_FILE || path3.join(os6.homedir(), ".aws", "credentials"); - const configPath = process.env.AWS_CONFIG_FILE || path3.join(os6.homedir(), ".aws", "config"); + const credentialsPath = process.env.AWS_SHARED_CREDENTIALS_FILE || path2.join(os6.homedir(), ".aws", "credentials"); + const configPath = process.env.AWS_CONFIG_FILE || path2.join(os6.homedir(), ".aws", "config"); return { credentials: credentialsPath, config: configPath }; } function ensureAwsDirectoryExists(filePath) { - const dir = path3.dirname(filePath); - debug(`Ensuring directory exists: ${dir}`); - mkdir2(dir, 448); + const dir = path2.dirname(filePath); + if (!fs4.existsSync(dir)) { + debug(`Creating directory: ${dir}`); + fs4.mkdirSync(dir, { recursive: true, mode: 448 }); + } } function validateProfileName(profileName) { if (!profileName || profileName.trim() === "") { @@ -75639,8 +75523,12 @@ function validateProfileName(profileName) { } } function mergeProfileSection(filePath, sectionName, data3, overwriteAwsProfile) { - const fileContent = readFileUtf8(filePath); - const existingContent = fileContent === null ? {} : parseIni2(fileContent); + let existingContent = {}; + if (fs4.existsSync(filePath)) { + debug(`Reading existing file: ${filePath}`); + const fileContent = fs4.readFileSync(filePath, "utf-8"); + existingContent = parseIni2(fileContent); + } if (existingContent[sectionName] && !overwriteAwsProfile) { throw new Error( `Profile with name "${sectionName}" already exists. Please use the overwrite-aws-profile input if you want to overwrite existing profiles.` @@ -75649,7 +75537,7 @@ function mergeProfileSection(filePath, sectionName, data3, overwriteAwsProfile) existingContent[sectionName] = data3; const content = stringifyIni(existingContent); debug(`Writing profile to ${filePath}`); - writeFileUtf8(filePath, content, 384); + fs4.writeFileSync(filePath, content, { mode: 384 }); } function writeProfileFiles(profileName, credentials, region, overwriteAwsProfile) { try { diff --git a/package-lock.json b/package-lock.json index 20074cc..6ebe393 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,34 +1,34 @@ { "name": "configure-aws-credentials", - "version": "6.2.0", + "version": "6.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "configure-aws-credentials", - "version": "6.2.0", + "version": "6.1.1", "license": "MIT", "dependencies": { "@actions/core": "^3.0.1", - "@aws-sdk/client-sts": "^3.1061.0", + "@aws-sdk/client-sts": "^3.1049.0", "@smithy/node-http-handler": "^4.7.3", "proxy-agent": "^8.0.1" }, "devDependencies": { - "@aws-sdk/credential-provider-env": "^3.972.39", - "@biomejs/biome": "2.4.16", - "@smithy/property-provider": "^4.3.6", - "@types/node": "^25.9.1", - "@vitest/coverage-v8": "4.1.8", + "@aws-sdk/credential-provider-env": "^3.972.38", + "@biomejs/biome": "2.4.15", + "@smithy/property-provider": "^4.3.3", + "@types/node": "^25.9.0", + "@vitest/coverage-v8": "^4.1.6", "aws-sdk-client-mock": "^4.1.0", "esbuild": "^0.28.0", - "generate-license-file": "^4.2.1", + "generate-license-file": "^4.1.1", "json-schema": "^0.4.0", "markdownlint-cli": "^0.48.0", - "memfs": "^4.57.6", + "memfs": "^4.57.2", "standard-version": "^9.5.0", "typescript": "^6.0.3", - "vitest": "4.1.8" + "vitest": "^4.1.5" }, "engines": { "node": ">= 16.3.0" @@ -133,21 +133,21 @@ } }, "node_modules/@aws-sdk/client-sts": { - "version": "3.1061.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.1061.0.tgz", - "integrity": "sha512-45pn+cxziQ86ftwX4u5OreEp98oFpozu+2pu6NekwDXp36JavRGS1PsRmijdAWomaCGQ4rDFX0RxgXQq865YiA==", + "version": "3.1049.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.1049.0.tgz", + "integrity": "sha512-Dq8WJk3oPNQvK7gOYDFnOl6jXh2TiwggATqzs3bbboOu5hleZ50Nt9Zm38jA0zWnWm2nJ5p/qdKJzXeGecHRvA==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/credential-provider-node": "^3.972.50", - "@aws-sdk/signature-v4-multi-region": "^3.996.31", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/fetch-http-handler": "^5.4.6", - "@smithy/node-http-handler": "^4.7.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/credential-provider-node": "^3.972.43", + "@aws-sdk/signature-v4-multi-region": "^3.996.27", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/fetch-http-handler": "^5.4.2", + "@smithy/node-http-handler": "^4.7.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -155,17 +155,17 @@ } }, "node_modules/@aws-sdk/core": { - "version": "3.974.17", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.974.17.tgz", - "integrity": "sha512-r8o4h2K7j6P9ngno+8ei0aK0U/4JwDb7A2fMMxGVoSqDN8AFlIzSDeZHME9LcVLR2codyhtr1WAAg+/nmkeeMA==", + "version": "3.974.12", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.974.12.tgz", + "integrity": "sha512-qrqgioqYFjwR6LatVNS1L2Vk++EwRIxqSQXPKNv5Ofux2D8UNgqMQ1znnMyEImXquVPTtbf71fc128pvmU6y9A==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "^3.973.10", - "@aws-sdk/xml-builder": "^3.972.27", + "@aws-sdk/types": "^3.973.8", + "@aws-sdk/xml-builder": "^3.972.24", "@aws/lambda-invoke-store": "^0.2.2", - "@smithy/core": "^3.24.6", - "@smithy/signature-v4": "^5.4.6", - "@smithy/types": "^4.14.3", + "@smithy/core": "^3.24.2", + "@smithy/signature-v4": "^5.4.2", + "@smithy/types": "^4.14.1", "bowser": "^2.11.0", "tslib": "^2.6.2" }, @@ -174,15 +174,15 @@ } }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.972.43", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.43.tgz", - "integrity": "sha512-g0XVQKzaA/4cq1vz1IvCQwYM+1Pkv01J9yHDpCTXekVuGZRDEz0wqBQ1AuYTq7FM6uik4uBGH8Tb5d9YvgeA7g==", + "version": "3.972.38", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.38.tgz", + "integrity": "sha512-m3WjZEgPtioMhPmwqUt+DhlTJ2i9ufR6DhfkyXojb9puEvfR+ur2U5shavu5/Cc9WHHsDCvALi6UFHgcqjhQ5w==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -190,17 +190,17 @@ } }, "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.972.45", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.45.tgz", - "integrity": "sha512-w9PuOoKCt6+xoESvY+zlV0u3PKQ0mVL259PcsVR6a3S/uYJJHnIi4r1NxdJHEcNldUVRIciltWnFMGBR4YEm3g==", + "version": "3.972.40", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.40.tgz", + "integrity": "sha512-D78L/m2Dr6cJnnSvWoAudPhQmCwmJ7j6APXsPYmFpPaKfQTfCSu0rdm8j14Np+VmXF9z8Aj8HE3xFpsrwtfgeg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/fetch-http-handler": "^5.4.6", - "@smithy/node-http-handler": "^4.7.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/fetch-http-handler": "^5.4.2", + "@smithy/node-http-handler": "^4.7.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -208,23 +208,23 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.972.48", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.48.tgz", - "integrity": "sha512-+6BQ6Lrnc+EyAGElLRW6j+Sa+RirPHnIJsobvYO6nnyK+oGKmz1ne/ieclbLWyjyDKEU3/JVJWcWY3VLFPvGtQ==", + "version": "3.972.42", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.42.tgz", + "integrity": "sha512-Mu5ESvFXeinafVM8jTIvRqcvK2Ehj4kz3auT39yUcHwu1Vfxo6xRlmUafdKLW4tusjAJukQwK09sCSMgOm7OKg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/credential-provider-env": "^3.972.43", - "@aws-sdk/credential-provider-http": "^3.972.45", - "@aws-sdk/credential-provider-login": "^3.972.47", - "@aws-sdk/credential-provider-process": "^3.972.43", - "@aws-sdk/credential-provider-sso": "^3.972.47", - "@aws-sdk/credential-provider-web-identity": "^3.972.47", - "@aws-sdk/nested-clients": "^3.997.15", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/credential-provider-imds": "^4.3.7", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/credential-provider-env": "^3.972.38", + "@aws-sdk/credential-provider-http": "^3.972.40", + "@aws-sdk/credential-provider-login": "^3.972.42", + "@aws-sdk/credential-provider-process": "^3.972.38", + "@aws-sdk/credential-provider-sso": "^3.972.42", + "@aws-sdk/credential-provider-web-identity": "^3.972.42", + "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/credential-provider-imds": "^4.3.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -232,16 +232,16 @@ } }, "node_modules/@aws-sdk/credential-provider-login": { - "version": "3.972.47", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.47.tgz", - "integrity": "sha512-Iy2ebWVgrZBH05464uJiQYu6HSSiROnwVZptthEFXx2gWjo1ORCxEAFZB5Cr2MdfrSnZ+0QUPkZ1ZpCqpkUrLQ==", + "version": "3.972.42", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.42.tgz", + "integrity": "sha512-O6WkZga3kf0yqyJYd1dbeJqVhEgJx/x1UaLgtbR+XuL/YP+K5y6QTxQKL7ka9z3jnQASESKGAPnRyt4D5hQrxA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/nested-clients": "^3.997.15", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -249,21 +249,21 @@ } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.972.50", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.50.tgz", - "integrity": "sha512-b05Aelq5cqAvCCDQjCYacl0XmR8QhBNSqLbsdISkQmlQBa5oPS66zYPteWcSp5LswbpoIe552EUGjluKiadBig==", + "version": "3.972.43", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.43.tgz", + "integrity": "sha512-D/DJmbrWRP5BXEO3FH+ar4el+2n6OlGofiud7dQun2jES+AQEJjczenp1jBb4MBN7CpGpS8nsWGQLtuzc9tQbA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/credential-provider-env": "^3.972.43", - "@aws-sdk/credential-provider-http": "^3.972.45", - "@aws-sdk/credential-provider-ini": "^3.972.48", - "@aws-sdk/credential-provider-process": "^3.972.43", - "@aws-sdk/credential-provider-sso": "^3.972.47", - "@aws-sdk/credential-provider-web-identity": "^3.972.47", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/credential-provider-imds": "^4.3.7", - "@smithy/types": "^4.14.3", + "@aws-sdk/credential-provider-env": "^3.972.38", + "@aws-sdk/credential-provider-http": "^3.972.40", + "@aws-sdk/credential-provider-ini": "^3.972.42", + "@aws-sdk/credential-provider-process": "^3.972.38", + "@aws-sdk/credential-provider-sso": "^3.972.42", + "@aws-sdk/credential-provider-web-identity": "^3.972.42", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/credential-provider-imds": "^4.3.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -271,15 +271,15 @@ } }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.972.43", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.43.tgz", - "integrity": "sha512-GPokLNyvTfCmuaHk+v3GKVs4ZT3cMu5kgS2a+NPkOMt96cq6fSIK0g+mZHpGS6Cd4QGrPKesANEaLUKgOskTzg==", + "version": "3.972.38", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.38.tgz", + "integrity": "sha512-EnbYVajGgbkb24s0K1eo4VNAPV5mHIET7LSvirTaFCwkfrfaOJxtSE+wY/tJdKDS21cEYkZs2ruCaAm+W4iblg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -287,17 +287,17 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.972.47", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.47.tgz", - "integrity": "sha512-0AzvLrzlvJs0DzbeWGvNj+bX3Uzd7VNS6vDqCOdZzBlCGKGd78uxctJSW9iK/Rt/nxiJqpTvrYQlVJ4guVM2Dw==", + "version": "3.972.42", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.42.tgz", + "integrity": "sha512-RVV/9NbFwI8ZHEH5dn39lGyFmSbSVj1+orZdr6QsOe1mW9DCglmlen0cFaNZmCcqkqc7erNRHNBduxbeZuHAnw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/nested-clients": "^3.997.15", - "@aws-sdk/token-providers": "3.1060.0", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/token-providers": "3.1049.0", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -305,16 +305,16 @@ } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.972.47", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.47.tgz", - "integrity": "sha512-eksfbUErOejUAGWBAcNqaP7IX21oUOEo73d9R56k9Ua4d57qS90NEYkWJsuSGzTXMFulCu17qXJI/qGmM7hvoA==", + "version": "3.972.42", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.42.tgz", + "integrity": "sha512-/67fXX0ddllD4u2Nujc5PvT4byHgpMUfz6+RxIKi/0nFIckeorm7JvXgzBuDyVKw0s58EbofmETDWUf9vTEuHQ==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/nested-clients": "^3.997.15", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -322,20 +322,20 @@ } }, "node_modules/@aws-sdk/nested-clients": { - "version": "3.997.15", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.15.tgz", - "integrity": "sha512-Fpri1/PXKMKveORZ7E00VLTlWS5DkfZkW70PUE+bOnpWpAeHAQLoiDHhkzN3kNWbbSsGg64+IZYiq/EZgME3Mg==", + "version": "3.997.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.10.tgz", + "integrity": "sha512-FtQ/Bt327peZJuyo4WZSOLVUTw9ujRxntepiC7L65FxA2P82Xlq0g14T22BuqBUeMjDoxa9nvwiMHjLIfP3eUg==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/signature-v4-multi-region": "^3.996.31", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/fetch-http-handler": "^5.4.6", - "@smithy/node-http-handler": "^4.7.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/signature-v4-multi-region": "^3.996.27", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/fetch-http-handler": "^5.4.2", + "@smithy/node-http-handler": "^4.7.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -343,14 +343,15 @@ } }, "node_modules/@aws-sdk/signature-v4-multi-region": { - "version": "3.996.31", - "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.31.tgz", - "integrity": "sha512-Kn2up9SlG1KC6wRtwf0d7waTGF6rvp9DxYqB54x6UCKdQ6kyaXCqHL4WGb5vUJga5kS8FxnjhY0LqM28aMvnNQ==", + "version": "3.996.27", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.27.tgz", + "integrity": "sha512-0Phbz4t6HI3D3skxvG2uI+VWU034/nSIw1T8d+FPzzQG9EQTrw94o9mOKO2Gv3n3Oc8P7JD7RAUxkoneLWv5Eg==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "^3.973.10", - "@smithy/signature-v4": "^5.4.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/signature-v4": "^5.4.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -358,16 +359,16 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.1060.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1060.0.tgz", - "integrity": "sha512-6NZaMKkFhpaNiwLpHi1sZaYjidL/lCJE6ME6NxwA8gv9vQna+Kr0j4OFwVoz6tANRWM3WbGz6jiPsGX/Vkjwow==", + "version": "3.1049.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1049.0.tgz", + "integrity": "sha512-r7+d0lQMTHKypkmaF5jRTBYLYHCUHzt3gaVoN9SidLhQeWhCmHk3AKrboDTpPF5b7Pt7vKu3+oeMjznM2Eu1ow==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.974.17", - "@aws-sdk/nested-clients": "^3.997.15", - "@aws-sdk/types": "^3.973.10", - "@smithy/core": "^3.24.6", - "@smithy/types": "^4.14.3", + "@aws-sdk/core": "^3.974.12", + "@aws-sdk/nested-clients": "^3.997.10", + "@aws-sdk/types": "^3.973.8", + "@smithy/core": "^3.24.2", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -375,12 +376,12 @@ } }, "node_modules/@aws-sdk/types": { - "version": "3.973.10", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.973.10.tgz", - "integrity": "sha512-992QrTO7G9qCvKD0fx1rMlqcL14plUcRAbwmqqYVsuF3GrqcvlAL9qxR+baMafarEZ+l7DUQ5lCMmt5mbMhF7g==", + "version": "3.973.8", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.973.8.tgz", + "integrity": "sha512-gjlAdtHMbtR9X5iIhVUvbVcy55KnznpC6bkDUWW9z915bi0ckdUr5cjf16Kp6xq0bP5HBD2xzgbL9F9Quv5vUw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.14.3", + "@smithy/types": "^4.14.1", "tslib": "^2.6.2" }, "engines": { @@ -400,12 +401,13 @@ } }, "node_modules/@aws-sdk/xml-builder": { - "version": "3.972.27", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.27.tgz", - "integrity": "sha512-hpsCXCOI436kxWpjtRuIHVvuPP81MOw8f18jzfZeg+UOiiOvlqWcmWChzEhJEu16cOC6+ku4ncBN+7rdt+DZ9g==", + "version": "3.972.24", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.24.tgz", + "integrity": "sha512-V8z5YcDPfsvzrBlj0xR1vhRtocblhYbqdreCJB/voGd4Sr5zjNAeWxexbnqVtskTJe0vFb5KMqbSL++ePl+zRw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.14.3", + "@nodable/entities": "2.1.0", + "@smithy/types": "^4.14.1", "fast-xml-parser": "5.7.3", "tslib": "^2.6.2" }, @@ -505,9 +507,9 @@ } }, "node_modules/@biomejs/biome": { - "version": "2.4.16", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.16.tgz", - "integrity": "sha512-x9ajFh1zChVybCiM3TN6OD4phAqLgtPZjFrZF+aTMYCPjwBO+k529TX7PPsAqtGNLeV4UgzwQnowEgS7bGmzcA==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.15.tgz", + "integrity": "sha512-j5VH3a/h/HXTKBM50MDMxRCzkeLv9S2XJcW2WgnZT1+xyisi+0bISrXR82gCX+8S9lvK0skEvHJRN+3Ktr2hlw==", "dev": true, "license": "MIT OR Apache-2.0", "bin": { @@ -521,20 +523,20 @@ "url": "https://opencollective.com/biome" }, "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "2.4.16", - "@biomejs/cli-darwin-x64": "2.4.16", - "@biomejs/cli-linux-arm64": "2.4.16", - "@biomejs/cli-linux-arm64-musl": "2.4.16", - "@biomejs/cli-linux-x64": "2.4.16", - "@biomejs/cli-linux-x64-musl": "2.4.16", - "@biomejs/cli-win32-arm64": "2.4.16", - "@biomejs/cli-win32-x64": "2.4.16" + "@biomejs/cli-darwin-arm64": "2.4.15", + "@biomejs/cli-darwin-x64": "2.4.15", + "@biomejs/cli-linux-arm64": "2.4.15", + "@biomejs/cli-linux-arm64-musl": "2.4.15", + "@biomejs/cli-linux-x64": "2.4.15", + "@biomejs/cli-linux-x64-musl": "2.4.15", + "@biomejs/cli-win32-arm64": "2.4.15", + "@biomejs/cli-win32-x64": "2.4.15" } }, "node_modules/@biomejs/cli-darwin-arm64": { - "version": "2.4.16", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.16.tgz", - "integrity": "sha512-wxPvu4XOA85YJk9ixSWUmq/QBHbid85BISbOAqqBM/5xQpPk9ayjk5375tOlSC0BeCwNSbPFafQBm+vBumXq0A==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.15.tgz", + "integrity": "sha512-rF3PPqLq1yoST79zaQbDjVJwsuIeci/O+9bgNmC5QpgOqz6aqYuzA4abyAGx+mgyiDXn4A049xAN8gijbuR1Qg==", "cpu": [ "arm64" ], @@ -549,9 +551,9 @@ } }, "node_modules/@biomejs/cli-darwin-x64": { - "version": "2.4.16", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.16.tgz", - "integrity": "sha512-xFCqGPwYusQJp4N4NJLi1XJiZqjwFdjhT+KqtNy+Ug3qgfczqnTa6MSDvxJF6TkuDLoYJItMapz6tAf7kCekFw==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.15.tgz", + "integrity": "sha512-/5KHXYMfSJs1fNXiX30xFtI8JcCFV6zaVVLxOa0M2sfqBKHkpQhRTv94yxQWxeTY2lzo2OuTlNvPC+hDQt2wcQ==", "cpu": [ "x64" ], @@ -566,9 +568,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64": { - "version": "2.4.16", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.16.tgz", - "integrity": "sha512-2kFb4//jxfZaP6D+Rj5VkHkxgyD9EoRAVBEQb8PKRv+s4NO2zYNJKXFaJmK1CmhufJOWEfpHKaRbOja7qjmdhQ==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.15.tgz", + "integrity": "sha512-owaAMZD/T4LrD0ELNCk0Km3qrRHuM0X6EAyVE1FSqGY0rbLoiDLrO4Us2tllm6cAeB2Ioa9C2C08NZPdr8+0Ug==", "cpu": [ "arm64" ], @@ -583,9 +585,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "2.4.16", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.16.tgz", - "integrity": "sha512-oYxnW0ARfJkr72ezzF2OR8N/rtkgLUQeYtF8cFhVswbknHxtTcmzSsanVJP8yQKnGpGpc2ck6c5zLvHahL6Cbg==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.15.tgz", + "integrity": "sha512-ZPcxznxm0pogHBLZhYntyR3sR+MrZjqJIKEr7ZqVen0Rl+P/4upVmfYXjftizi9RoqZntg33fv/1fbdhbYXpEQ==", "cpu": [ "arm64" ], @@ -600,9 +602,9 @@ } }, "node_modules/@biomejs/cli-linux-x64": { - "version": "2.4.16", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.16.tgz", - "integrity": "sha512-NbcBbi/nJqn5baae6wqRXdS7Gadf2uRpehSh6vMSYpG8OhkXl/Xg8aorWrJ+9VWqAT5ml90alLvorkpMW0nBwQ==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.15.tgz", + "integrity": "sha512-0jj7THz12GbUOLmMibktK6DZjqz2zV64KFxyBtcFTKPiiOIY0a7vns1elpO1dERvxpsZ5ik0oFfz0oGwFde1+g==", "cpu": [ "x64" ], @@ -617,9 +619,9 @@ } }, "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "2.4.16", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.16.tgz", - "integrity": "sha512-iHDS+MCM65DPqWGu+ECC3uoALyj2H7F4nVUPxIPjz/PIl94EUu+EDfGZDzFP+NY1EOPVt9NQvwFqq7HdMmowdg==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.15.tgz", + "integrity": "sha512-CNq/9W38SYSH023lfcQ4KKU8K0YX8T//FZUhcgtMMRABDojx5XsMV7jlweAvGSl389wJQB29Qo6Zb/a+jdvt+w==", "cpu": [ "x64" ], @@ -634,9 +636,9 @@ } }, "node_modules/@biomejs/cli-win32-arm64": { - "version": "2.4.16", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.16.tgz", - "integrity": "sha512-0rgImMsNb5v/chhkIFe3wu7PEFClS6RBAYUijGL9UsYN3PanSaoK24HSSuSJb1pYbYYVjzAyZTl3gtjJ84BM8A==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.15.tgz", + "integrity": "sha512-ouhkYdlhp/1GghEJPdWwD/Vi3gQ1nFxuSpMolWsbq3Lsq3QUR4jl6UdhhscdCugKU5vOEuMiJhvKj66O0OCq+w==", "cpu": [ "arm64" ], @@ -651,9 +653,9 @@ } }, "node_modules/@biomejs/cli-win32-x64": { - "version": "2.4.16", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.16.tgz", - "integrity": "sha512-Kp85jgoBHa05gix6UIRjfCDiUV3w/8VIdZ247VyyO2gEjaw12WEVhdIjlxp/AMzXxqxQwbxNTDVZ3Mwd2RG5rw==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.15.tgz", + "integrity": "sha512-zBrGq5mx5wwpnow4+2BxUvleDM+GNd4sLbPaMapsSLQLD0NGRCquqPBTgN+7XkUteHvj7M+BstuI8tmnV7+HgQ==", "cpu": [ "x64" ], @@ -1173,6 +1175,16 @@ "node": ">=6.9.0" } }, + "node_modules/@isaacs/cliui": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz", + "integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, "node_modules/@isaacs/fs-minipass": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", @@ -1273,14 +1285,14 @@ } }, "node_modules/@jsonjoy.com/fs-core": { - "version": "4.57.6", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-core/-/fs-core-4.57.6.tgz", - "integrity": "sha512-uI++Wx6VkBJqVmkb4ZeExwAVpZiA2Do5NrEtXoDk0Pdvce3ytFXJoviT1sLOj16+qDIMnD5nWPfOhVpnDmRJKg==", + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-core/-/fs-core-4.57.2.tgz", + "integrity": "sha512-SVjwklkpIV5wrynpYtuYnfYH1QF4/nDuLBX7VXdb+3miglcAgBVZb/5y0cOsehRV/9Vb+3UqhkMq3/NR3ztdkQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@jsonjoy.com/fs-node-builtins": "4.57.6", - "@jsonjoy.com/fs-node-utils": "4.57.6", + "@jsonjoy.com/fs-node-builtins": "4.57.2", + "@jsonjoy.com/fs-node-utils": "4.57.2", "thingies": "^2.5.0" }, "engines": { @@ -1295,15 +1307,15 @@ } }, "node_modules/@jsonjoy.com/fs-fsa": { - "version": "4.57.6", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-fsa/-/fs-fsa-4.57.6.tgz", - "integrity": "sha512-pKkw/yC5CzSZKhIIUIsH1przOa+K5jGmZIg1sWaSF24JojyrUFbjcQv7QrcGAudriei6HQ6R0BFj+V8NbQinJw==", + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-fsa/-/fs-fsa-4.57.2.tgz", + "integrity": "sha512-fhO8+iR2I+OCw668ISDJdn1aArc9zx033sWejIyzQ8RBeXa9bDSaUeA3ix0poYOfrj1KdOzytmYNv2/uLDfV6g==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@jsonjoy.com/fs-core": "4.57.6", - "@jsonjoy.com/fs-node-builtins": "4.57.6", - "@jsonjoy.com/fs-node-utils": "4.57.6", + "@jsonjoy.com/fs-core": "4.57.2", + "@jsonjoy.com/fs-node-builtins": "4.57.2", + "@jsonjoy.com/fs-node-utils": "4.57.2", "thingies": "^2.5.0" }, "engines": { @@ -1318,17 +1330,17 @@ } }, "node_modules/@jsonjoy.com/fs-node": { - "version": "4.57.6", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node/-/fs-node-4.57.6.tgz", - "integrity": "sha512-Kbn1jdkvDN4F2+BhoB6mMu7NCbhP0bgA5NcI1aJj/Q5UcU+I1JLLW+dEQean33iV4tXv35AzBVKPICnDltBpxw==", + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node/-/fs-node-4.57.2.tgz", + "integrity": "sha512-nX2AdL6cOFwLdju9G4/nbRnYevmCJbh7N7hvR3gGm97Cs60uEjyd0rpR+YBS7cTg175zzl22pGKXR5USaQMvKg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@jsonjoy.com/fs-core": "4.57.6", - "@jsonjoy.com/fs-node-builtins": "4.57.6", - "@jsonjoy.com/fs-node-utils": "4.57.6", - "@jsonjoy.com/fs-print": "4.57.6", - "@jsonjoy.com/fs-snapshot": "4.57.6", + "@jsonjoy.com/fs-core": "4.57.2", + "@jsonjoy.com/fs-node-builtins": "4.57.2", + "@jsonjoy.com/fs-node-utils": "4.57.2", + "@jsonjoy.com/fs-print": "4.57.2", + "@jsonjoy.com/fs-snapshot": "4.57.2", "glob-to-regex.js": "^1.0.0", "thingies": "^2.5.0" }, @@ -1344,9 +1356,9 @@ } }, "node_modules/@jsonjoy.com/fs-node-builtins": { - "version": "4.57.6", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-builtins/-/fs-node-builtins-4.57.6.tgz", - "integrity": "sha512-V4DgEFT3Cg5S9fCMOZSCVdTxdJWWLBO0WnAazV7hnCM96u5zXHyW/ubDAfcSVwqjkMJ50W1Y44IXtxRoIwaCVg==", + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-builtins/-/fs-node-builtins-4.57.2.tgz", + "integrity": "sha512-xhiegylRmhw43Ki2HO1ZBL7DQ5ja/qpRsL29VtQ2xuUHiuDGbgf2uD4p9Qd8hJI5P6RCtGYD50IXHXVq/Ocjcg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1361,15 +1373,15 @@ } }, "node_modules/@jsonjoy.com/fs-node-to-fsa": { - "version": "4.57.6", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-to-fsa/-/fs-node-to-fsa-4.57.6.tgz", - "integrity": "sha512-+JptNw3iifihxH2rEXrninDzX4FFVW8JD/wPR8GbJPAeL9CQUSblrlumOPB5gZuS7tYRX+PJPLtT7XzKoRhv/Q==", + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-to-fsa/-/fs-node-to-fsa-4.57.2.tgz", + "integrity": "sha512-18LmWTSONhoAPW+IWRuf8w/+zRolPFGPeGwMxlAhhfY11EKzX+5XHDBPAw67dBF5dxDErHJbl40U+3IXSDRXSQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@jsonjoy.com/fs-fsa": "4.57.6", - "@jsonjoy.com/fs-node-builtins": "4.57.6", - "@jsonjoy.com/fs-node-utils": "4.57.6" + "@jsonjoy.com/fs-fsa": "4.57.2", + "@jsonjoy.com/fs-node-builtins": "4.57.2", + "@jsonjoy.com/fs-node-utils": "4.57.2" }, "engines": { "node": ">=10.0" @@ -1383,13 +1395,13 @@ } }, "node_modules/@jsonjoy.com/fs-node-utils": { - "version": "4.57.6", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-utils/-/fs-node-utils-4.57.6.tgz", - "integrity": "sha512-foyUrfS7WmYEUzqYXSNxmJBcSj04TABrkpFabwO9SCDCpVCfJ+qG+2sk5FjfiflG2n0SDFZDCJ6vYlJAEpxJFg==", + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-node-utils/-/fs-node-utils-4.57.2.tgz", + "integrity": "sha512-rsPSJgekz43IlNbLyAM/Ab+ouYLWGp5DDBfYBNNEqDaSpsbXfthBn29Q4muFA9L0F+Z3mKo+CWlgSCXrf+mOyQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@jsonjoy.com/fs-node-builtins": "4.57.6" + "@jsonjoy.com/fs-node-builtins": "4.57.2" }, "engines": { "node": ">=10.0" @@ -1403,13 +1415,13 @@ } }, "node_modules/@jsonjoy.com/fs-print": { - "version": "4.57.6", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-print/-/fs-print-4.57.6.tgz", - "integrity": "sha512-96eAn4Dudtt67LTeuU47yUD+pg9/G/oKpI10zei9ljk3X3WK4lYKc+n3cpaPCAbKPzoyfxl0mXm8f8Y7BOSFXw==", + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-print/-/fs-print-4.57.2.tgz", + "integrity": "sha512-wK9NSow48i4DbDl9F1CQE5TqnyZOJ04elU3WFG5aJ76p+YxO/ulyBBQvKsessPxdo381Bc2pcEoyPujMOhcRqQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@jsonjoy.com/fs-node-utils": "4.57.6", + "@jsonjoy.com/fs-node-utils": "4.57.2", "tree-dump": "^1.1.0" }, "engines": { @@ -1424,14 +1436,14 @@ } }, "node_modules/@jsonjoy.com/fs-snapshot": { - "version": "4.57.6", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-snapshot/-/fs-snapshot-4.57.6.tgz", - "integrity": "sha512-V57CMzbOgTzUWGOWQ8GzHQdpJP6JnrYVNCtTBNxVYEnlVRvo4uEJqHhtAT8vhDFrIuJOXLrTL1Fki4h5oI7xxg==", + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/fs-snapshot/-/fs-snapshot-4.57.2.tgz", + "integrity": "sha512-GdduDZuoP5V/QCgJkx9+BZ6SC0EZ/smXAdTS7PfMqgMTGXLlt/bH/FqMYaqB9JmLf05sJPtO0XRbAwwkEEPbVw==", "dev": true, "license": "Apache-2.0", "dependencies": { "@jsonjoy.com/buffers": "^17.65.0", - "@jsonjoy.com/fs-node-utils": "4.57.6", + "@jsonjoy.com/fs-node-utils": "4.57.2", "@jsonjoy.com/json-pack": "^17.65.0", "@jsonjoy.com/util": "^17.65.0" }, @@ -1671,9 +1683,9 @@ } }, "node_modules/@nodable/entities": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.1.tgz", - "integrity": "sha512-Pig3HxDIoMgjdEH8OCf/dkcTmLFjJRjWuq8jSnklu284/TKOPibSRERmOykiwmyXTtv61mP+44f3GMx0tLAyjg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA==", "funding": [ { "type": "github", @@ -1814,6 +1826,24 @@ "node": "^20.17.0 || >=22.9.0" } }, + "node_modules/@npmcli/map-workspaces/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@npmcli/metavuln-calculator": { "version": "9.0.3", "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-9.0.3.tgz", @@ -1870,6 +1900,24 @@ "node": "^20.17.0 || >=22.9.0" } }, + "node_modules/@npmcli/package-json/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@npmcli/promise-spawn": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-9.0.1.tgz", @@ -1924,9 +1972,9 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.133.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz", - "integrity": "sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==", + "version": "0.129.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.129.0.tgz", + "integrity": "sha512-3oz8m3FGdr2nDXVqmFUw7jolKliC4MoyXYIG2c7gpjBnzUWQpUGIYcXYKxTdTi+N2jusvt610ckTMkxdwHkYEg==", "dev": true, "license": "MIT", "funding": { @@ -1934,9 +1982,9 @@ } }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.3.tgz", - "integrity": "sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0.tgz", + "integrity": "sha512-TWMZnRLMe63C2Lhyicviu7ZHaU4kxa6PS3rofvc9GmcvptzNN11BcfQ4Sl7MwTOsisQoa2keB/EBdNCAnUo8vA==", "cpu": [ "arm64" ], @@ -1951,9 +1999,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.3.tgz", - "integrity": "sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0.tgz", + "integrity": "sha512-6XcD+8k0gPVItNagEw78/qqcBDwKcwDYS8V2hRmVsfUSIrd8cWe/CBvRDI5toqFyPfj+FJr6t8U6Xj2P2prEew==", "cpu": [ "arm64" ], @@ -1968,9 +2016,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.3.tgz", - "integrity": "sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0.tgz", + "integrity": "sha512-iN/tWVXRQDWvmZlKdceP1Dwug9GDpEymhb9p4xnEe6zvCg5lFmzVljl+1qR1NVx3yfGpr2Na+CuLmv5IU8uzfQ==", "cpu": [ "x64" ], @@ -1985,9 +2033,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.3.tgz", - "integrity": "sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0.tgz", + "integrity": "sha512-jjQMDvvwSOuhOwMszD/klSOjyWMM3zI64hWTj9KT5x4MxRbZAf+7vLQ6qouRhtsLVFHr3f0ILaJAfgENPiQdAQ==", "cpu": [ "x64" ], @@ -2002,9 +2050,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.3.tgz", - "integrity": "sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0.tgz", + "integrity": "sha512-d//Dtg2x6/m3mbV64yUGNnDGNZaDGRpDLLNGerHQUVObuNaIQaaDp25yUiqGXtHEXX+NP2d0wAlmKgpYgIAJ2A==", "cpu": [ "arm" ], @@ -2019,9 +2067,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.3.tgz", - "integrity": "sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0.tgz", + "integrity": "sha512-n7Ofp0mx+aB2cC+Sdy5YtMnXtY9lchnHbY+3Yt0uq9JsWQExf4f5Whu0tK0R8Jdc9S6RchTHjIFY7uc92puOVQ==", "cpu": [ "arm64" ], @@ -2036,9 +2084,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.3.tgz", - "integrity": "sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0.tgz", + "integrity": "sha512-EIVjy2cgd7uuMMo94FVkBp7F6DhcZAUwNURkSG3RwUmvAXR6s0ISxM81U+IydcZByPG0pZIHsf1b6kTxoFDgJA==", "cpu": [ "arm64" ], @@ -2053,9 +2101,9 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.3.tgz", - "integrity": "sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0.tgz", + "integrity": "sha512-JEwwOPcwTLAcpDQlqSmjEmfs63xJnSiUNIGvLcDLUHCWK4XowpS/7c7tUsUH6uT/ct6bMUTdXKfI8967FYj6mg==", "cpu": [ "ppc64" ], @@ -2070,9 +2118,9 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.3.tgz", - "integrity": "sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0.tgz", + "integrity": "sha512-0wjCFhLrihtAubnT9iA0N++0pSV0z5Hg7tNGdNJ4RFaINceHadoF+kiFGyY1qSSNVIAZtLotG8Ju1bgDPkjnFA==", "cpu": [ "s390x" ], @@ -2087,9 +2135,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.3.tgz", - "integrity": "sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0.tgz", + "integrity": "sha512-Dfn7iak9BcMMePxcoJfpSbWqnEyrp/dRF63/8qW/eHBdOZov6x5aShLLEYGYdIeSJ6vMLK/XCVB+lGIxm41bQA==", "cpu": [ "x64" ], @@ -2104,9 +2152,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.3.tgz", - "integrity": "sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0.tgz", + "integrity": "sha512-5/utzzDmD/pD/bmuaUcbTf/sZYy0aztwIVlfpoW1fTjCZ0BaPOMVWGZL1zvgxyi7ZIVYWlxKONHmSbHuiOh8Jw==", "cpu": [ "x64" ], @@ -2121,9 +2169,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.3.tgz", - "integrity": "sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0.tgz", + "integrity": "sha512-ouJs8VcUomfLfpbUECqFMRqdV4x6aeAK3MA4m6vTrJJjKyWTV5KnxZx7Jd9G+GlDaQQxubcba00x16OyJ1meig==", "cpu": [ "arm64" ], @@ -2138,9 +2186,9 @@ } }, "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.3.tgz", - "integrity": "sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0.tgz", + "integrity": "sha512-E+oHKGiDA+lsKMmFtffDDw91EryDT7uJocrIuCHqhm6bCTM6xFK+3gaCkYOHfPwQr0cCNarSM2xaELoQDz9jJg==", "cpu": [ "wasm32" ], @@ -2157,9 +2205,9 @@ } }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.3.tgz", - "integrity": "sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0.tgz", + "integrity": "sha512-yYK02n8Rngo+gbm1y6G0+7jk1sJ/2Wt7K0me0Y7k/ErBpyf+LJ2gFpqWVTcRV1rUepBlQRmpgWkTQCiiwrK0Ow==", "cpu": [ "arm64" ], @@ -2174,9 +2222,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.3.tgz", - "integrity": "sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0.tgz", + "integrity": "sha512-14bpChMahXRRXiTwahSl+zzHPW6qQTXtkMuJBFlbo+pqSAews2d4BdCSHfrJ/MBsCZtpmTafsY+1QhBzitcmdg==", "cpu": [ "x64" ], @@ -2191,9 +2239,9 @@ } }, "node_modules/@rolldown/pluginutils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", - "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0.tgz", + "integrity": "sha512-aKs/3GSWyV0mrhNmt/96/Z3yczC3yvrzYATCiCXQebBsGyYzjNdUphRVLeJQ67ySKVXRfMxt2lm12pmXvbPFQQ==", "dev": true, "license": "MIT" }, @@ -2319,13 +2367,13 @@ } }, "node_modules/@smithy/core": { - "version": "3.24.6", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.24.6.tgz", - "integrity": "sha512-wBXDRup6UU97VKyaiRo8AssnfStPtG0oAAfpq/bC0a1YYau8pM86YB4kM6ccoVi1mS8l/UHbn9oDM+7uozr/ug==", + "version": "3.24.3", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.24.3.tgz", + "integrity": "sha512-Ep/7tPamGY8mgESE3LyLKtxJyy6U52WWAqr/3wial47Sj4u3PiIF73AOGI27UyLy9duTkhZbgzodOfLV4TduZg==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/crc32": "5.2.0", - "@smithy/types": "^4.14.3", + "@smithy/types": "^4.14.2", "tslib": "^2.6.2" }, "engines": { @@ -2333,13 +2381,13 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.3.7.tgz", - "integrity": "sha512-xj8gq/bjFABAh6qWPSDCYcY3kzQIm4b561C+YnHH4zGq8rOgzQ3Shk+JGlpUxSd41UGiO6FkLdUCtNX1FAeHgg==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.3.3.tgz", + "integrity": "sha512-I2Bti0DKFo2IJyN28ijCsx51BAumEYR4/1yZ1FXyBygy9MqbnMqCev4JPth/MbpRfBSRAX35hITSnAdJRo1u5w==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.6", - "@smithy/types": "^4.14.3", + "@smithy/core": "^3.24.3", + "@smithy/types": "^4.14.2", "tslib": "^2.6.2" }, "engines": { @@ -2347,13 +2395,13 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.4.6.tgz", - "integrity": "sha512-FEwEYJ1jlBKdhe9TPzfghEi1bP55ZeEImlDkEa62bBBYzUcnB6RUCyuiS2mqKt6ZVjUbBgcNhzfIctH+Hevx9g==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.4.3.tgz", + "integrity": "sha512-F+DRf8IJazRJgYog2A/yJK7eYVc0rqTlRzO+5ZxjJd4WkZoKz0IJRncf7G6t1pdVT3kryJcwuTFhN1c5m6N47A==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.6", - "@smithy/types": "^4.14.3", + "@smithy/core": "^3.24.3", + "@smithy/types": "^4.14.2", "tslib": "^2.6.2" }, "engines": { @@ -2373,13 +2421,13 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.7.6.tgz", - "integrity": "sha512-3fya8i7GrJilQouk4cZJKdy5k8MWQBpjfXrRNaXDedH8r779tr0jcxyH3+yoTmsluc2+vF4S343yFbnvu8ExDQ==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.7.3.tgz", + "integrity": "sha512-/jPhevcTFPMVl6KNjbaI47iOg1zxC7IsnX4PQDGVZKMFceOXtB8IEYaB7a9VvkP/3oC60WzTeKocvSI7vLT0vA==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.6", - "@smithy/types": "^4.14.3", + "@smithy/core": "^3.24.3", + "@smithy/types": "^4.14.2", "tslib": "^2.6.2" }, "engines": { @@ -2387,13 +2435,13 @@ } }, "node_modules/@smithy/property-provider": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.3.6.tgz", - "integrity": "sha512-0rhHv1Ww27kajF6qewme2aRtJmKFtSwE6EZ2dj5KxdX/R3ANsUugqTnH0tvpZwGiQ3MOMhetuCGFAeKVv3/Onw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.3.3.tgz", + "integrity": "sha512-nmeVi9Ww/RMyttqj1Dh0PA+iVieKm4dxDlnT6tNP118O/5U/Qqb9b3DV5A3RX+slR/m4/MABSZ2zNfSkpVV8dw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.6", + "@smithy/core": "^3.24.3", "tslib": "^2.6.2" }, "engines": { @@ -2401,13 +2449,13 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.4.6.tgz", - "integrity": "sha512-Ojg4B6oIDlIr1R86xCDJt1zJWnYa0VINmqdjfe9qxWjdRivHalZ3iSlQgVqYbW0MdpFOC5XfHEWsnbmdnpIILQ==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.4.3.tgz", + "integrity": "sha512-53+75QuPl6DL+ct6vVEB51FDO5oulXr20TPV46VvJZg76lIlXNWfxi8j+G2V/t0I2qxCBOa3vX/8bmjrpFVo9g==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.24.6", - "@smithy/types": "^4.14.3", + "@smithy/core": "^3.24.3", + "@smithy/types": "^4.14.2", "tslib": "^2.6.2" }, "engines": { @@ -2415,9 +2463,9 @@ } }, "node_modules/@smithy/types": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.14.3.tgz", - "integrity": "sha512-YupL0ZWmFtJexUN2cHzkvvF/b9pKrtAIfT1o7/oY/Ppu8IYeZ+lDPM5vZdQJaSeA132dJCqojjGC9NhXeF71VQ==", + "version": "4.14.2", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.14.2.tgz", + "integrity": "sha512-P+otAxbV4CqBybp7EkcJCrig63yE2E7PuNVOmilVMRcx/O+QDzGULTrKsq4DV13gSfak9ObPrWaHl/9bL5YcWw==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -2551,9 +2599,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "25.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.1.tgz", - "integrity": "sha512-xfrlY7UD5rMJk3ZVJP8BNzS28J36YJg+xp+LPXV1TdWxr8uMH5A860QNxYDGQe/ylDSgjxE52Q9VnO7p75tJxg==", + "version": "25.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.0.tgz", + "integrity": "sha512-AOQwYUNolgy3VosiRqXrACUXTN8nJUtPl7FJXMqZVyxiiCLhQuG3jXKvCS1ALr+Y2OmZhzzLVlYPEqJaiqkaJQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2592,14 +2640,14 @@ "license": "MIT" }, "node_modules/@vitest/coverage-v8": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.8.tgz", - "integrity": "sha512-lt3kovsyHwYe00wq4D1ti0Z974fWj4NLp6siqiyEufUpyFwK9Yhi7rBhac9JL5aA0zoMrJqc4vYPZRUnI7l7nw==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.6.tgz", + "integrity": "sha512-36l628fQ/9a/8ihy97eOtEnvWQEdqULQOJtcaxtoNq0G1w3Mxd4szSahOaMM9/NGyZ+hyKcMtIW/WIxq0XQViQ==", "dev": true, "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^1.0.2", - "@vitest/utils": "4.1.8", + "@vitest/utils": "4.1.6", "ast-v8-to-istanbul": "^1.0.0", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", @@ -2613,8 +2661,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "4.1.8", - "vitest": "4.1.8" + "@vitest/browser": "4.1.6", + "vitest": "4.1.6" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -2622,45 +2670,17 @@ } } }, - "node_modules/@vitest/coverage-v8/node_modules/@vitest/pretty-format": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.8.tgz", - "integrity": "sha512-9GasEBxpZ1VYIpqHf/0+YGg121uSNwCKOJqIrTwWP/TB7DmFCiaBpNl3aPZzoLWfWkuqhbH8vJIVobZkvdo2cA==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^3.1.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/coverage-v8/node_modules/@vitest/utils": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.8.tgz", - "integrity": "sha512-uOJamYALNhfJ6iolExyQM40yIQwDqYnkKtQ5VCiSe17E33H0aQ/u+1GlRuz4LZBk6Mm3sg90G9hEbmEt37C1Zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "4.1.8", - "convert-source-map": "^2.0.0", - "tinyrainbow": "^3.1.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, "node_modules/@vitest/expect": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.8.tgz", - "integrity": "sha512-h3nDO677RDLEGlBxyQ5CW8RlMThSKSRLUePLOx09gNIWRL40edgA1GCZSZgf1W55MFAG6/Sw14KeaAnqv0NKdQ==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.6.tgz", + "integrity": "sha512-7EHDquPthALSV0jhhjgEW8FXaviMx7rSqu8W6oqCoAuOhKov814P99QDV1pxMA3QPv21YudvJngIhjrNI4opLg==", "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.8", - "@vitest/utils": "4.1.8", + "@vitest/spy": "4.1.6", + "@vitest/utils": "4.1.6", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" }, @@ -2669,13 +2689,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.8.tgz", - "integrity": "sha512-LEiN/xe4OSIbKe9HQIp5OC24agGD9J5CnmMgsLohVVoOPWL9a2sBoR6VBx43jQZb7Kr1l4RCuyCJzcAa0+dojw==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.6.tgz", + "integrity": "sha512-MCFc63czMjEInOlcY2cpQCvCN+KgbAn+60xu9cMgP4sKaLC5JNAKw7JH8QdAnoAC88hW1IiSNZ+GgVXlN1UcMQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.1.8", + "@vitest/spy": "4.1.6", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -2696,9 +2716,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.8.tgz", - "integrity": "sha512-9GasEBxpZ1VYIpqHf/0+YGg121uSNwCKOJqIrTwWP/TB7DmFCiaBpNl3aPZzoLWfWkuqhbH8vJIVobZkvdo2cA==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.6.tgz", + "integrity": "sha512-h5SxD/IzNhZYnrSZRsUZQIC+vD0GY8cUvq0iwsmkFKixRCKLLWqCXa/FIQ4S1R+sI+PGoojkHsdNrbZiM9Qpgw==", "dev": true, "license": "MIT", "dependencies": { @@ -2709,13 +2729,13 @@ } }, "node_modules/@vitest/runner": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.8.tgz", - "integrity": "sha512-EmVxeBAfMJvycdjd6Hm+RbFBbA9fKvo0Kx37hNpBYoYeavH3RNsBXWDooR1mgD52dCrxIIuP7UotpfiwOikvcg==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.6.tgz", + "integrity": "sha512-nOPCmn2+yD0ZNmKdsXGv/UxMMWbMuKeD6GyYncNwdkYDxpQvrPSKYj2rWuDjC2Y4b6w6hjip5dBKFzEUuZe3vA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.1.8", + "@vitest/utils": "4.1.6", "pathe": "^2.0.3" }, "funding": { @@ -2723,14 +2743,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.8.tgz", - "integrity": "sha512-acfZboRmAIf05DEKcBQy33VXojFJjtUdLyo7oOmV9kebb2xdU01UknNiPuPZoJZQyO7DF0gZdTGTpeAzET9QPQ==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.6.tgz", + "integrity": "sha512-YhsdE6xAVfTDmzjxL2ZDUvjj+ZsgyOKe+TdQzqkD72wIOmHka8NuGQ6NpTNZv9D2Z63fbwWKJPeVpEw4EQgYxw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.8", - "@vitest/utils": "4.1.8", + "@vitest/pretty-format": "4.1.6", + "@vitest/utils": "4.1.6", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -2739,9 +2759,9 @@ } }, "node_modules/@vitest/spy": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.8.tgz", - "integrity": "sha512-6EevtBp6OZOPF7bmz36HrGMeP3txgVSrgebWxHOafDXGkhIzfXK14f8KF6MuFfgXXUeHxmpD3BQxkV00/3s5mA==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.6.tgz", + "integrity": "sha512-JFKxMx6udhwKh/Ldo270e17QX710vgunMkuPAvXjHSvC6oqLWAHhVhjg/I71q0u0CBSErIODV1Kjv0FQNSWjdg==", "dev": true, "license": "MIT", "funding": { @@ -2749,13 +2769,13 @@ } }, "node_modules/@vitest/utils": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.8.tgz", - "integrity": "sha512-uOJamYALNhfJ6iolExyQM40yIQwDqYnkKtQ5VCiSe17E33H0aQ/u+1GlRuz4LZBk6Mm3sg90G9hEbmEt37C1Zg==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.6.tgz", + "integrity": "sha512-FxIY+U81R3LGKCxaHHFRQ5+g6/iRgGLmeHWdp2Amj4ljQRrEIWHmZyDfDYBRZlpyqA7qKxtS9DD1dhk8RnRIVQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.8", + "@vitest/pretty-format": "4.1.6", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" }, @@ -3038,6 +3058,24 @@ "node": "^20.17.0 || >=22.9.0" } }, + "node_modules/cacache/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -3613,6 +3651,44 @@ } } }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -4251,6 +4327,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fs-minipass": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", @@ -4290,9 +4383,9 @@ } }, "node_modules/generate-license-file": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/generate-license-file/-/generate-license-file-4.2.1.tgz", - "integrity": "sha512-0As00it8cbFYxp8W5vFqGgyEDgsNFoTMycoIMChmPqmw9ablhWHdO78KzjkedUnszWpLdTspby+tEV4WI0KscA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/generate-license-file/-/generate-license-file-4.1.1.tgz", + "integrity": "sha512-hh2UnFsUiUkw/NdO1tdwBM4xVKnFPHEnR+2yU9NxDLIupIQNRZf4i0UpzGdJu1wUTSzlMHzy4C+2xv+Tex9suA==", "dev": true, "license": "ISC", "dependencies": { @@ -4302,11 +4395,11 @@ "commander": "^14.0.2", "cosmiconfig": "^9.0.0", "enquirer": "^2.3.6", - "glob": "^13.0.0", + "glob": "^11.0.0", "json5": "^2.2.3", "ora": "^5.4.1", "tslib": "^2.3.0", - "zod": "^4.0.0" + "zod": "^3.21.4" }, "bin": { "generate-license-file": "bin/generate-license-file" @@ -4526,18 +4619,25 @@ "license": "ISC" }, "node_modules/glob": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", - "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", + "integrity": "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "minimatch": "^10.2.2", - "minipass": "^7.1.3", - "path-scurry": "^2.0.2" + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -4995,6 +5095,22 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz", + "integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^9.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/js-tokens": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz", @@ -5698,20 +5814,20 @@ "license": "MIT" }, "node_modules/memfs": { - "version": "4.57.6", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.57.6.tgz", - "integrity": "sha512-WQK+DGjKCnPdpSyJUXphz+COF2uEhhsxQ3VIWBSbzpbbXuch3h4FePMqXrXGdLjsTgo4JFzBFsP6AWd9pVazGw==", + "version": "4.57.2", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.57.2.tgz", + "integrity": "sha512-2nWzSsJzrukurSDna4Z0WywuScK4Id3tSKejgu74u8KCdW4uNrseKRSIDg75C6Yw5ZRqBe0F0EtMNlTbUq8bAQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@jsonjoy.com/fs-core": "4.57.6", - "@jsonjoy.com/fs-fsa": "4.57.6", - "@jsonjoy.com/fs-node": "4.57.6", - "@jsonjoy.com/fs-node-builtins": "4.57.6", - "@jsonjoy.com/fs-node-to-fsa": "4.57.6", - "@jsonjoy.com/fs-node-utils": "4.57.6", - "@jsonjoy.com/fs-print": "4.57.6", - "@jsonjoy.com/fs-snapshot": "4.57.6", + "@jsonjoy.com/fs-core": "4.57.2", + "@jsonjoy.com/fs-fsa": "4.57.2", + "@jsonjoy.com/fs-node": "4.57.2", + "@jsonjoy.com/fs-node-builtins": "4.57.2", + "@jsonjoy.com/fs-node-to-fsa": "4.57.2", + "@jsonjoy.com/fs-node-utils": "4.57.2", + "@jsonjoy.com/fs-print": "4.57.2", + "@jsonjoy.com/fs-snapshot": "4.57.2", "@jsonjoy.com/json-pack": "^1.11.0", "@jsonjoy.com/util": "^1.9.0", "glob-to-regex.js": "^1.0.1", @@ -7089,6 +7205,13 @@ "quickjs-wasi": "^2.2.0" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/pacote": { "version": "21.5.0", "resolved": "https://registry.npmjs.org/pacote/-/pacote-21.5.0.tgz", @@ -7220,6 +7343,16 @@ "node": ">=14.0.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -7316,9 +7449,9 @@ } }, "node_modules/postcss": { - "version": "8.5.15", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", - "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "version": "8.5.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz", + "integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==", "dev": true, "funding": [ { @@ -7336,7 +7469,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.12", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -7764,14 +7897,14 @@ "license": "ISC" }, "node_modules/rolldown": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.3.tgz", - "integrity": "sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0.tgz", + "integrity": "sha512-yD986aXDESFGS95spT1LAv0jssywP4npMEjmMHyN2/5+eE8qQJUype2AaKkRiLgBgyD0LFlubwAht7VmY8rGoA==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.133.0", - "@rolldown/pluginutils": "^1.0.0" + "@oxc-project/types": "=0.129.0", + "@rolldown/pluginutils": "1.0.0" }, "bin": { "rolldown": "bin/cli.mjs" @@ -7780,21 +7913,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.0.3", - "@rolldown/binding-darwin-arm64": "1.0.3", - "@rolldown/binding-darwin-x64": "1.0.3", - "@rolldown/binding-freebsd-x64": "1.0.3", - "@rolldown/binding-linux-arm-gnueabihf": "1.0.3", - "@rolldown/binding-linux-arm64-gnu": "1.0.3", - "@rolldown/binding-linux-arm64-musl": "1.0.3", - "@rolldown/binding-linux-ppc64-gnu": "1.0.3", - "@rolldown/binding-linux-s390x-gnu": "1.0.3", - "@rolldown/binding-linux-x64-gnu": "1.0.3", - "@rolldown/binding-linux-x64-musl": "1.0.3", - "@rolldown/binding-openharmony-arm64": "1.0.3", - "@rolldown/binding-wasm32-wasi": "1.0.3", - "@rolldown/binding-win32-arm64-msvc": "1.0.3", - "@rolldown/binding-win32-x64-msvc": "1.0.3" + "@rolldown/binding-android-arm64": "1.0.0", + "@rolldown/binding-darwin-arm64": "1.0.0", + "@rolldown/binding-darwin-x64": "1.0.0", + "@rolldown/binding-freebsd-x64": "1.0.0", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.0", + "@rolldown/binding-linux-arm64-gnu": "1.0.0", + "@rolldown/binding-linux-arm64-musl": "1.0.0", + "@rolldown/binding-linux-ppc64-gnu": "1.0.0", + "@rolldown/binding-linux-s390x-gnu": "1.0.0", + "@rolldown/binding-linux-x64-gnu": "1.0.0", + "@rolldown/binding-linux-x64-musl": "1.0.0", + "@rolldown/binding-openharmony-arm64": "1.0.0", + "@rolldown/binding-wasm32-wasi": "1.0.0", + "@rolldown/binding-win32-arm64-msvc": "1.0.0", + "@rolldown/binding-win32-x64-msvc": "1.0.0" } }, "node_modules/run-con": { @@ -7865,6 +7998,29 @@ "node": ">=10" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -8408,9 +8564,9 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.2.tgz", - "integrity": "sha512-M/Q0B2cp4K7kynaT/vnED1j8TlLY+Pp7C6Wl2bl/7u/F0mUVwdyOpwomQb8JpYLitHUssAJRmLZdMCGsrx7i+g==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.1.2.tgz", + "integrity": "sha512-dAqSqE/RabpBKI8+h26GfLq6Vb3JVXs30XYQjdMjaj/c2tS8IYYMbIzP599KtRj7c57/wYApb3QjgRgXmrCukA==", "dev": true, "license": "MIT", "engines": { @@ -8418,9 +8574,9 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", "dev": true, "license": "MIT", "dependencies": { @@ -8632,17 +8788,17 @@ } }, "node_modules/vite": { - "version": "8.0.16", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz", - "integrity": "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==", + "version": "8.0.12", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.12.tgz", + "integrity": "sha512-w2dDofOWv2QB09ZITZBsvKTVAlYvPR4IAmrY/v0ir9KvLs0xybR7i48wxhM1/oyBWO34wPns+bPGw5ZrZqDpZg==", "dev": true, "license": "MIT", "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", - "postcss": "^8.5.15", - "rolldown": "1.0.3", - "tinyglobby": "^0.2.17" + "postcss": "^8.5.14", + "rolldown": "1.0.0", + "tinyglobby": "^0.2.16" }, "bin": { "vite": "bin/vite.js" @@ -8710,19 +8866,19 @@ } }, "node_modules/vitest": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.8.tgz", - "integrity": "sha512-flY6ScbCIt9HThs+C5HS7jvGOB560DJtk/Z15IQROTA6zEy49Nh8T/dofWTQL+n3vswqn87sbJNiuqw1SDp5Ig==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.6.tgz", + "integrity": "sha512-6lvjbS3p9b4CrdCmguzbh2/4uoXhGE2q71R4OX5sqF9R1bo9Xd6fGrMAfvp5wnCzlBnFVdCOp6onuTQVbo8iUQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.1.8", - "@vitest/mocker": "4.1.8", - "@vitest/pretty-format": "4.1.8", - "@vitest/runner": "4.1.8", - "@vitest/snapshot": "4.1.8", - "@vitest/spy": "4.1.8", - "@vitest/utils": "4.1.8", + "@vitest/expect": "4.1.6", + "@vitest/mocker": "4.1.6", + "@vitest/pretty-format": "4.1.6", + "@vitest/runner": "4.1.6", + "@vitest/snapshot": "4.1.6", + "@vitest/spy": "4.1.6", + "@vitest/utils": "4.1.6", "es-module-lexer": "^2.0.0", "expect-type": "^1.3.0", "magic-string": "^0.30.21", @@ -8750,12 +8906,12 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.8", - "@vitest/browser-preview": "4.1.8", - "@vitest/browser-webdriverio": "4.1.8", - "@vitest/coverage-istanbul": "4.1.8", - "@vitest/coverage-v8": "4.1.8", - "@vitest/ui": "4.1.8", + "@vitest/browser-playwright": "4.1.6", + "@vitest/browser-preview": "4.1.6", + "@vitest/browser-webdriverio": "4.1.6", + "@vitest/coverage-istanbul": "4.1.6", + "@vitest/coverage-v8": "4.1.6", + "@vitest/ui": "4.1.6", "happy-dom": "*", "jsdom": "*", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -9008,9 +9164,9 @@ } }, "node_modules/zod": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", - "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "dev": true, "license": "MIT", "funding": { diff --git a/package.json b/package.json index 027fa25..044fba5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "configure-aws-credentials", "description": "A GitHub Action to configure AWS credentials", - "version": "6.2.0", + "version": "6.1.1", "scripts": { "build": "tsc", "lint": "biome check --error-on-warnings ./src ./test && markdownlint -i node_modules -i CHANGELOG.md '**/*.md'", @@ -17,24 +17,24 @@ "organization": true }, "devDependencies": { - "@aws-sdk/credential-provider-env": "^3.972.39", - "@biomejs/biome": "2.4.16", - "@smithy/property-provider": "^4.3.6", - "@types/node": "^25.9.1", - "@vitest/coverage-v8": "4.1.8", + "@aws-sdk/credential-provider-env": "^3.972.38", + "@biomejs/biome": "2.4.15", + "@smithy/property-provider": "^4.3.3", + "@types/node": "^25.9.0", + "@vitest/coverage-v8": "^4.1.6", "aws-sdk-client-mock": "^4.1.0", "esbuild": "^0.28.0", - "generate-license-file": "^4.2.1", + "generate-license-file": "^4.1.1", "json-schema": "^0.4.0", "markdownlint-cli": "^0.48.0", - "memfs": "^4.57.6", + "memfs": "^4.57.2", "standard-version": "^9.5.0", "typescript": "^6.0.3", - "vitest": "4.1.8" + "vitest": "^4.1.5" }, "dependencies": { "@actions/core": "^3.0.1", - "@aws-sdk/client-sts": "^3.1061.0", + "@aws-sdk/client-sts": "^3.1049.0", "@smithy/node-http-handler": "^4.7.3", "proxy-agent": "^8.0.1" }, diff --git a/src/assumeRole.ts b/src/assumeRole.ts index 95f6bdc..700532b 100644 --- a/src/assumeRole.ts +++ b/src/assumeRole.ts @@ -1,14 +1,11 @@ import assert from 'node:assert'; +import fs from 'node:fs'; import path from 'node:path'; import * as core from '@actions/core'; import type { AssumeRoleCommandInput, STSClient, Tag } from '@aws-sdk/client-sts'; -import { - AssumeRoleCommand, - AssumeRoleWithWebIdentityCommand, - PackedPolicyTooLargeException, -} from '@aws-sdk/client-sts'; +import { AssumeRoleCommand, AssumeRoleWithWebIdentityCommand } from '@aws-sdk/client-sts'; import type { CredentialsClient } from './CredentialsClient'; -import { errorMessage, isDefined, readFileUtf8, sanitizeGitHubVariables } from './helpers'; +import { errorMessage, isDefined, sanitizeGitHubVariables } from './helpers'; async function assumeRoleWithOIDC(params: AssumeRoleCommandInput, client: STSClient, webIdentityToken: string) { delete params.Tags; @@ -39,14 +36,13 @@ async function assumeRoleWithWebIdentityTokenFile( const webIdentityTokenFilePath = path.isAbsolute(webIdentityTokenFile) ? webIdentityTokenFile : path.join(workspace, webIdentityTokenFile); - const webIdentityToken = readFileUtf8(webIdentityTokenFilePath); - if (webIdentityToken === null) { + if (!fs.existsSync(webIdentityTokenFilePath)) { throw new Error(`Web identity token file does not exist: ${webIdentityTokenFilePath}`); } core.info('Assuming role with web identity token file'); try { + const webIdentityToken = fs.readFileSync(webIdentityTokenFilePath, 'utf8'); delete params.Tags; - delete params.TransitiveTagKeys; const creds = await client.send( new AssumeRoleWithWebIdentityCommand({ ...params, @@ -65,13 +61,6 @@ async function assumeRoleWithCredentials(params: AssumeRoleCommandInput, client: const creds = await client.send(new AssumeRoleCommand({ ...params })); return creds; } catch (error) { - if (error instanceof PackedPolicyTooLargeException) { - core.info('Session tag size is too large; dropping droppable tags and retrying.'); - const droppableKeys = new Set(DROPPABLE_TAG_SOURCES.map((s) => s.key)); - params.Tags = params.Tags?.filter((tag) => !droppableKeys.has(tag.Key ?? '')); - const creds = await client.send(new AssumeRoleCommand({ ...params })); - return creds; - } throw new Error(`Could not assume role with user credentials: ${errorMessage(error)}`); } } @@ -98,8 +87,8 @@ const MAX_TAG_KEY_LENGTH = 128; const MAX_TAG_VALUE_LENGTH = 256; const MAX_SESSION_TAGS = 50; -// Identity/audit primitives. Always emitted and cannot be dropped. -const NON_DROPPABLE_TAG_SOURCES: ReadonlyArray<{ key: string; envVar: string }> = [ +// Identity/audit primitives. Always emitted and cannot be overridden by custom-tags. +const PROTECTED_TAG_SOURCES: ReadonlyArray<{ key: string; envVar: string }> = [ { key: 'Repository', envVar: 'GITHUB_REPOSITORY' }, { key: 'Workflow', envVar: 'GITHUB_WORKFLOW' }, { key: 'Action', envVar: 'GITHUB_ACTION' }, @@ -108,22 +97,21 @@ const NON_DROPPABLE_TAG_SOURCES: ReadonlyArray<{ key: string; envVar: string }> { key: 'Branch', envVar: 'GITHUB_REF' }, ]; -// Convenience metadata. If the AssumeRole call fails due to compressed size of -// session tags being too large, we will drop these tags and retry once. -const DROPPABLE_TAG_SOURCES: ReadonlyArray<{ key: string; envVar: string }> = [ +// Convenience metadata. Custom-tags may override (suppresses the default for that key). +// Listed in priority order; lower-priority entries are dropped first if the user's custom-tags +// would push the total above MAX_SESSION_TAGS. +const OVERRIDEABLE_TAG_SOURCES_BY_PRIORITY: ReadonlyArray<{ key: string; envVar: string }> = [ { key: 'EventName', envVar: 'GITHUB_EVENT_NAME' }, { key: 'BaseRef', envVar: 'GITHUB_BASE_REF' }, { key: 'HeadRef', envVar: 'GITHUB_HEAD_REF' }, + { key: 'RefName', envVar: 'GITHUB_REF_NAME' }, { key: 'RunId', envVar: 'GITHUB_RUN_ID' }, + { key: 'RefType', envVar: 'GITHUB_REF_TYPE' }, { key: 'Job', envVar: 'GITHUB_JOB' }, { key: 'TriggeringActor', envVar: 'GITHUB_TRIGGERING_ACTOR' }, ]; -const PROTECTED_TAG_KEYS = new Set([ - 'GitHub', - ...NON_DROPPABLE_TAG_SOURCES.map((s) => s.key), - ...DROPPABLE_TAG_SOURCES.map((s) => s.key), -]); +const PROTECTED_TAG_KEYS = new Set(['GitHub', ...PROTECTED_TAG_SOURCES.map((s) => s.key)]); export function parseAndValidateCustomTags(customTags: string, existingTags: Tag[]): Tag[] { let parsed: unknown; @@ -210,13 +198,7 @@ export async function assumeRole(params: assumeRoleParams) { // Build session tags. Values are sanitized because the AWS tag value spec is more // restrictive than permissible characters in environment variables. const protectedTags: Tag[] = [{ Key: 'GitHub', Value: 'Actions' }]; - for (const { key, envVar } of NON_DROPPABLE_TAG_SOURCES) { - const value = process.env[envVar]; - if (value) { - protectedTags.push({ Key: key, Value: sanitizeGitHubVariables(value) }); - } - } - for (const { key, envVar } of DROPPABLE_TAG_SOURCES) { + for (const { key, envVar } of PROTECTED_TAG_SOURCES) { const value = process.env[envVar]; if (value) { protectedTags.push({ Key: key, Value: sanitizeGitHubVariables(value) }); @@ -224,15 +206,26 @@ export async function assumeRole(params: assumeRoleParams) { } const parsedCustomTags: Tag[] = customTags ? parseAndValidateCustomTags(customTags, protectedTags) : []; + const customTagKeys = new Set(parsedCustomTags.map((t) => t.Key)); - const tagArray: Tag[] = [...protectedTags, ...parsedCustomTags]; + const availableOverrideableSlots = MAX_SESSION_TAGS - protectedTags.length - parsedCustomTags.length; + const overrideableTags: Tag[] = []; + for (const { key, envVar } of OVERRIDEABLE_TAG_SOURCES_BY_PRIORITY) { + if (overrideableTags.length >= availableOverrideableSlots) break; + if (customTagKeys.has(key)) continue; + const value = process.env[envVar]; + if (value) { + overrideableTags.push({ Key: key, Value: sanitizeGitHubVariables(value) }); + } + } + + const tagArray: Tag[] = [...protectedTags, ...overrideableTags, ...parsedCustomTags]; const tags = roleSkipSessionTagging ? undefined : tagArray; if (!tags) { core.debug('Role session tagging has been skipped.'); } else { core.debug(`${tags.length} role session tags are being used:`); - core.debug(JSON.stringify(tagArray)); } //only populate transitiveTagKeys array if user is actually using session tagging diff --git a/src/helpers.ts b/src/helpers.ts index 4ad21e3..7fa5298 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,5 +1,3 @@ -import * as fs from 'node:fs'; -import * as path from 'node:path'; import * as core from '@actions/core'; import type { Credentials, STSClient } from '@aws-sdk/client-sts'; import { GetCallerIdentityCommand } from '@aws-sdk/client-sts'; @@ -293,106 +291,3 @@ export function getBooleanInput(name: string, options?: core.InputOptions & { de `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``, ); } - -// O_NOFOLLOW is undefined on Windows. This sets it to 0 if it's not defined. -const O_NOFOLLOW: number = (fs.constants as { O_NOFOLLOW?: number }).O_NOFOLLOW ?? 0; - -export function isAllowListed(filePath: string): boolean { - // Kubelet projects service-account tokens through a symlink chain - // (token -> ..data/token, ..data -> ../). The containing path is - // kubelet-controlled, so we allow symlink-following reads of this fixed - // location only. - const KUBERNETES_TOKEN_PATH_REGEX = /^\/var\/run\/secrets\/[^/]+\/serviceaccount\/token$/; - - if (process.platform !== 'win32') { - // No Kubernetes token paths on Windows - return KUBERNETES_TOKEN_PATH_REGEX.test(path.posix.normalize(filePath)); - } - return false; -} - -export function isSymlink(filePath: string): boolean { - try { - return fs.lstatSync(filePath).isSymbolicLink(); - } catch (err) { - if ((err as NodeJS.ErrnoException).code === 'ENOENT') return false; - throw err; - } -} - -// Refuses if filePath or its parent directory is a symbolic link. -function refuseSymlinkOnPath(filePath: string): void { - const parent = path.dirname(filePath); - if (parent !== filePath && isSymlink(parent)) { - throw new Error(`Refusing ${filePath} (parent directory is a symbolic link)`); - } - if (isSymlink(filePath)) { - throw new Error(`Refusing ${filePath} (path is a symbolic link)`); - } -} - -function assertRegularFile(fd: number, filePath: string): void { - const stats = fs.fstatSync(fd); - if (!stats.isFile()) { - throw new Error(`${filePath} (path is not a regular file)`); - } -} - -// ENOENT: file does not exist -// ELOOP: too many symbolic links (from NOFOLLOW) - -export function readFileUtf8(filePath: string): string | null { - const allowSymlink = isAllowListed(filePath); - if (!allowSymlink) { - refuseSymlinkOnPath(filePath); - } - const openFlags = fs.constants.O_RDONLY | (allowSymlink ? 0 : O_NOFOLLOW); - let fd: number; - try { - fd = fs.openSync(filePath, openFlags); - } catch (err) { - const code = (err as NodeJS.ErrnoException).code; - if (code === 'ENOENT') return null; - if (code === 'ELOOP') { - throw new Error(`Refusing ${filePath} (path is a symbolic link)`); - } - throw err; - } - try { - assertRegularFile(fd, filePath); - return fs.readFileSync(fd, 'utf-8'); - } finally { - fs.closeSync(fd); - } -} - -export function writeFileUtf8(filePath: string, content: string, mode = 0o600): void { - refuseSymlinkOnPath(filePath); - let fd: number; - try { - fd = fs.openSync(filePath, fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_TRUNC | O_NOFOLLOW, mode); - } catch (err) { - if ((err as NodeJS.ErrnoException).code === 'ELOOP') { - throw new Error(`Refusing ${filePath} (path is a symbolic link)`); - } - throw err; - } - try { - assertRegularFile(fd, filePath); - // openSync only applies mode on creation. - // If the file already exists, we need to ensure the mode is correct. - if (process.platform !== 'win32') { - fs.fchmodSync(fd, mode); - } - fs.writeFileSync(fd, content); - } finally { - fs.closeSync(fd); - } -} - -export function mkdir(dir: string, mode = 0o700): void { - fs.mkdirSync(dir, { recursive: true, mode }); - if (isSymlink(dir)) { - throw new Error(`Refusing ${dir} (path is a symbolic link)`); - } -} diff --git a/src/profileManager.ts b/src/profileManager.ts index 89e8ae6..d98db43 100644 --- a/src/profileManager.ts +++ b/src/profileManager.ts @@ -1,8 +1,8 @@ +import * as fs from 'node:fs'; import * as os from 'node:os'; import * as path from 'node:path'; import * as core from '@actions/core'; import type { Credentials } from '@aws-sdk/client-sts'; -import { mkdir, readFileUtf8, writeFileUtf8 } from './helpers'; /** * Parse an INI-format string into a nested object. @@ -87,8 +87,10 @@ export function getProfileFilePaths(): ProfileFilePaths { */ export function ensureAwsDirectoryExists(filePath: string): void { const dir = path.dirname(filePath); - core.debug(`Ensuring directory exists: ${dir}`); - mkdir(dir, 0o700); + if (!fs.existsSync(dir)) { + core.debug(`Creating directory: ${dir}`); + fs.mkdirSync(dir, { recursive: true, mode: 0o700 }); + } } /** @@ -125,8 +127,14 @@ export function mergeProfileSection( data: Record, overwriteAwsProfile: boolean, ): void { - const fileContent = readFileUtf8(filePath); - const existingContent: Record> = fileContent === null ? {} : parseIni(fileContent); + let existingContent: Record> = {}; + + // Read existing file if it exists + if (fs.existsSync(filePath)) { + core.debug(`Reading existing file: ${filePath}`); + const fileContent = fs.readFileSync(filePath, 'utf-8'); + existingContent = parseIni(fileContent); + } if (existingContent[sectionName] && !overwriteAwsProfile) { throw new Error( @@ -139,7 +147,7 @@ export function mergeProfileSection( const content = stringifyIni(existingContent); core.debug(`Writing profile to ${filePath}`); - writeFileUtf8(filePath, content, 0o600); + fs.writeFileSync(filePath, content, { mode: 0o600 }); } /** diff --git a/test/assumeRole.test.ts b/test/assumeRole.test.ts deleted file mode 100644 index 566f0d9..0000000 --- a/test/assumeRole.test.ts +++ /dev/null @@ -1,63 +0,0 @@ -import * as core from '@actions/core'; -import { AssumeRoleWithWebIdentityCommand, GetCallerIdentityCommand, STSClient } from '@aws-sdk/client-sts'; -import { mockClient } from 'aws-sdk-client-mock'; -import { fs, vol } from 'memfs'; -import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import * as helpers from '../src/helpers'; -import { run } from '../src/index'; -import mocks from './mockinputs.test'; - -vi.mock('node:fs'); -vi.mock('@actions/core'); - -const mockedSTSClient = mockClient(STSClient); - -describe('assumeRoleWithWebIdentityTokenFile', {}, () => { - beforeEach(() => { - vi.restoreAllMocks(); - vi.clearAllMocks(); - mockedSTSClient.reset(); - vol.reset(); - helpers.withsleep(() => Promise.resolve()); - vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.WEBIDENTITY_TOKEN_FILE_INPUTS)); - vi.mocked(core.getMultilineInput).mockReturnValue([]); - mockedSTSClient.on(GetCallerIdentityCommand).resolves({ ...mocks.outputs.GET_CALLER_IDENTITY }); - process.env = { ...mocks.envs }; - fs.mkdirSync('/home/github', { recursive: true }); - }); - - afterEach(() => { - helpers.reset(); - }); - - it('refuses when the token file is a symlink and never calls STS', async () => { - fs.mkdirSync('/etc', { recursive: true }); - fs.writeFileSync('/etc/passwd', 'root:x:0:0::/root:/bin/sh'); - fs.symlinkSync('/etc/passwd', '/home/github/file.txt'); - - await run(); - - expect(core.setFailed).toHaveBeenCalledWith(expect.stringMatching(/Refusing .* \(.* symbolic link\)/)); - expect(mockedSTSClient.commandCalls(AssumeRoleWithWebIdentityCommand)).toHaveLength(0); - expect(fs.readFileSync('/etc/passwd', 'utf-8')).toBe('root:x:0:0::/root:/bin/sh'); - }); - - it('preserves the existing missing-file error when the token file does not exist', async () => { - await run(); - - expect(core.setFailed).toHaveBeenCalledWith(expect.stringContaining('Web identity token file does not exist')); - expect(mockedSTSClient.commandCalls(AssumeRoleWithWebIdentityCommand)).toHaveLength(0); - }); - - it('passes token contents to STS when the file is regular', async () => { - fs.writeFileSync('/home/github/file.txt', 'real-token'); - mockedSTSClient.on(AssumeRoleWithWebIdentityCommand).resolves(mocks.outputs.STS_CREDENTIALS); - - await run(); - - expect(core.setFailed).not.toHaveBeenCalled(); - const calls = mockedSTSClient.commandCalls(AssumeRoleWithWebIdentityCommand); - expect(calls).toHaveLength(1); - expect(calls[0]?.args[0].input.WebIdentityToken).toBe('real-token'); - }); -}); diff --git a/test/helpers.test.ts b/test/helpers.test.ts index eefca3c..cd4c29e 100644 --- a/test/helpers.test.ts +++ b/test/helpers.test.ts @@ -1,16 +1,12 @@ import * as core from '@actions/core'; -import { fs, vol } from 'memfs'; import { beforeEach, describe, expect, it, vi } from 'vitest'; import * as helpers from '../src/helpers'; -vi.mock('node:fs'); vi.mock('@actions/core'); describe('Configure AWS Credentials helpers', {}, () => { beforeEach(() => { - vi.restoreAllMocks(); - vi.clearAllMocks(); - vol.reset(); + vi.resetAllMocks(); }); it('removes brackets from GitHub Actor', {}, () => { const actor = 'actor[bot]'; @@ -52,9 +48,6 @@ describe('Configure AWS Credentials helpers', {}, () => { helpers.reset(); }); it('can output creds when told to', {}, () => { - vi.spyOn(core, 'setOutput').mockImplementation(() => {}); - vi.spyOn(core, 'setSecret').mockImplementation(() => {}); - vi.spyOn(core, 'exportVariable').mockImplementation(() => {}); helpers.exportCredentials( { AccessKeyId: 'test', SecretAccessKey: 'test', SessionToken: 'test', Expiration: new Date(8640000000000000) }, true, @@ -75,9 +68,6 @@ describe('Configure AWS Credentials helpers', {}, () => { process.env = env; }); it(`won't output credentials to env if told not to`, {}, () => { - vi.spyOn(core, 'setOutput').mockImplementation(() => {}); - vi.spyOn(core, 'setSecret').mockImplementation(() => {}); - vi.spyOn(core, 'exportVariable').mockImplementation(() => {}); helpers.exportCredentials( { AccessKeyId: 'test', SecretAccessKey: 'test', SessionToken: 'test', Expiration: new Date(8640000000000000) }, true, @@ -105,163 +95,22 @@ describe('Configure AWS Credentials helpers', {}, () => { }); it('handles getBooleanInput correctly', {}, () => { - vi.spyOn(core, 'getInput').mockReturnValue('true'); + vi.mocked(core.getInput).mockReturnValue('true'); expect(helpers.getBooleanInput('test')).toBe(true); - vi.spyOn(core, 'getInput').mockReturnValue('false'); + vi.mocked(core.getInput).mockReturnValue('false'); expect(helpers.getBooleanInput('test')).toBe(false); - vi.spyOn(core, 'getInput').mockReturnValue(''); + vi.mocked(core.getInput).mockReturnValue(''); expect(helpers.getBooleanInput('test', { default: true })).toBe(true); - vi.spyOn(core, 'getInput').mockReturnValue('invalid'); + vi.mocked(core.getInput).mockReturnValue('invalid'); expect(() => helpers.getBooleanInput('test')).toThrow(); }); it('clears session token when not provided', {}, () => { - vi.spyOn(core, 'setSecret').mockImplementation(() => {}); - vi.spyOn(core, 'exportVariable').mockImplementation(() => {}); process.env.AWS_SESSION_TOKEN = 'old-token'; helpers.exportCredentials({ AccessKeyId: 'test', SecretAccessKey: 'test' }, false, true); expect(core.exportVariable).toHaveBeenCalledWith('AWS_SESSION_TOKEN', ''); }); - - describe('filesystem helpers', {}, () => { - describe('isSymlink', {}, () => { - it('returns true for a symlink', {}, () => { - fs.mkdirSync('/dir', { recursive: true }); - fs.writeFileSync('/dir/target', 'data'); - fs.symlinkSync('/dir/target', '/dir/link'); - expect(helpers.isSymlink('/dir/link')).toBe(true); - }); - - it('returns false for a regular file', {}, () => { - fs.mkdirSync('/dir', { recursive: true }); - fs.writeFileSync('/dir/file', 'data'); - expect(helpers.isSymlink('/dir/file')).toBe(false); - }); - - it('returns false for a missing path', {}, () => { - expect(helpers.isSymlink('/nonexistent')).toBe(false); - }); - }); - - describe('readFileUtf8', {}, () => { - it('returns content for a regular file', {}, () => { - fs.mkdirSync('/dir', { recursive: true }); - fs.writeFileSync('/dir/file', 'hello'); - expect(helpers.readFileUtf8('/dir/file')).toBe('hello'); - }); - - it('returns null when the file does not exist', {}, () => { - fs.mkdirSync('/dir', { recursive: true }); - expect(helpers.readFileUtf8('/dir/missing')).toBe(null); - }); - - it('refuses to read through a symlink at the target', {}, () => { - fs.mkdirSync('/dir', { recursive: true }); - fs.writeFileSync('/dir/secret', 'sensitive'); - fs.symlinkSync('/dir/secret', '/dir/link'); - expect(() => helpers.readFileUtf8('/dir/link')).toThrow(/Refusing .* \(.* symbolic link\)/); - }); - - it('refuses to read when the parent directory is a symlink', {}, () => { - fs.mkdirSync('/real/.aws', { recursive: true }); - fs.writeFileSync('/real/.aws/credentials', 'data'); - fs.mkdirSync('/home', { recursive: true }); - fs.symlinkSync('/real/.aws', '/home/.aws'); - expect(() => helpers.readFileUtf8('/home/.aws/credentials')).toThrow(/Refusing .* \(.* symbolic link\)/); - }); - - it('refuses to read when the path is a directory', {}, () => { - fs.mkdirSync('/dir/subdir', { recursive: true }); - expect(() => helpers.readFileUtf8('/dir/subdir')).toThrow(/not a regular file/); - }); - - it.skipIf(process.platform === 'win32')( - 'follows the kubelet projected-token symlink chain at /var/run/secrets/*/serviceaccount/token', - () => { - fs.mkdirSync('/var/run/secrets/eks.amazonaws.com/serviceaccount/..2026_05_28_00_00_00.123', { - recursive: true, - }); - fs.writeFileSync( - '/var/run/secrets/eks.amazonaws.com/serviceaccount/..2026_05_28_00_00_00.123/token', - 'jwt-token', - ); - fs.symlinkSync('..2026_05_28_00_00_00.123', '/var/run/secrets/eks.amazonaws.com/serviceaccount/..data'); - fs.symlinkSync('..data/token', '/var/run/secrets/eks.amazonaws.com/serviceaccount/token'); - expect(helpers.readFileUtf8('/var/run/secrets/eks.amazonaws.com/serviceaccount/token')).toBe('jwt-token'); - }, - ); - - it.skipIf(process.platform === 'win32')('still refuses symlinks at lookalike paths outside the allowlist', () => { - fs.mkdirSync('/var/run/secrets/eks.amazonaws.com/serviceaccount', { recursive: true }); - fs.writeFileSync('/var/run/secrets/eks.amazonaws.com/serviceaccount/secret', 'jwt-token'); - fs.symlinkSync( - '/var/run/secrets/eks.amazonaws.com/serviceaccount/secret', - '/var/run/secrets/eks.amazonaws.com/serviceaccount/token2', - ); - expect(() => helpers.readFileUtf8('/var/run/secrets/eks.amazonaws.com/serviceaccount/token2')).toThrow( - /Refusing .* \(.* symbolic link\)/, - ); - }); - }); - - describe('isAllowListed', {}, () => { - it.skipIf(process.platform === 'win32')('matches the canonical kubelet projected-token path', () => { - expect(helpers.isAllowListed('/var/run/secrets/eks.amazonaws.com/serviceaccount/token')).toBe(true); - expect(helpers.isAllowListed('/var/run/secrets/kubernetes.io/serviceaccount/token')).toBe(true); - }); - - it.skipIf(process.platform === 'win32')('rejects nested or unrelated paths', () => { - expect(helpers.isAllowListed('/var/run/secrets/serviceaccount/token')).toBe(false); - expect(helpers.isAllowListed('/var/run/secrets/a/b/serviceaccount/token')).toBe(false); - expect(helpers.isAllowListed('/var/run/secrets/eks.amazonaws.com/serviceaccount/token2')).toBe(false); - expect(helpers.isAllowListed('/etc/var/run/secrets/foo/serviceaccount/token')).toBe(false); - }); - - it.skipIf(process.platform === 'win32')('normalizes path traversal attempts', () => { - expect(helpers.isAllowListed('/var/run/secrets/foo/serviceaccount/../../../../etc/passwd')).toBe(false); - }); - }); - - describe('writeFileUtf8', {}, () => { - it('writes content with the specified mode', {}, () => { - fs.mkdirSync('/dir', { recursive: true }); - helpers.writeFileUtf8('/dir/file', 'payload', 0o600); - expect(fs.readFileSync('/dir/file', 'utf-8')).toBe('payload'); - expect(fs.statSync('/dir/file').mode & 0o777).toBe(0o600); - }); - - it('refuses to follow a symlink at the target and leaves the target file untouched', {}, () => { - fs.mkdirSync('/dir', { recursive: true }); - fs.writeFileSync('/dir/target', 'original'); - fs.symlinkSync('/dir/target', '/dir/link'); - expect(() => helpers.writeFileUtf8('/dir/link', 'attacker', 0o600)).toThrow(/Refusing .* \(.* symbolic link\)/); - expect(fs.readFileSync('/dir/target', 'utf-8')).toBe('original'); - }); - - it.skipIf(process.platform === 'win32')('tightens mode on existing files', () => { - fs.mkdirSync('/dir', { recursive: true }); - fs.writeFileSync('/dir/file', 'old', { mode: 0o644 }); - helpers.writeFileUtf8('/dir/file', 'new', 0o600); - expect(fs.statSync('/dir/file').mode & 0o777).toBe(0o600); - }); - }); - - describe('mkdir', {}, () => { - it('is idempotent on a regular directory', {}, () => { - helpers.mkdir('/some/nested/dir', 0o700); - helpers.mkdir('/some/nested/dir', 0o700); - expect(fs.statSync('/some/nested/dir').isDirectory()).toBe(true); - }); - - it('refuses when the target directory is a symlink', {}, () => { - fs.mkdirSync('/real', { recursive: true }); - fs.mkdirSync('/home', { recursive: true }); - fs.symlinkSync('/real', '/home/.aws'); - expect(() => helpers.mkdir('/home/.aws', 0o700)).toThrow(/Refusing .* \(.* symbolic link\)/); - }); - }); - }); }); diff --git a/test/index.test.ts b/test/index.test.ts index d03181a..3970951 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -3,7 +3,6 @@ import { AssumeRoleCommand, AssumeRoleWithWebIdentityCommand, GetCallerIdentityCommand, - PackedPolicyTooLargeException, STSClient, } from '@aws-sdk/client-sts'; import { mockClient } from 'aws-sdk-client-mock'; @@ -203,18 +202,6 @@ describe('Configure AWS Credentials', {}, () => { expect(core.setOutput).toHaveBeenCalledTimes(2); expect(core.setFailed).not.toHaveBeenCalled(); }); - it('does not send Tags or TransitiveTagKeys to AssumeRoleWithWebIdentity', async () => { - // AssumeRoleWithWebIdentity reads session tags from JWT claims, not the request. - // Both fields must be stripped before the STS call. - vi.mocked(core.getMultilineInput).mockImplementation((name: string) => { - if (name === 'transitive-tag-keys') return ['Repository']; - return []; - }); - await run(); - const callInput = mockedSTSClient.commandCalls(AssumeRoleWithWebIdentityCommand)[0].args[0].input; - expect(callInput.Tags).toBeUndefined(); - expect(callInput.TransitiveTagKeys).toBeUndefined(); - }); }); describe('Assume existing role', {}, () => { @@ -295,9 +282,9 @@ describe('Configure AWS Credentials', {}, () => { await run(); const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? []; // 7 protected (GitHub + Repository, Workflow, Action, Actor, Commit, Branch) - // + 6 droppable (EventName, BaseRef, HeadRef, RunId, Job, TriggeringActor). - // No custom-tags, all env vars set in mocks.envs → all 13 should be present, nothing else. - expect(tags).toHaveLength(13); + // + 8 overrideable (EventName, BaseRef, HeadRef, RefName, RunId, RefType, Job, TriggeringActor). + // No custom-tags, all env vars set in mocks.envs → all 15 should be present, nothing else. + expect(tags).toHaveLength(15); const tagsByKey = Object.fromEntries(tags.map((t) => [t.Key, t.Value])); expect(tagsByKey).toEqual({ GitHub: 'Actions', @@ -310,12 +297,14 @@ describe('Configure AWS Credentials', {}, () => { EventName: 'pull_request', BaseRef: 'main', HeadRef: 'feature-branch', + RefName: 'feature-branch', RunId: '16412345678', + RefType: 'branch', Job: 'build', TriggeringActor: 'MY-USERNAME_bot_', }); }); - it('omits droppable tags whose env vars are unset', {}, async () => { + it('omits overrideable tags whose env vars are unset', {}, async () => { vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS)); delete process.env.GITHUB_BASE_REF; delete process.env.GITHUB_HEAD_REF; @@ -329,27 +318,6 @@ describe('Configure AWS Credentials', {}, () => { expect(tagKeys).toContain('EventName'); expect(tagKeys).toContain('RunId'); }); - it('drops droppable tags and retries on PackedPolicyTooLargeException', {}, async () => { - vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS)); - mockedSTSClient - .on(AssumeRoleCommand) - .rejectsOnce(new PackedPolicyTooLargeException({ message: 'too large', $metadata: {} })) - .resolvesOnce(mocks.outputs.STS_CREDENTIALS); - await run(); - expect(core.info).toHaveBeenCalledWith('Session tag size is too large; dropping droppable tags and retrying.'); - const retryInput = mockedSTSClient.commandCalls(AssumeRoleCommand)[1].args[0].input; - const retryTagKeys = (retryInput.Tags ?? []).map((t) => t.Key); - expect(retryTagKeys).not.toContain('EventName'); - expect(retryTagKeys).not.toContain('BaseRef'); - expect(retryTagKeys).not.toContain('HeadRef'); - expect(retryTagKeys).not.toContain('RunId'); - expect(retryTagKeys).not.toContain('Job'); - expect(retryTagKeys).not.toContain('TriggeringActor'); - // Protected tags remain - expect(retryTagKeys).toContain('GitHub'); - expect(retryTagKeys).toContain('Repository'); - expect(core.setFailed).not.toHaveBeenCalled(); - }); it('sanitizes invalid characters in env-derived tag values', {}, async () => { vi.mocked(core.getInput).mockImplementation(mocks.getInput(mocks.IAM_ASSUMEROLE_INPUTS)); process.env.GITHUB_HEAD_REF = 'feature/has spaces&bad?chars'; @@ -402,6 +370,8 @@ describe('Configure AWS Credentials', {}, () => { { Key: 'EventName', Value: 'pull_request' }, { Key: 'RunId', Value: '16412345678' }, { Key: 'Job', Value: 'build' }, + { Key: 'RefName', Value: 'feature-branch' }, + { Key: 'RefType', Value: 'branch' }, { Key: 'TriggeringActor', Value: 'MY-USERNAME_bot_' }, { Key: 'Environment', Value: 'Production' }, { Key: 'Team', Value: 'DevOps' }, @@ -450,7 +420,7 @@ describe('Configure AWS Credentials', {}, () => { await run(); expect(core.warning).toHaveBeenCalledWith(expect.stringContaining("'custom-tags' is set but will be ignored")); }); - it('rejects custom tags that conflict with droppable tag keys', {}, async () => { + it('lets custom tags override overrideable default tag keys', {}, async () => { vi.mocked(core.getInput).mockImplementation( mocks.getInput({ ...mocks.IAM_ASSUMEROLE_INPUTS, @@ -458,10 +428,13 @@ describe('Configure AWS Credentials', {}, () => { }), ); await run(); - expect(core.setFailed).toHaveBeenCalledWith( - "custom-tags: key 'EventName' conflicts with a protected session tag set by this action and cannot be overridden", - ); - expect(mockedSTSClient.commandCalls(AssumeRoleCommand)).toHaveLength(0); + const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? []; + const eventNameTags = tags.filter((t) => t.Key === 'EventName'); + const baseRefTags = tags.filter((t) => t.Key === 'BaseRef'); + expect(eventNameTags).toHaveLength(1); + expect(eventNameTags[0]?.Value).toBe('workflow_dispatch'); + expect(baseRefTags).toHaveLength(1); + expect(baseRefTags[0]?.Value).toBe('release/2026'); }); it('rejects custom tags that conflict with the protected Branch tag', {}, async () => { // Regression guard: Branch was a default before v6.2 and must remain unoverridable. @@ -477,10 +450,62 @@ describe('Configure AWS Credentials', {}, () => { ); expect(mockedSTSClient.commandCalls(AssumeRoleCommand)).toHaveLength(0); }); - it('rejects custom-tags that would exceed the session-tag limit', {}, async () => { - // 13 existing tags (7 non-droppable + 6 droppable) + 38 custom = 51 > 50. + it('drops lower-priority overrideable tags when custom-tags would exceed the session-tag limit', {}, async () => { + // 7 protected (GitHub + 6 from PROTECTED_TAG_SOURCES) + 40 custom = 47 used → 3 overrideable slots. + // The first 3 overrideable tags by priority are EventName, BaseRef, HeadRef (RefName, RunId, RefType, + // Job, TriggeringActor must be dropped). const customTagsObj: Record = {}; - for (let i = 0; i < 38; i++) { + for (let i = 0; i < 40; i++) { + customTagsObj[`Custom${i}`] = `value${i}`; + } + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ + ...mocks.IAM_ASSUMEROLE_INPUTS, + 'custom-tags': JSON.stringify(customTagsObj), + }), + ); + await run(); + const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? []; + const tagKeys = tags.map((t) => t.Key); + expect(tags).toHaveLength(50); + expect(tagKeys).toContain('Branch'); + expect(tagKeys).toContain('EventName'); + expect(tagKeys).toContain('BaseRef'); + expect(tagKeys).toContain('HeadRef'); + expect(tagKeys).not.toContain('RefName'); + expect(tagKeys).not.toContain('RunId'); + expect(tagKeys).not.toContain('RefType'); + expect(tagKeys).not.toContain('Job'); + expect(tagKeys).not.toContain('TriggeringActor'); + }); + it('overridden overrideable tags free a slot for a lower-priority overrideable tag', {}, async () => { + // Same 40-custom-tag scenario as above, but one of the customs overrides BaseRef. + // BaseRef no longer competes for the overrideable budget, so the next-priority overrideable (RefName) gets in. + const customTagsObj: Record = { BaseRef: 'release/2026' }; + for (let i = 0; i < 39; i++) { + customTagsObj[`Custom${i}`] = `value${i}`; + } + vi.mocked(core.getInput).mockImplementation( + mocks.getInput({ + ...mocks.IAM_ASSUMEROLE_INPUTS, + 'custom-tags': JSON.stringify(customTagsObj), + }), + ); + await run(); + const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? []; + const tagKeys = tags.map((t) => t.Key); + expect(tags).toHaveLength(50); + expect(tagKeys).toContain('Branch'); + expect(tagKeys).toContain('EventName'); + expect(tagKeys).toContain('BaseRef'); + expect(tagKeys).toContain('HeadRef'); + expect(tagKeys).toContain('RefName'); + expect(tagKeys).not.toContain('RunId'); + }); + it('rejects custom-tags that would exceed the session-tag limit on their own', {}, async () => { + // 7 protected + 44 custom = 51, which is over 50 even with zero overrideable tags. + const customTagsObj: Record = {}; + for (let i = 0; i < 44; i++) { customTagsObj[`Custom${i}`] = `value${i}`; } vi.mocked(core.getInput).mockImplementation( @@ -493,10 +518,12 @@ describe('Configure AWS Credentials', {}, () => { expect(core.setFailed).toHaveBeenCalledWith(expect.stringContaining('would exceed the AWS limit of 50')); expect(mockedSTSClient.commandCalls(AssumeRoleCommand)).toHaveLength(0); }); - it('allows custom-tags up to the session-tag limit', {}, async () => { - // 13 existing tags + 37 custom = 50, exactly at the limit. + it('drops transitive-tag-keys entries that refer to evicted overrideable tags', {}, async () => { + // Force eviction of all overrideable tags below EventName/BaseRef/HeadRef. The user transitive-tags + // RunId (which gets evicted) and Repository (which is protected and stays). The TransitiveTagKeys + // payload must include only the keys that actually appear in Tags. const customTagsObj: Record = {}; - for (let i = 0; i < 37; i++) { + for (let i = 0; i < 40; i++) { customTagsObj[`Custom${i}`] = `value${i}`; } vi.mocked(core.getInput).mockImplementation( @@ -505,10 +532,15 @@ describe('Configure AWS Credentials', {}, () => { 'custom-tags': JSON.stringify(customTagsObj), }), ); + vi.mocked(core.getMultilineInput).mockImplementation((name: string) => { + if (name === 'transitive-tag-keys') return ['Repository', 'RunId']; + return []; + }); await run(); - expect(core.setFailed).not.toHaveBeenCalled(); - const tags = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input.Tags ?? []; - expect(tags).toHaveLength(50); + const callInput = mockedSTSClient.commandCalls(AssumeRoleCommand)[0].args[0].input; + const tagKeys = (callInput.Tags ?? []).map((t) => t.Key); + expect(tagKeys).not.toContain('RunId'); + expect(callInput.TransitiveTagKeys).toEqual(['Repository']); }); }); diff --git a/test/mockinputs.test.ts b/test/mockinputs.test.ts index 68ee8a0..cfc4125 100644 --- a/test/mockinputs.test.ts +++ b/test/mockinputs.test.ts @@ -105,6 +105,8 @@ const envs = { GITHUB_EVENT_NAME: 'pull_request', GITHUB_RUN_ID: '16412345678', GITHUB_JOB: 'build', + GITHUB_REF_NAME: 'feature-branch', + GITHUB_REF_TYPE: 'branch', GITHUB_BASE_REF: 'main', GITHUB_HEAD_REF: 'feature-branch', GITHUB_TRIGGERING_ACTOR: 'MY-USERNAME[bot]', diff --git a/test/profileManager.test.ts b/test/profileManager.test.ts index 19bf1c1..5702684 100644 --- a/test/profileManager.test.ts +++ b/test/profileManager.test.ts @@ -11,13 +11,12 @@ import { writeProfileFiles, } from '../src/profileManager'; -vi.mock('node:fs'); vi.mock('@actions/core'); +vi.mock('node:fs'); describe('Profile Manager', {}, () => { beforeEach(() => { - vi.restoreAllMocks(); - vi.clearAllMocks(); + vi.resetAllMocks(); vol.reset(); }); @@ -736,69 +735,4 @@ describe('Profile Manager', {}, () => { ); }); }); - - describe('symlink hardening', {}, () => { - const credsPath = '/home/user/.aws/credentials'; - const configPath = '/home/user/.aws/config'; - - beforeEach(() => { - process.env.AWS_SHARED_CREDENTIALS_FILE = credsPath; - process.env.AWS_CONFIG_FILE = configPath; - }); - - it('mergeProfileSection refuses when the credentials path is a symlink and leaves the target unchanged', {}, () => { - fs.mkdirSync('/home/user/.aws', { recursive: true }); - fs.mkdirSync('/etc', { recursive: true }); - fs.writeFileSync('/etc/passwd', 'root:x:0:0::/root:/bin/sh'); - fs.symlinkSync('/etc/passwd', credsPath); - - expect(() => mergeProfileSection(credsPath, 'dev', { aws_access_key_id: 'AKIA' }, true)).toThrow( - /Refusing .* \(.* symbolic link\)/, - ); - expect(fs.readFileSync('/etc/passwd', 'utf-8')).toBe('root:x:0:0::/root:/bin/sh'); - }); - - it('mergeProfileSection refuses when the config path is a symlink', {}, () => { - fs.mkdirSync('/home/user/.aws', { recursive: true }); - fs.mkdirSync('/etc', { recursive: true }); - fs.writeFileSync('/etc/sensitive', 'do not overwrite'); - fs.symlinkSync('/etc/sensitive', configPath); - - expect(() => mergeProfileSection(configPath, 'profile dev', { region: 'us-east-1' }, true)).toThrow( - /Refusing .* \(.* symbolic link\)/, - ); - expect(fs.readFileSync('/etc/sensitive', 'utf-8')).toBe('do not overwrite'); - }); - - it('ensureAwsDirectoryExists refuses when ~/.aws is a symlink', {}, () => { - fs.mkdirSync('/real-target', { recursive: true }); - fs.mkdirSync('/home/user', { recursive: true }); - fs.symlinkSync('/real-target', '/home/user/.aws'); - - expect(() => ensureAwsDirectoryExists(credsPath)).toThrow(/Refusing .* \(.* symbolic link\)/); - }); - - it('writeProfileFiles refuses to overwrite a pre-existing symlink at the credentials path', {}, () => { - fs.mkdirSync('/home/user/.aws', { recursive: true }); - fs.mkdirSync('/etc', { recursive: true }); - fs.writeFileSync('/etc/passwd', 'root:x:0:0::/root:/bin/sh'); - fs.symlinkSync('/etc/passwd', credsPath); - - expect(() => - writeProfileFiles('dev', { AccessKeyId: 'AKIA', SecretAccessKey: 'secret' }, 'us-east-1', true), - ).toThrow(/Refusing .* \(.* symbolic link\)/); - - expect(fs.lstatSync(credsPath).isSymbolicLink()).toBe(true); - expect(fs.readFileSync('/etc/passwd', 'utf-8')).toBe('root:x:0:0::/root:/bin/sh'); - }); - - it('happy path still writes both files with mode 0o600 when no symlinks are present', {}, () => { - writeProfileFiles('dev', { AccessKeyId: 'AKIA', SecretAccessKey: 'secret' }, 'us-east-1', false); - - expect(fs.statSync(credsPath).mode & 0o777).toBe(0o600); - expect(fs.statSync(configPath).mode & 0o777).toBe(0o600); - expect(fs.lstatSync(credsPath).isSymbolicLink()).toBe(false); - expect(fs.lstatSync(configPath).isSymbolicLink()).toBe(false); - }); - }); });