@aws-sdk/credential-provider-ini 3.502.0 → 3.503.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js
CHANGED
|
@@ -130,15 +130,10 @@ var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile)
|
|
|
130
130
|
), "resolveProcessCredentials");
|
|
131
131
|
|
|
132
132
|
// src/resolveSsoCredentials.ts
|
|
133
|
-
var resolveSsoCredentials = /* @__PURE__ */ __name(async (
|
|
134
|
-
const { fromSSO
|
|
135
|
-
const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = validateSsoProfile(data);
|
|
133
|
+
var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile) => {
|
|
134
|
+
const { fromSSO } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-sso")));
|
|
136
135
|
return fromSSO({
|
|
137
|
-
|
|
138
|
-
ssoAccountId: sso_account_id,
|
|
139
|
-
ssoSession: sso_session,
|
|
140
|
-
ssoRegion: sso_region,
|
|
141
|
-
ssoRoleName: sso_role_name
|
|
136
|
+
profile
|
|
142
137
|
})();
|
|
143
138
|
}, "resolveSsoCredentials");
|
|
144
139
|
var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
|
|
@@ -186,7 +181,7 @@ var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, op
|
|
|
186
181
|
return resolveProcessCredentials(options, profileName);
|
|
187
182
|
}
|
|
188
183
|
if (isSsoProfile(data)) {
|
|
189
|
-
return await resolveSsoCredentials(
|
|
184
|
+
return await resolveSsoCredentials(profileName);
|
|
190
185
|
}
|
|
191
186
|
throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
|
|
192
187
|
}, "resolveProfileData");
|
|
@@ -22,7 +22,7 @@ export const resolveProfileData = async (profileName, profiles, options, visited
|
|
|
22
22
|
return resolveProcessCredentials(options, profileName);
|
|
23
23
|
}
|
|
24
24
|
if (isSsoProfile(data)) {
|
|
25
|
-
return await resolveSsoCredentials(
|
|
25
|
+
return await resolveSsoCredentials(profileName);
|
|
26
26
|
}
|
|
27
27
|
throw new CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
|
|
28
28
|
};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
export const resolveSsoCredentials = async (
|
|
2
|
-
const { fromSSO
|
|
3
|
-
const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = validateSsoProfile(data);
|
|
1
|
+
export const resolveSsoCredentials = async (profile) => {
|
|
2
|
+
const { fromSSO } = await import("@aws-sdk/credential-provider-sso");
|
|
4
3
|
return fromSSO({
|
|
5
|
-
|
|
6
|
-
ssoAccountId: sso_account_id,
|
|
7
|
-
ssoSession: sso_session,
|
|
8
|
-
ssoRegion: sso_region,
|
|
9
|
-
ssoRoleName: sso_role_name,
|
|
4
|
+
profile,
|
|
10
5
|
})();
|
|
11
6
|
};
|
|
12
7
|
export const isSsoProfile = (arg) => arg &&
|
|
@@ -3,7 +3,7 @@ import type { Profile } from "@smithy/types";
|
|
|
3
3
|
/**
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
6
|
-
export declare const resolveSsoCredentials: (
|
|
6
|
+
export declare const resolveSsoCredentials: (profile: string) => Promise<import("@smithy/types").AwsCredentialIdentity>;
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
9
9
|
* duplicated from \@aws-sdk/credential-provider-sso to defer import.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SsoProfile } from "@aws-sdk/credential-provider-sso";
|
|
2
2
|
import { Profile } from "@smithy/types";
|
|
3
3
|
export declare const resolveSsoCredentials: (
|
|
4
|
-
|
|
4
|
+
profile: string
|
|
5
5
|
) => Promise<import("@smithy/types").AwsCredentialIdentity>;
|
|
6
6
|
export declare const isSsoProfile: (arg: Profile) => arg is Partial<SsoProfile>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-ini",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.503.0",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from ~/.aws/credentials and ~/.aws/config",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|