diff --git a/dist/136.index.js b/dist/136.index.js index 2cb6fd1..a03364b 100644 --- a/dist/136.index.js +++ b/dist/136.index.js @@ -1216,7 +1216,7 @@ exports.resolveRuntimeExtensions = resolveRuntimeExtensions; /***/ 9955: /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.908.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.908.0","@aws-sdk/middleware-host-header":"3.901.0","@aws-sdk/middleware-logger":"3.901.0","@aws-sdk/middleware-recursion-detection":"3.901.0","@aws-sdk/middleware-user-agent":"3.908.0","@aws-sdk/region-config-resolver":"3.901.0","@aws-sdk/types":"3.901.0","@aws-sdk/util-endpoints":"3.901.0","@aws-sdk/util-user-agent-browser":"3.907.0","@aws-sdk/util-user-agent-node":"3.908.0","@smithy/config-resolver":"^4.3.0","@smithy/core":"^3.15.0","@smithy/fetch-http-handler":"^5.3.1","@smithy/hash-node":"^4.2.0","@smithy/invalid-dependency":"^4.2.0","@smithy/middleware-content-length":"^4.2.0","@smithy/middleware-endpoint":"^4.3.1","@smithy/middleware-retry":"^4.4.1","@smithy/middleware-serde":"^4.2.0","@smithy/middleware-stack":"^4.2.0","@smithy/node-config-provider":"^4.3.0","@smithy/node-http-handler":"^4.3.0","@smithy/protocol-http":"^5.3.0","@smithy/smithy-client":"^4.7.1","@smithy/types":"^4.6.0","@smithy/url-parser":"^4.2.0","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.0","@smithy/util-defaults-mode-node":"^4.2.1","@smithy/util-endpoints":"^3.2.0","@smithy/util-middleware":"^4.2.0","@smithy/util-retry":"^4.2.0","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.911.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.911.0","@aws-sdk/middleware-host-header":"3.910.0","@aws-sdk/middleware-logger":"3.910.0","@aws-sdk/middleware-recursion-detection":"3.910.0","@aws-sdk/middleware-user-agent":"3.911.0","@aws-sdk/region-config-resolver":"3.910.0","@aws-sdk/types":"3.910.0","@aws-sdk/util-endpoints":"3.910.0","@aws-sdk/util-user-agent-browser":"3.910.0","@aws-sdk/util-user-agent-node":"3.911.0","@smithy/config-resolver":"^4.3.2","@smithy/core":"^3.16.1","@smithy/fetch-http-handler":"^5.3.3","@smithy/hash-node":"^4.2.2","@smithy/invalid-dependency":"^4.2.2","@smithy/middleware-content-length":"^4.2.2","@smithy/middleware-endpoint":"^4.3.3","@smithy/middleware-retry":"^4.4.3","@smithy/middleware-serde":"^4.2.2","@smithy/middleware-stack":"^4.2.2","@smithy/node-config-provider":"^4.3.2","@smithy/node-http-handler":"^4.4.1","@smithy/protocol-http":"^5.3.2","@smithy/smithy-client":"^4.8.1","@smithy/types":"^4.7.1","@smithy/url-parser":"^4.2.2","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.2","@smithy/util-defaults-mode-node":"^4.2.3","@smithy/util-endpoints":"^3.2.2","@smithy/util-middleware":"^4.2.2","@smithy/util-retry":"^4.2.2","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); /***/ }) diff --git a/dist/443.index.js b/dist/443.index.js index de8c79e..2e2feb2 100644 --- a/dist/443.index.js +++ b/dist/443.index.js @@ -848,7 +848,7 @@ exports.getRuntimeConfig = getRuntimeConfig; /***/ 9955: /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.908.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.908.0","@aws-sdk/middleware-host-header":"3.901.0","@aws-sdk/middleware-logger":"3.901.0","@aws-sdk/middleware-recursion-detection":"3.901.0","@aws-sdk/middleware-user-agent":"3.908.0","@aws-sdk/region-config-resolver":"3.901.0","@aws-sdk/types":"3.901.0","@aws-sdk/util-endpoints":"3.901.0","@aws-sdk/util-user-agent-browser":"3.907.0","@aws-sdk/util-user-agent-node":"3.908.0","@smithy/config-resolver":"^4.3.0","@smithy/core":"^3.15.0","@smithy/fetch-http-handler":"^5.3.1","@smithy/hash-node":"^4.2.0","@smithy/invalid-dependency":"^4.2.0","@smithy/middleware-content-length":"^4.2.0","@smithy/middleware-endpoint":"^4.3.1","@smithy/middleware-retry":"^4.4.1","@smithy/middleware-serde":"^4.2.0","@smithy/middleware-stack":"^4.2.0","@smithy/node-config-provider":"^4.3.0","@smithy/node-http-handler":"^4.3.0","@smithy/protocol-http":"^5.3.0","@smithy/smithy-client":"^4.7.1","@smithy/types":"^4.6.0","@smithy/url-parser":"^4.2.0","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.0","@smithy/util-defaults-mode-node":"^4.2.1","@smithy/util-endpoints":"^3.2.0","@smithy/util-middleware":"^4.2.0","@smithy/util-retry":"^4.2.0","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.911.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.911.0","@aws-sdk/middleware-host-header":"3.910.0","@aws-sdk/middleware-logger":"3.910.0","@aws-sdk/middleware-recursion-detection":"3.910.0","@aws-sdk/middleware-user-agent":"3.911.0","@aws-sdk/region-config-resolver":"3.910.0","@aws-sdk/types":"3.910.0","@aws-sdk/util-endpoints":"3.910.0","@aws-sdk/util-user-agent-browser":"3.910.0","@aws-sdk/util-user-agent-node":"3.911.0","@smithy/config-resolver":"^4.3.2","@smithy/core":"^3.16.1","@smithy/fetch-http-handler":"^5.3.3","@smithy/hash-node":"^4.2.2","@smithy/invalid-dependency":"^4.2.2","@smithy/middleware-content-length":"^4.2.2","@smithy/middleware-endpoint":"^4.3.3","@smithy/middleware-retry":"^4.4.3","@smithy/middleware-serde":"^4.2.2","@smithy/middleware-stack":"^4.2.2","@smithy/node-config-provider":"^4.3.2","@smithy/node-http-handler":"^4.4.1","@smithy/protocol-http":"^5.3.2","@smithy/smithy-client":"^4.8.1","@smithy/types":"^4.7.1","@smithy/url-parser":"^4.2.2","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.2","@smithy/util-defaults-mode-node":"^4.2.3","@smithy/util-endpoints":"^3.2.2","@smithy/util-middleware":"^4.2.2","@smithy/util-retry":"^4.2.2","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); /***/ }) diff --git a/dist/579.index.js b/dist/579.index.js index ad8faa1..b155f76 100644 --- a/dist/579.index.js +++ b/dist/579.index.js @@ -27,7 +27,6 @@ class EventStreamSerde { const marshaller = this.marshaller; const eventStreamMember = requestSchema.getEventStreamMember(); const unionSchema = requestSchema.getMemberSchema(eventStreamMember); - unionSchema.getMemberSchemas(); const serializer = this.serializer; const defaultContentType = this.defaultContentType; const initialRequestMarker = Symbol("initialRequestMarker"); @@ -140,7 +139,7 @@ class EventStreamSerde { let explicitPayloadContentType; const isKnownSchema = (() => { const struct = unionSchema.getSchema(); - return struct.memberNames.includes(unionMember); + return struct[4].includes(unionMember); })(); const additionalHeaders = {}; if (!isKnownSchema) { diff --git a/dist/869.index.js b/dist/869.index.js index b19d6e2..9dc6e6d 100644 --- a/dist/869.index.js +++ b/dist/869.index.js @@ -64,7 +64,7 @@ const isCredentialSourceProfile = (arg, { profile, logger }) => { } return withProviderProfile; }; -const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => { +const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}, resolveProfileData) => { options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)"); const profileData = profiles[profileName]; const { source_profile, region } = profileData; @@ -184,7 +184,7 @@ const resolveProfileData = async (profileName, profiles, options, visitedProfile return resolveStaticCredentials(data, options); } if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) { - return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles); + return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles, resolveProfileData); } if (isStaticCredsProfile(data)) { return resolveStaticCredentials(data, options); diff --git a/dist/998.index.js b/dist/998.index.js index de7c33c..d51dca5 100644 --- a/dist/998.index.js +++ b/dist/998.index.js @@ -1435,7 +1435,7 @@ exports.nodeProvider = nodeProvider; /***/ 5188: /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.908.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.908.0","@aws-sdk/middleware-host-header":"3.901.0","@aws-sdk/middleware-logger":"3.901.0","@aws-sdk/middleware-recursion-detection":"3.901.0","@aws-sdk/middleware-user-agent":"3.908.0","@aws-sdk/region-config-resolver":"3.901.0","@aws-sdk/types":"3.901.0","@aws-sdk/util-endpoints":"3.901.0","@aws-sdk/util-user-agent-browser":"3.907.0","@aws-sdk/util-user-agent-node":"3.908.0","@smithy/config-resolver":"^4.3.0","@smithy/core":"^3.15.0","@smithy/fetch-http-handler":"^5.3.1","@smithy/hash-node":"^4.2.0","@smithy/invalid-dependency":"^4.2.0","@smithy/middleware-content-length":"^4.2.0","@smithy/middleware-endpoint":"^4.3.1","@smithy/middleware-retry":"^4.4.1","@smithy/middleware-serde":"^4.2.0","@smithy/middleware-stack":"^4.2.0","@smithy/node-config-provider":"^4.3.0","@smithy/node-http-handler":"^4.3.0","@smithy/protocol-http":"^5.3.0","@smithy/smithy-client":"^4.7.1","@smithy/types":"^4.6.0","@smithy/url-parser":"^4.2.0","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.0","@smithy/util-defaults-mode-node":"^4.2.1","@smithy/util-endpoints":"^3.2.0","@smithy/util-middleware":"^4.2.0","@smithy/util-retry":"^4.2.0","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.911.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.911.0","@aws-sdk/middleware-host-header":"3.910.0","@aws-sdk/middleware-logger":"3.910.0","@aws-sdk/middleware-recursion-detection":"3.910.0","@aws-sdk/middleware-user-agent":"3.911.0","@aws-sdk/region-config-resolver":"3.910.0","@aws-sdk/types":"3.910.0","@aws-sdk/util-endpoints":"3.910.0","@aws-sdk/util-user-agent-browser":"3.910.0","@aws-sdk/util-user-agent-node":"3.911.0","@smithy/config-resolver":"^4.3.2","@smithy/core":"^3.16.1","@smithy/fetch-http-handler":"^5.3.3","@smithy/hash-node":"^4.2.2","@smithy/invalid-dependency":"^4.2.2","@smithy/middleware-content-length":"^4.2.2","@smithy/middleware-endpoint":"^4.3.3","@smithy/middleware-retry":"^4.4.3","@smithy/middleware-serde":"^4.2.2","@smithy/middleware-stack":"^4.2.2","@smithy/node-config-provider":"^4.3.2","@smithy/node-http-handler":"^4.4.1","@smithy/protocol-http":"^5.3.2","@smithy/smithy-client":"^4.8.1","@smithy/types":"^4.7.1","@smithy/url-parser":"^4.2.2","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.2","@smithy/util-defaults-mode-node":"^4.2.3","@smithy/util-endpoints":"^3.2.2","@smithy/util-middleware":"^4.2.2","@smithy/util-retry":"^4.2.2","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); /***/ }) diff --git a/dist/cleanup/136.index.js b/dist/cleanup/136.index.js index 2cb6fd1..a03364b 100644 --- a/dist/cleanup/136.index.js +++ b/dist/cleanup/136.index.js @@ -1216,7 +1216,7 @@ exports.resolveRuntimeExtensions = resolveRuntimeExtensions; /***/ 9955: /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.908.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.908.0","@aws-sdk/middleware-host-header":"3.901.0","@aws-sdk/middleware-logger":"3.901.0","@aws-sdk/middleware-recursion-detection":"3.901.0","@aws-sdk/middleware-user-agent":"3.908.0","@aws-sdk/region-config-resolver":"3.901.0","@aws-sdk/types":"3.901.0","@aws-sdk/util-endpoints":"3.901.0","@aws-sdk/util-user-agent-browser":"3.907.0","@aws-sdk/util-user-agent-node":"3.908.0","@smithy/config-resolver":"^4.3.0","@smithy/core":"^3.15.0","@smithy/fetch-http-handler":"^5.3.1","@smithy/hash-node":"^4.2.0","@smithy/invalid-dependency":"^4.2.0","@smithy/middleware-content-length":"^4.2.0","@smithy/middleware-endpoint":"^4.3.1","@smithy/middleware-retry":"^4.4.1","@smithy/middleware-serde":"^4.2.0","@smithy/middleware-stack":"^4.2.0","@smithy/node-config-provider":"^4.3.0","@smithy/node-http-handler":"^4.3.0","@smithy/protocol-http":"^5.3.0","@smithy/smithy-client":"^4.7.1","@smithy/types":"^4.6.0","@smithy/url-parser":"^4.2.0","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.0","@smithy/util-defaults-mode-node":"^4.2.1","@smithy/util-endpoints":"^3.2.0","@smithy/util-middleware":"^4.2.0","@smithy/util-retry":"^4.2.0","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.911.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.911.0","@aws-sdk/middleware-host-header":"3.910.0","@aws-sdk/middleware-logger":"3.910.0","@aws-sdk/middleware-recursion-detection":"3.910.0","@aws-sdk/middleware-user-agent":"3.911.0","@aws-sdk/region-config-resolver":"3.910.0","@aws-sdk/types":"3.910.0","@aws-sdk/util-endpoints":"3.910.0","@aws-sdk/util-user-agent-browser":"3.910.0","@aws-sdk/util-user-agent-node":"3.911.0","@smithy/config-resolver":"^4.3.2","@smithy/core":"^3.16.1","@smithy/fetch-http-handler":"^5.3.3","@smithy/hash-node":"^4.2.2","@smithy/invalid-dependency":"^4.2.2","@smithy/middleware-content-length":"^4.2.2","@smithy/middleware-endpoint":"^4.3.3","@smithy/middleware-retry":"^4.4.3","@smithy/middleware-serde":"^4.2.2","@smithy/middleware-stack":"^4.2.2","@smithy/node-config-provider":"^4.3.2","@smithy/node-http-handler":"^4.4.1","@smithy/protocol-http":"^5.3.2","@smithy/smithy-client":"^4.8.1","@smithy/types":"^4.7.1","@smithy/url-parser":"^4.2.2","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.2","@smithy/util-defaults-mode-node":"^4.2.3","@smithy/util-endpoints":"^3.2.2","@smithy/util-middleware":"^4.2.2","@smithy/util-retry":"^4.2.2","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); /***/ }) diff --git a/dist/cleanup/443.index.js b/dist/cleanup/443.index.js index de8c79e..2e2feb2 100644 --- a/dist/cleanup/443.index.js +++ b/dist/cleanup/443.index.js @@ -848,7 +848,7 @@ exports.getRuntimeConfig = getRuntimeConfig; /***/ 9955: /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.908.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.908.0","@aws-sdk/middleware-host-header":"3.901.0","@aws-sdk/middleware-logger":"3.901.0","@aws-sdk/middleware-recursion-detection":"3.901.0","@aws-sdk/middleware-user-agent":"3.908.0","@aws-sdk/region-config-resolver":"3.901.0","@aws-sdk/types":"3.901.0","@aws-sdk/util-endpoints":"3.901.0","@aws-sdk/util-user-agent-browser":"3.907.0","@aws-sdk/util-user-agent-node":"3.908.0","@smithy/config-resolver":"^4.3.0","@smithy/core":"^3.15.0","@smithy/fetch-http-handler":"^5.3.1","@smithy/hash-node":"^4.2.0","@smithy/invalid-dependency":"^4.2.0","@smithy/middleware-content-length":"^4.2.0","@smithy/middleware-endpoint":"^4.3.1","@smithy/middleware-retry":"^4.4.1","@smithy/middleware-serde":"^4.2.0","@smithy/middleware-stack":"^4.2.0","@smithy/node-config-provider":"^4.3.0","@smithy/node-http-handler":"^4.3.0","@smithy/protocol-http":"^5.3.0","@smithy/smithy-client":"^4.7.1","@smithy/types":"^4.6.0","@smithy/url-parser":"^4.2.0","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.0","@smithy/util-defaults-mode-node":"^4.2.1","@smithy/util-endpoints":"^3.2.0","@smithy/util-middleware":"^4.2.0","@smithy/util-retry":"^4.2.0","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.911.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.911.0","@aws-sdk/middleware-host-header":"3.910.0","@aws-sdk/middleware-logger":"3.910.0","@aws-sdk/middleware-recursion-detection":"3.910.0","@aws-sdk/middleware-user-agent":"3.911.0","@aws-sdk/region-config-resolver":"3.910.0","@aws-sdk/types":"3.910.0","@aws-sdk/util-endpoints":"3.910.0","@aws-sdk/util-user-agent-browser":"3.910.0","@aws-sdk/util-user-agent-node":"3.911.0","@smithy/config-resolver":"^4.3.2","@smithy/core":"^3.16.1","@smithy/fetch-http-handler":"^5.3.3","@smithy/hash-node":"^4.2.2","@smithy/invalid-dependency":"^4.2.2","@smithy/middleware-content-length":"^4.2.2","@smithy/middleware-endpoint":"^4.3.3","@smithy/middleware-retry":"^4.4.3","@smithy/middleware-serde":"^4.2.2","@smithy/middleware-stack":"^4.2.2","@smithy/node-config-provider":"^4.3.2","@smithy/node-http-handler":"^4.4.1","@smithy/protocol-http":"^5.3.2","@smithy/smithy-client":"^4.8.1","@smithy/types":"^4.7.1","@smithy/url-parser":"^4.2.2","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.2","@smithy/util-defaults-mode-node":"^4.2.3","@smithy/util-endpoints":"^3.2.2","@smithy/util-middleware":"^4.2.2","@smithy/util-retry":"^4.2.2","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); /***/ }) diff --git a/dist/cleanup/579.index.js b/dist/cleanup/579.index.js index ad8faa1..b155f76 100644 --- a/dist/cleanup/579.index.js +++ b/dist/cleanup/579.index.js @@ -27,7 +27,6 @@ class EventStreamSerde { const marshaller = this.marshaller; const eventStreamMember = requestSchema.getEventStreamMember(); const unionSchema = requestSchema.getMemberSchema(eventStreamMember); - unionSchema.getMemberSchemas(); const serializer = this.serializer; const defaultContentType = this.defaultContentType; const initialRequestMarker = Symbol("initialRequestMarker"); @@ -140,7 +139,7 @@ class EventStreamSerde { let explicitPayloadContentType; const isKnownSchema = (() => { const struct = unionSchema.getSchema(); - return struct.memberNames.includes(unionMember); + return struct[4].includes(unionMember); })(); const additionalHeaders = {}; if (!isKnownSchema) { diff --git a/dist/cleanup/869.index.js b/dist/cleanup/869.index.js index b19d6e2..9dc6e6d 100644 --- a/dist/cleanup/869.index.js +++ b/dist/cleanup/869.index.js @@ -64,7 +64,7 @@ const isCredentialSourceProfile = (arg, { profile, logger }) => { } return withProviderProfile; }; -const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}) => { +const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}, resolveProfileData) => { options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)"); const profileData = profiles[profileName]; const { source_profile, region } = profileData; @@ -184,7 +184,7 @@ const resolveProfileData = async (profileName, profiles, options, visitedProfile return resolveStaticCredentials(data, options); } if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) { - return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles); + return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles, resolveProfileData); } if (isStaticCredsProfile(data)) { return resolveStaticCredentials(data, options); diff --git a/dist/cleanup/998.index.js b/dist/cleanup/998.index.js index de7c33c..d51dca5 100644 --- a/dist/cleanup/998.index.js +++ b/dist/cleanup/998.index.js @@ -1435,7 +1435,7 @@ exports.nodeProvider = nodeProvider; /***/ 5188: /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.908.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.908.0","@aws-sdk/middleware-host-header":"3.901.0","@aws-sdk/middleware-logger":"3.901.0","@aws-sdk/middleware-recursion-detection":"3.901.0","@aws-sdk/middleware-user-agent":"3.908.0","@aws-sdk/region-config-resolver":"3.901.0","@aws-sdk/types":"3.901.0","@aws-sdk/util-endpoints":"3.901.0","@aws-sdk/util-user-agent-browser":"3.907.0","@aws-sdk/util-user-agent-node":"3.908.0","@smithy/config-resolver":"^4.3.0","@smithy/core":"^3.15.0","@smithy/fetch-http-handler":"^5.3.1","@smithy/hash-node":"^4.2.0","@smithy/invalid-dependency":"^4.2.0","@smithy/middleware-content-length":"^4.2.0","@smithy/middleware-endpoint":"^4.3.1","@smithy/middleware-retry":"^4.4.1","@smithy/middleware-serde":"^4.2.0","@smithy/middleware-stack":"^4.2.0","@smithy/node-config-provider":"^4.3.0","@smithy/node-http-handler":"^4.3.0","@smithy/protocol-http":"^5.3.0","@smithy/smithy-client":"^4.7.1","@smithy/types":"^4.6.0","@smithy/url-parser":"^4.2.0","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.0","@smithy/util-defaults-mode-node":"^4.2.1","@smithy/util-endpoints":"^3.2.0","@smithy/util-middleware":"^4.2.0","@smithy/util-retry":"^4.2.0","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.911.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.911.0","@aws-sdk/middleware-host-header":"3.910.0","@aws-sdk/middleware-logger":"3.910.0","@aws-sdk/middleware-recursion-detection":"3.910.0","@aws-sdk/middleware-user-agent":"3.911.0","@aws-sdk/region-config-resolver":"3.910.0","@aws-sdk/types":"3.910.0","@aws-sdk/util-endpoints":"3.910.0","@aws-sdk/util-user-agent-browser":"3.910.0","@aws-sdk/util-user-agent-node":"3.911.0","@smithy/config-resolver":"^4.3.2","@smithy/core":"^3.16.1","@smithy/fetch-http-handler":"^5.3.3","@smithy/hash-node":"^4.2.2","@smithy/invalid-dependency":"^4.2.2","@smithy/middleware-content-length":"^4.2.2","@smithy/middleware-endpoint":"^4.3.3","@smithy/middleware-retry":"^4.4.3","@smithy/middleware-serde":"^4.2.2","@smithy/middleware-stack":"^4.2.2","@smithy/node-config-provider":"^4.3.2","@smithy/node-http-handler":"^4.4.1","@smithy/protocol-http":"^5.3.2","@smithy/smithy-client":"^4.8.1","@smithy/types":"^4.7.1","@smithy/url-parser":"^4.2.2","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.2","@smithy/util-defaults-mode-node":"^4.2.3","@smithy/util-endpoints":"^3.2.2","@smithy/util-middleware":"^4.2.2","@smithy/util-retry":"^4.2.2","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); /***/ }) diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 7da6377..a6bcf00 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -5458,7 +5458,7 @@ class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol { const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = {}; for (const [name, member] of ns.structIterator()) { @@ -5943,7 +5943,7 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol { } Object.assign(request.headers, { "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`, - "x-amz-target": `${this.serviceTarget}.${schema.NormalizedSchema.of(operationSchema).getName()}`, + "x-amz-target": `${this.serviceTarget}.${operationSchema.name}`, }); if (this.awsQueryCompatible) { request.headers["x-amzn-query-mode"] = "true"; @@ -5964,7 +5964,7 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol { const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = {}; for (const [name, member] of ns.structIterator()) { @@ -6069,7 +6069,7 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol { const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); await this.deserializeHttpMessage(errorSchema, context, response, dataObject); const output = {}; @@ -6479,7 +6479,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol { }; const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, (registry, errorName) => registry.find((schema$1) => schema.NormalizedSchema.of(schema$1).getMergedTraits().awsQueryError?.[0] === errorName)); const ns = schema.NormalizedSchema.of(errorSchema); - const ErrorCtor = schema.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = { Error: errorData.Error, @@ -6917,7 +6917,7 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol { const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); await this.deserializeHttpMessage(errorSchema, context, response, dataObject); const output = {}; @@ -7183,215 +7183,139 @@ exports.defaultProvider = defaultProvider; /***/ }), /***/ 2590: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getHostHeaderPlugin: () => getHostHeaderPlugin, - hostHeaderMiddleware: () => hostHeaderMiddleware, - hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, - resolveHostHeaderConfig: () => resolveHostHeaderConfig -}); -module.exports = __toCommonJS(index_exports); -var import_protocol_http = __nccwpck_require__(2356); +var protocolHttp = __nccwpck_require__(2356); + function resolveHostHeaderConfig(input) { - return input; + return input; } -__name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); -var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { - if (!import_protocol_http.HttpRequest.isInstance(args.request)) return next(args); - const { request } = args; - const { handlerProtocol = "" } = options.requestHandler.metadata || {}; - if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { - delete request.headers["host"]; - request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); - } else if (!request.headers["host"]) { - let host = request.hostname; - if (request.port != null) host += `:${request.port}`; - request.headers["host"] = host; - } - return next(args); -}, "hostHeaderMiddleware"); -var hostHeaderMiddlewareOptions = { - name: "hostHeaderMiddleware", - step: "build", - priority: "low", - tags: ["HOST"], - override: true +const hostHeaderMiddleware = (options) => (next) => async (args) => { + if (!protocolHttp.HttpRequest.isInstance(args.request)) + return next(args); + const { request } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { + delete request.headers["host"]; + request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); + } + else if (!request.headers["host"]) { + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; + } + return next(args); }; -var getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); - }, "applyToStack") -}), "getHostHeaderPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); +const hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true, +}; +const getHostHeaderPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + }, +}); +exports.getHostHeaderPlugin = getHostHeaderPlugin; +exports.hostHeaderMiddleware = hostHeaderMiddleware; +exports.hostHeaderMiddlewareOptions = hostHeaderMiddlewareOptions; +exports.resolveHostHeaderConfig = resolveHostHeaderConfig; /***/ }), /***/ 5242: -/***/ ((module) => { +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getLoggerPlugin: () => getLoggerPlugin, - loggerMiddleware: () => loggerMiddleware, - loggerMiddlewareOptions: () => loggerMiddlewareOptions +const loggerMiddleware = () => (next, context) => async (args) => { + try { + const response = await next(args); + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + logger?.info?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata, + }); + return response; + } + catch (error) { + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + logger?.error?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error, + metadata: error.$metadata, + }); + throw error; + } +}; +const loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true, +}; +const getLoggerPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + }, }); -module.exports = __toCommonJS(index_exports); - -// src/loggerMiddleware.ts -var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => { - try { - const response = await next(args); - const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; - const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; - const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; - const { $metadata, ...outputWithoutMetadata } = response.output; - logger?.info?.({ - clientName, - commandName, - input: inputFilterSensitiveLog(args.input), - output: outputFilterSensitiveLog(outputWithoutMetadata), - metadata: $metadata - }); - return response; - } catch (error) { - const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; - const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; - logger?.error?.({ - clientName, - commandName, - input: inputFilterSensitiveLog(args.input), - error, - metadata: error.$metadata - }); - throw error; - } -}, "loggerMiddleware"); -var loggerMiddlewareOptions = { - name: "loggerMiddleware", - tags: ["LOGGER"], - step: "initialize", - override: true -}; -var getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); - }, "applyToStack") -}), "getLoggerPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); +exports.getLoggerPlugin = getLoggerPlugin; +exports.loggerMiddleware = loggerMiddleware; +exports.loggerMiddlewareOptions = loggerMiddlewareOptions; /***/ }), /***/ 1568: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getRecursionDetectionPlugin: () => getRecursionDetectionPlugin +var recursionDetectionMiddleware = __nccwpck_require__(2521); + +const recursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low", +}; + +const getRecursionDetectionPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware.recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions); + }, }); -module.exports = __toCommonJS(index_exports); - -// src/configuration.ts -var recursionDetectionMiddlewareOptions = { - step: "build", - tags: ["RECURSION_DETECTION"], - name: "recursionDetectionMiddleware", - override: true, - priority: "low" -}; - -// src/getRecursionDetectionPlugin.ts -var import_recursionDetectionMiddleware = __nccwpck_require__(2521); -var getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add((0, import_recursionDetectionMiddleware.recursionDetectionMiddleware)(), recursionDetectionMiddlewareOptions); - }, "applyToStack") -}), "getRecursionDetectionPlugin"); - -// src/index.ts -__reExport(index_exports, __nccwpck_require__(2521), module.exports); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); +exports.getRecursionDetectionPlugin = getRecursionDetectionPlugin; +Object.keys(recursionDetectionMiddleware).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return recursionDetectionMiddleware[k]; } + }); +}); /***/ }), @@ -7639,589 +7563,498 @@ exports.userAgentMiddleware = userAgentMiddleware; /***/ }), /***/ 6463: -/***/ ((module) => { +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, - NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, - REGION_ENV_NAME: () => REGION_ENV_NAME, - REGION_INI_NAME: () => REGION_INI_NAME, - getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration, - resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration, - resolveRegionConfig: () => resolveRegionConfig -}); -module.exports = __toCommonJS(index_exports); +const getAwsRegionExtensionConfiguration = (runtimeConfig) => { + return { + setRegion(region) { + runtimeConfig.region = region; + }, + region() { + return runtimeConfig.region; + }, + }; +}; +const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region(), + }; +}; -// src/extensions/index.ts -var getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return { - setRegion(region) { - runtimeConfig.region = region; +const REGION_ENV_NAME = "AWS_REGION"; +const REGION_INI_NAME = "region"; +const NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); }, - region() { - return runtimeConfig.region; +}; +const NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials", +}; + +const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); + +const getRealRegion = (region) => isFipsRegion(region) + ? ["fips-aws-global", "aws-fips"].includes(region) + ? "us-east-1" + : region.replace(/fips-(dkr-|prod-)?|-fips/, "") + : region; + +const resolveRegionConfig = (input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); } - }; -}, "getAwsRegionExtensionConfiguration"); -var resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { - return { - region: awsRegionExtensionConfiguration.region() - }; -}, "resolveAwsRegionExtensionConfiguration"); - -// src/regionConfig/config.ts -var REGION_ENV_NAME = "AWS_REGION"; -var REGION_INI_NAME = "region"; -var NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: /* @__PURE__ */ __name((env) => env[REGION_ENV_NAME], "environmentVariableSelector"), - configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], "configFileSelector"), - default: /* @__PURE__ */ __name(() => { - throw new Error("Region is missing"); - }, "default") -}; -var NODE_REGION_CONFIG_FILE_OPTIONS = { - preferredFile: "credentials" + return Object.assign(input, { + region: async () => { + if (typeof region === "string") { + return getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + }, + }); }; -// src/regionConfig/isFipsRegion.ts -var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); - -// src/regionConfig/getRealRegion.ts -var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); - -// src/regionConfig/resolveRegionConfig.ts -var resolveRegionConfig = /* @__PURE__ */ __name((input) => { - const { region, useFipsEndpoint } = input; - if (!region) { - throw new Error("Region is missing"); - } - return Object.assign(input, { - region: /* @__PURE__ */ __name(async () => { - if (typeof region === "string") { - return getRealRegion(region); - } - const providedRegion = await region(); - return getRealRegion(providedRegion); - }, "region"), - useFipsEndpoint: /* @__PURE__ */ __name(async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if (isFipsRegion(providedRegion)) { - return true; - } - return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - }, "useFipsEndpoint") - }); -}, "resolveRegionConfig"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - +exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS; +exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS; +exports.REGION_ENV_NAME = REGION_ENV_NAME; +exports.REGION_INI_NAME = REGION_INI_NAME; +exports.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration; +exports.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration; +exports.resolveRegionConfig = resolveRegionConfig; /***/ }), /***/ 3068: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ConditionObject: () => import_util_endpoints.ConditionObject, - DeprecatedObject: () => import_util_endpoints.DeprecatedObject, - EndpointError: () => import_util_endpoints.EndpointError, - EndpointObject: () => import_util_endpoints.EndpointObject, - EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders, - EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties, - EndpointParams: () => import_util_endpoints.EndpointParams, - EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions, - EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject, - ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject, - EvaluateOptions: () => import_util_endpoints.EvaluateOptions, - Expression: () => import_util_endpoints.Expression, - FunctionArgv: () => import_util_endpoints.FunctionArgv, - FunctionObject: () => import_util_endpoints.FunctionObject, - FunctionReturn: () => import_util_endpoints.FunctionReturn, - ParameterObject: () => import_util_endpoints.ParameterObject, - ReferenceObject: () => import_util_endpoints.ReferenceObject, - ReferenceRecord: () => import_util_endpoints.ReferenceRecord, - RuleSetObject: () => import_util_endpoints.RuleSetObject, - RuleSetRules: () => import_util_endpoints.RuleSetRules, - TreeRuleObject: () => import_util_endpoints.TreeRuleObject, - awsEndpointFunctions: () => awsEndpointFunctions, - getUserAgentPrefix: () => getUserAgentPrefix, - isIpAddress: () => import_util_endpoints.isIpAddress, - partition: () => partition, - resolveDefaultAwsRegionalEndpointsConfig: () => resolveDefaultAwsRegionalEndpointsConfig, - resolveEndpoint: () => import_util_endpoints.resolveEndpoint, - setPartitionInfo: () => setPartitionInfo, - toEndpointV1: () => toEndpointV1, - useDefaultPartitionInfo: () => useDefaultPartitionInfo -}); -module.exports = __toCommonJS(index_exports); +var utilEndpoints = __nccwpck_require__(9674); +var urlParser = __nccwpck_require__(4494); -// src/aws.ts - - -// src/lib/aws/isVirtualHostableS3Bucket.ts - - -// src/lib/isIpAddress.ts -var import_util_endpoints = __nccwpck_require__(9674); - -// src/lib/aws/isVirtualHostableS3Bucket.ts -var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { - if (allowSubDomains) { - for (const label of value.split(".")) { - if (!isVirtualHostableS3Bucket(label)) { +const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!utilEndpoints.isValidHostLabel(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if (utilEndpoints.isIpAddress(value)) { return false; - } } return true; - } - if (!(0, import_util_endpoints.isValidHostLabel)(value)) { - return false; - } - if (value.length < 3 || value.length > 63) { - return false; - } - if (value !== value.toLowerCase()) { - return false; - } - if ((0, import_util_endpoints.isIpAddress)(value)) { - return false; - } - return true; -}, "isVirtualHostableS3Bucket"); - -// src/lib/aws/parseArn.ts -var ARN_DELIMITER = ":"; -var RESOURCE_DELIMITER = "/"; -var parseArn = /* @__PURE__ */ __name((value) => { - const segments = value.split(ARN_DELIMITER); - if (segments.length < 6) return null; - const [arn, partition2, service, region, accountId, ...resourcePath] = segments; - if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") return null; - const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); - return { - partition: partition2, - service, - region, - accountId, - resourceId - }; -}, "parseArn"); - -// src/lib/aws/partitions.json -var partitions_default = { - partitions: [{ - id: "aws", - outputs: { - dnsSuffix: "amazonaws.com", - dualStackDnsSuffix: "api.aws", - implicitGlobalRegion: "us-east-1", - name: "aws", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", - regions: { - "af-south-1": { - description: "Africa (Cape Town)" - }, - "ap-east-1": { - description: "Asia Pacific (Hong Kong)" - }, - "ap-east-2": { - description: "Asia Pacific (Taipei)" - }, - "ap-northeast-1": { - description: "Asia Pacific (Tokyo)" - }, - "ap-northeast-2": { - description: "Asia Pacific (Seoul)" - }, - "ap-northeast-3": { - description: "Asia Pacific (Osaka)" - }, - "ap-south-1": { - description: "Asia Pacific (Mumbai)" - }, - "ap-south-2": { - description: "Asia Pacific (Hyderabad)" - }, - "ap-southeast-1": { - description: "Asia Pacific (Singapore)" - }, - "ap-southeast-2": { - description: "Asia Pacific (Sydney)" - }, - "ap-southeast-3": { - description: "Asia Pacific (Jakarta)" - }, - "ap-southeast-4": { - description: "Asia Pacific (Melbourne)" - }, - "ap-southeast-5": { - description: "Asia Pacific (Malaysia)" - }, - "ap-southeast-6": { - description: "Asia Pacific (New Zealand)" - }, - "ap-southeast-7": { - description: "Asia Pacific (Thailand)" - }, - "aws-global": { - description: "aws global region" - }, - "ca-central-1": { - description: "Canada (Central)" - }, - "ca-west-1": { - description: "Canada West (Calgary)" - }, - "eu-central-1": { - description: "Europe (Frankfurt)" - }, - "eu-central-2": { - description: "Europe (Zurich)" - }, - "eu-north-1": { - description: "Europe (Stockholm)" - }, - "eu-south-1": { - description: "Europe (Milan)" - }, - "eu-south-2": { - description: "Europe (Spain)" - }, - "eu-west-1": { - description: "Europe (Ireland)" - }, - "eu-west-2": { - description: "Europe (London)" - }, - "eu-west-3": { - description: "Europe (Paris)" - }, - "il-central-1": { - description: "Israel (Tel Aviv)" - }, - "me-central-1": { - description: "Middle East (UAE)" - }, - "me-south-1": { - description: "Middle East (Bahrain)" - }, - "mx-central-1": { - description: "Mexico (Central)" - }, - "sa-east-1": { - description: "South America (Sao Paulo)" - }, - "us-east-1": { - description: "US East (N. Virginia)" - }, - "us-east-2": { - description: "US East (Ohio)" - }, - "us-west-1": { - description: "US West (N. California)" - }, - "us-west-2": { - description: "US West (Oregon)" - } - } - }, { - id: "aws-cn", - outputs: { - dnsSuffix: "amazonaws.com.cn", - dualStackDnsSuffix: "api.amazonwebservices.com.cn", - implicitGlobalRegion: "cn-northwest-1", - name: "aws-cn", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^cn\\-\\w+\\-\\d+$", - regions: { - "aws-cn-global": { - description: "aws-cn global region" - }, - "cn-north-1": { - description: "China (Beijing)" - }, - "cn-northwest-1": { - description: "China (Ningxia)" - } - } - }, { - id: "aws-eusc", - outputs: { - dnsSuffix: "amazonaws.eu", - dualStackDnsSuffix: "api.amazonwebservices.eu", - implicitGlobalRegion: "eusc-de-east-1", - name: "aws-eusc", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", - regions: { - "eusc-de-east-1": { - description: "EU (Germany)" - } - } - }, { - id: "aws-iso", - outputs: { - dnsSuffix: "c2s.ic.gov", - dualStackDnsSuffix: "api.aws.ic.gov", - implicitGlobalRegion: "us-iso-east-1", - name: "aws-iso", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", - regions: { - "aws-iso-global": { - description: "aws-iso global region" - }, - "us-iso-east-1": { - description: "US ISO East" - }, - "us-iso-west-1": { - description: "US ISO WEST" - } - } - }, { - id: "aws-iso-b", - outputs: { - dnsSuffix: "sc2s.sgov.gov", - dualStackDnsSuffix: "api.aws.scloud", - implicitGlobalRegion: "us-isob-east-1", - name: "aws-iso-b", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", - regions: { - "aws-iso-b-global": { - description: "aws-iso-b global region" - }, - "us-isob-east-1": { - description: "US ISOB East (Ohio)" - } - } - }, { - id: "aws-iso-e", - outputs: { - dnsSuffix: "cloud.adc-e.uk", - dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", - implicitGlobalRegion: "eu-isoe-west-1", - name: "aws-iso-e", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", - regions: { - "aws-iso-e-global": { - description: "aws-iso-e global region" - }, - "eu-isoe-west-1": { - description: "EU ISOE West" - } - } - }, { - id: "aws-iso-f", - outputs: { - dnsSuffix: "csp.hci.ic.gov", - dualStackDnsSuffix: "api.aws.hci.ic.gov", - implicitGlobalRegion: "us-isof-south-1", - name: "aws-iso-f", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", - regions: { - "aws-iso-f-global": { - description: "aws-iso-f global region" - }, - "us-isof-east-1": { - description: "US ISOF EAST" - }, - "us-isof-south-1": { - description: "US ISOF SOUTH" - } - } - }, { - id: "aws-us-gov", - outputs: { - dnsSuffix: "amazonaws.com", - dualStackDnsSuffix: "api.aws", - implicitGlobalRegion: "us-gov-west-1", - name: "aws-us-gov", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", - regions: { - "aws-us-gov-global": { - description: "aws-us-gov global region" - }, - "us-gov-east-1": { - description: "AWS GovCloud (US-East)" - }, - "us-gov-west-1": { - description: "AWS GovCloud (US-West)" - } - } - }], - version: "1.1" }; -// src/lib/aws/partition.ts -var selectedPartitionsInfo = partitions_default; -var selectedUserAgentPrefix = ""; -var partition = /* @__PURE__ */ __name((value) => { - const { partitions } = selectedPartitionsInfo; - for (const partition2 of partitions) { - const { regions, outputs } = partition2; - for (const [region, regionData] of Object.entries(regions)) { - if (region === value) { - return { - ...outputs, - ...regionData - }; - } - } - } - for (const partition2 of partitions) { - const { regionRegex, outputs } = partition2; - if (new RegExp(regionRegex).test(value)) { - return { - ...outputs - }; - } - } - const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); - if (!DEFAULT_PARTITION) { - throw new Error( - "Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist." - ); - } - return { - ...DEFAULT_PARTITION.outputs - }; -}, "partition"); -var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => { - selectedPartitionsInfo = partitionsInfo; - selectedUserAgentPrefix = userAgentPrefix; -}, "setPartitionInfo"); -var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => { - setPartitionInfo(partitions_default, ""); -}, "useDefaultPartitionInfo"); -var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); - -// src/aws.ts -var awsEndpointFunctions = { - isVirtualHostableS3Bucket, - parseArn, - partition -}; -import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions; - -// src/resolveDefaultAwsRegionalEndpointsConfig.ts -var import_url_parser = __nccwpck_require__(4494); -var resolveDefaultAwsRegionalEndpointsConfig = /* @__PURE__ */ __name((input) => { - if (typeof input.endpointProvider !== "function") { - throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); - } - const { endpoint } = input; - if (endpoint === void 0) { - input.endpoint = async () => { - return toEndpointV1( - input.endpointProvider( - { - Region: typeof input.region === "function" ? await input.region() : input.region, - UseDualStack: typeof input.useDualstackEndpoint === "function" ? await input.useDualstackEndpoint() : input.useDualstackEndpoint, - UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, - Endpoint: void 0 - }, - { logger: input.logger } - ) - ); +const ARN_DELIMITER = ":"; +const RESOURCE_DELIMITER = "/"; +const parseArn = (value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) + return null; + const [arn, partition, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") + return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition, + service, + region, + accountId, + resourceId, }; - } - return input; -}, "resolveDefaultAwsRegionalEndpointsConfig"); -var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => (0, import_url_parser.parseUrl)(endpoint.url), "toEndpointV1"); +}; -// src/resolveEndpoint.ts +var partitions = [ + { + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "aws global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, + { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "aws-cn global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, + { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "api.amazonwebservices.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "EU (Germany)" + } + } + }, + { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "api.aws.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "aws-iso global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, + { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "api.aws.scloud", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "aws-iso-b global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + } + } + }, + { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "aws-iso-e global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, + { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "api.aws.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "aws-iso-f global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, + { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "aws-us-gov global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + } +]; +var version = "1.1"; +var partitionsInfo = { + partitions: partitions, + version: version +}; +let selectedPartitionsInfo = partitionsInfo; +let selectedUserAgentPrefix = ""; +const partition = (value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition of partitions) { + const { regions, outputs } = partition; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData, + }; + } + } + } + for (const partition of partitions) { + const { regionRegex, outputs } = partition; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs, + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error("Provided region was not found in the partition array or regex," + + " and default partition with id 'aws' doesn't exist."); + } + return { + ...DEFAULT_PARTITION.outputs, + }; +}; +const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; +}; +const useDefaultPartitionInfo = () => { + setPartitionInfo(partitionsInfo, ""); +}; +const getUserAgentPrefix = () => selectedUserAgentPrefix; -// src/types/EndpointError.ts +const awsEndpointFunctions = { + isVirtualHostableS3Bucket: isVirtualHostableS3Bucket, + parseArn: parseArn, + partition: partition, +}; +utilEndpoints.customEndpointFunctions.aws = awsEndpointFunctions; +const resolveDefaultAwsRegionalEndpointsConfig = (input) => { + if (typeof input.endpointProvider !== "function") { + throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); + } + const { endpoint } = input; + if (endpoint === undefined) { + input.endpoint = async () => { + return toEndpointV1(input.endpointProvider({ + Region: typeof input.region === "function" ? await input.region() : input.region, + UseDualStack: typeof input.useDualstackEndpoint === "function" + ? await input.useDualstackEndpoint() + : input.useDualstackEndpoint, + UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, + Endpoint: undefined, + }, { logger: input.logger })); + }; + } + return input; +}; +const toEndpointV1 = (endpoint) => urlParser.parseUrl(endpoint.url); -// src/types/EndpointRuleObject.ts - - -// src/types/ErrorRuleObject.ts - - -// src/types/RuleSetObject.ts - - -// src/types/TreeRuleObject.ts - - -// src/types/shared.ts - -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - +Object.defineProperty(exports, "EndpointError", ({ + enumerable: true, + get: function () { return utilEndpoints.EndpointError; } +})); +Object.defineProperty(exports, "isIpAddress", ({ + enumerable: true, + get: function () { return utilEndpoints.isIpAddress; } +})); +Object.defineProperty(exports, "resolveEndpoint", ({ + enumerable: true, + get: function () { return utilEndpoints.resolveEndpoint; } +})); +exports.awsEndpointFunctions = awsEndpointFunctions; +exports.getUserAgentPrefix = getUserAgentPrefix; +exports.partition = partition; +exports.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig; +exports.setPartitionInfo = setPartitionInfo; +exports.toEndpointV1 = toEndpointV1; +exports.useDefaultPartitionInfo = useDefaultPartitionInfo; /***/ }), @@ -8293,183 +8126,133 @@ exports.defaultUserAgent = defaultUserAgent; /***/ }), /***/ 4274: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - XmlNode: () => XmlNode, - XmlText: () => XmlText, - parseXML: () => import_xml_parser.parseXML -}); -module.exports = __toCommonJS(index_exports); +var xmlParser = __nccwpck_require__(3343); -// src/escape-attribute.ts function escapeAttribute(value) { - return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); + return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); } -__name(escapeAttribute, "escapeAttribute"); -// src/escape-element.ts function escapeElement(value) { - return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, " ").replace(/\n/g, " ").replace(/\u0085/g, "…").replace(/\u2028/, "
"); + return value + .replace(/&/g, "&") + .replace(/"/g, """) + .replace(/'/g, "'") + .replace(//g, ">") + .replace(/\r/g, " ") + .replace(/\n/g, " ") + .replace(/\u0085/g, "…") + .replace(/\u2028/, "
"); } -__name(escapeElement, "escapeElement"); -// src/XmlText.ts -var XmlText = class { - constructor(value) { - this.value = value; - } - static { - __name(this, "XmlText"); - } - toString() { - return escapeElement("" + this.value); - } -}; +class XmlText { + value; + constructor(value) { + this.value = value; + } + toString() { + return escapeElement("" + this.value); + } +} -// src/XmlNode.ts -var XmlNode = class _XmlNode { - constructor(name, children = []) { - this.name = name; - this.children = children; - } - static { - __name(this, "XmlNode"); - } - attributes = {}; - static of(name, childText, withName) { - const node = new _XmlNode(name); - if (childText !== void 0) { - node.addChildNode(new XmlText(childText)); +class XmlNode { + name; + children; + attributes = {}; + static of(name, childText, withName) { + const node = new XmlNode(name); + if (childText !== undefined) { + node.addChildNode(new XmlText(childText)); + } + if (withName !== undefined) { + node.withName(withName); + } + return node; } - if (withName !== void 0) { - node.withName(withName); + constructor(name, children = []) { + this.name = name; + this.children = children; } - return node; - } - withName(name) { - this.name = name; - return this; - } - addAttribute(name, value) { - this.attributes[name] = value; - return this; - } - addChildNode(child) { - this.children.push(child); - return this; - } - removeAttribute(name) { - delete this.attributes[name]; - return this; - } - /** - * @internal - * Alias of {@link XmlNode#withName(string)} for codegen brevity. - */ - n(name) { - this.name = name; - return this; - } - /** - * @internal - * Alias of {@link XmlNode#addChildNode(string)} for codegen brevity. - */ - c(child) { - this.children.push(child); - return this; - } - /** - * @internal - * Checked version of {@link XmlNode#addAttribute(string)} for codegen brevity. - */ - a(name, value) { - if (value != null) { - this.attributes[name] = value; + withName(name) { + this.name = name; + return this; } - return this; - } - /** - * Create a child node. - * Used in serialization of string fields. - * @internal - */ - cc(input, field, withName = field) { - if (input[field] != null) { - const node = _XmlNode.of(field, input[field]).withName(withName); - this.c(node); + addAttribute(name, value) { + this.attributes[name] = value; + return this; } - } - /** - * Creates list child nodes. - * @internal - */ - l(input, listName, memberName, valueProvider) { - if (input[listName] != null) { - const nodes = valueProvider(); - nodes.map((node) => { - node.withName(memberName); - this.c(node); - }); + addChildNode(child) { + this.children.push(child); + return this; } - } - /** - * Creates list child nodes with container. - * @internal - */ - lc(input, listName, memberName, valueProvider) { - if (input[listName] != null) { - const nodes = valueProvider(); - const containerNode = new _XmlNode(memberName); - nodes.map((node) => { - containerNode.c(node); - }); - this.c(containerNode); + removeAttribute(name) { + delete this.attributes[name]; + return this; } - } - toString() { - const hasChildren = Boolean(this.children.length); - let xmlText = `<${this.name}`; - const attributes = this.attributes; - for (const attributeName of Object.keys(attributes)) { - const attribute = attributes[attributeName]; - if (attribute != null) { - xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`; - } + n(name) { + this.name = name; + return this; } - return xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}`; - } -}; - -// src/index.ts -var import_xml_parser = __nccwpck_require__(3343); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); + c(child) { + this.children.push(child); + return this; + } + a(name, value) { + if (value != null) { + this.attributes[name] = value; + } + return this; + } + cc(input, field, withName = field) { + if (input[field] != null) { + const node = XmlNode.of(field, input[field]).withName(withName); + this.c(node); + } + } + l(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + nodes.map((node) => { + node.withName(memberName); + this.c(node); + }); + } + } + lc(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + const containerNode = new XmlNode(memberName); + nodes.map((node) => { + containerNode.c(node); + }); + this.c(containerNode); + } + } + toString() { + const hasChildren = Boolean(this.children.length); + let xmlText = `<${this.name}`; + const attributes = this.attributes; + for (const attributeName of Object.keys(attributes)) { + const attribute = attributes[attributeName]; + if (attribute != null) { + xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`; + } + } + return (xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}`); + } +} +Object.defineProperty(exports, "parseXML", ({ + enumerable: true, + get: function () { return xmlParser.parseXML; } +})); +exports.XmlNode = XmlNode; +exports.XmlText = XmlText; /***/ }), @@ -10276,10 +10059,10 @@ class HttpProtocol extends SerdeContext { } } setHostPrefix(request, operationSchema, input) { - const operationNs = schema.NormalizedSchema.of(operationSchema); const inputNs = schema.NormalizedSchema.of(operationSchema.input); - if (operationNs.getMergedTraits().endpoint) { - let hostPrefix = operationNs.getMergedTraits().endpoint?.[0]; + const opTraits = schema.translateTraits(operationSchema.traits ?? {}); + if (opTraits.endpoint) { + let hostPrefix = opTraits.endpoint?.[0]; if (typeof hostPrefix === "string") { const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel); for (const [name] of hostLabelInputs) { @@ -11042,63 +10825,111 @@ const deref = (schemaRef) => { return schemaRef; }; -class TypeRegistry { - namespace; - schemas; - exceptions; - static registries = new Map(); - constructor(namespace, schemas = new Map(), exceptions = new Map()) { - this.namespace = namespace; - this.schemas = schemas; - this.exceptions = exceptions; +const operation = (namespace, name, traits, input, output) => ({ + name, + namespace, + traits, + input, + output, +}); + +const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { + const { response } = await next(args); + const { operationSchema } = utilMiddleware.getSmithyContext(context); + const [, ns, n, t, i, o] = operationSchema ?? []; + try { + const parsed = await config.protocol.deserializeResponse(operation(ns, n, t, i, o), { + ...config, + ...context, + }, response); + return { + response, + output: parsed, + }; } - static for(namespace) { - if (!TypeRegistry.registries.has(namespace)) { - TypeRegistry.registries.set(namespace, new TypeRegistry(namespace)); - } - return TypeRegistry.registries.get(namespace); - } - register(shapeId, schema) { - const qualifiedName = this.normalizeShapeId(shapeId); - this.schemas.set(qualifiedName, schema); - } - getSchema(shapeId) { - const id = this.normalizeShapeId(shapeId); - if (!this.schemas.has(id)) { - throw new Error(`@smithy/core/schema - schema not found for ${id}`); - } - return this.schemas.get(id); - } - registerError(es, ctor) { - this.exceptions.set(es, ctor); - } - getErrorCtor(es) { - return this.exceptions.get(es); - } - getBaseException() { - for (const [id, schema] of this.schemas.entries()) { - if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { - return schema; + catch (error) { + Object.defineProperty(error, "$response", { + value: response, + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error.message += "\n " + hint; + } + catch (e) { + if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } + else { + context.logger?.warn?.(hint); + } + } + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } + try { + if (protocolHttp.HttpResponse.isInstance(response)) { + const { headers = {} } = response; + const headerEntries = Object.entries(headers); + error.$metadata = { + httpStatusCode: response.statusCode, + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries), + }; + } + } + catch (e) { } } - return undefined; - } - find(predicate) { - return [...this.schemas.values()].find(predicate); - } - clear() { - this.schemas.clear(); - this.exceptions.clear(); - } - normalizeShapeId(shapeId) { - if (shapeId.includes("#")) { - return shapeId; - } - return this.namespace + "#" + shapeId; - } - getNamespace(shapeId) { - return this.normalizeShapeId(shapeId).split("#")[0]; + throw error; } +}; +const findHeader = (pattern, headers) => { + return (headers.find(([k]) => { + return k.match(pattern); + }) || [void 0, void 0])[1]; +}; + +const schemaSerializationMiddleware = (config) => (next, context) => async (args) => { + const { operationSchema } = utilMiddleware.getSmithyContext(context); + const [, ns, n, t, i, o] = operationSchema ?? []; + const endpoint = context.endpointV2?.url && config.urlParser + ? async () => config.urlParser(context.endpointV2.url) + : config.endpoint; + const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, { + ...config, + ...context, + endpoint, + }); + return next({ + ...args, + request, + }); +}; + +const deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true, +}; +const serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true, +}; +function getSchemaSerdePlugin(config) { + return { + applyToStack: (commandStack) => { + commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption); + commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption); + config.protocol.setSerdeContext(config); + }, + }; } class Schema { @@ -11107,7 +10938,6 @@ class Schema { traits; static assign(instance, values) { const schema = Object.assign(instance, values); - TypeRegistry.for(schema.namespace).register(schema.name, schema); return schema; } static [Symbol.hasInstance](lhs) { @@ -11123,36 +10953,6 @@ class Schema { } } -class StructureSchema extends Schema { - static symbol = Symbol.for("@smithy/str"); - name; - traits; - memberNames; - memberList; - symbol = StructureSchema.symbol; -} -const struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), { - name, - namespace, - traits, - memberNames, - memberList, -}); - -class ErrorSchema extends StructureSchema { - static symbol = Symbol.for("@smithy/err"); - ctor; - symbol = ErrorSchema.symbol; -} -const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { - name, - namespace, - traits, - memberNames, - memberList, - ctor: null, -}); - class ListSchema extends Schema { static symbol = Symbol.for("@smithy/lis"); name; @@ -11199,18 +10999,34 @@ const op = (namespace, name, traits, input, output) => Schema.assign(new Operati output, }); -class SimpleSchema extends Schema { - static symbol = Symbol.for("@smithy/sim"); +class StructureSchema extends Schema { + static symbol = Symbol.for("@smithy/str"); name; - schemaRef; traits; - symbol = SimpleSchema.symbol; + memberNames; + memberList; + symbol = StructureSchema.symbol; } -const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { +const struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), { name, namespace, traits, - schemaRef, + memberNames, + memberList, +}); + +class ErrorSchema extends StructureSchema { + static symbol = Symbol.for("@smithy/err"); + ctor; + symbol = ErrorSchema.symbol; +} +const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { + name, + namespace, + traits, + memberNames, + memberList, + ctor: null, }); function translateTraits(indicator) { @@ -11260,8 +11076,6 @@ class NormalizedSchema { schema = deref(_ref); this._isMemberSchema = true; } - if (isStaticSchema(schema)) - schema = hydrate(schema); if (traitStack.length > 0) { this.memberTraits = {}; for (let i = traitStack.length - 1; i >= 0; --i) { @@ -11281,19 +11095,25 @@ class NormalizedSchema { return; } this.schema = deref(schema); - if (this.schema && typeof this.schema === "object") { - this.traits = this.schema?.traits ?? {}; + 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; } - this.name = (this.schema instanceof Schema ? this.schema.getName?.() : void 0) ?? this.memberName ?? String(schema); if (this._isMemberSchema && !memberName) { throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); } } static [Symbol.hasInstance](lhs) { - return Schema[Symbol.hasInstance].bind(this)(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 sc = deref(ref); @@ -11311,7 +11131,11 @@ class NormalizedSchema { return new NormalizedSchema(sc); } getSchema() { - return deref(this.schema?.schemaRef ?? this.schema); + const sc = this.schema; + if (sc[0] === 0) { + return sc[4]; + } + return sc; } getName(withNamespace = false) { const { name } = this; @@ -11328,17 +11152,18 @@ class NormalizedSchema { const sc = this.getSchema(); return typeof sc === "number" ? sc >= 64 && sc < 128 - : sc instanceof ListSchema; + : sc[0] === 1; } isMapSchema() { const sc = this.getSchema(); return typeof sc === "number" ? sc >= 128 && sc <= 0b1111_1111 - : sc instanceof MapSchema; + : sc[0] === 2; } isStructSchema() { const sc = this.getSchema(); - return (sc !== null && typeof sc === "object" && "members" in sc) || sc instanceof StructureSchema; + return (sc[0] === 3 || + sc[0] === -3); } isBlobSchema() { const sc = this.getSchema(); @@ -11402,7 +11227,7 @@ class NormalizedSchema { const schema = this.getSchema(); const memberSchema = isDoc ? 15 - : schema?.keySchema ?? 0; + : schema[4] ?? 0; return member([memberSchema, 0], "key"); } getValueSchema() { @@ -11411,7 +11236,7 @@ class NormalizedSchema { const memberSchema = typeof sc === "number" ? 0b0011_1111 & sc : sc && typeof sc === "object" && (isMap || isList) - ? sc.valueSchema + ? sc[3 + sc[0]] : isDoc ? 15 : void 0; @@ -11422,9 +11247,9 @@ class NormalizedSchema { } getMemberSchema(memberName) { const struct = this.getSchema(); - if (this.isStructSchema() && struct.memberNames.includes(memberName)) { - const i = struct.memberNames.indexOf(memberName); - const memberSchema = struct.memberList[i]; + if (this.isStructSchema() && struct[4].includes(memberName)) { + const i = struct[4].indexOf(memberName); + const memberSchema = struct[5][i]; return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); } if (this.isDocumentSchema()) { @@ -11460,8 +11285,8 @@ class NormalizedSchema { throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); } const struct = this.getSchema(); - for (let i = 0; i < struct.memberNames.length; ++i) { - yield [struct.memberNames[i], member([struct.memberList[i], 0], struct.memberNames[i])]; + for (let i = 0; i < struct[4].length; ++i) { + yield [struct[4][i], member([struct[5][i], 0], struct[4][i])]; } } } @@ -11475,122 +11300,28 @@ function member(memberSchema, memberName) { const internalCtorAccess = NormalizedSchema; return new internalCtorAccess(memberSchema, memberName); } -function hydrate(ss) { - const [id, ...rest] = ss; - return { - [0]: sim, - [1]: list, - [2]: map, - [3]: struct, - [-3]: error, - [9]: op, - }[id].call(null, ...rest); -} const isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; -const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { - const { response } = await next(args); - let { operationSchema } = utilMiddleware.getSmithyContext(context); - if (isStaticSchema(operationSchema)) { - operationSchema = hydrate(operationSchema); - } - try { - const parsed = await config.protocol.deserializeResponse(operationSchema, { - ...config, - ...context, - }, response); - return { - response, - output: parsed, - }; - } - catch (error) { - Object.defineProperty(error, "$response", { - value: response, - }); - if (!("$metadata" in error)) { - const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; - try { - error.message += "\n " + hint; - } - catch (e) { - if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { - console.warn(hint); - } - else { - context.logger?.warn?.(hint); - } - } - if (typeof error.$responseBodyText !== "undefined") { - if (error.$response) { - error.$response.body = error.$responseBodyText; - } - } - try { - if (protocolHttp.HttpResponse.isInstance(response)) { - const { headers = {} } = response; - const headerEntries = Object.entries(headers); - error.$metadata = { - httpStatusCode: response.statusCode, - requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), - extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), - cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries), - }; - } - } - catch (e) { - } - } - throw error; - } -}; -const findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; -}; - -const schemaSerializationMiddleware = (config) => (next, context) => async (args) => { - let { operationSchema } = utilMiddleware.getSmithyContext(context); - if (isStaticSchema(operationSchema)) { - operationSchema = hydrate(operationSchema); - } - const endpoint = context.endpointV2?.url && config.urlParser - ? async () => config.urlParser(context.endpointV2.url) - : config.endpoint; - const request = await config.protocol.serializeRequest(operationSchema, args.input, { - ...config, - ...context, - endpoint, - }); - return next({ - ...args, - request, - }); -}; - -const deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true, -}; -const serializerMiddlewareOption = { - name: "serializerMiddleware", - step: "serialize", - tags: ["SERIALIZER"], - override: true, -}; -function getSchemaSerdePlugin(config) { - return { - applyToStack: (commandStack) => { - commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption); - commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption); - config.protocol.setSerdeContext(config); - }, - }; +class SimpleSchema extends Schema { + static symbol = Symbol.for("@smithy/sim"); + name; + schemaRef; + traits; + symbol = SimpleSchema.symbol; } +const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { + name, + namespace, + traits, + schemaRef, +}); +const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { + name, + namespace, + traits, + schemaRef, +}); const SCHEMA = { BLOB: 0b0001_0101, @@ -11609,6 +11340,72 @@ const SCHEMA = { MAP_MODIFIER: 0b1000_0000, }; +class TypeRegistry { + namespace; + schemas; + exceptions; + static registries = new Map(); + constructor(namespace, schemas = new Map(), exceptions = 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); + } + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + const registry = TypeRegistry.for(qualifiedName.split("#")[0]); + registry.schemas.set(qualifiedName, schema); + } + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + throw new Error(`@smithy/core/schema - schema not found for ${id}`); + } + return this.schemas.get(id); + } + registerError(es, ctor) { + const $error = es; + const registry = TypeRegistry.for($error[1]); + registry.schemas.set($error[1] + "#" + $error[2], $error); + registry.exceptions.set($error, ctor); + } + getErrorCtor(es) { + const $error = es; + 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 undefined; + } + find(predicate) { + return [...this.schemas.values()].find(predicate); + } + clear() { + this.schemas.clear(); + this.exceptions.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; + } +} + exports.ErrorSchema = ErrorSchema; exports.ListSchema = ListSchema; exports.MapSchema = MapSchema; @@ -11623,13 +11420,14 @@ exports.deref = deref; exports.deserializerMiddlewareOption = deserializerMiddlewareOption; exports.error = error; exports.getSchemaSerdePlugin = getSchemaSerdePlugin; -exports.hydrate = hydrate; exports.isStaticSchema = isStaticSchema; exports.list = list; exports.map = map; exports.op = op; +exports.operation = operation; exports.serializerMiddlewareOption = serializerMiddlewareOption; exports.sim = sim; +exports.simAdapter = simAdapter; exports.struct = struct; exports.translateTraits = translateTraits; @@ -15133,6 +14931,8 @@ const ENV_PROFILE = "AWS_PROFILE"; const DEFAULT_PROFILE = "default"; const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; +const CONFIG_PREFIX_SEPARATOR = "."; + const getConfigData = (data) => Object.entries(data) .filter(([key]) => { const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); @@ -15208,7 +15008,6 @@ const parseIni = (iniData) => { }; const swallowError$1 = () => ({}); -const CONFIG_PREFIX_SEPARATOR = "."; const loadSharedConfigFiles = async (init = {}) => { const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; const homeDir = getHomeDir.getHomeDir(); @@ -17199,22 +16998,25 @@ const evaluateExpression = (obj, keyName, options) => { return evaluateTemplate(obj, options); } else if (obj["fn"]) { - return callFunction(obj, options); + return group$2.callFunction(obj, options); } else if (obj["ref"]) { return getReferenceValue(obj, options); } throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); }; - const callFunction = ({ fn, argv }, options) => { - const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options)); + const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : group$2.evaluateExpression(arg, "arg", options)); const fnSegments = fn.split("."); if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); } return endpointFunctions[fn](...evaluatedArgs); }; +const group$2 = { + evaluateExpression, + callFunction, +}; const evaluateCondition = ({ assign, ...fnArgs }, options) => { if (assign && assign in options.referenceRecord) { @@ -17260,6 +17062,10 @@ const getEndpointHeaders = (headers, options) => Object.entries(headers).reduce( }), }), {}); +const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: group$1.getEndpointProperty(propertyVal, options), +}), {}); const getEndpointProperty = (property, options) => { if (Array.isArray(property)) { return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); @@ -17271,18 +17077,17 @@ const getEndpointProperty = (property, options) => { if (property === null) { throw new EndpointError(`Unexpected endpoint property: ${property}`); } - return getEndpointProperties(property, options); + return group$1.getEndpointProperties(property, options); case "boolean": return property; default: throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); } }; - -const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ - ...acc, - [propertyKey]: getEndpointProperty(propertyVal, options), -}), {}); +const group$1 = { + getEndpointProperty, + getEndpointProperties, +}; const getEndpointUrl = (endpointUrl, options) => { const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); @@ -17333,18 +17138,6 @@ const evaluateErrorRule = (errorRule, options) => { })); }; -const evaluateTreeRule = (treeRule, options) => { - const { conditions, rules } = treeRule; - const { result, referenceRecord } = evaluateConditions(conditions, options); - if (!result) { - return; - } - return evaluateRules(rules, { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord }, - }); -}; - const evaluateRules = (rules, options) => { for (const rule of rules) { if (rule.type === "endpoint") { @@ -17357,7 +17150,7 @@ const evaluateRules = (rules, options) => { evaluateErrorRule(rule, options); } else if (rule.type === "tree") { - const endpointOrUndefined = evaluateTreeRule(rule, options); + const endpointOrUndefined = group.evaluateTreeRule(rule, options); if (endpointOrUndefined) { return endpointOrUndefined; } @@ -17368,6 +17161,21 @@ const evaluateRules = (rules, options) => { } throw new EndpointError(`Rules evaluation failed`); }; +const evaluateTreeRule = (treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + return group.evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + }); +}; +const group = { + evaluateRules, + evaluateTreeRule, +}; const resolveEndpoint = (ruleSetObject, options) => { const { endpointParams, logger } = options; @@ -18272,23 +18080,13 @@ var sdkStreamMixin = __nccwpck_require__(7201); var splitStream = __nccwpck_require__(2108); var streamTypeCheck = __nccwpck_require__(4414); -function transformToString(payload, encoding = "utf-8") { - if (encoding === "base64") { - return utilBase64.toBase64(payload); - } - return utilUtf8.toUtf8(payload); -} -function transformFromString(str, encoding) { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(str)); - } - return Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(str)); -} - class Uint8ArrayBlobAdapter extends Uint8Array { static fromString(source, encoding = "utf-8") { if (typeof source === "string") { - return transformFromString(source, encoding); + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source)); + } + return Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(source)); } throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); } @@ -18297,7 +18095,10 @@ class Uint8ArrayBlobAdapter extends Uint8Array { return source; } transformToString(encoding = "utf-8") { - return transformToString(this, encoding); + if (encoding === "base64") { + return utilBase64.toBase64(this); + } + return utilUtf8.toUtf8(this); } } @@ -43855,7 +43656,7 @@ module.exports = parseParams /***/ ((module) => { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.908.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.908.0","@aws-sdk/credential-provider-node":"3.908.0","@aws-sdk/middleware-host-header":"3.901.0","@aws-sdk/middleware-logger":"3.901.0","@aws-sdk/middleware-recursion-detection":"3.901.0","@aws-sdk/middleware-user-agent":"3.908.0","@aws-sdk/region-config-resolver":"3.901.0","@aws-sdk/types":"3.901.0","@aws-sdk/util-endpoints":"3.901.0","@aws-sdk/util-user-agent-browser":"3.907.0","@aws-sdk/util-user-agent-node":"3.908.0","@smithy/config-resolver":"^4.3.0","@smithy/core":"^3.15.0","@smithy/fetch-http-handler":"^5.3.1","@smithy/hash-node":"^4.2.0","@smithy/invalid-dependency":"^4.2.0","@smithy/middleware-content-length":"^4.2.0","@smithy/middleware-endpoint":"^4.3.1","@smithy/middleware-retry":"^4.4.1","@smithy/middleware-serde":"^4.2.0","@smithy/middleware-stack":"^4.2.0","@smithy/node-config-provider":"^4.3.0","@smithy/node-http-handler":"^4.3.0","@smithy/protocol-http":"^5.3.0","@smithy/smithy-client":"^4.7.1","@smithy/types":"^4.6.0","@smithy/url-parser":"^4.2.0","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.0","@smithy/util-defaults-mode-node":"^4.2.1","@smithy/util-endpoints":"^3.2.0","@smithy/util-middleware":"^4.2.0","@smithy/util-retry":"^4.2.0","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.913.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.911.0","@aws-sdk/credential-provider-node":"3.913.0","@aws-sdk/middleware-host-header":"3.910.0","@aws-sdk/middleware-logger":"3.910.0","@aws-sdk/middleware-recursion-detection":"3.910.0","@aws-sdk/middleware-user-agent":"3.911.0","@aws-sdk/region-config-resolver":"3.910.0","@aws-sdk/types":"3.910.0","@aws-sdk/util-endpoints":"3.910.0","@aws-sdk/util-user-agent-browser":"3.910.0","@aws-sdk/util-user-agent-node":"3.911.0","@smithy/config-resolver":"^4.3.2","@smithy/core":"^3.16.1","@smithy/fetch-http-handler":"^5.3.3","@smithy/hash-node":"^4.2.2","@smithy/invalid-dependency":"^4.2.2","@smithy/middleware-content-length":"^4.2.2","@smithy/middleware-endpoint":"^4.3.3","@smithy/middleware-retry":"^4.4.3","@smithy/middleware-serde":"^4.2.2","@smithy/middleware-stack":"^4.2.2","@smithy/node-config-provider":"^4.3.2","@smithy/node-http-handler":"^4.4.1","@smithy/protocol-http":"^5.3.2","@smithy/smithy-client":"^4.8.1","@smithy/types":"^4.7.1","@smithy/url-parser":"^4.2.2","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.2","@smithy/util-defaults-mode-node":"^4.2.3","@smithy/util-endpoints":"^3.2.2","@smithy/util-middleware":"^4.2.2","@smithy/util-retry":"^4.2.2","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}'); /***/ }) diff --git a/dist/index.js b/dist/index.js index e777c97..b5013c9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6319,7 +6319,7 @@ class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol { const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = {}; for (const [name, member] of ns.structIterator()) { @@ -6804,7 +6804,7 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol { } Object.assign(request.headers, { "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`, - "x-amz-target": `${this.serviceTarget}.${schema.NormalizedSchema.of(operationSchema).getName()}`, + "x-amz-target": `${this.serviceTarget}.${operationSchema.name}`, }); if (this.awsQueryCompatible) { request.headers["x-amzn-query-mode"] = "true"; @@ -6825,7 +6825,7 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol { const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = {}; for (const [name, member] of ns.structIterator()) { @@ -6930,7 +6930,7 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol { const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); await this.deserializeHttpMessage(errorSchema, context, response, dataObject); const output = {}; @@ -7340,7 +7340,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol { }; const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, (registry, errorName) => registry.find((schema$1) => schema.NormalizedSchema.of(schema$1).getMergedTraits().awsQueryError?.[0] === errorName)); const ns = schema.NormalizedSchema.of(errorSchema); - const ErrorCtor = schema.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = { Error: errorData.Error, @@ -7778,7 +7778,7 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol { const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; - const ErrorCtor = schema.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error; + const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); await this.deserializeHttpMessage(errorSchema, context, response, dataObject); const output = {}; @@ -8044,215 +8044,139 @@ exports.defaultProvider = defaultProvider; /***/ }), /***/ 2590: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getHostHeaderPlugin: () => getHostHeaderPlugin, - hostHeaderMiddleware: () => hostHeaderMiddleware, - hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, - resolveHostHeaderConfig: () => resolveHostHeaderConfig -}); -module.exports = __toCommonJS(index_exports); -var import_protocol_http = __nccwpck_require__(2356); +var protocolHttp = __nccwpck_require__(2356); + function resolveHostHeaderConfig(input) { - return input; + return input; } -__name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); -var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { - if (!import_protocol_http.HttpRequest.isInstance(args.request)) return next(args); - const { request } = args; - const { handlerProtocol = "" } = options.requestHandler.metadata || {}; - if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { - delete request.headers["host"]; - request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); - } else if (!request.headers["host"]) { - let host = request.hostname; - if (request.port != null) host += `:${request.port}`; - request.headers["host"] = host; - } - return next(args); -}, "hostHeaderMiddleware"); -var hostHeaderMiddlewareOptions = { - name: "hostHeaderMiddleware", - step: "build", - priority: "low", - tags: ["HOST"], - override: true +const hostHeaderMiddleware = (options) => (next) => async (args) => { + if (!protocolHttp.HttpRequest.isInstance(args.request)) + return next(args); + const { request } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { + delete request.headers["host"]; + request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); + } + else if (!request.headers["host"]) { + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; + } + return next(args); }; -var getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); - }, "applyToStack") -}), "getHostHeaderPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); +const hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true, +}; +const getHostHeaderPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + }, +}); +exports.getHostHeaderPlugin = getHostHeaderPlugin; +exports.hostHeaderMiddleware = hostHeaderMiddleware; +exports.hostHeaderMiddlewareOptions = hostHeaderMiddlewareOptions; +exports.resolveHostHeaderConfig = resolveHostHeaderConfig; /***/ }), /***/ 5242: -/***/ ((module) => { +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getLoggerPlugin: () => getLoggerPlugin, - loggerMiddleware: () => loggerMiddleware, - loggerMiddlewareOptions: () => loggerMiddlewareOptions +const loggerMiddleware = () => (next, context) => async (args) => { + try { + const response = await next(args); + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + logger?.info?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata, + }); + return response; + } + catch (error) { + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + logger?.error?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error, + metadata: error.$metadata, + }); + throw error; + } +}; +const loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true, +}; +const getLoggerPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + }, }); -module.exports = __toCommonJS(index_exports); - -// src/loggerMiddleware.ts -var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => { - try { - const response = await next(args); - const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; - const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; - const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; - const { $metadata, ...outputWithoutMetadata } = response.output; - logger?.info?.({ - clientName, - commandName, - input: inputFilterSensitiveLog(args.input), - output: outputFilterSensitiveLog(outputWithoutMetadata), - metadata: $metadata - }); - return response; - } catch (error) { - const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; - const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; - logger?.error?.({ - clientName, - commandName, - input: inputFilterSensitiveLog(args.input), - error, - metadata: error.$metadata - }); - throw error; - } -}, "loggerMiddleware"); -var loggerMiddlewareOptions = { - name: "loggerMiddleware", - tags: ["LOGGER"], - step: "initialize", - override: true -}; -var getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); - }, "applyToStack") -}), "getLoggerPlugin"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); +exports.getLoggerPlugin = getLoggerPlugin; +exports.loggerMiddleware = loggerMiddleware; +exports.loggerMiddlewareOptions = loggerMiddlewareOptions; /***/ }), /***/ 1568: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - getRecursionDetectionPlugin: () => getRecursionDetectionPlugin +var recursionDetectionMiddleware = __nccwpck_require__(2521); + +const recursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low", +}; + +const getRecursionDetectionPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware.recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions); + }, }); -module.exports = __toCommonJS(index_exports); - -// src/configuration.ts -var recursionDetectionMiddlewareOptions = { - step: "build", - tags: ["RECURSION_DETECTION"], - name: "recursionDetectionMiddleware", - override: true, - priority: "low" -}; - -// src/getRecursionDetectionPlugin.ts -var import_recursionDetectionMiddleware = __nccwpck_require__(2521); -var getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: /* @__PURE__ */ __name((clientStack) => { - clientStack.add((0, import_recursionDetectionMiddleware.recursionDetectionMiddleware)(), recursionDetectionMiddlewareOptions); - }, "applyToStack") -}), "getRecursionDetectionPlugin"); - -// src/index.ts -__reExport(index_exports, __nccwpck_require__(2521), module.exports); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); +exports.getRecursionDetectionPlugin = getRecursionDetectionPlugin; +Object.keys(recursionDetectionMiddleware).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return recursionDetectionMiddleware[k]; } + }); +}); /***/ }), @@ -8500,589 +8424,498 @@ exports.userAgentMiddleware = userAgentMiddleware; /***/ }), /***/ 6463: -/***/ ((module) => { +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, - NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, - REGION_ENV_NAME: () => REGION_ENV_NAME, - REGION_INI_NAME: () => REGION_INI_NAME, - getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration, - resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration, - resolveRegionConfig: () => resolveRegionConfig -}); -module.exports = __toCommonJS(index_exports); +const getAwsRegionExtensionConfiguration = (runtimeConfig) => { + return { + setRegion(region) { + runtimeConfig.region = region; + }, + region() { + return runtimeConfig.region; + }, + }; +}; +const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region(), + }; +}; -// src/extensions/index.ts -var getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - return { - setRegion(region) { - runtimeConfig.region = region; +const REGION_ENV_NAME = "AWS_REGION"; +const REGION_INI_NAME = "region"; +const NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); }, - region() { - return runtimeConfig.region; +}; +const NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials", +}; + +const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); + +const getRealRegion = (region) => isFipsRegion(region) + ? ["fips-aws-global", "aws-fips"].includes(region) + ? "us-east-1" + : region.replace(/fips-(dkr-|prod-)?|-fips/, "") + : region; + +const resolveRegionConfig = (input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); } - }; -}, "getAwsRegionExtensionConfiguration"); -var resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { - return { - region: awsRegionExtensionConfiguration.region() - }; -}, "resolveAwsRegionExtensionConfiguration"); - -// src/regionConfig/config.ts -var REGION_ENV_NAME = "AWS_REGION"; -var REGION_INI_NAME = "region"; -var NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: /* @__PURE__ */ __name((env) => env[REGION_ENV_NAME], "environmentVariableSelector"), - configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], "configFileSelector"), - default: /* @__PURE__ */ __name(() => { - throw new Error("Region is missing"); - }, "default") -}; -var NODE_REGION_CONFIG_FILE_OPTIONS = { - preferredFile: "credentials" + return Object.assign(input, { + region: async () => { + if (typeof region === "string") { + return getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + }, + }); }; -// src/regionConfig/isFipsRegion.ts -var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); - -// src/regionConfig/getRealRegion.ts -var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); - -// src/regionConfig/resolveRegionConfig.ts -var resolveRegionConfig = /* @__PURE__ */ __name((input) => { - const { region, useFipsEndpoint } = input; - if (!region) { - throw new Error("Region is missing"); - } - return Object.assign(input, { - region: /* @__PURE__ */ __name(async () => { - if (typeof region === "string") { - return getRealRegion(region); - } - const providedRegion = await region(); - return getRealRegion(providedRegion); - }, "region"), - useFipsEndpoint: /* @__PURE__ */ __name(async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if (isFipsRegion(providedRegion)) { - return true; - } - return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - }, "useFipsEndpoint") - }); -}, "resolveRegionConfig"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - +exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS; +exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS; +exports.REGION_ENV_NAME = REGION_ENV_NAME; +exports.REGION_INI_NAME = REGION_INI_NAME; +exports.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration; +exports.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration; +exports.resolveRegionConfig = resolveRegionConfig; /***/ }), /***/ 3068: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ConditionObject: () => import_util_endpoints.ConditionObject, - DeprecatedObject: () => import_util_endpoints.DeprecatedObject, - EndpointError: () => import_util_endpoints.EndpointError, - EndpointObject: () => import_util_endpoints.EndpointObject, - EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders, - EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties, - EndpointParams: () => import_util_endpoints.EndpointParams, - EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions, - EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject, - ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject, - EvaluateOptions: () => import_util_endpoints.EvaluateOptions, - Expression: () => import_util_endpoints.Expression, - FunctionArgv: () => import_util_endpoints.FunctionArgv, - FunctionObject: () => import_util_endpoints.FunctionObject, - FunctionReturn: () => import_util_endpoints.FunctionReturn, - ParameterObject: () => import_util_endpoints.ParameterObject, - ReferenceObject: () => import_util_endpoints.ReferenceObject, - ReferenceRecord: () => import_util_endpoints.ReferenceRecord, - RuleSetObject: () => import_util_endpoints.RuleSetObject, - RuleSetRules: () => import_util_endpoints.RuleSetRules, - TreeRuleObject: () => import_util_endpoints.TreeRuleObject, - awsEndpointFunctions: () => awsEndpointFunctions, - getUserAgentPrefix: () => getUserAgentPrefix, - isIpAddress: () => import_util_endpoints.isIpAddress, - partition: () => partition, - resolveDefaultAwsRegionalEndpointsConfig: () => resolveDefaultAwsRegionalEndpointsConfig, - resolveEndpoint: () => import_util_endpoints.resolveEndpoint, - setPartitionInfo: () => setPartitionInfo, - toEndpointV1: () => toEndpointV1, - useDefaultPartitionInfo: () => useDefaultPartitionInfo -}); -module.exports = __toCommonJS(index_exports); +var utilEndpoints = __nccwpck_require__(9674); +var urlParser = __nccwpck_require__(4494); -// src/aws.ts - - -// src/lib/aws/isVirtualHostableS3Bucket.ts - - -// src/lib/isIpAddress.ts -var import_util_endpoints = __nccwpck_require__(9674); - -// src/lib/aws/isVirtualHostableS3Bucket.ts -var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { - if (allowSubDomains) { - for (const label of value.split(".")) { - if (!isVirtualHostableS3Bucket(label)) { +const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!utilEndpoints.isValidHostLabel(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if (utilEndpoints.isIpAddress(value)) { return false; - } } return true; - } - if (!(0, import_util_endpoints.isValidHostLabel)(value)) { - return false; - } - if (value.length < 3 || value.length > 63) { - return false; - } - if (value !== value.toLowerCase()) { - return false; - } - if ((0, import_util_endpoints.isIpAddress)(value)) { - return false; - } - return true; -}, "isVirtualHostableS3Bucket"); - -// src/lib/aws/parseArn.ts -var ARN_DELIMITER = ":"; -var RESOURCE_DELIMITER = "/"; -var parseArn = /* @__PURE__ */ __name((value) => { - const segments = value.split(ARN_DELIMITER); - if (segments.length < 6) return null; - const [arn, partition2, service, region, accountId, ...resourcePath] = segments; - if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") return null; - const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); - return { - partition: partition2, - service, - region, - accountId, - resourceId - }; -}, "parseArn"); - -// src/lib/aws/partitions.json -var partitions_default = { - partitions: [{ - id: "aws", - outputs: { - dnsSuffix: "amazonaws.com", - dualStackDnsSuffix: "api.aws", - implicitGlobalRegion: "us-east-1", - name: "aws", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", - regions: { - "af-south-1": { - description: "Africa (Cape Town)" - }, - "ap-east-1": { - description: "Asia Pacific (Hong Kong)" - }, - "ap-east-2": { - description: "Asia Pacific (Taipei)" - }, - "ap-northeast-1": { - description: "Asia Pacific (Tokyo)" - }, - "ap-northeast-2": { - description: "Asia Pacific (Seoul)" - }, - "ap-northeast-3": { - description: "Asia Pacific (Osaka)" - }, - "ap-south-1": { - description: "Asia Pacific (Mumbai)" - }, - "ap-south-2": { - description: "Asia Pacific (Hyderabad)" - }, - "ap-southeast-1": { - description: "Asia Pacific (Singapore)" - }, - "ap-southeast-2": { - description: "Asia Pacific (Sydney)" - }, - "ap-southeast-3": { - description: "Asia Pacific (Jakarta)" - }, - "ap-southeast-4": { - description: "Asia Pacific (Melbourne)" - }, - "ap-southeast-5": { - description: "Asia Pacific (Malaysia)" - }, - "ap-southeast-6": { - description: "Asia Pacific (New Zealand)" - }, - "ap-southeast-7": { - description: "Asia Pacific (Thailand)" - }, - "aws-global": { - description: "aws global region" - }, - "ca-central-1": { - description: "Canada (Central)" - }, - "ca-west-1": { - description: "Canada West (Calgary)" - }, - "eu-central-1": { - description: "Europe (Frankfurt)" - }, - "eu-central-2": { - description: "Europe (Zurich)" - }, - "eu-north-1": { - description: "Europe (Stockholm)" - }, - "eu-south-1": { - description: "Europe (Milan)" - }, - "eu-south-2": { - description: "Europe (Spain)" - }, - "eu-west-1": { - description: "Europe (Ireland)" - }, - "eu-west-2": { - description: "Europe (London)" - }, - "eu-west-3": { - description: "Europe (Paris)" - }, - "il-central-1": { - description: "Israel (Tel Aviv)" - }, - "me-central-1": { - description: "Middle East (UAE)" - }, - "me-south-1": { - description: "Middle East (Bahrain)" - }, - "mx-central-1": { - description: "Mexico (Central)" - }, - "sa-east-1": { - description: "South America (Sao Paulo)" - }, - "us-east-1": { - description: "US East (N. Virginia)" - }, - "us-east-2": { - description: "US East (Ohio)" - }, - "us-west-1": { - description: "US West (N. California)" - }, - "us-west-2": { - description: "US West (Oregon)" - } - } - }, { - id: "aws-cn", - outputs: { - dnsSuffix: "amazonaws.com.cn", - dualStackDnsSuffix: "api.amazonwebservices.com.cn", - implicitGlobalRegion: "cn-northwest-1", - name: "aws-cn", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^cn\\-\\w+\\-\\d+$", - regions: { - "aws-cn-global": { - description: "aws-cn global region" - }, - "cn-north-1": { - description: "China (Beijing)" - }, - "cn-northwest-1": { - description: "China (Ningxia)" - } - } - }, { - id: "aws-eusc", - outputs: { - dnsSuffix: "amazonaws.eu", - dualStackDnsSuffix: "api.amazonwebservices.eu", - implicitGlobalRegion: "eusc-de-east-1", - name: "aws-eusc", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", - regions: { - "eusc-de-east-1": { - description: "EU (Germany)" - } - } - }, { - id: "aws-iso", - outputs: { - dnsSuffix: "c2s.ic.gov", - dualStackDnsSuffix: "api.aws.ic.gov", - implicitGlobalRegion: "us-iso-east-1", - name: "aws-iso", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", - regions: { - "aws-iso-global": { - description: "aws-iso global region" - }, - "us-iso-east-1": { - description: "US ISO East" - }, - "us-iso-west-1": { - description: "US ISO WEST" - } - } - }, { - id: "aws-iso-b", - outputs: { - dnsSuffix: "sc2s.sgov.gov", - dualStackDnsSuffix: "api.aws.scloud", - implicitGlobalRegion: "us-isob-east-1", - name: "aws-iso-b", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", - regions: { - "aws-iso-b-global": { - description: "aws-iso-b global region" - }, - "us-isob-east-1": { - description: "US ISOB East (Ohio)" - } - } - }, { - id: "aws-iso-e", - outputs: { - dnsSuffix: "cloud.adc-e.uk", - dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", - implicitGlobalRegion: "eu-isoe-west-1", - name: "aws-iso-e", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", - regions: { - "aws-iso-e-global": { - description: "aws-iso-e global region" - }, - "eu-isoe-west-1": { - description: "EU ISOE West" - } - } - }, { - id: "aws-iso-f", - outputs: { - dnsSuffix: "csp.hci.ic.gov", - dualStackDnsSuffix: "api.aws.hci.ic.gov", - implicitGlobalRegion: "us-isof-south-1", - name: "aws-iso-f", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", - regions: { - "aws-iso-f-global": { - description: "aws-iso-f global region" - }, - "us-isof-east-1": { - description: "US ISOF EAST" - }, - "us-isof-south-1": { - description: "US ISOF SOUTH" - } - } - }, { - id: "aws-us-gov", - outputs: { - dnsSuffix: "amazonaws.com", - dualStackDnsSuffix: "api.aws", - implicitGlobalRegion: "us-gov-west-1", - name: "aws-us-gov", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", - regions: { - "aws-us-gov-global": { - description: "aws-us-gov global region" - }, - "us-gov-east-1": { - description: "AWS GovCloud (US-East)" - }, - "us-gov-west-1": { - description: "AWS GovCloud (US-West)" - } - } - }], - version: "1.1" }; -// src/lib/aws/partition.ts -var selectedPartitionsInfo = partitions_default; -var selectedUserAgentPrefix = ""; -var partition = /* @__PURE__ */ __name((value) => { - const { partitions } = selectedPartitionsInfo; - for (const partition2 of partitions) { - const { regions, outputs } = partition2; - for (const [region, regionData] of Object.entries(regions)) { - if (region === value) { - return { - ...outputs, - ...regionData - }; - } - } - } - for (const partition2 of partitions) { - const { regionRegex, outputs } = partition2; - if (new RegExp(regionRegex).test(value)) { - return { - ...outputs - }; - } - } - const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); - if (!DEFAULT_PARTITION) { - throw new Error( - "Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist." - ); - } - return { - ...DEFAULT_PARTITION.outputs - }; -}, "partition"); -var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => { - selectedPartitionsInfo = partitionsInfo; - selectedUserAgentPrefix = userAgentPrefix; -}, "setPartitionInfo"); -var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => { - setPartitionInfo(partitions_default, ""); -}, "useDefaultPartitionInfo"); -var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); - -// src/aws.ts -var awsEndpointFunctions = { - isVirtualHostableS3Bucket, - parseArn, - partition -}; -import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions; - -// src/resolveDefaultAwsRegionalEndpointsConfig.ts -var import_url_parser = __nccwpck_require__(4494); -var resolveDefaultAwsRegionalEndpointsConfig = /* @__PURE__ */ __name((input) => { - if (typeof input.endpointProvider !== "function") { - throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); - } - const { endpoint } = input; - if (endpoint === void 0) { - input.endpoint = async () => { - return toEndpointV1( - input.endpointProvider( - { - Region: typeof input.region === "function" ? await input.region() : input.region, - UseDualStack: typeof input.useDualstackEndpoint === "function" ? await input.useDualstackEndpoint() : input.useDualstackEndpoint, - UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, - Endpoint: void 0 - }, - { logger: input.logger } - ) - ); +const ARN_DELIMITER = ":"; +const RESOURCE_DELIMITER = "/"; +const parseArn = (value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) + return null; + const [arn, partition, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") + return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition, + service, + region, + accountId, + resourceId, }; - } - return input; -}, "resolveDefaultAwsRegionalEndpointsConfig"); -var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => (0, import_url_parser.parseUrl)(endpoint.url), "toEndpointV1"); +}; -// src/resolveEndpoint.ts +var partitions = [ + { + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "aws global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, + { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "aws-cn global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, + { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "api.amazonwebservices.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "EU (Germany)" + } + } + }, + { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "api.aws.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "aws-iso global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, + { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "api.aws.scloud", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "aws-iso-b global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + } + } + }, + { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "aws-iso-e global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, + { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "api.aws.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "aws-iso-f global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, + { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "aws-us-gov global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + } +]; +var version = "1.1"; +var partitionsInfo = { + partitions: partitions, + version: version +}; +let selectedPartitionsInfo = partitionsInfo; +let selectedUserAgentPrefix = ""; +const partition = (value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition of partitions) { + const { regions, outputs } = partition; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData, + }; + } + } + } + for (const partition of partitions) { + const { regionRegex, outputs } = partition; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs, + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error("Provided region was not found in the partition array or regex," + + " and default partition with id 'aws' doesn't exist."); + } + return { + ...DEFAULT_PARTITION.outputs, + }; +}; +const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; +}; +const useDefaultPartitionInfo = () => { + setPartitionInfo(partitionsInfo, ""); +}; +const getUserAgentPrefix = () => selectedUserAgentPrefix; -// src/types/EndpointError.ts +const awsEndpointFunctions = { + isVirtualHostableS3Bucket: isVirtualHostableS3Bucket, + parseArn: parseArn, + partition: partition, +}; +utilEndpoints.customEndpointFunctions.aws = awsEndpointFunctions; +const resolveDefaultAwsRegionalEndpointsConfig = (input) => { + if (typeof input.endpointProvider !== "function") { + throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); + } + const { endpoint } = input; + if (endpoint === undefined) { + input.endpoint = async () => { + return toEndpointV1(input.endpointProvider({ + Region: typeof input.region === "function" ? await input.region() : input.region, + UseDualStack: typeof input.useDualstackEndpoint === "function" + ? await input.useDualstackEndpoint() + : input.useDualstackEndpoint, + UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, + Endpoint: undefined, + }, { logger: input.logger })); + }; + } + return input; +}; +const toEndpointV1 = (endpoint) => urlParser.parseUrl(endpoint.url); -// src/types/EndpointRuleObject.ts - - -// src/types/ErrorRuleObject.ts - - -// src/types/RuleSetObject.ts - - -// src/types/TreeRuleObject.ts - - -// src/types/shared.ts - -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - +Object.defineProperty(exports, "EndpointError", ({ + enumerable: true, + get: function () { return utilEndpoints.EndpointError; } +})); +Object.defineProperty(exports, "isIpAddress", ({ + enumerable: true, + get: function () { return utilEndpoints.isIpAddress; } +})); +Object.defineProperty(exports, "resolveEndpoint", ({ + enumerable: true, + get: function () { return utilEndpoints.resolveEndpoint; } +})); +exports.awsEndpointFunctions = awsEndpointFunctions; +exports.getUserAgentPrefix = getUserAgentPrefix; +exports.partition = partition; +exports.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig; +exports.setPartitionInfo = setPartitionInfo; +exports.toEndpointV1 = toEndpointV1; +exports.useDefaultPartitionInfo = useDefaultPartitionInfo; /***/ }), @@ -9154,183 +8987,133 @@ exports.defaultUserAgent = defaultUserAgent; /***/ }), /***/ 4274: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var index_exports = {}; -__export(index_exports, { - XmlNode: () => XmlNode, - XmlText: () => XmlText, - parseXML: () => import_xml_parser.parseXML -}); -module.exports = __toCommonJS(index_exports); +var xmlParser = __nccwpck_require__(3343); -// src/escape-attribute.ts function escapeAttribute(value) { - return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); + return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); } -__name(escapeAttribute, "escapeAttribute"); -// src/escape-element.ts function escapeElement(value) { - return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, " ").replace(/\n/g, " ").replace(/\u0085/g, "…").replace(/\u2028/, "
"); + return value + .replace(/&/g, "&") + .replace(/"/g, """) + .replace(/'/g, "'") + .replace(//g, ">") + .replace(/\r/g, " ") + .replace(/\n/g, " ") + .replace(/\u0085/g, "…") + .replace(/\u2028/, "
"); } -__name(escapeElement, "escapeElement"); -// src/XmlText.ts -var XmlText = class { - constructor(value) { - this.value = value; - } - static { - __name(this, "XmlText"); - } - toString() { - return escapeElement("" + this.value); - } -}; +class XmlText { + value; + constructor(value) { + this.value = value; + } + toString() { + return escapeElement("" + this.value); + } +} -// src/XmlNode.ts -var XmlNode = class _XmlNode { - constructor(name, children = []) { - this.name = name; - this.children = children; - } - static { - __name(this, "XmlNode"); - } - attributes = {}; - static of(name, childText, withName) { - const node = new _XmlNode(name); - if (childText !== void 0) { - node.addChildNode(new XmlText(childText)); +class XmlNode { + name; + children; + attributes = {}; + static of(name, childText, withName) { + const node = new XmlNode(name); + if (childText !== undefined) { + node.addChildNode(new XmlText(childText)); + } + if (withName !== undefined) { + node.withName(withName); + } + return node; } - if (withName !== void 0) { - node.withName(withName); + constructor(name, children = []) { + this.name = name; + this.children = children; } - return node; - } - withName(name) { - this.name = name; - return this; - } - addAttribute(name, value) { - this.attributes[name] = value; - return this; - } - addChildNode(child) { - this.children.push(child); - return this; - } - removeAttribute(name) { - delete this.attributes[name]; - return this; - } - /** - * @internal - * Alias of {@link XmlNode#withName(string)} for codegen brevity. - */ - n(name) { - this.name = name; - return this; - } - /** - * @internal - * Alias of {@link XmlNode#addChildNode(string)} for codegen brevity. - */ - c(child) { - this.children.push(child); - return this; - } - /** - * @internal - * Checked version of {@link XmlNode#addAttribute(string)} for codegen brevity. - */ - a(name, value) { - if (value != null) { - this.attributes[name] = value; + withName(name) { + this.name = name; + return this; } - return this; - } - /** - * Create a child node. - * Used in serialization of string fields. - * @internal - */ - cc(input, field, withName = field) { - if (input[field] != null) { - const node = _XmlNode.of(field, input[field]).withName(withName); - this.c(node); + addAttribute(name, value) { + this.attributes[name] = value; + return this; } - } - /** - * Creates list child nodes. - * @internal - */ - l(input, listName, memberName, valueProvider) { - if (input[listName] != null) { - const nodes = valueProvider(); - nodes.map((node) => { - node.withName(memberName); - this.c(node); - }); + addChildNode(child) { + this.children.push(child); + return this; } - } - /** - * Creates list child nodes with container. - * @internal - */ - lc(input, listName, memberName, valueProvider) { - if (input[listName] != null) { - const nodes = valueProvider(); - const containerNode = new _XmlNode(memberName); - nodes.map((node) => { - containerNode.c(node); - }); - this.c(containerNode); + removeAttribute(name) { + delete this.attributes[name]; + return this; } - } - toString() { - const hasChildren = Boolean(this.children.length); - let xmlText = `<${this.name}`; - const attributes = this.attributes; - for (const attributeName of Object.keys(attributes)) { - const attribute = attributes[attributeName]; - if (attribute != null) { - xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`; - } + n(name) { + this.name = name; + return this; } - return xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}`; - } -}; - -// src/index.ts -var import_xml_parser = __nccwpck_require__(3343); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); + c(child) { + this.children.push(child); + return this; + } + a(name, value) { + if (value != null) { + this.attributes[name] = value; + } + return this; + } + cc(input, field, withName = field) { + if (input[field] != null) { + const node = XmlNode.of(field, input[field]).withName(withName); + this.c(node); + } + } + l(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + nodes.map((node) => { + node.withName(memberName); + this.c(node); + }); + } + } + lc(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + const containerNode = new XmlNode(memberName); + nodes.map((node) => { + containerNode.c(node); + }); + this.c(containerNode); + } + } + toString() { + const hasChildren = Boolean(this.children.length); + let xmlText = `<${this.name}`; + const attributes = this.attributes; + for (const attributeName of Object.keys(attributes)) { + const attribute = attributes[attributeName]; + if (attribute != null) { + xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`; + } + } + return (xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}`); + } +} +Object.defineProperty(exports, "parseXML", ({ + enumerable: true, + get: function () { return xmlParser.parseXML; } +})); +exports.XmlNode = XmlNode; +exports.XmlText = XmlText; /***/ }), @@ -11137,10 +10920,10 @@ class HttpProtocol extends SerdeContext { } } setHostPrefix(request, operationSchema, input) { - const operationNs = schema.NormalizedSchema.of(operationSchema); const inputNs = schema.NormalizedSchema.of(operationSchema.input); - if (operationNs.getMergedTraits().endpoint) { - let hostPrefix = operationNs.getMergedTraits().endpoint?.[0]; + const opTraits = schema.translateTraits(operationSchema.traits ?? {}); + if (opTraits.endpoint) { + let hostPrefix = opTraits.endpoint?.[0]; if (typeof hostPrefix === "string") { const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel); for (const [name] of hostLabelInputs) { @@ -11903,63 +11686,111 @@ const deref = (schemaRef) => { return schemaRef; }; -class TypeRegistry { - namespace; - schemas; - exceptions; - static registries = new Map(); - constructor(namespace, schemas = new Map(), exceptions = new Map()) { - this.namespace = namespace; - this.schemas = schemas; - this.exceptions = exceptions; +const operation = (namespace, name, traits, input, output) => ({ + name, + namespace, + traits, + input, + output, +}); + +const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { + const { response } = await next(args); + const { operationSchema } = utilMiddleware.getSmithyContext(context); + const [, ns, n, t, i, o] = operationSchema ?? []; + try { + const parsed = await config.protocol.deserializeResponse(operation(ns, n, t, i, o), { + ...config, + ...context, + }, response); + return { + response, + output: parsed, + }; } - static for(namespace) { - if (!TypeRegistry.registries.has(namespace)) { - TypeRegistry.registries.set(namespace, new TypeRegistry(namespace)); - } - return TypeRegistry.registries.get(namespace); - } - register(shapeId, schema) { - const qualifiedName = this.normalizeShapeId(shapeId); - this.schemas.set(qualifiedName, schema); - } - getSchema(shapeId) { - const id = this.normalizeShapeId(shapeId); - if (!this.schemas.has(id)) { - throw new Error(`@smithy/core/schema - schema not found for ${id}`); - } - return this.schemas.get(id); - } - registerError(es, ctor) { - this.exceptions.set(es, ctor); - } - getErrorCtor(es) { - return this.exceptions.get(es); - } - getBaseException() { - for (const [id, schema] of this.schemas.entries()) { - if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { - return schema; + catch (error) { + Object.defineProperty(error, "$response", { + value: response, + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error.message += "\n " + hint; + } + catch (e) { + if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } + else { + context.logger?.warn?.(hint); + } + } + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } + try { + if (protocolHttp.HttpResponse.isInstance(response)) { + const { headers = {} } = response; + const headerEntries = Object.entries(headers); + error.$metadata = { + httpStatusCode: response.statusCode, + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries), + }; + } + } + catch (e) { } } - return undefined; - } - find(predicate) { - return [...this.schemas.values()].find(predicate); - } - clear() { - this.schemas.clear(); - this.exceptions.clear(); - } - normalizeShapeId(shapeId) { - if (shapeId.includes("#")) { - return shapeId; - } - return this.namespace + "#" + shapeId; - } - getNamespace(shapeId) { - return this.normalizeShapeId(shapeId).split("#")[0]; + throw error; } +}; +const findHeader = (pattern, headers) => { + return (headers.find(([k]) => { + return k.match(pattern); + }) || [void 0, void 0])[1]; +}; + +const schemaSerializationMiddleware = (config) => (next, context) => async (args) => { + const { operationSchema } = utilMiddleware.getSmithyContext(context); + const [, ns, n, t, i, o] = operationSchema ?? []; + const endpoint = context.endpointV2?.url && config.urlParser + ? async () => config.urlParser(context.endpointV2.url) + : config.endpoint; + const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, { + ...config, + ...context, + endpoint, + }); + return next({ + ...args, + request, + }); +}; + +const deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true, +}; +const serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true, +}; +function getSchemaSerdePlugin(config) { + return { + applyToStack: (commandStack) => { + commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption); + commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption); + config.protocol.setSerdeContext(config); + }, + }; } class Schema { @@ -11968,7 +11799,6 @@ class Schema { traits; static assign(instance, values) { const schema = Object.assign(instance, values); - TypeRegistry.for(schema.namespace).register(schema.name, schema); return schema; } static [Symbol.hasInstance](lhs) { @@ -11984,36 +11814,6 @@ class Schema { } } -class StructureSchema extends Schema { - static symbol = Symbol.for("@smithy/str"); - name; - traits; - memberNames; - memberList; - symbol = StructureSchema.symbol; -} -const struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), { - name, - namespace, - traits, - memberNames, - memberList, -}); - -class ErrorSchema extends StructureSchema { - static symbol = Symbol.for("@smithy/err"); - ctor; - symbol = ErrorSchema.symbol; -} -const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { - name, - namespace, - traits, - memberNames, - memberList, - ctor: null, -}); - class ListSchema extends Schema { static symbol = Symbol.for("@smithy/lis"); name; @@ -12060,18 +11860,34 @@ const op = (namespace, name, traits, input, output) => Schema.assign(new Operati output, }); -class SimpleSchema extends Schema { - static symbol = Symbol.for("@smithy/sim"); +class StructureSchema extends Schema { + static symbol = Symbol.for("@smithy/str"); name; - schemaRef; traits; - symbol = SimpleSchema.symbol; + memberNames; + memberList; + symbol = StructureSchema.symbol; } -const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { +const struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema(), { name, namespace, traits, - schemaRef, + memberNames, + memberList, +}); + +class ErrorSchema extends StructureSchema { + static symbol = Symbol.for("@smithy/err"); + ctor; + symbol = ErrorSchema.symbol; +} +const error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema(), { + name, + namespace, + traits, + memberNames, + memberList, + ctor: null, }); function translateTraits(indicator) { @@ -12121,8 +11937,6 @@ class NormalizedSchema { schema = deref(_ref); this._isMemberSchema = true; } - if (isStaticSchema(schema)) - schema = hydrate(schema); if (traitStack.length > 0) { this.memberTraits = {}; for (let i = traitStack.length - 1; i >= 0; --i) { @@ -12142,19 +11956,25 @@ class NormalizedSchema { return; } this.schema = deref(schema); - if (this.schema && typeof this.schema === "object") { - this.traits = this.schema?.traits ?? {}; + 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; } - this.name = (this.schema instanceof Schema ? this.schema.getName?.() : void 0) ?? this.memberName ?? String(schema); if (this._isMemberSchema && !memberName) { throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`); } } static [Symbol.hasInstance](lhs) { - return Schema[Symbol.hasInstance].bind(this)(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 sc = deref(ref); @@ -12172,7 +11992,11 @@ class NormalizedSchema { return new NormalizedSchema(sc); } getSchema() { - return deref(this.schema?.schemaRef ?? this.schema); + const sc = this.schema; + if (sc[0] === 0) { + return sc[4]; + } + return sc; } getName(withNamespace = false) { const { name } = this; @@ -12189,17 +12013,18 @@ class NormalizedSchema { const sc = this.getSchema(); return typeof sc === "number" ? sc >= 64 && sc < 128 - : sc instanceof ListSchema; + : sc[0] === 1; } isMapSchema() { const sc = this.getSchema(); return typeof sc === "number" ? sc >= 128 && sc <= 0b1111_1111 - : sc instanceof MapSchema; + : sc[0] === 2; } isStructSchema() { const sc = this.getSchema(); - return (sc !== null && typeof sc === "object" && "members" in sc) || sc instanceof StructureSchema; + return (sc[0] === 3 || + sc[0] === -3); } isBlobSchema() { const sc = this.getSchema(); @@ -12263,7 +12088,7 @@ class NormalizedSchema { const schema = this.getSchema(); const memberSchema = isDoc ? 15 - : schema?.keySchema ?? 0; + : schema[4] ?? 0; return member([memberSchema, 0], "key"); } getValueSchema() { @@ -12272,7 +12097,7 @@ class NormalizedSchema { const memberSchema = typeof sc === "number" ? 0b0011_1111 & sc : sc && typeof sc === "object" && (isMap || isList) - ? sc.valueSchema + ? sc[3 + sc[0]] : isDoc ? 15 : void 0; @@ -12283,9 +12108,9 @@ class NormalizedSchema { } getMemberSchema(memberName) { const struct = this.getSchema(); - if (this.isStructSchema() && struct.memberNames.includes(memberName)) { - const i = struct.memberNames.indexOf(memberName); - const memberSchema = struct.memberList[i]; + if (this.isStructSchema() && struct[4].includes(memberName)) { + const i = struct[4].indexOf(memberName); + const memberSchema = struct[5][i]; return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName); } if (this.isDocumentSchema()) { @@ -12321,8 +12146,8 @@ class NormalizedSchema { throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); } const struct = this.getSchema(); - for (let i = 0; i < struct.memberNames.length; ++i) { - yield [struct.memberNames[i], member([struct.memberList[i], 0], struct.memberNames[i])]; + for (let i = 0; i < struct[4].length; ++i) { + yield [struct[4][i], member([struct[5][i], 0], struct[4][i])]; } } } @@ -12336,122 +12161,28 @@ function member(memberSchema, memberName) { const internalCtorAccess = NormalizedSchema; return new internalCtorAccess(memberSchema, memberName); } -function hydrate(ss) { - const [id, ...rest] = ss; - return { - [0]: sim, - [1]: list, - [2]: map, - [3]: struct, - [-3]: error, - [9]: op, - }[id].call(null, ...rest); -} const isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2; const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5; -const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => { - const { response } = await next(args); - let { operationSchema } = utilMiddleware.getSmithyContext(context); - if (isStaticSchema(operationSchema)) { - operationSchema = hydrate(operationSchema); - } - try { - const parsed = await config.protocol.deserializeResponse(operationSchema, { - ...config, - ...context, - }, response); - return { - response, - output: parsed, - }; - } - catch (error) { - Object.defineProperty(error, "$response", { - value: response, - }); - if (!("$metadata" in error)) { - const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; - try { - error.message += "\n " + hint; - } - catch (e) { - if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { - console.warn(hint); - } - else { - context.logger?.warn?.(hint); - } - } - if (typeof error.$responseBodyText !== "undefined") { - if (error.$response) { - error.$response.body = error.$responseBodyText; - } - } - try { - if (protocolHttp.HttpResponse.isInstance(response)) { - const { headers = {} } = response; - const headerEntries = Object.entries(headers); - error.$metadata = { - httpStatusCode: response.statusCode, - requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), - extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), - cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries), - }; - } - } - catch (e) { - } - } - throw error; - } -}; -const findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; -}; - -const schemaSerializationMiddleware = (config) => (next, context) => async (args) => { - let { operationSchema } = utilMiddleware.getSmithyContext(context); - if (isStaticSchema(operationSchema)) { - operationSchema = hydrate(operationSchema); - } - const endpoint = context.endpointV2?.url && config.urlParser - ? async () => config.urlParser(context.endpointV2.url) - : config.endpoint; - const request = await config.protocol.serializeRequest(operationSchema, args.input, { - ...config, - ...context, - endpoint, - }); - return next({ - ...args, - request, - }); -}; - -const deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true, -}; -const serializerMiddlewareOption = { - name: "serializerMiddleware", - step: "serialize", - tags: ["SERIALIZER"], - override: true, -}; -function getSchemaSerdePlugin(config) { - return { - applyToStack: (commandStack) => { - commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption); - commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption); - config.protocol.setSerdeContext(config); - }, - }; +class SimpleSchema extends Schema { + static symbol = Symbol.for("@smithy/sim"); + name; + schemaRef; + traits; + symbol = SimpleSchema.symbol; } +const sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema(), { + name, + namespace, + traits, + schemaRef, +}); +const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), { + name, + namespace, + traits, + schemaRef, +}); const SCHEMA = { BLOB: 0b0001_0101, @@ -12470,6 +12201,72 @@ const SCHEMA = { MAP_MODIFIER: 0b1000_0000, }; +class TypeRegistry { + namespace; + schemas; + exceptions; + static registries = new Map(); + constructor(namespace, schemas = new Map(), exceptions = 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); + } + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + const registry = TypeRegistry.for(qualifiedName.split("#")[0]); + registry.schemas.set(qualifiedName, schema); + } + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + throw new Error(`@smithy/core/schema - schema not found for ${id}`); + } + return this.schemas.get(id); + } + registerError(es, ctor) { + const $error = es; + const registry = TypeRegistry.for($error[1]); + registry.schemas.set($error[1] + "#" + $error[2], $error); + registry.exceptions.set($error, ctor); + } + getErrorCtor(es) { + const $error = es; + 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 undefined; + } + find(predicate) { + return [...this.schemas.values()].find(predicate); + } + clear() { + this.schemas.clear(); + this.exceptions.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; + } +} + exports.ErrorSchema = ErrorSchema; exports.ListSchema = ListSchema; exports.MapSchema = MapSchema; @@ -12484,13 +12281,14 @@ exports.deref = deref; exports.deserializerMiddlewareOption = deserializerMiddlewareOption; exports.error = error; exports.getSchemaSerdePlugin = getSchemaSerdePlugin; -exports.hydrate = hydrate; exports.isStaticSchema = isStaticSchema; exports.list = list; exports.map = map; exports.op = op; +exports.operation = operation; exports.serializerMiddlewareOption = serializerMiddlewareOption; exports.sim = sim; +exports.simAdapter = simAdapter; exports.struct = struct; exports.translateTraits = translateTraits; @@ -15994,6 +15792,8 @@ const ENV_PROFILE = "AWS_PROFILE"; const DEFAULT_PROFILE = "default"; const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; +const CONFIG_PREFIX_SEPARATOR = "."; + const getConfigData = (data) => Object.entries(data) .filter(([key]) => { const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); @@ -16069,7 +15869,6 @@ const parseIni = (iniData) => { }; const swallowError$1 = () => ({}); -const CONFIG_PREFIX_SEPARATOR = "."; const loadSharedConfigFiles = async (init = {}) => { const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; const homeDir = getHomeDir.getHomeDir(); @@ -18060,22 +17859,25 @@ const evaluateExpression = (obj, keyName, options) => { return evaluateTemplate(obj, options); } else if (obj["fn"]) { - return callFunction(obj, options); + return group$2.callFunction(obj, options); } else if (obj["ref"]) { return getReferenceValue(obj, options); } throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); }; - const callFunction = ({ fn, argv }, options) => { - const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options)); + const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : group$2.evaluateExpression(arg, "arg", options)); const fnSegments = fn.split("."); if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); } return endpointFunctions[fn](...evaluatedArgs); }; +const group$2 = { + evaluateExpression, + callFunction, +}; const evaluateCondition = ({ assign, ...fnArgs }, options) => { if (assign && assign in options.referenceRecord) { @@ -18121,6 +17923,10 @@ const getEndpointHeaders = (headers, options) => Object.entries(headers).reduce( }), }), {}); +const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: group$1.getEndpointProperty(propertyVal, options), +}), {}); const getEndpointProperty = (property, options) => { if (Array.isArray(property)) { return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); @@ -18132,18 +17938,17 @@ const getEndpointProperty = (property, options) => { if (property === null) { throw new EndpointError(`Unexpected endpoint property: ${property}`); } - return getEndpointProperties(property, options); + return group$1.getEndpointProperties(property, options); case "boolean": return property; default: throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); } }; - -const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ - ...acc, - [propertyKey]: getEndpointProperty(propertyVal, options), -}), {}); +const group$1 = { + getEndpointProperty, + getEndpointProperties, +}; const getEndpointUrl = (endpointUrl, options) => { const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); @@ -18194,18 +17999,6 @@ const evaluateErrorRule = (errorRule, options) => { })); }; -const evaluateTreeRule = (treeRule, options) => { - const { conditions, rules } = treeRule; - const { result, referenceRecord } = evaluateConditions(conditions, options); - if (!result) { - return; - } - return evaluateRules(rules, { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord }, - }); -}; - const evaluateRules = (rules, options) => { for (const rule of rules) { if (rule.type === "endpoint") { @@ -18218,7 +18011,7 @@ const evaluateRules = (rules, options) => { evaluateErrorRule(rule, options); } else if (rule.type === "tree") { - const endpointOrUndefined = evaluateTreeRule(rule, options); + const endpointOrUndefined = group.evaluateTreeRule(rule, options); if (endpointOrUndefined) { return endpointOrUndefined; } @@ -18229,6 +18022,21 @@ const evaluateRules = (rules, options) => { } throw new EndpointError(`Rules evaluation failed`); }; +const evaluateTreeRule = (treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + return group.evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + }); +}; +const group = { + evaluateRules, + evaluateTreeRule, +}; const resolveEndpoint = (ruleSetObject, options) => { const { endpointParams, logger } = options; @@ -19133,23 +18941,13 @@ var sdkStreamMixin = __nccwpck_require__(7201); var splitStream = __nccwpck_require__(2108); var streamTypeCheck = __nccwpck_require__(4414); -function transformToString(payload, encoding = "utf-8") { - if (encoding === "base64") { - return utilBase64.toBase64(payload); - } - return utilUtf8.toUtf8(payload); -} -function transformFromString(str, encoding) { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(str)); - } - return Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(str)); -} - class Uint8ArrayBlobAdapter extends Uint8Array { static fromString(source, encoding = "utf-8") { if (typeof source === "string") { - return transformFromString(source, encoding); + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source)); + } + return Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(source)); } throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); } @@ -19158,7 +18956,10 @@ class Uint8ArrayBlobAdapter extends Uint8Array { return source; } transformToString(encoding = "utf-8") { - return transformToString(this, encoding); + if (encoding === "base64") { + return utilBase64.toBase64(this); + } + return utilUtf8.toUtf8(this); } } @@ -78179,7 +77980,7 @@ module.exports = LRUCache /***/ ((module) => { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.908.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.908.0","@aws-sdk/credential-provider-node":"3.908.0","@aws-sdk/middleware-host-header":"3.901.0","@aws-sdk/middleware-logger":"3.901.0","@aws-sdk/middleware-recursion-detection":"3.901.0","@aws-sdk/middleware-user-agent":"3.908.0","@aws-sdk/region-config-resolver":"3.901.0","@aws-sdk/types":"3.901.0","@aws-sdk/util-endpoints":"3.901.0","@aws-sdk/util-user-agent-browser":"3.907.0","@aws-sdk/util-user-agent-node":"3.908.0","@smithy/config-resolver":"^4.3.0","@smithy/core":"^3.15.0","@smithy/fetch-http-handler":"^5.3.1","@smithy/hash-node":"^4.2.0","@smithy/invalid-dependency":"^4.2.0","@smithy/middleware-content-length":"^4.2.0","@smithy/middleware-endpoint":"^4.3.1","@smithy/middleware-retry":"^4.4.1","@smithy/middleware-serde":"^4.2.0","@smithy/middleware-stack":"^4.2.0","@smithy/node-config-provider":"^4.3.0","@smithy/node-http-handler":"^4.3.0","@smithy/protocol-http":"^5.3.0","@smithy/smithy-client":"^4.7.1","@smithy/types":"^4.6.0","@smithy/url-parser":"^4.2.0","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.0","@smithy/util-defaults-mode-node":"^4.2.1","@smithy/util-endpoints":"^3.2.0","@smithy/util-middleware":"^4.2.0","@smithy/util-retry":"^4.2.0","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.913.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.911.0","@aws-sdk/credential-provider-node":"3.913.0","@aws-sdk/middleware-host-header":"3.910.0","@aws-sdk/middleware-logger":"3.910.0","@aws-sdk/middleware-recursion-detection":"3.910.0","@aws-sdk/middleware-user-agent":"3.911.0","@aws-sdk/region-config-resolver":"3.910.0","@aws-sdk/types":"3.910.0","@aws-sdk/util-endpoints":"3.910.0","@aws-sdk/util-user-agent-browser":"3.910.0","@aws-sdk/util-user-agent-node":"3.911.0","@smithy/config-resolver":"^4.3.2","@smithy/core":"^3.16.1","@smithy/fetch-http-handler":"^5.3.3","@smithy/hash-node":"^4.2.2","@smithy/invalid-dependency":"^4.2.2","@smithy/middleware-content-length":"^4.2.2","@smithy/middleware-endpoint":"^4.3.3","@smithy/middleware-retry":"^4.4.3","@smithy/middleware-serde":"^4.2.2","@smithy/middleware-stack":"^4.2.2","@smithy/node-config-provider":"^4.3.2","@smithy/node-http-handler":"^4.4.1","@smithy/protocol-http":"^5.3.2","@smithy/smithy-client":"^4.8.1","@smithy/types":"^4.7.1","@smithy/url-parser":"^4.2.2","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.2","@smithy/util-defaults-mode-node":"^4.2.3","@smithy/util-endpoints":"^3.2.2","@smithy/util-middleware":"^4.2.2","@smithy/util-retry":"^4.2.2","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}'); /***/ }),