@rharkor/caching-for-turbo 2.4.0 → 2.4.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"762.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;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/nested-clients/dist-cjs/submodules/signin/auth/httpAuthSchemeProvider.js",".././node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/bdd.js",".././node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/endpointResolver.js",".././node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js",".././node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/SigninServiceException.js",".././node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/errors.js",".././node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.js",".././node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.shared.js",".././node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/schemas/schemas_0.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.defaultSigninHttpAuthSchemeProvider = exports.defaultSigninHttpAuthSchemeParametersProvider = void 0;\nconst httpAuthSchemes_1 = require(\"@aws-sdk/core/httpAuthSchemes\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst defaultSigninHttpAuthSchemeParametersProvider = 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.defaultSigninHttpAuthSchemeParametersProvider = defaultSigninHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"signin\",\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 defaultSigninHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateOAuth2Token\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSigninHttpAuthSchemeProvider = defaultSigninHttpAuthSchemeProvider;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, httpAuthSchemes_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.bdd = void 0;\nconst util_endpoints_1 = require(\"@smithy/util-endpoints\");\nconst m = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = \"stringEquals\", h = { [m]: \"Endpoint\" }, i = { [m]: d }, j = { fn: f, argv: [i, \"name\"] }, k = {}, l = [{ [m]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [h]],\n [c, l],\n [\"aws.partition\", l, d],\n [e, [{ [m]: \"UseFIPS\" }, b]],\n [e, [{ [m]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [i, \"supportsFIPS\"] }, b]],\n [g, [j, \"aws\"]],\n [g, [j, \"aws-cn\"]],\n [g, [j, \"aws-us-gov\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [h, k],\n [\"https://{Region}.signin.aws.amazon.com\", k],\n [\"https://{Region}.signin.amazonaws.cn\", k],\n [\"https://{Region}.signin.amazonaws-us-gov.com\", k],\n [\"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://signin.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 15,\n 3,\n 1,\n 4,\n r + 14,\n 2,\n 5,\n r + 14,\n 3,\n 11,\n 6,\n 4,\n 10,\n 7,\n 7,\n r + 4,\n 8,\n 8,\n r + 5,\n 9,\n 9,\n r + 6,\n r + 13,\n 5,\n r + 11,\n r + 12,\n 4,\n 13,\n 12,\n 6,\n r + 9,\n r + 10,\n 5,\n 14,\n r + 8,\n 6,\n r + 7,\n r + 8,\n 3,\n r + 1,\n 16,\n 4,\n r + 2,\n r + 3,\n]);\nexports.bdd = util_endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\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 bdd_1 = require(\"./bdd\");\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.decideEndpoint)(bdd_1.bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\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');\nvar schemas_0 = require('./schemas/schemas_0');\nvar errors = require('./models/errors');\nvar SigninServiceException = require('./models/SigninServiceException');\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"signin\",\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 SigninClient 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.defaultSigninHttpAuthSchemeParametersProvider,\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\nclass CreateOAuth2TokenCommand 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(\"Signin\", \"CreateOAuth2Token\", {})\n .n(\"SigninClient\", \"CreateOAuth2TokenCommand\")\n .sc(schemas_0.CreateOAuth2Token$)\n .build() {\n}\n\nconst commands = {\n CreateOAuth2TokenCommand,\n};\nclass Signin extends SigninClient {\n}\nsmithyClient.createAggregatedClient(commands, Signin);\n\nconst OAuth2ErrorCode = {\n AUTHCODE_EXPIRED: \"AUTHCODE_EXPIRED\",\n INSUFFICIENT_PERMISSIONS: \"INSUFFICIENT_PERMISSIONS\",\n INVALID_REQUEST: \"INVALID_REQUEST\",\n SERVER_ERROR: \"server_error\",\n TOKEN_EXPIRED: \"TOKEN_EXPIRED\",\n USER_CREDENTIALS_CHANGED: \"USER_CREDENTIALS_CHANGED\",\n};\n\nexports.$Command = smithyClient.Command;\nexports.__Client = smithyClient.Client;\nexports.SigninServiceException = SigninServiceException.SigninServiceException;\nexports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;\nexports.OAuth2ErrorCode = OAuth2ErrorCode;\nexports.Signin = Signin;\nexports.SigninClient = SigninClient;\nObject.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: schemas_0['__proto__']\n });\n\nObject.keys(schemas_0).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];\n});\nObject.prototype.hasOwnProperty.call(errors, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: errors['__proto__']\n });\n\nObject.keys(errors).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SigninServiceException = exports.__ServiceException = void 0;\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nObject.defineProperty(exports, \"__ServiceException\", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });\nclass SigninServiceException extends smithy_client_1.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SigninServiceException.prototype);\n }\n}\nexports.SigninServiceException = SigninServiceException;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidationException = exports.TooManyRequestsError = exports.InternalServerException = exports.AccessDeniedException = void 0;\nconst SigninServiceException_1 = require(\"./SigninServiceException\");\nclass AccessDeniedException extends SigninServiceException_1.SigninServiceException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n }\n}\nexports.AccessDeniedException = AccessDeniedException;\nclass InternalServerException extends SigninServiceException_1.SigninServiceException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n }\n}\nexports.InternalServerException = InternalServerException;\nclass TooManyRequestsError extends SigninServiceException_1.SigninServiceException {\n name = \"TooManyRequestsError\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"TooManyRequestsError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsError.prototype);\n this.error = opts.error;\n }\n}\nexports.TooManyRequestsError = TooManyRequestsError;\nclass ValidationException extends SigninServiceException_1.SigninServiceException {\n name = \"ValidationException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"ValidationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ValidationException.prototype);\n this.error = opts.error;\n }\n}\nexports.ValidationException = ValidationException;\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 client_1 = require(\"@aws-sdk/core/client\");\nconst httpAuthSchemes_1 = require(\"@aws-sdk/core/httpAuthSchemes\");\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 smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_1.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, client_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)(httpAuthSchemes_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 httpAuthSchemes_1 = require(\"@aws-sdk/core/httpAuthSchemes\");\nconst protocols_1 = require(\"@aws-sdk/core/protocols\");\nconst core_1 = 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 schemas_0_1 = require(\"./schemas/schemas_0\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2023-01-01\",\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.defaultSigninHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_1.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.signin\",\n errorTypeRegistries: schemas_0_1.errorTypeRegistries,\n version: \"2023-01-01\",\n serviceTarget: \"Signin\",\n },\n serviceId: config?.serviceId ?? \"Signin\",\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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CreateOAuth2Token$ = exports.CreateOAuth2TokenResponseBody$ = exports.CreateOAuth2TokenResponse$ = exports.CreateOAuth2TokenRequestBody$ = exports.CreateOAuth2TokenRequest$ = exports.AccessToken$ = exports.errorTypeRegistries = exports.ValidationException$ = exports.TooManyRequestsError$ = exports.InternalServerException$ = exports.AccessDeniedException$ = exports.SigninServiceException$ = void 0;\nconst _ADE = \"AccessDeniedException\";\nconst _AT = \"AccessToken\";\nconst _COAT = \"CreateOAuth2Token\";\nconst _COATR = \"CreateOAuth2TokenRequest\";\nconst _COATRB = \"CreateOAuth2TokenRequestBody\";\nconst _COATRBr = \"CreateOAuth2TokenResponseBody\";\nconst _COATRr = \"CreateOAuth2TokenResponse\";\nconst _ISE = \"InternalServerException\";\nconst _RT = \"RefreshToken\";\nconst _TMRE = \"TooManyRequestsError\";\nconst _VE = \"ValidationException\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _gT = \"grantType\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _jN = \"jsonName\";\nconst _m = \"message\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.signin\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _se = \"server\";\nconst _tI = \"tokenInput\";\nconst _tO = \"tokenOutput\";\nconst _tT = \"tokenType\";\nconst n0 = \"com.amazonaws.signin\";\nconst schema_1 = require(\"@smithy/core/schema\");\nconst errors_1 = require(\"../models/errors\");\nconst SigninServiceException_1 = require(\"../models/SigninServiceException\");\nconst _s_registry = schema_1.TypeRegistry.for(_s);\nexports.SigninServiceException$ = [-3, _s, \"SigninServiceException\", 0, [], []];\n_s_registry.registerError(exports.SigninServiceException$, SigninServiceException_1.SigninServiceException);\nconst n0_registry = schema_1.TypeRegistry.for(n0);\nexports.AccessDeniedException$ = [-3, n0, _ADE, { [_e]: _c }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(exports.AccessDeniedException$, errors_1.AccessDeniedException);\nexports.InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(exports.InternalServerException$, errors_1.InternalServerException);\nexports.TooManyRequestsError$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(exports.TooManyRequestsError$, errors_1.TooManyRequestsError);\nexports.ValidationException$ = [-3, n0, _VE, { [_e]: _c, [_hE]: 400 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(exports.ValidationException$, errors_1.ValidationException);\nexports.errorTypeRegistries = [_s_registry, n0_registry];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nexports.AccessToken$ = [\n 3,\n n0,\n _AT,\n 8,\n [_aKI, _sAK, _sT],\n [\n [0, { [_jN]: _aKI }],\n [0, { [_jN]: _sAK }],\n [0, { [_jN]: _sT }],\n ],\n 3,\n];\nexports.CreateOAuth2TokenRequest$ = [\n 3,\n n0,\n _COATR,\n 0,\n [_tI],\n [[() => exports.CreateOAuth2TokenRequestBody$, 16]],\n 1,\n];\nexports.CreateOAuth2TokenRequestBody$ = [\n 3,\n n0,\n _COATRB,\n 0,\n [_cI, _gT, _co, _rU, _cV, _rT],\n [\n [0, { [_jN]: _cI }],\n [0, { [_jN]: _gT }],\n 0,\n [0, { [_jN]: _rU }],\n [0, { [_jN]: _cV }],\n [() => RefreshToken, { [_jN]: _rT }],\n ],\n 2,\n];\nexports.CreateOAuth2TokenResponse$ = [\n 3,\n n0,\n _COATRr,\n 0,\n [_tO],\n [[() => exports.CreateOAuth2TokenResponseBody$, 16]],\n 1,\n];\nexports.CreateOAuth2TokenResponseBody$ = [\n 3,\n n0,\n _COATRBr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [\n [() => exports.AccessToken$, { [_jN]: _aT }],\n [0, { [_jN]: _tT }],\n [1, { [_jN]: _eI }],\n [() => RefreshToken, { [_jN]: _rT }],\n [0, { [_jN]: _iT }],\n ],\n 4,\n];\nexports.CreateOAuth2Token$ = [\n 9,\n n0,\n _COAT,\n { [_h]: [\"POST\", \"/v1/token\", 200] },\n () => exports.CreateOAuth2TokenRequest$,\n () => exports.CreateOAuth2TokenResponse$,\n];\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"762.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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/nested-clients/dist-cjs/submodules/signin/index.js"],"sourcesContent":["'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 core = require('@smithy/core');\nvar client = require('@smithy/core/client');\nvar config = require('@smithy/core/config');\nvar endpoints = require('@smithy/core/endpoints');\nvar protocols = require('@smithy/core/protocols');\nvar retry = require('@smithy/core/retry');\nvar schema = require('@smithy/core/schema');\nvar httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');\nvar client$1 = require('@aws-sdk/core/client');\nvar utilUserAgentNode = require('@aws-sdk/util-user-agent-node');\nvar serde = require('@smithy/core/serde');\nvar nodeHttpHandler = require('@smithy/node-http-handler');\nvar protocols$1 = require('@aws-sdk/core/protocols');\nvar utilEndpoints = require('@aws-sdk/util-endpoints');\nvar regionConfigResolver = require('@aws-sdk/region-config-resolver');\n\nconst defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: client.getSmithyContext(context).operation,\n region: (await client.normalizeProvider(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"signin\",\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 defaultSigninHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateOAuth2Token\": {\n options.push(createSmithyApiNoAuthHttpAuthOption());\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"signin\",\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\nvar version = \"3.997.7\";\nvar packageInfo = {\n\tversion: version};\n\nconst m = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = \"stringEquals\", h = { [m]: \"Endpoint\" }, i = { [m]: d }, j = { fn: f, argv: [i, \"name\"] }, k = {}, l = [{ [m]: \"Region\" }];\nconst _data = {\n conditions: [\n [c, [h]],\n [c, l],\n [\"aws.partition\", l, d],\n [e, [{ [m]: \"UseFIPS\" }, b]],\n [e, [{ [m]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsDualStack\"] }, b]],\n [e, [{ fn: f, argv: [i, \"supportsFIPS\"] }, b]],\n [g, [j, \"aws\"]],\n [g, [j, \"aws-cn\"]],\n [g, [j, \"aws-us-gov\"]],\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [h, k],\n [\"https://{Region}.signin.aws.amazon.com\", k],\n [\"https://{Region}.signin.amazonaws.cn\", k],\n [\"https://{Region}.signin.amazonaws-us-gov.com\", k],\n [\"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://signin.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"Invalid Configuration: Missing Region\"],\n ],\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1,\n 1,\n -1,\n 0,\n 15,\n 3,\n 1,\n 4,\n r + 14,\n 2,\n 5,\n r + 14,\n 3,\n 11,\n 6,\n 4,\n 10,\n 7,\n 7,\n r + 4,\n 8,\n 8,\n r + 5,\n 9,\n 9,\n r + 6,\n r + 13,\n 5,\n r + 11,\n r + 12,\n 4,\n 13,\n 12,\n 6,\n r + 9,\n r + 10,\n 5,\n 14,\n r + 8,\n 6,\n r + 7,\n r + 8,\n 3,\n r + 1,\n 16,\n 4,\n r + 2,\n r + 3,\n]);\nconst bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n\nconst cache = new endpoints.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nendpoints.customEndpointFunctions.aws = utilEndpoints.awsEndpointFunctions;\n\nclass SigninServiceException extends client.ServiceException {\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, SigninServiceException.prototype);\n }\n}\n\nclass AccessDeniedException extends SigninServiceException {\n name = \"AccessDeniedException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, AccessDeniedException.prototype);\n this.error = opts.error;\n }\n}\nclass InternalServerException extends SigninServiceException {\n name = \"InternalServerException\";\n $fault = \"server\";\n error;\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalServerException.prototype);\n this.error = opts.error;\n }\n}\nclass TooManyRequestsError extends SigninServiceException {\n name = \"TooManyRequestsError\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"TooManyRequestsError\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsError.prototype);\n this.error = opts.error;\n }\n}\nclass ValidationException extends SigninServiceException {\n name = \"ValidationException\";\n $fault = \"client\";\n error;\n constructor(opts) {\n super({\n name: \"ValidationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ValidationException.prototype);\n this.error = opts.error;\n }\n}\n\nconst _ADE = \"AccessDeniedException\";\nconst _AT = \"AccessToken\";\nconst _COAT = \"CreateOAuth2Token\";\nconst _COATR = \"CreateOAuth2TokenRequest\";\nconst _COATRB = \"CreateOAuth2TokenRequestBody\";\nconst _COATRBr = \"CreateOAuth2TokenResponseBody\";\nconst _COATRr = \"CreateOAuth2TokenResponse\";\nconst _ISE = \"InternalServerException\";\nconst _RT = \"RefreshToken\";\nconst _TMRE = \"TooManyRequestsError\";\nconst _VE = \"ValidationException\";\nconst _aKI = \"accessKeyId\";\nconst _aT = \"accessToken\";\nconst _c = \"client\";\nconst _cI = \"clientId\";\nconst _cV = \"codeVerifier\";\nconst _co = \"code\";\nconst _e = \"error\";\nconst _eI = \"expiresIn\";\nconst _gT = \"grantType\";\nconst _h = \"http\";\nconst _hE = \"httpError\";\nconst _iT = \"idToken\";\nconst _jN = \"jsonName\";\nconst _m = \"message\";\nconst _rT = \"refreshToken\";\nconst _rU = \"redirectUri\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.signin\";\nconst _sAK = \"secretAccessKey\";\nconst _sT = \"sessionToken\";\nconst _se = \"server\";\nconst _tI = \"tokenInput\";\nconst _tO = \"tokenOutput\";\nconst _tT = \"tokenType\";\nconst n0 = \"com.amazonaws.signin\";\nconst _s_registry = schema.TypeRegistry.for(_s);\nvar SigninServiceException$ = [-3, _s, \"SigninServiceException\", 0, [], []];\n_s_registry.registerError(SigninServiceException$, SigninServiceException);\nconst n0_registry = schema.TypeRegistry.for(n0);\nvar AccessDeniedException$ = [-3, n0, _ADE, { [_e]: _c }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(AccessDeniedException$, AccessDeniedException);\nvar InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(InternalServerException$, InternalServerException);\nvar TooManyRequestsError$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(TooManyRequestsError$, TooManyRequestsError);\nvar ValidationException$ = [-3, n0, _VE, { [_e]: _c, [_hE]: 400 }, [_e, _m], [0, 0], 2];\nn0_registry.registerError(ValidationException$, ValidationException);\nconst errorTypeRegistries = [_s_registry, n0_registry];\nvar RefreshToken = [0, n0, _RT, 8, 0];\nvar AccessToken$ = [\n 3,\n n0,\n _AT,\n 8,\n [_aKI, _sAK, _sT],\n [\n [0, { [_jN]: _aKI }],\n [0, { [_jN]: _sAK }],\n [0, { [_jN]: _sT }],\n ],\n 3,\n];\nvar CreateOAuth2TokenRequest$ = [\n 3,\n n0,\n _COATR,\n 0,\n [_tI],\n [[() => CreateOAuth2TokenRequestBody$, 16]],\n 1,\n];\nvar CreateOAuth2TokenRequestBody$ = [\n 3,\n n0,\n _COATRB,\n 0,\n [_cI, _gT, _co, _rU, _cV, _rT],\n [\n [0, { [_jN]: _cI }],\n [0, { [_jN]: _gT }],\n 0,\n [0, { [_jN]: _rU }],\n [0, { [_jN]: _cV }],\n [() => RefreshToken, { [_jN]: _rT }],\n ],\n 2,\n];\nvar CreateOAuth2TokenResponse$ = [\n 3,\n n0,\n _COATRr,\n 0,\n [_tO],\n [[() => CreateOAuth2TokenResponseBody$, 16]],\n 1,\n];\nvar CreateOAuth2TokenResponseBody$ = [\n 3,\n n0,\n _COATRBr,\n 0,\n [_aT, _tT, _eI, _rT, _iT],\n [\n [() => AccessToken$, { [_jN]: _aT }],\n [0, { [_jN]: _tT }],\n [1, { [_jN]: _eI }],\n [() => RefreshToken, { [_jN]: _rT }],\n [0, { [_jN]: _iT }],\n ],\n 4,\n];\nvar CreateOAuth2Token$ = [\n 9,\n n0,\n _COAT,\n { [_h]: [\"POST\", \"/v1/token\", 200] },\n () => CreateOAuth2TokenRequest$,\n () => CreateOAuth2TokenResponse$,\n];\n\nconst getRuntimeConfig$1 = (config) => {\n return {\n apiVersion: \"2023-01-01\",\n base64Decoder: config?.base64Decoder ?? serde.fromBase64,\n base64Encoder: config?.base64Encoder ?? serde.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSigninHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new httpAuthSchemes.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new client.NoOpLogger(),\n protocol: config?.protocol ?? protocols$1.AwsRestJsonProtocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.signin\",\n errorTypeRegistries,\n version: \"2023-01-01\",\n serviceTarget: \"Signin\",\n },\n serviceId: config?.serviceId ?? \"Signin\",\n urlParser: config?.urlParser ?? protocols.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,\n };\n};\n\nconst getRuntimeConfig = (config$1) => {\n client.emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = config.resolveDefaultsModeConfig(config$1);\n const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);\n const clientSharedValues = getRuntimeConfig$1(config$1);\n client$1.emitWarningIfUnsupportedVersion(process.version);\n const loaderConfig = {\n profile: config$1?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config$1,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,\n defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??\n utilUserAgentNode.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),\n region: config$1?.region ??\n config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),\n retryMode: config$1?.retryMode ??\n config.loadConfig({\n ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,\n }, config$1),\n sha256: config$1?.sha256 ?? serde.Hash.bind(null, \"sha256\"),\n streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,\n useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(utilUserAgentNode.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\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), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n\nclass SigninClient extends client.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = 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 = retry.resolveRetryConfig(_config_2);\n const _config_4 = config.resolveRegionConfig(_config_3);\n const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);\n const _config_6 = endpoints.resolveEndpointConfig(_config_5);\n const _config_7 = 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(retry.getRetryPlugin(this.config));\n this.middlewareStack.use(protocols.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: defaultSigninHttpAuthSchemeParametersProvider,\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\nclass CreateOAuth2TokenCommand extends client.Command\n .classBuilder()\n .ep(commonParams)\n .m(function (Command, cs, config, o) {\n return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"Signin\", \"CreateOAuth2Token\", {})\n .n(\"SigninClient\", \"CreateOAuth2TokenCommand\")\n .sc(CreateOAuth2Token$)\n .build() {\n}\n\nconst commands = {\n CreateOAuth2TokenCommand,\n};\nclass Signin extends SigninClient {\n}\nclient.createAggregatedClient(commands, Signin);\n\nconst OAuth2ErrorCode = {\n AUTHCODE_EXPIRED: \"AUTHCODE_EXPIRED\",\n INSUFFICIENT_PERMISSIONS: \"INSUFFICIENT_PERMISSIONS\",\n INVALID_REQUEST: \"INVALID_REQUEST\",\n SERVER_ERROR: \"server_error\",\n TOKEN_EXPIRED: \"TOKEN_EXPIRED\",\n USER_CREDENTIALS_CHANGED: \"USER_CREDENTIALS_CHANGED\",\n};\n\nexports.$Command = client.Command;\nexports.__Client = client.Client;\nexports.AccessDeniedException = AccessDeniedException;\nexports.AccessDeniedException$ = AccessDeniedException$;\nexports.AccessToken$ = AccessToken$;\nexports.CreateOAuth2Token$ = CreateOAuth2Token$;\nexports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;\nexports.CreateOAuth2TokenRequest$ = CreateOAuth2TokenRequest$;\nexports.CreateOAuth2TokenRequestBody$ = CreateOAuth2TokenRequestBody$;\nexports.CreateOAuth2TokenResponse$ = CreateOAuth2TokenResponse$;\nexports.CreateOAuth2TokenResponseBody$ = CreateOAuth2TokenResponseBody$;\nexports.InternalServerException = InternalServerException;\nexports.InternalServerException$ = InternalServerException$;\nexports.OAuth2ErrorCode = OAuth2ErrorCode;\nexports.Signin = Signin;\nexports.SigninClient = SigninClient;\nexports.SigninServiceException = SigninServiceException;\nexports.SigninServiceException$ = SigninServiceException$;\nexports.TooManyRequestsError = TooManyRequestsError;\nexports.TooManyRequestsError$ = TooManyRequestsError$;\nexports.ValidationException = ValidationException;\nexports.ValidationException$ = ValidationException$;\nexports.errorTypeRegistries = errorTypeRegistries;\n"],"names":[],"sourceRoot":""}
@@ -7,18 +7,17 @@ export const modules = {
7
7
 
8
8
 
9
9
 
10
- var sharedIniFileLoader = __webpack_require__(94964);
11
- var propertyProvider = __webpack_require__(71238);
10
+ var config = __webpack_require__(47291);
12
11
  var client = __webpack_require__(5152);
13
12
  var credentialProviderLogin = __webpack_require__(84072);
14
13
 
15
14
  const resolveCredentialSource = (credentialSource, profileName, logger) => {
16
15
  const sourceProvidersMap = {
17
16
  EcsContainer: async (options) => {
18
- const { fromHttp } = await __webpack_require__.e(/* import() */ 605).then(__webpack_require__.bind(__webpack_require__, 98605));
17
+ const { fromHttp } = await __webpack_require__.e(/* import() */ 605).then(__webpack_require__.t.bind(__webpack_require__, 98605, 19));
19
18
  const { fromContainerMetadata } = await __webpack_require__.e(/* import() */ 566).then(__webpack_require__.t.bind(__webpack_require__, 40566, 19));
20
19
  logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
21
- return async () => propertyProvider.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
20
+ return async () => config.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
22
21
  },
23
22
  Ec2InstanceMetadata: async (options) => {
24
23
  logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
@@ -35,7 +34,7 @@ const resolveCredentialSource = (credentialSource, profileName, logger) => {
35
34
  return sourceProvidersMap[credentialSource];
36
35
  }
37
36
  else {
38
- throw new propertyProvider.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +
37
+ throw new config.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +
39
38
  `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
40
39
  }
41
40
  };
@@ -69,7 +68,7 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, call
69
68
  const profileData = profiles[profileName];
70
69
  const { source_profile, region } = profileData;
71
70
  if (!options.roleAssumer) {
72
- const { getDefaultRoleAssumer } = await __webpack_require__.e(/* import() */ 136).then(__webpack_require__.t.bind(__webpack_require__, 1136, 23));
71
+ const { getDefaultRoleAssumer } = await __webpack_require__.e(/* import() */ 136).then(__webpack_require__.t.bind(__webpack_require__, 1136, 19));
73
72
  options.roleAssumer = getDefaultRoleAssumer({
74
73
  ...options.clientConfig,
75
74
  credentialProviderLogger: options.logger,
@@ -81,8 +80,8 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, call
81
80
  }, options.clientPlugins);
82
81
  }
83
82
  if (source_profile && source_profile in visitedProfiles) {
84
- throw new propertyProvider.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +
85
- ` ${sharedIniFileLoader.getProfileName(options)}. Profiles visited: ` +
83
+ throw new config.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +
84
+ ` ${config.getProfileName(options)}. Profiles visited: ` +
86
85
  Object.keys(visitedProfiles).join(", "), { logger: options.logger });
87
86
  }
88
87
  options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
@@ -105,7 +104,7 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, call
105
104
  const { mfa_serial } = profileData;
106
105
  if (mfa_serial) {
107
106
  if (!options.mfaCodeProvider) {
108
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
107
+ throw new config.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
109
108
  }
110
109
  params.SerialNumber = mfa_serial;
111
110
  params.TokenCode = await options.mfaCodeProvider(mfa_serial);
@@ -183,7 +182,7 @@ const isWebIdentityProfile = (arg) => Boolean(arg) &&
183
182
  typeof arg.web_identity_token_file === "string" &&
184
183
  typeof arg.role_arn === "string" &&
185
184
  ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
186
- const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => Promise.all(/* import() */[__webpack_require__.e(136), __webpack_require__.e(956)]).then(__webpack_require__.t.bind(__webpack_require__, 29956, 23)).then(({ fromTokenFile }) => fromTokenFile({
185
+ const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => __webpack_require__.e(/* import() */ 956).then(__webpack_require__.t.bind(__webpack_require__, 29956, 23)).then(({ fromTokenFile }) => fromTokenFile({
187
186
  webIdentityTokenFile: profile.web_identity_token_file,
188
187
  roleArn: profile.role_arn,
189
188
  roleSessionName: profile.role_session_name,
@@ -217,13 +216,13 @@ const resolveProfileData = async (profileName, profiles, options, callerClientCo
217
216
  if (isLoginProfile(data)) {
218
217
  return resolveLoginCredentials(profileName, options, callerClientConfig);
219
218
  }
220
- throw new propertyProvider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
219
+ throw new config.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
221
220
  };
222
221
 
223
222
  const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
224
223
  init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
225
- const profiles = await sharedIniFileLoader.parseKnownFiles(init);
226
- return resolveProfileData(sharedIniFileLoader.getProfileName({
224
+ const profiles = await config.parseKnownFiles(init);
225
+ return resolveProfileData(config.getProfileName({
227
226
  profile: init.profile ?? callerClientConfig?.profile,
228
227
  }), profiles, init, callerClientConfig);
229
228
  };
@@ -239,9 +238,8 @@ exports.fromIni = fromIni;
239
238
 
240
239
 
241
240
  var client = __webpack_require__(5152);
242
- var propertyProvider = __webpack_require__(71238);
243
- var sharedIniFileLoader = __webpack_require__(94964);
244
- var protocolHttp = __webpack_require__(72356);
241
+ var config = __webpack_require__(47291);
242
+ var protocols = __webpack_require__(93422);
245
243
  var node_crypto = __webpack_require__(77598);
246
244
  var node_fs = __webpack_require__(73024);
247
245
  var node_os = __webpack_require__(48161);
@@ -260,7 +258,7 @@ class LoginCredentialsFetcher {
260
258
  async loadCredentials() {
261
259
  const token = await this.loadToken();
262
260
  if (!token) {
263
- throw new propertyProvider.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });
261
+ throw new config.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });
264
262
  }
265
263
  const accessToken = token.accessToken;
266
264
  const now = Date.now();
@@ -284,7 +282,7 @@ class LoginCredentialsFetcher {
284
282
  return this.profileData.login_session;
285
283
  }
286
284
  async refresh(token) {
287
- const { SigninClient, CreateOAuth2TokenCommand } = await __webpack_require__.e(/* import() */ 762).then(__webpack_require__.t.bind(__webpack_require__, 99762, 23));
285
+ const { SigninClient, CreateOAuth2TokenCommand } = await __webpack_require__.e(/* import() */ 762).then(__webpack_require__.t.bind(__webpack_require__, 99762, 19));
288
286
  const { logger, userAgentAppId } = this.callerClientConfig ?? {};
289
287
  const isH2 = (requestHandler) => {
290
288
  return requestHandler?.metadata?.handlerProtocol === "h2";
@@ -317,7 +315,7 @@ class LoginCredentialsFetcher {
317
315
  const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};
318
316
  const { refreshToken, expiresIn } = response.tokenOutput ?? {};
319
317
  if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {
320
- throw new propertyProvider.CredentialsProviderError("Token refresh response missing required fields", {
318
+ throw new config.CredentialsProviderError("Token refresh response missing required fields", {
321
319
  logger: this.logger,
322
320
  tryNextLink: false,
323
321
  });
@@ -364,9 +362,9 @@ class LoginCredentialsFetcher {
364
362
  default:
365
363
  message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \`aws login\``;
366
364
  }
367
- throw new propertyProvider.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });
365
+ throw new config.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });
368
366
  }
369
- throw new propertyProvider.CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });
367
+ throw new config.CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });
370
368
  }
371
369
  }
372
370
  async loadToken() {
@@ -374,7 +372,7 @@ class LoginCredentialsFetcher {
374
372
  try {
375
373
  let tokenData;
376
374
  try {
377
- tokenData = await sharedIniFileLoader.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });
375
+ tokenData = await config.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });
378
376
  }
379
377
  catch {
380
378
  tokenData = await node_fs.promises.readFile(tokenFilePath, "utf8");
@@ -385,7 +383,7 @@ class LoginCredentialsFetcher {
385
383
  missingFields.push("accountId");
386
384
  }
387
385
  if (missingFields.length > 0) {
388
- throw new propertyProvider.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
386
+ throw new config.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
389
387
  logger: this.logger,
390
388
  tryNextLink: false,
391
389
  });
@@ -393,7 +391,7 @@ class LoginCredentialsFetcher {
393
391
  return token;
394
392
  }
395
393
  catch (error) {
396
- throw new propertyProvider.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {
394
+ throw new config.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {
397
395
  logger: this.logger,
398
396
  tryNextLink: false,
399
397
  });
@@ -438,7 +436,7 @@ class LoginCredentialsFetcher {
438
436
  }
439
437
  createDPoPInterceptor(middlewareStack) {
440
438
  middlewareStack.add((next) => async (args) => {
441
- if (protocolHttp.HttpRequest.isInstance(args.request)) {
439
+ if (protocols.HttpRequest.isInstance(args.request)) {
442
440
  const request = args.request;
443
441
  const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : ""}${request.path}`;
444
442
  const dpop = await this.generateDpop(request.method, actualEndpoint);
@@ -498,20 +496,20 @@ class LoginCredentialsFetcher {
498
496
  return `${message}.${signatureB64}`;
499
497
  }
500
498
  catch (error) {
501
- throw new propertyProvider.CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });
499
+ throw new config.CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });
502
500
  }
503
501
  }
504
502
  }
505
503
 
506
504
  const fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
507
505
  init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");
508
- const profiles = await sharedIniFileLoader.parseKnownFiles(init || {});
509
- const profileName = sharedIniFileLoader.getProfileName({
506
+ const profiles = await config.parseKnownFiles(init || {});
507
+ const profileName = config.getProfileName({
510
508
  profile: init?.profile ?? callerClientConfig?.profile,
511
509
  });
512
510
  const profile = profiles[profileName];
513
511
  if (!profile?.login_session) {
514
- throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
512
+ throw new config.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
515
513
  tryNextLink: true,
516
514
  logger: init?.logger,
517
515
  });
@@ -1 +1 @@
1
- {"version":3,"file":"869.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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/credential-provider-ini/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js"],"sourcesContent":["'use strict';\n\nvar sharedIniFileLoader = require('@smithy/shared-ini-file-loader');\nvar propertyProvider = require('@smithy/property-provider');\nvar client = require('@aws-sdk/core/client');\nvar credentialProviderLogin = require('@aws-sdk/credential-provider-login');\n\nconst resolveCredentialSource = (credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: async (options) => {\n const { fromHttp } = await import('@aws-sdk/credential-provider-http');\n const { fromContainerMetadata } = await import('@smithy/credential-provider-imds');\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => propertyProvider.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n },\n Ec2InstanceMetadata: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = await import('@smithy/credential-provider-imds');\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n },\n Environment: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = await import('@aws-sdk/credential-provider-env');\n return async () => fromEnv(options)().then(setNamedProvider);\n },\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n }\n else {\n throw new propertyProvider.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +\n `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });\n }\n};\nconst setNamedProvider = (creds) => client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\");\n\nconst isAssumeRoleProfile = (arg, { profile = \"default\", logger } = {}) => {\n return (Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 &&\n (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));\n};\nconst isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n};\nconst isCredentialSourceProfile = (arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n};\nconst resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const profileData = profiles[profileName];\n const { source_profile, region } = profileData;\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = await import('@aws-sdk/nested-clients/sts');\n options.roleAssumer = getDefaultRoleAssumer({\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: {\n ...callerClientConfig,\n ...options?.parentClientConfig,\n region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,\n },\n }, options.clientPlugins);\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new propertyProvider.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +\n ` ${sharedIniFileLoader.getProfileName(options)}. Profiles visited: ` +\n Object.keys(visitedProfiles).join(\", \"), { logger: options.logger });\n }\n options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);\n const sourceCredsProvider = source_profile\n ? resolveProfileData(source_profile, profiles, options, callerClientConfig, {\n ...visitedProfiles,\n [source_profile]: true,\n }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))\n : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(profileData)) {\n return sourceCredsProvider.then((creds) => client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n else {\n const params = {\n RoleArn: profileData.role_arn,\n RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: profileData.external_id,\n DurationSeconds: parseInt(profileData.duration_seconds || \"3600\", 10),\n };\n const { mfa_serial } = profileData;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then((creds) => client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n};\nconst isCredentialSourceWithoutRoleArn = (section) => {\n return !section.role_arn && !!section.credential_source;\n};\n\nconst isLoginProfile = (data) => {\n return Boolean(data && data.login_session);\n};\nconst resolveLoginCredentials = async (profileName, options, callerClientConfig) => {\n const credentials = await credentialProviderLogin.fromLoginCredentials({\n ...options,\n profile: profileName,\n })({ callerClientConfig });\n return client.setCredentialFeature(credentials, \"CREDENTIALS_PROFILE_LOGIN\", \"AC\");\n};\n\nconst isProcessProfile = (arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\";\nconst resolveProcessCredentials = async (options, profile) => import('@aws-sdk/credential-provider-process').then(({ fromProcess }) => fromProcess({\n ...options,\n profile,\n})().then((creds) => client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_PROCESS\", \"v\")));\n\nconst resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {\n const { fromSSO } = await import('@aws-sdk/credential-provider-sso');\n return fromSSO({\n profile,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n clientConfig: options.clientConfig,\n })({\n callerClientConfig,\n }).then((creds) => {\n if (profileData.sso_session) {\n return client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n }\n else {\n return client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\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 isStaticCredsProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.aws_access_key_id === \"string\" &&\n typeof arg.aws_secret_access_key === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1;\nconst resolveStaticCredentials = async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),\n ...(profile.aws_account_id && { accountId: profile.aws_account_id }),\n };\n return client.setCredentialFeature(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n};\n\nconst isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nconst resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => import('@aws-sdk/credential-provider-web-identity').then(({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n})({\n callerClientConfig,\n}).then((creds) => client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\")));\n\nconst resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options, callerClientConfig);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options, callerClientConfig);\n }\n if (isLoginProfile(data)) {\n return resolveLoginCredentials(profileName, options, callerClientConfig);\n }\n throw new propertyProvider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });\n};\n\nconst fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await sharedIniFileLoader.parseKnownFiles(init);\n return resolveProfileData(sharedIniFileLoader.getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init, callerClientConfig);\n};\n\nexports.fromIni = fromIni;\n","'use strict';\n\nvar client = require('@aws-sdk/core/client');\nvar propertyProvider = require('@smithy/property-provider');\nvar sharedIniFileLoader = require('@smithy/shared-ini-file-loader');\nvar protocolHttp = require('@smithy/protocol-http');\nvar node_crypto = require('node:crypto');\nvar node_fs = require('node:fs');\nvar node_os = require('node:os');\nvar node_path = require('node:path');\n\nclass LoginCredentialsFetcher {\n profileData;\n init;\n callerClientConfig;\n static REFRESH_THRESHOLD = 5 * 60 * 1000;\n constructor(profileData, init, callerClientConfig) {\n this.profileData = profileData;\n this.init = init;\n this.callerClientConfig = callerClientConfig;\n }\n async loadCredentials() {\n const token = await this.loadToken();\n if (!token) {\n throw new propertyProvider.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });\n }\n const accessToken = token.accessToken;\n const now = Date.now();\n const expiryTime = new Date(accessToken.expiresAt).getTime();\n const timeUntilExpiry = expiryTime - now;\n if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {\n return this.refresh(token);\n }\n return {\n accessKeyId: accessToken.accessKeyId,\n secretAccessKey: accessToken.secretAccessKey,\n sessionToken: accessToken.sessionToken,\n accountId: accessToken.accountId,\n expiration: new Date(accessToken.expiresAt),\n };\n }\n get logger() {\n return this.init?.logger;\n }\n get loginSession() {\n return this.profileData.login_session;\n }\n async refresh(token) {\n const { SigninClient, CreateOAuth2TokenCommand } = await import('@aws-sdk/nested-clients/signin');\n const { logger, userAgentAppId } = this.callerClientConfig ?? {};\n const isH2 = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n };\n const requestHandler = isH2(this.callerClientConfig?.requestHandler)\n ? undefined\n : this.callerClientConfig?.requestHandler;\n const region = this.profileData.region ?? (await this.callerClientConfig?.region?.()) ?? process.env.AWS_REGION;\n const client = new SigninClient({\n credentials: {\n accessKeyId: \"\",\n secretAccessKey: \"\",\n },\n region,\n requestHandler,\n logger,\n userAgentAppId,\n ...this.init?.clientConfig,\n });\n this.createDPoPInterceptor(client.middlewareStack);\n const commandInput = {\n tokenInput: {\n clientId: token.clientId,\n refreshToken: token.refreshToken,\n grantType: \"refresh_token\",\n },\n };\n try {\n const response = await client.send(new CreateOAuth2TokenCommand(commandInput));\n const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};\n const { refreshToken, expiresIn } = response.tokenOutput ?? {};\n if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {\n throw new propertyProvider.CredentialsProviderError(\"Token refresh response missing required fields\", {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n const expiresInMs = (expiresIn ?? 900) * 1000;\n const expiration = new Date(Date.now() + expiresInMs);\n const updatedToken = {\n ...token,\n accessToken: {\n ...token.accessToken,\n accessKeyId: accessKeyId,\n secretAccessKey: secretAccessKey,\n sessionToken: sessionToken,\n expiresAt: expiration.toISOString(),\n },\n refreshToken: refreshToken,\n };\n await this.saveToken(updatedToken);\n const newAccessToken = updatedToken.accessToken;\n return {\n accessKeyId: newAccessToken.accessKeyId,\n secretAccessKey: newAccessToken.secretAccessKey,\n sessionToken: newAccessToken.sessionToken,\n accountId: newAccessToken.accountId,\n expiration,\n };\n }\n catch (error) {\n if (error.name === \"AccessDeniedException\") {\n const errorType = error.error;\n let message;\n switch (errorType) {\n case \"TOKEN_EXPIRED\":\n message = \"Your session has expired. Please reauthenticate.\";\n break;\n case \"USER_CREDENTIALS_CHANGED\":\n message =\n \"Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.\";\n break;\n case \"INSUFFICIENT_PERMISSIONS\":\n message =\n \"Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.\";\n break;\n default:\n message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \\`aws login\\``;\n }\n throw new propertyProvider.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });\n }\n throw new propertyProvider.CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });\n }\n }\n async loadToken() {\n const tokenFilePath = this.getTokenFilePath();\n try {\n let tokenData;\n try {\n tokenData = await sharedIniFileLoader.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });\n }\n catch {\n tokenData = await node_fs.promises.readFile(tokenFilePath, \"utf8\");\n }\n const token = JSON.parse(tokenData);\n const missingFields = [\"accessToken\", \"clientId\", \"refreshToken\", \"dpopKey\"].filter((k) => !token[k]);\n if (!token.accessToken?.accountId) {\n missingFields.push(\"accountId\");\n }\n if (missingFields.length > 0) {\n throw new propertyProvider.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(\", \")}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n return token;\n }\n catch (error) {\n throw new propertyProvider.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n }\n async saveToken(token) {\n const tokenFilePath = this.getTokenFilePath();\n const directory = node_path.dirname(tokenFilePath);\n try {\n await node_fs.promises.mkdir(directory, { recursive: true });\n }\n catch (error) {\n }\n await node_fs.promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), \"utf8\");\n }\n getTokenFilePath() {\n const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? node_path.join(node_os.homedir(), \".aws\", \"login\", \"cache\");\n const loginSessionBytes = Buffer.from(this.loginSession, \"utf8\");\n const loginSessionSha256 = node_crypto.createHash(\"sha256\").update(loginSessionBytes).digest(\"hex\");\n return node_path.join(directory, `${loginSessionSha256}.json`);\n }\n derToRawSignature(derSignature) {\n let offset = 2;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const rLength = derSignature[offset++];\n let r = derSignature.subarray(offset, offset + rLength);\n offset += rLength;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const sLength = derSignature[offset++];\n let s = derSignature.subarray(offset, offset + sLength);\n r = r[0] === 0x00 ? r.subarray(1) : r;\n s = s[0] === 0x00 ? s.subarray(1) : s;\n const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);\n const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);\n return Buffer.concat([rPadded, sPadded]);\n }\n createDPoPInterceptor(middlewareStack) {\n middlewareStack.add((next) => async (args) => {\n if (protocolHttp.HttpRequest.isInstance(args.request)) {\n const request = args.request;\n const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : \"\"}${request.path}`;\n const dpop = await this.generateDpop(request.method, actualEndpoint);\n request.headers = {\n ...request.headers,\n DPoP: dpop,\n };\n }\n return next(args);\n }, {\n step: \"finalizeRequest\",\n name: \"dpopInterceptor\",\n override: true,\n });\n }\n async generateDpop(method = \"POST\", endpoint) {\n const token = await this.loadToken();\n try {\n const privateKey = node_crypto.createPrivateKey({\n key: token.dpopKey,\n format: \"pem\",\n type: \"sec1\",\n });\n const publicKey = node_crypto.createPublicKey(privateKey);\n const publicDer = publicKey.export({ format: \"der\", type: \"spki\" });\n let pointStart = -1;\n for (let i = 0; i < publicDer.length; i++) {\n if (publicDer[i] === 0x04) {\n pointStart = i;\n break;\n }\n }\n const x = publicDer.slice(pointStart + 1, pointStart + 33);\n const y = publicDer.slice(pointStart + 33, pointStart + 65);\n const header = {\n alg: \"ES256\",\n typ: \"dpop+jwt\",\n jwk: {\n kty: \"EC\",\n crv: \"P-256\",\n x: x.toString(\"base64url\"),\n y: y.toString(\"base64url\"),\n },\n };\n const payload = {\n jti: crypto.randomUUID(),\n htm: method,\n htu: endpoint,\n iat: Math.floor(Date.now() / 1000),\n };\n const headerB64 = Buffer.from(JSON.stringify(header)).toString(\"base64url\");\n const payloadB64 = Buffer.from(JSON.stringify(payload)).toString(\"base64url\");\n const message = `${headerB64}.${payloadB64}`;\n const asn1Signature = node_crypto.sign(\"sha256\", Buffer.from(message), privateKey);\n const rawSignature = this.derToRawSignature(asn1Signature);\n const signatureB64 = rawSignature.toString(\"base64url\");\n return `${message}.${signatureB64}`;\n }\n catch (error) {\n throw new propertyProvider.CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });\n }\n }\n}\n\nconst fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {\n init?.logger?.debug?.(\"@aws-sdk/credential-providers - fromLoginCredentials\");\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?.login_session) {\n throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {\n tryNextLink: true,\n logger: init?.logger,\n });\n }\n const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);\n const credentials = await fetcher.loadCredentials();\n return client.setCredentialFeature(credentials, \"CREDENTIALS_LOGIN\", \"AD\");\n};\n\nexports.fromLoginCredentials = fromLoginCredentials;\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"869.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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/credential-provider-ini/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js"],"sourcesContent":["'use strict';\n\nvar config = require('@smithy/core/config');\nvar client = require('@aws-sdk/core/client');\nvar credentialProviderLogin = require('@aws-sdk/credential-provider-login');\n\nconst resolveCredentialSource = (credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: async (options) => {\n const { fromHttp } = await import('@aws-sdk/credential-provider-http');\n const { fromContainerMetadata } = await import('@smithy/credential-provider-imds');\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => config.chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n },\n Ec2InstanceMetadata: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = await import('@smithy/credential-provider-imds');\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n },\n Environment: async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = await import('@aws-sdk/credential-provider-env');\n return async () => fromEnv(options)().then(setNamedProvider);\n },\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n }\n else {\n throw new config.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, ` +\n `expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });\n }\n};\nconst setNamedProvider = (creds) => client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\");\n\nconst isAssumeRoleProfile = (arg, { profile = \"default\", logger } = {}) => {\n return (Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 &&\n (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger })));\n};\nconst isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n};\nconst isCredentialSourceProfile = (arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n};\nconst resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const profileData = profiles[profileName];\n const { source_profile, region } = profileData;\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = await import('@aws-sdk/nested-clients/sts');\n options.roleAssumer = getDefaultRoleAssumer({\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: {\n ...callerClientConfig,\n ...options?.parentClientConfig,\n region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region,\n },\n }, options.clientPlugins);\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new config.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile` +\n ` ${config.getProfileName(options)}. Profiles visited: ` +\n Object.keys(visitedProfiles).join(\", \"), { logger: options.logger });\n }\n options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);\n const sourceCredsProvider = source_profile\n ? resolveProfileData(source_profile, profiles, options, callerClientConfig, {\n ...visitedProfiles,\n [source_profile]: true,\n }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}))\n : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(profileData)) {\n return sourceCredsProvider.then((creds) => client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n else {\n const params = {\n RoleArn: profileData.role_arn,\n RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: profileData.external_id,\n DurationSeconds: parseInt(profileData.duration_seconds || \"3600\", 10),\n };\n const { mfa_serial } = profileData;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new config.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then((creds) => client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n }\n};\nconst isCredentialSourceWithoutRoleArn = (section) => {\n return !section.role_arn && !!section.credential_source;\n};\n\nconst isLoginProfile = (data) => {\n return Boolean(data && data.login_session);\n};\nconst resolveLoginCredentials = async (profileName, options, callerClientConfig) => {\n const credentials = await credentialProviderLogin.fromLoginCredentials({\n ...options,\n profile: profileName,\n })({ callerClientConfig });\n return client.setCredentialFeature(credentials, \"CREDENTIALS_PROFILE_LOGIN\", \"AC\");\n};\n\nconst isProcessProfile = (arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\";\nconst resolveProcessCredentials = async (options, profile) => import('@aws-sdk/credential-provider-process').then(({ fromProcess }) => fromProcess({\n ...options,\n profile,\n})().then((creds) => client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_PROCESS\", \"v\")));\n\nconst resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {\n const { fromSSO } = await import('@aws-sdk/credential-provider-sso');\n return fromSSO({\n profile,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n clientConfig: options.clientConfig,\n })({\n callerClientConfig,\n }).then((creds) => {\n if (profileData.sso_session) {\n return client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n }\n else {\n return client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\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 isStaticCredsProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.aws_access_key_id === \"string\" &&\n typeof arg.aws_secret_access_key === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 &&\n [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1;\nconst resolveStaticCredentials = async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),\n ...(profile.aws_account_id && { accountId: profile.aws_account_id }),\n };\n return client.setCredentialFeature(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n};\n\nconst isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nconst resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => import('@aws-sdk/credential-provider-web-identity').then(({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n})({\n callerClientConfig,\n}).then((creds) => client.setCredentialFeature(creds, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\")));\n\nconst resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options, callerClientConfig);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options, callerClientConfig);\n }\n if (isLoginProfile(data)) {\n return resolveLoginCredentials(profileName, options, callerClientConfig);\n }\n throw new config.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });\n};\n\nconst fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await config.parseKnownFiles(init);\n return resolveProfileData(config.getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init, callerClientConfig);\n};\n\nexports.fromIni = fromIni;\n","'use strict';\n\nvar client = require('@aws-sdk/core/client');\nvar config = require('@smithy/core/config');\nvar protocols = require('@smithy/core/protocols');\nvar node_crypto = require('node:crypto');\nvar node_fs = require('node:fs');\nvar node_os = require('node:os');\nvar node_path = require('node:path');\n\nclass LoginCredentialsFetcher {\n profileData;\n init;\n callerClientConfig;\n static REFRESH_THRESHOLD = 5 * 60 * 1000;\n constructor(profileData, init, callerClientConfig) {\n this.profileData = profileData;\n this.init = init;\n this.callerClientConfig = callerClientConfig;\n }\n async loadCredentials() {\n const token = await this.loadToken();\n if (!token) {\n throw new config.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });\n }\n const accessToken = token.accessToken;\n const now = Date.now();\n const expiryTime = new Date(accessToken.expiresAt).getTime();\n const timeUntilExpiry = expiryTime - now;\n if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) {\n return this.refresh(token);\n }\n return {\n accessKeyId: accessToken.accessKeyId,\n secretAccessKey: accessToken.secretAccessKey,\n sessionToken: accessToken.sessionToken,\n accountId: accessToken.accountId,\n expiration: new Date(accessToken.expiresAt),\n };\n }\n get logger() {\n return this.init?.logger;\n }\n get loginSession() {\n return this.profileData.login_session;\n }\n async refresh(token) {\n const { SigninClient, CreateOAuth2TokenCommand } = await import('@aws-sdk/nested-clients/signin');\n const { logger, userAgentAppId } = this.callerClientConfig ?? {};\n const isH2 = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n };\n const requestHandler = isH2(this.callerClientConfig?.requestHandler)\n ? undefined\n : this.callerClientConfig?.requestHandler;\n const region = this.profileData.region ?? (await this.callerClientConfig?.region?.()) ?? process.env.AWS_REGION;\n const client = new SigninClient({\n credentials: {\n accessKeyId: \"\",\n secretAccessKey: \"\",\n },\n region,\n requestHandler,\n logger,\n userAgentAppId,\n ...this.init?.clientConfig,\n });\n this.createDPoPInterceptor(client.middlewareStack);\n const commandInput = {\n tokenInput: {\n clientId: token.clientId,\n refreshToken: token.refreshToken,\n grantType: \"refresh_token\",\n },\n };\n try {\n const response = await client.send(new CreateOAuth2TokenCommand(commandInput));\n const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};\n const { refreshToken, expiresIn } = response.tokenOutput ?? {};\n if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {\n throw new config.CredentialsProviderError(\"Token refresh response missing required fields\", {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n const expiresInMs = (expiresIn ?? 900) * 1000;\n const expiration = new Date(Date.now() + expiresInMs);\n const updatedToken = {\n ...token,\n accessToken: {\n ...token.accessToken,\n accessKeyId: accessKeyId,\n secretAccessKey: secretAccessKey,\n sessionToken: sessionToken,\n expiresAt: expiration.toISOString(),\n },\n refreshToken: refreshToken,\n };\n await this.saveToken(updatedToken);\n const newAccessToken = updatedToken.accessToken;\n return {\n accessKeyId: newAccessToken.accessKeyId,\n secretAccessKey: newAccessToken.secretAccessKey,\n sessionToken: newAccessToken.sessionToken,\n accountId: newAccessToken.accountId,\n expiration,\n };\n }\n catch (error) {\n if (error.name === \"AccessDeniedException\") {\n const errorType = error.error;\n let message;\n switch (errorType) {\n case \"TOKEN_EXPIRED\":\n message = \"Your session has expired. Please reauthenticate.\";\n break;\n case \"USER_CREDENTIALS_CHANGED\":\n message =\n \"Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.\";\n break;\n case \"INSUFFICIENT_PERMISSIONS\":\n message =\n \"Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.\";\n break;\n default:\n message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \\`aws login\\``;\n }\n throw new config.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false });\n }\n throw new config.CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });\n }\n }\n async loadToken() {\n const tokenFilePath = this.getTokenFilePath();\n try {\n let tokenData;\n try {\n tokenData = await config.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache });\n }\n catch {\n tokenData = await node_fs.promises.readFile(tokenFilePath, \"utf8\");\n }\n const token = JSON.parse(tokenData);\n const missingFields = [\"accessToken\", \"clientId\", \"refreshToken\", \"dpopKey\"].filter((k) => !token[k]);\n if (!token.accessToken?.accountId) {\n missingFields.push(\"accountId\");\n }\n if (missingFields.length > 0) {\n throw new config.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(\", \")}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n return token;\n }\n catch (error) {\n throw new config.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {\n logger: this.logger,\n tryNextLink: false,\n });\n }\n }\n async saveToken(token) {\n const tokenFilePath = this.getTokenFilePath();\n const directory = node_path.dirname(tokenFilePath);\n try {\n await node_fs.promises.mkdir(directory, { recursive: true });\n }\n catch (error) {\n }\n await node_fs.promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), \"utf8\");\n }\n getTokenFilePath() {\n const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? node_path.join(node_os.homedir(), \".aws\", \"login\", \"cache\");\n const loginSessionBytes = Buffer.from(this.loginSession, \"utf8\");\n const loginSessionSha256 = node_crypto.createHash(\"sha256\").update(loginSessionBytes).digest(\"hex\");\n return node_path.join(directory, `${loginSessionSha256}.json`);\n }\n derToRawSignature(derSignature) {\n let offset = 2;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const rLength = derSignature[offset++];\n let r = derSignature.subarray(offset, offset + rLength);\n offset += rLength;\n if (derSignature[offset] !== 0x02) {\n throw new Error(\"Invalid DER signature\");\n }\n offset++;\n const sLength = derSignature[offset++];\n let s = derSignature.subarray(offset, offset + sLength);\n r = r[0] === 0x00 ? r.subarray(1) : r;\n s = s[0] === 0x00 ? s.subarray(1) : s;\n const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);\n const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);\n return Buffer.concat([rPadded, sPadded]);\n }\n createDPoPInterceptor(middlewareStack) {\n middlewareStack.add((next) => async (args) => {\n if (protocols.HttpRequest.isInstance(args.request)) {\n const request = args.request;\n const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : \"\"}${request.path}`;\n const dpop = await this.generateDpop(request.method, actualEndpoint);\n request.headers = {\n ...request.headers,\n DPoP: dpop,\n };\n }\n return next(args);\n }, {\n step: \"finalizeRequest\",\n name: \"dpopInterceptor\",\n override: true,\n });\n }\n async generateDpop(method = \"POST\", endpoint) {\n const token = await this.loadToken();\n try {\n const privateKey = node_crypto.createPrivateKey({\n key: token.dpopKey,\n format: \"pem\",\n type: \"sec1\",\n });\n const publicKey = node_crypto.createPublicKey(privateKey);\n const publicDer = publicKey.export({ format: \"der\", type: \"spki\" });\n let pointStart = -1;\n for (let i = 0; i < publicDer.length; i++) {\n if (publicDer[i] === 0x04) {\n pointStart = i;\n break;\n }\n }\n const x = publicDer.slice(pointStart + 1, pointStart + 33);\n const y = publicDer.slice(pointStart + 33, pointStart + 65);\n const header = {\n alg: \"ES256\",\n typ: \"dpop+jwt\",\n jwk: {\n kty: \"EC\",\n crv: \"P-256\",\n x: x.toString(\"base64url\"),\n y: y.toString(\"base64url\"),\n },\n };\n const payload = {\n jti: crypto.randomUUID(),\n htm: method,\n htu: endpoint,\n iat: Math.floor(Date.now() / 1000),\n };\n const headerB64 = Buffer.from(JSON.stringify(header)).toString(\"base64url\");\n const payloadB64 = Buffer.from(JSON.stringify(payload)).toString(\"base64url\");\n const message = `${headerB64}.${payloadB64}`;\n const asn1Signature = node_crypto.sign(\"sha256\", Buffer.from(message), privateKey);\n const rawSignature = this.derToRawSignature(asn1Signature);\n const signatureB64 = rawSignature.toString(\"base64url\");\n return `${message}.${signatureB64}`;\n }\n catch (error) {\n throw new config.CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });\n }\n }\n}\n\nconst fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {\n init?.logger?.debug?.(\"@aws-sdk/credential-providers - fromLoginCredentials\");\n const profiles = await config.parseKnownFiles(init || {});\n const profileName = config.getProfileName({\n profile: init?.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile?.login_session) {\n throw new config.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {\n tryNextLink: true,\n logger: init?.logger,\n });\n }\n const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);\n const credentials = await fetcher.loadCredentials();\n return client.setCredentialFeature(credentials, \"CREDENTIALS_LOGIN\", \"AD\");\n};\n\nexports.fromLoginCredentials = fromLoginCredentials;\n"],"names":[],"sourceRoot":""}
@@ -9,8 +9,7 @@ export const modules = {
9
9
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10
10
  exports.fromTokenFile = void 0;
11
11
  const client_1 = __webpack_require__(5152);
12
- const property_provider_1 = __webpack_require__(71238);
13
- const shared_ini_file_loader_1 = __webpack_require__(94964);
12
+ const config_1 = __webpack_require__(47291);
14
13
  const node_fs_1 = __webpack_require__(73024);
15
14
  const fromWebToken_1 = __webpack_require__(34453);
16
15
  const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
@@ -22,13 +21,13 @@ const fromTokenFile = (init = {}) => async (awsIdentityProperties) => {
22
21
  const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];
23
22
  const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];
24
23
  if (!webIdentityTokenFile || !roleArn) {
25
- throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified", {
24
+ throw new config_1.CredentialsProviderError("Web identity configuration not specified", {
26
25
  logger: init.logger,
27
26
  });
28
27
  }
29
28
  const credentials = await (0, fromWebToken_1.fromWebToken)({
30
29
  ...init,
31
- webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??
30
+ webIdentityToken: config_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??
32
31
  (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
33
32
  roleArn,
34
33
  roleSessionName,
@@ -44,42 +43,9 @@ exports.fromTokenFile = fromTokenFile;
44
43
  /***/ }),
45
44
 
46
45
  /***/ 34453:
47
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
46
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
48
47
 
49
48
 
50
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
51
- if (k2 === undefined) k2 = k;
52
- var desc = Object.getOwnPropertyDescriptor(m, k);
53
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
54
- desc = { enumerable: true, get: function() { return m[k]; } };
55
- }
56
- Object.defineProperty(o, k2, desc);
57
- }) : (function(o, m, k, k2) {
58
- if (k2 === undefined) k2 = k;
59
- o[k2] = m[k];
60
- }));
61
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
62
- Object.defineProperty(o, "default", { enumerable: true, value: v });
63
- }) : function(o, v) {
64
- o["default"] = v;
65
- });
66
- var __importStar = (this && this.__importStar) || (function () {
67
- var ownKeys = function(o) {
68
- ownKeys = Object.getOwnPropertyNames || function (o) {
69
- var ar = [];
70
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
71
- return ar;
72
- };
73
- return ownKeys(o);
74
- };
75
- return function (mod) {
76
- if (mod && mod.__esModule) return mod;
77
- var result = {};
78
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
79
- __setModuleDefault(result, mod);
80
- return result;
81
- };
82
- })();
83
49
  Object.defineProperty(exports, "__esModule", ({ value: true }));
84
50
  exports.fromWebToken = void 0;
85
51
  const fromWebToken = (init) => async (awsIdentityProperties) => {
@@ -87,7 +53,7 @@ const fromWebToken = (init) => async (awsIdentityProperties) => {
87
53
  const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
88
54
  let { roleAssumerWithWebIdentity } = init;
89
55
  if (!roleAssumerWithWebIdentity) {
90
- const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(__webpack_require__(1136)));
56
+ const { getDefaultRoleAssumerWithWebIdentity } = await __webpack_require__.e(/* import() */ 136).then(__webpack_require__.t.bind(__webpack_require__, 1136, 19));
91
57
  roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
92
58
  ...init.clientConfig,
93
59
  credentialProviderLogger: init.logger,
@@ -1 +1 @@
1
- {"version":3,"file":"956.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;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;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/credential-provider-web-identity/dist-cjs/fromTokenFile.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTokenFile = void 0;\nconst client_1 = require(\"@aws-sdk/core/client\");\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst shared_ini_file_loader_1 = require(\"@smithy/shared-ini-file-loader\");\nconst node_fs_1 = require(\"node:fs\");\nconst fromWebToken_1 = require(\"./fromWebToken\");\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nconst fromTokenFile = (init = {}) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new property_provider_1.CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n const credentials = await (0, fromWebToken_1.fromWebToken)({\n ...init,\n webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??\n (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })(awsIdentityProperties);\n if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {\n (0, client_1.setCredentialFeature)(credentials, \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\", \"h\");\n }\n return credentials;\n};\nexports.fromTokenFile = fromTokenFile;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromWebToken = void 0;\nconst fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(require(\"@aws-sdk/nested-clients/sts\")));\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\nexports.fromWebToken = fromWebToken;\n","'use strict';\n\nvar fromTokenFile = require('./fromTokenFile');\nvar fromWebToken = require('./fromWebToken');\n\n\n\nObject.prototype.hasOwnProperty.call(fromTokenFile, '__proto__') &&\n\t!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n\tObject.defineProperty(exports, '__proto__', {\n\t\tenumerable: true,\n\t\tvalue: fromTokenFile['__proto__']\n\t});\n\nObject.keys(fromTokenFile).forEach(function (k) {\n\tif (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = fromTokenFile[k];\n});\nObject.prototype.hasOwnProperty.call(fromWebToken, '__proto__') &&\n\t!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n\tObject.defineProperty(exports, '__proto__', {\n\t\tenumerable: true,\n\t\tvalue: fromWebToken['__proto__']\n\t});\n\nObject.keys(fromWebToken).forEach(function (k) {\n\tif (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = fromWebToken[k];\n});\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"956.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;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;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/credential-provider-web-identity/dist-cjs/fromTokenFile.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTokenFile = void 0;\nconst client_1 = require(\"@aws-sdk/core/client\");\nconst config_1 = require(\"@smithy/core/config\");\nconst node_fs_1 = require(\"node:fs\");\nconst fromWebToken_1 = require(\"./fromWebToken\");\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nconst fromTokenFile = (init = {}) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new config_1.CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n const credentials = await (0, fromWebToken_1.fromWebToken)({\n ...init,\n webIdentityToken: config_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??\n (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })(awsIdentityProperties);\n if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {\n (0, client_1.setCredentialFeature)(credentials, \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\", \"h\");\n }\n return credentials;\n};\nexports.fromTokenFile = fromTokenFile;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromWebToken = void 0;\nconst fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await import(\"@aws-sdk/nested-clients/sts\");\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\nexports.fromWebToken = fromWebToken;\n","'use strict';\n\nvar fromTokenFile = require('./fromTokenFile');\nvar fromWebToken = require('./fromWebToken');\n\n\n\nObject.prototype.hasOwnProperty.call(fromTokenFile, '__proto__') &&\n\t!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n\tObject.defineProperty(exports, '__proto__', {\n\t\tenumerable: true,\n\t\tvalue: fromTokenFile['__proto__']\n\t});\n\nObject.keys(fromTokenFile).forEach(function (k) {\n\tif (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = fromTokenFile[k];\n});\nObject.prototype.hasOwnProperty.call(fromWebToken, '__proto__') &&\n\t!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n\tObject.defineProperty(exports, '__proto__', {\n\t\tenumerable: true,\n\t\tvalue: fromWebToken['__proto__']\n\t});\n\nObject.keys(fromWebToken).forEach(function (k) {\n\tif (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = fromWebToken[k];\n});\n"],"names":[],"sourceRoot":""}