@aws-sdk/token-providers
Advanced tools
Comparing version 3.713.0 to 3.714.0
@@ -106,16 +106,16 @@ "use strict"; | ||
var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); | ||
var fromSso = /* @__PURE__ */ __name((_init = {}) => async (awsIdentityProperties) => { | ||
var _a, _b, _c; | ||
var fromSso = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => { | ||
var _a; | ||
const init = { | ||
..._init, | ||
...((_a = awsIdentityProperties == null ? void 0 : awsIdentityProperties.callerClientConfig) == null ? void 0 : _a.region) ? { | ||
parentClientConfig: { | ||
region: (_b = awsIdentityProperties == null ? void 0 : awsIdentityProperties.callerClientConfig) == null ? void 0 : _b.region, | ||
..._init.parentClientConfig | ||
} | ||
} : {} | ||
parentClientConfig: { | ||
...callerClientConfig, | ||
..._init.parentClientConfig | ||
} | ||
}; | ||
(_c = init.logger) == null ? void 0 : _c.debug("@aws-sdk/token-providers - fromSso"); | ||
(_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/token-providers - fromSso"); | ||
const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); | ||
const profileName = (0, import_shared_ini_file_loader.getProfileName)(init); | ||
const profileName = (0, import_shared_ini_file_loader.getProfileName)({ | ||
profile: init.profile ?? (callerClientConfig == null ? void 0 : callerClientConfig.profile) | ||
}); | ||
const profile = profiles[profileName]; | ||
@@ -122,0 +122,0 @@ if (!profile) { |
@@ -9,17 +9,15 @@ import { TokenProviderError } from "@smithy/property-provider"; | ||
const lastRefreshAttemptTime = new Date(0); | ||
export const fromSso = (_init = {}) => async (awsIdentityProperties) => { | ||
export const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => { | ||
const init = { | ||
..._init, | ||
...(awsIdentityProperties?.callerClientConfig?.region | ||
? { | ||
parentClientConfig: { | ||
region: awsIdentityProperties?.callerClientConfig?.region, | ||
..._init.parentClientConfig, | ||
}, | ||
} | ||
: {}), | ||
parentClientConfig: { | ||
...callerClientConfig, | ||
..._init.parentClientConfig, | ||
}, | ||
}; | ||
init.logger?.debug("@aws-sdk/token-providers - fromSso"); | ||
const profiles = await parseKnownFiles(init); | ||
const profileName = getProfileName(init); | ||
const profileName = getProfileName({ | ||
profile: init.profile ?? callerClientConfig?.profile, | ||
}); | ||
const profile = profiles[profileName]; | ||
@@ -26,0 +24,0 @@ if (!profile) { |
{ | ||
"name": "@aws-sdk/token-providers", | ||
"version": "3.713.0", | ||
"version": "3.714.0", | ||
"description": "A collection of token providers", | ||
@@ -30,3 +30,3 @@ "main": "./dist-cjs/index.js", | ||
"dependencies": { | ||
"@aws-sdk/types": "3.713.0", | ||
"@aws-sdk/types": "3.714.0", | ||
"@smithy/property-provider": "^3.1.11", | ||
@@ -46,3 +46,3 @@ "@smithy/shared-ini-file-loader": "^3.1.12", | ||
"peerDependencies": { | ||
"@aws-sdk/client-sso-oidc": "^3.713.0" | ||
"@aws-sdk/client-sso-oidc": "^3.714.0" | ||
}, | ||
@@ -49,0 +49,0 @@ "types": "./dist-types/index.d.ts", |
36358
485
+ Added@aws-sdk/types@3.714.0(transitive)
- Removed@aws-sdk/types@3.713.0(transitive)
Updated@aws-sdk/types@3.714.0