@rharkor/caching-for-turbo 2.3.1 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/136.index.js +903 -0
- package/dist/cli/136.index.js.map +1 -0
- package/dist/cli/360.index.js +93 -0
- package/dist/cli/360.index.js.map +1 -0
- package/dist/cli/443.index.js +795 -0
- package/dist/cli/443.index.js.map +1 -0
- package/dist/cli/566.index.js +387 -0
- package/dist/cli/566.index.js.map +1 -0
- package/dist/cli/579.index.js +265 -0
- package/dist/cli/579.index.js.map +1 -0
- package/dist/cli/605.index.js +234 -0
- package/dist/cli/605.index.js.map +1 -0
- package/dist/cli/762.index.js +673 -0
- package/dist/cli/762.index.js.map +1 -0
- package/dist/cli/869.index.js +533 -0
- package/dist/cli/869.index.js.map +1 -0
- package/dist/cli/884.index.js +4 -0
- package/dist/cli/884.index.js.map +1 -1
- package/dist/cli/956.index.js +1039 -0
- package/dist/cli/956.index.js.map +1 -0
- package/dist/cli/998.index.js +1455 -0
- package/dist/cli/998.index.js.map +1 -0
- package/dist/cli/index.js +159117 -159559
- package/dist/cli/licenses.txt +1646 -0
- package/dist/cli/worker.js +158 -178
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"998.index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":[".././node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/index.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js",".././node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js",".././node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-CVy8iqsZ.js",".././node_modules/@aws-sdk/token-providers/dist-cjs/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"awsssoportal\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetRoleCredentials\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"ListAccountRoles\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"ListAccounts\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"Logout\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);\n return Object.assign(config_0, {\n authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),\n });\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst cache = new util_endpoints_2.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst u = \"required\", v = \"fn\", w = \"argv\", x = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = \"getAttr\", i = { [u]: false, \"type\": \"string\" }, j = { [u]: true, \"default\": false, \"type\": \"boolean\" }, k = { [x]: \"Endpoint\" }, l = { [v]: c, [w]: [{ [x]: \"UseFIPS\" }, true] }, m = { [v]: c, [w]: [{ [x]: \"UseDualStack\" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, \"supportsFIPS\"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, \"supportsDualStack\"] }] }, r = [l], s = [m], t = [{ [x]: \"Region\" }];\nconst _data = { version: \"1.0\", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: s, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: \"aws.partition\", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: \"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: \"stringEquals\", [w]: [{ [v]: h, [w]: [p, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://portal.sso.{Region}.amazonaws.com\", properties: n, headers: n }, type: e }, { endpoint: { url: \"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: \"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","'use strict';\n\nvar middlewareHostHeader = require('@aws-sdk/middleware-host-header');\nvar middlewareLogger = require('@aws-sdk/middleware-logger');\nvar middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');\nvar middlewareUserAgent = require('@aws-sdk/middleware-user-agent');\nvar configResolver = require('@smithy/config-resolver');\nvar core = require('@smithy/core');\nvar schema = require('@smithy/core/schema');\nvar middlewareContentLength = require('@smithy/middleware-content-length');\nvar middlewareEndpoint = require('@smithy/middleware-endpoint');\nvar middlewareRetry = require('@smithy/middleware-retry');\nvar smithyClient = require('@smithy/smithy-client');\nvar httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');\nvar runtimeConfig = require('./runtimeConfig');\nvar regionConfigResolver = require('@aws-sdk/region-config-resolver');\nvar protocolHttp = require('@smithy/protocol-http');\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"awsssoportal\",\n });\n};\nconst commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SSOClient extends smithyClient.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);\n const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);\n const _config_4 = configResolver.resolveRegionConfig(_config_3);\n const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);\n const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);\n const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));\n this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));\n this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));\n this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));\n this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));\n this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(core.getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n\nlet SSOServiceException$1 = class SSOServiceException extends smithyClient.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SSOServiceException.prototype);\n }\n};\n\nlet InvalidRequestException$1 = class InvalidRequestException extends SSOServiceException$1 {\n name = \"InvalidRequestException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidRequestException.prototype);\n }\n};\nlet ResourceNotFoundException$1 = class ResourceNotFoundException extends SSOServiceException$1 {\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n};\nlet TooManyRequestsException$1 = class TooManyRequestsException extends SSOServiceException$1 {\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n};\nlet UnauthorizedException$1 = class UnauthorizedException extends SSOServiceException$1 {\n name = \"UnauthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"UnauthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, UnauthorizedException.prototype);\n }\n};\n\nconst _AI = \"AccountInfo\";\nconst _ALT = \"AccountListType\";\nconst _ATT = \"AccessTokenType\";\nconst _GRC = \"GetRoleCredentials\";\nconst _GRCR = \"GetRoleCredentialsRequest\";\nconst _GRCRe = \"GetRoleCredentialsResponse\";\nconst _IRE = \"InvalidRequestException\";\nconst _L = \"Logout\";\nconst _LA = \"ListAccounts\";\nconst _LAR = \"ListAccountsRequest\";\nconst _LARR = \"ListAccountRolesRequest\";\nconst _LARRi = \"ListAccountRolesResponse\";\nconst _LARi = \"ListAccountsResponse\";\nconst _LARis = \"ListAccountRoles\";\nconst _LR = \"LogoutRequest\";\nconst _RC = \"RoleCredentials\";\nconst _RI = \"RoleInfo\";\nconst _RLT = \"RoleListType\";\nconst _RNFE = \"ResourceNotFoundException\";\nconst _SAKT = \"SecretAccessKeyType\";\nconst _STT = \"SessionTokenType\";\nconst _TMRE = \"TooManyRequestsException\";\nconst _UE = \"UnauthorizedException\";\nconst _aI = \"accountId\";\nconst _aKI = \"accessKeyId\";\nconst _aL = \"accountList\";\nconst _aN = \"accountName\";\nconst _aT = \"accessToken\";\nconst _ai = \"account_id\";\nconst _c = \"client\";\nconst _e = \"error\";\nconst _eA = \"emailAddress\";\nconst _ex = \"expiration\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _hH = \"httpHeader\";\nconst _hQ = \"httpQuery\";\nconst _m = \"message\";\nconst _mR = \"maxResults\";\nconst _mr = \"max_result\";\nconst _nT = \"nextToken\";\nconst _nt = \"next_token\";\nconst _rC = \"roleCredentials\";\nconst _rL = \"roleList\";\nconst _rN = \"roleName\";\nconst _rn = \"role_name\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.sso\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _xasbt = \"x-amz-sso_bearer_token\";\nconst n0 = \"com.amazonaws.sso\";\nvar AccessTokenType = [0, n0, _ATT, 8, 0];\nvar SecretAccessKeyType = [0, n0, _SAKT, 8, 0];\nvar SessionTokenType = [0, n0, _STT, 8, 0];\nvar AccountInfo = [3, n0, _AI, 0, [_aI, _aN, _eA], [0, 0, 0]];\nvar GetRoleCredentialsRequest = [\n 3,\n n0,\n _GRCR,\n 0,\n [_rN, _aI, _aT],\n [\n [\n 0,\n {\n [_hQ]: _rn,\n },\n ],\n [\n 0,\n {\n [_hQ]: _ai,\n },\n ],\n [\n () => AccessTokenType,\n {\n [_hH]: _xasbt,\n },\n ],\n ],\n];\nvar GetRoleCredentialsResponse = [3, n0, _GRCRe, 0, [_rC], [[() => RoleCredentials, 0]]];\nvar InvalidRequestException = [\n -3,\n n0,\n _IRE,\n {\n [_e]: _c,\n [_hE]: 400,\n },\n [_m],\n [0],\n];\nschema.TypeRegistry.for(n0).registerError(InvalidRequestException, InvalidRequestException$1);\nvar ListAccountRolesRequest = [\n 3,\n n0,\n _LARR,\n 0,\n [_nT, _mR, _aT, _aI],\n [\n [\n 0,\n {\n [_hQ]: _nt,\n },\n ],\n [\n 1,\n {\n [_hQ]: _mr,\n },\n ],\n [\n () => AccessTokenType,\n {\n [_hH]: _xasbt,\n },\n ],\n [\n 0,\n {\n [_hQ]: _ai,\n },\n ],\n ],\n];\nvar ListAccountRolesResponse = [3, n0, _LARRi, 0, [_nT, _rL], [0, () => RoleListType]];\nvar ListAccountsRequest = [\n 3,\n n0,\n _LAR,\n 0,\n [_nT, _mR, _aT],\n [\n [\n 0,\n {\n [_hQ]: _nt,\n },\n ],\n [\n 1,\n {\n [_hQ]: _mr,\n },\n ],\n [\n () => AccessTokenType,\n {\n [_hH]: _xasbt,\n },\n ],\n ],\n];\nvar ListAccountsResponse = [3, n0, _LARi, 0, [_nT, _aL], [0, () => AccountListType]];\nvar LogoutRequest = [\n 3,\n n0,\n _LR,\n 0,\n [_aT],\n [\n [\n () => AccessTokenType,\n {\n [_hH]: _xasbt,\n },\n ],\n ],\n];\nvar ResourceNotFoundException = [\n -3,\n n0,\n _RNFE,\n {\n [_e]: _c,\n [_hE]: 404,\n },\n [_m],\n [0],\n];\nschema.TypeRegistry.for(n0).registerError(ResourceNotFoundException, ResourceNotFoundException$1);\nvar RoleCredentials = [\n 3,\n n0,\n _RC,\n 0,\n [_aKI, _sAK, _sT, _ex],\n [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],\n];\nvar RoleInfo = [3, n0, _RI, 0, [_rN, _aI], [0, 0]];\nvar TooManyRequestsException = [\n -3,\n n0,\n _TMRE,\n {\n [_e]: _c,\n [_hE]: 429,\n },\n [_m],\n [0],\n];\nschema.TypeRegistry.for(n0).registerError(TooManyRequestsException, TooManyRequestsException$1);\nvar UnauthorizedException = [\n -3,\n n0,\n _UE,\n {\n [_e]: _c,\n [_hE]: 401,\n },\n [_m],\n [0],\n];\nschema.TypeRegistry.for(n0).registerError(UnauthorizedException, UnauthorizedException$1);\nvar __Unit = \"unit\";\nvar SSOServiceException = [-3, _s, \"SSOServiceException\", 0, [], []];\nschema.TypeRegistry.for(_s).registerError(SSOServiceException, SSOServiceException$1);\nvar AccountListType = [1, n0, _ALT, 0, () => AccountInfo];\nvar RoleListType = [1, n0, _RLT, 0, () => RoleInfo];\nvar GetRoleCredentials = [\n 9,\n n0,\n _GRC,\n {\n [_h]: [\"GET\", \"/federation/credentials\", 200],\n },\n () => GetRoleCredentialsRequest,\n () => GetRoleCredentialsResponse,\n];\nvar ListAccountRoles = [\n 9,\n n0,\n _LARis,\n {\n [_h]: [\"GET\", \"/assignment/roles\", 200],\n },\n () => ListAccountRolesRequest,\n () => ListAccountRolesResponse,\n];\nvar ListAccounts = [\n 9,\n n0,\n _LA,\n {\n [_h]: [\"GET\", \"/assignment/accounts\", 200],\n },\n () => ListAccountsRequest,\n () => ListAccountsResponse,\n];\nvar Logout = [\n 9,\n n0,\n _L,\n {\n [_h]: [\"POST\", \"/logout\", 200],\n },\n () => LogoutRequest,\n () => __Unit,\n];\n\nclass GetRoleCredentialsCommand extends smithyClient.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"SWBPortalService\", \"GetRoleCredentials\", {})\n .n(\"SSOClient\", \"GetRoleCredentialsCommand\")\n .sc(GetRoleCredentials)\n .build() {\n}\n\nclass ListAccountRolesCommand extends smithyClient.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"SWBPortalService\", \"ListAccountRoles\", {})\n .n(\"SSOClient\", \"ListAccountRolesCommand\")\n .sc(ListAccountRoles)\n .build() {\n}\n\nclass ListAccountsCommand extends smithyClient.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"SWBPortalService\", \"ListAccounts\", {})\n .n(\"SSOClient\", \"ListAccountsCommand\")\n .sc(ListAccounts)\n .build() {\n}\n\nclass LogoutCommand extends smithyClient.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"SWBPortalService\", \"Logout\", {})\n .n(\"SSOClient\", \"LogoutCommand\")\n .sc(Logout)\n .build() {\n}\n\nconst commands = {\n GetRoleCredentialsCommand,\n ListAccountRolesCommand,\n ListAccountsCommand,\n LogoutCommand,\n};\nclass SSO extends SSOClient {\n}\nsmithyClient.createAggregatedClient(commands, SSO);\n\nconst paginateListAccountRoles = core.createPaginator(SSOClient, ListAccountRolesCommand, \"nextToken\", \"nextToken\", \"maxResults\");\n\nconst paginateListAccounts = core.createPaginator(SSOClient, ListAccountsCommand, \"nextToken\", \"nextToken\", \"maxResults\");\n\nObject.defineProperty(exports, \"$Command\", {\n enumerable: true,\n get: function () { return smithyClient.Command; }\n});\nObject.defineProperty(exports, \"__Client\", {\n enumerable: true,\n get: function () { return smithyClient.Client; }\n});\nexports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;\nexports.InvalidRequestException = InvalidRequestException$1;\nexports.ListAccountRolesCommand = ListAccountRolesCommand;\nexports.ListAccountsCommand = ListAccountsCommand;\nexports.LogoutCommand = LogoutCommand;\nexports.ResourceNotFoundException = ResourceNotFoundException$1;\nexports.SSO = SSO;\nexports.SSOClient = SSOClient;\nexports.SSOServiceException = SSOServiceException$1;\nexports.TooManyRequestsException = TooManyRequestsException$1;\nexports.UnauthorizedException = UnauthorizedException$1;\nexports.paginateListAccountRoles = paginateListAccountRoles;\nexports.paginateListAccounts = paginateListAccounts;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst protocols_1 = require(\"@aws-sdk/core/protocols\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: \"com.amazonaws.sso\" }),\n serviceId: config?.serviceId ?? \"SSO\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","'use strict';\n\nvar protocolHttp = require('@smithy/protocol-http');\nvar core = require('@smithy/core');\nvar propertyProvider = require('@smithy/property-provider');\nvar client = require('@aws-sdk/core/client');\nvar signatureV4 = require('@smithy/signature-v4');\n\nconst getDateHeader = (response) => protocolHttp.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined;\n\nconst getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);\n\nconst isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000;\n\nconst getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {\n const clockTimeInMs = Date.parse(clockTime);\n if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n return clockTimeInMs - Date.now();\n }\n return currentSystemClockOffset;\n};\n\nconst throwSigningPropertyError = (name, property) => {\n if (!property) {\n throw new Error(`Property \\`${name}\\` is not resolved for AWS SDK SigV4Auth`);\n }\n return property;\n};\nconst validateSigningProperties = async (signingProperties) => {\n const context = throwSigningPropertyError(\"context\", signingProperties.context);\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const authScheme = context.endpointV2?.properties?.authSchemes?.[0];\n const signerFunction = throwSigningPropertyError(\"signer\", config.signer);\n const signer = await signerFunction(authScheme);\n const signingRegion = signingProperties?.signingRegion;\n const signingRegionSet = signingProperties?.signingRegionSet;\n const signingName = signingProperties?.signingName;\n return {\n config,\n signer,\n signingRegion,\n signingRegionSet,\n signingName,\n };\n};\nclass AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!protocolHttp.HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const validatedProps = await validateSigningProperties(signingProperties);\n const { config, signer } = validatedProps;\n let { signingRegion, signingName } = validatedProps;\n const handlerExecutionContext = signingProperties.context;\n if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {\n const [first, second] = handlerExecutionContext.authSchemes;\n if (first?.name === \"sigv4a\" && second?.name === \"sigv4\") {\n signingRegion = second?.signingRegion ?? signingRegion;\n signingName = second?.signingName ?? signingName;\n }\n }\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: signingRegion,\n signingService: signingName,\n });\n return signedRequest;\n }\n errorHandler(signingProperties) {\n return (error) => {\n const serverTime = error.ServerTime ?? getDateHeader(error.$response);\n if (serverTime) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const initialSystemClockOffset = config.systemClockOffset;\n config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);\n const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;\n if (clockSkewCorrected && error.$metadata) {\n error.$metadata.clockSkewCorrected = true;\n }\n }\n throw error;\n };\n }\n successHandler(httpResponse, signingProperties) {\n const dateHeader = getDateHeader(httpResponse);\n if (dateHeader) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);\n }\n }\n}\nconst AWSSDKSigV4Signer = AwsSdkSigV4Signer;\n\nclass AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!protocolHttp.HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);\n const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();\n const multiRegionOverride = (configResolvedSigningRegionSet ??\n signingRegionSet ?? [signingRegion]).join(\",\");\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: multiRegionOverride,\n signingService: signingName,\n });\n return signedRequest;\n }\n}\n\nconst getArrayForCommaSeparatedString = (str) => typeof str === \"string\" && str.length > 0 ? str.split(\",\").map((item) => item.trim()) : [];\n\nconst getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\\s-]/g, \"_\").toUpperCase()}`;\n\nconst NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = \"AWS_AUTH_SCHEME_PREFERENCE\";\nconst NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = \"auth_scheme_preference\";\nconst NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {\n environmentVariableSelector: (env, options) => {\n if (options?.signingName) {\n const bearerTokenKey = getBearerTokenEnvKey(options.signingName);\n if (bearerTokenKey in env)\n return [\"httpBearerAuth\"];\n }\n if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env))\n return undefined;\n return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);\n },\n configFileSelector: (profile) => {\n if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))\n return undefined;\n return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);\n },\n default: [],\n};\n\nconst resolveAwsSdkSigV4AConfig = (config) => {\n config.sigv4aSigningRegionSet = core.normalizeProvider(config.sigv4aSigningRegionSet);\n return config;\n};\nconst NODE_SIGV4A_CONFIG_OPTIONS = {\n environmentVariableSelector(env) {\n if (env.AWS_SIGV4A_SIGNING_REGION_SET) {\n return env.AWS_SIGV4A_SIGNING_REGION_SET.split(\",\").map((_) => _.trim());\n }\n throw new propertyProvider.ProviderError(\"AWS_SIGV4A_SIGNING_REGION_SET not set in env.\", {\n tryNextLink: true,\n });\n },\n configFileSelector(profile) {\n if (profile.sigv4a_signing_region_set) {\n return (profile.sigv4a_signing_region_set ?? \"\").split(\",\").map((_) => _.trim());\n }\n throw new propertyProvider.ProviderError(\"sigv4a_signing_region_set not set in profile.\", {\n tryNextLink: true,\n });\n },\n default: undefined,\n};\n\nconst resolveAwsSdkSigV4Config = (config) => {\n let inputCredentials = config.credentials;\n let isUserSupplied = !!config.credentials;\n let resolvedCredentials = undefined;\n Object.defineProperty(config, \"credentials\", {\n set(credentials) {\n if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {\n isUserSupplied = true;\n }\n inputCredentials = credentials;\n const memoizedProvider = normalizeCredentialProvider(config, {\n credentials: inputCredentials,\n credentialDefaultProvider: config.credentialDefaultProvider,\n });\n const boundProvider = bindCallerConfig(config, memoizedProvider);\n if (isUserSupplied && !boundProvider.attributed) {\n resolvedCredentials = async (options) => boundProvider(options).then((creds) => client.setCredentialFeature(creds, \"CREDENTIALS_CODE\", \"e\"));\n resolvedCredentials.memoized = boundProvider.memoized;\n resolvedCredentials.configBound = boundProvider.configBound;\n resolvedCredentials.attributed = true;\n }\n else {\n resolvedCredentials = boundProvider;\n }\n },\n get() {\n return resolvedCredentials;\n },\n enumerable: true,\n configurable: true,\n });\n config.credentials = inputCredentials;\n const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config;\n let signer;\n if (config.signer) {\n signer = core.normalizeProvider(config.signer);\n }\n else if (config.regionInfoProvider) {\n signer = () => core.normalizeProvider(config.region)()\n .then(async (region) => [\n (await config.regionInfoProvider(region, {\n useFipsEndpoint: await config.useFipsEndpoint(),\n useDualstackEndpoint: await config.useDualstackEndpoint(),\n })) || {},\n region,\n ])\n .then(([regionInfo, region]) => {\n const { signingRegion, signingService } = regionInfo;\n config.signingRegion = config.signingRegion || signingRegion || region;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n };\n const SignerCtor = config.signerConstructor || signatureV4.SignatureV4;\n return new SignerCtor(params);\n });\n }\n else {\n signer = async (authScheme) => {\n authScheme = Object.assign({}, {\n name: \"sigv4\",\n signingName: config.signingName || config.defaultSigningName,\n signingRegion: await core.normalizeProvider(config.region)(),\n properties: {},\n }, authScheme);\n const signingRegion = authScheme.signingRegion;\n const signingService = authScheme.signingName;\n config.signingRegion = config.signingRegion || signingRegion;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath,\n };\n const SignerCtor = config.signerConstructor || signatureV4.SignatureV4;\n return new SignerCtor(params);\n };\n }\n const resolvedConfig = Object.assign(config, {\n systemClockOffset,\n signingEscapePath,\n signer,\n });\n return resolvedConfig;\n};\nconst resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;\nfunction normalizeCredentialProvider(config, { credentials, credentialDefaultProvider, }) {\n let credentialsProvider;\n if (credentials) {\n if (!credentials?.memoized) {\n credentialsProvider = core.memoizeIdentityProvider(credentials, core.isIdentityExpired, core.doesIdentityRequireRefresh);\n }\n else {\n credentialsProvider = credentials;\n }\n }\n else {\n if (credentialDefaultProvider) {\n credentialsProvider = core.normalizeProvider(credentialDefaultProvider(Object.assign({}, config, {\n parentClientConfig: config,\n })));\n }\n else {\n credentialsProvider = async () => {\n throw new Error(\"@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.\");\n };\n }\n }\n credentialsProvider.memoized = true;\n return credentialsProvider;\n}\nfunction bindCallerConfig(config, credentialsProvider) {\n if (credentialsProvider.configBound) {\n return credentialsProvider;\n }\n const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });\n fn.memoized = credentialsProvider.memoized;\n fn.configBound = true;\n return fn;\n}\n\nexports.AWSSDKSigV4Signer = AWSSDKSigV4Signer;\nexports.AwsSdkSigV4ASigner = AwsSdkSigV4ASigner;\nexports.AwsSdkSigV4Signer = AwsSdkSigV4Signer;\nexports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = NODE_AUTH_SCHEME_PREFERENCE_OPTIONS;\nexports.NODE_SIGV4A_CONFIG_OPTIONS = NODE_SIGV4A_CONFIG_OPTIONS;\nexports.getBearerTokenEnvKey = getBearerTokenEnvKey;\nexports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config;\nexports.resolveAwsSdkSigV4AConfig = resolveAwsSdkSigV4AConfig;\nexports.resolveAwsSdkSigV4Config = resolveAwsSdkSigV4Config;\nexports.validateSigningProperties = validateSigningProperties;\n","'use strict';\n\nvar propertyProvider = require('@smithy/property-provider');\nvar sharedIniFileLoader = require('@smithy/shared-ini-file-loader');\nvar client = require('@aws-sdk/core/client');\nvar tokenProviders = require('@aws-sdk/token-providers');\n\nconst isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n\nconst SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nconst resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await tokenProviders.fromSso({\n profile,\n filepath,\n configFilepath,\n ignoreCache,\n })();\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString(),\n };\n }\n catch (e) {\n throw new propertyProvider.CredentialsProviderError(e.message, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n else {\n try {\n token = await sharedIniFileLoader.getSSOTokenFromFile(ssoStartUrl);\n }\n catch (e) {\n throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new propertyProvider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { accessToken } = token;\n const { SSOClient, GetRoleCredentialsCommand } = await Promise.resolve().then(function () { return require('./loadSso-CVy8iqsZ.js'); });\n const sso = ssoClient ||\n new SSOClient(Object.assign({}, clientConfig ?? {}, {\n logger: clientConfig?.logger ?? parentClientConfig?.logger,\n region: clientConfig?.region ?? ssoRegion,\n userAgentAppId: clientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,\n }));\n let ssoResp;\n try {\n ssoResp = await sso.send(new GetRoleCredentialsCommand({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken,\n }));\n }\n catch (e) {\n throw new propertyProvider.CredentialsProviderError(e, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new propertyProvider.CredentialsProviderError(\"SSO returns an invalid temporary credential.\", {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const credentials = {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiration: new Date(expiration),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n if (ssoSession) {\n client.setCredentialFeature(credentials, \"CREDENTIALS_SSO\", \"s\");\n }\n else {\n client.setCredentialFeature(credentials, \"CREDENTIALS_SSO_LEGACY\", \"u\");\n }\n return credentials;\n};\n\nconst validateSsoProfile = (profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new propertyProvider.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", ` +\n `\"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });\n }\n return profile;\n};\n\nconst fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-sso - fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = sharedIniFileLoader.getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await sharedIniFileLoader.parseKnownFiles(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });\n }\n if (!isSsoProfile(profile)) {\n throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {\n logger: init.logger,\n });\n }\n if (profile?.sso_session) {\n const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new propertyProvider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new propertyProvider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient: ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new propertyProvider.CredentialsProviderError(\"Incomplete configuration. The fromSSO() argument hash must include \" +\n '\"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"', { tryNextLink: false, logger: init.logger });\n }\n else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n};\n\nexports.fromSSO = fromSSO;\nexports.isSsoProfile = isSsoProfile;\nexports.validateSsoProfile = validateSsoProfile;\n","'use strict';\n\nvar clientSso = require('@aws-sdk/client-sso');\n\n\n\nObject.defineProperty(exports, \"GetRoleCredentialsCommand\", {\n\tenumerable: true,\n\tget: function () { return clientSso.GetRoleCredentialsCommand; }\n});\nObject.defineProperty(exports, \"SSOClient\", {\n\tenumerable: true,\n\tget: function () { return clientSso.SSOClient; }\n});\n","'use strict';\n\nvar client = require('@aws-sdk/core/client');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar propertyProvider = require('@smithy/property-provider');\nvar sharedIniFileLoader = require('@smithy/shared-ini-file-loader');\nvar fs = require('fs');\n\nconst fromEnvSigningName = ({ logger, signingName } = {}) => async () => {\n logger?.debug?.(\"@aws-sdk/token-providers - fromEnvSigningName\");\n if (!signingName) {\n throw new propertyProvider.TokenProviderError(\"Please pass 'signingName' to compute environment variable key\", { logger });\n }\n const bearerTokenKey = httpAuthSchemes.getBearerTokenEnvKey(signingName);\n if (!(bearerTokenKey in process.env)) {\n throw new propertyProvider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });\n }\n const token = { token: process.env[bearerTokenKey] };\n client.setTokenFeature(token, \"BEARER_SERVICE_ENV_VARS\", \"3\");\n return token;\n};\n\nconst EXPIRE_WINDOW_MS = 5 * 60 * 1000;\nconst REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n\nconst getSsoOidcClient = async (ssoRegion, init = {}) => {\n const { SSOOIDCClient } = await import('@aws-sdk/nested-clients/sso-oidc');\n const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop];\n const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {\n region: ssoRegion ?? init.clientConfig?.region,\n logger: coalesce(\"logger\"),\n userAgentAppId: coalesce(\"userAgentAppId\"),\n }));\n return ssoOidcClient;\n};\n\nconst getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => {\n const { CreateTokenCommand } = await import('@aws-sdk/nested-clients/sso-oidc');\n const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);\n return ssoOidcClient.send(new CreateTokenCommand({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\",\n }));\n};\n\nconst validateTokenExpiry = (token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new propertyProvider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n};\n\nconst validateTokenKey = (key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`, false);\n }\n};\n\nconst { writeFile } = fs.promises;\nconst writeSSOTokenToFile = (id, ssoToken) => {\n const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n};\n\nconst lastRefreshAttemptTime = new Date(0);\nconst fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => {\n const init = {\n ..._init,\n parentClientConfig: {\n ...callerClientConfig,\n ..._init.parentClientConfig,\n },\n };\n init.logger?.debug(\"@aws-sdk/token-providers - fromSso\");\n const profiles = await sharedIniFileLoader.parseKnownFiles(init);\n const profileName = sharedIniFileLoader.getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile) {\n throw new propertyProvider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n }\n else if (!profile[\"sso_session\"]) {\n throw new propertyProvider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await sharedIniFileLoader.loadSsoSessionData(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new propertyProvider.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);\n }\n }\n ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await sharedIniFileLoader.getSSOTokenFromFile(ssoSessionName);\n }\n catch (e) {\n throw new propertyProvider.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = { token: accessToken, expiration: new Date(expiresAt) };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTime.setTime(Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken,\n });\n }\n catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration,\n };\n }\n catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n};\n\nconst fromStatic = ({ token, logger }) => async () => {\n logger?.debug(\"@aws-sdk/token-providers - fromStatic\");\n if (!token || !token.token) {\n throw new propertyProvider.TokenProviderError(`Please pass a valid token to fromStatic`, false);\n }\n return token;\n};\n\nconst nodeProvider = (init = {}) => propertyProvider.memoize(propertyProvider.chain(fromSso(init), async () => {\n throw new propertyProvider.TokenProviderError(\"Could not load token from any providers\", false);\n}), (token) => token.expiration !== undefined && token.expiration.getTime() - Date.now() < 300000, (token) => token.expiration !== undefined);\n\nexports.fromEnvSigningName = fromEnvSigningName;\nexports.fromSso = fromSso;\nexports.fromStatic = fromStatic;\nexports.nodeProvider = nodeProvider;\n"],"names":[],"sourceRoot":""}
|