@aws-sdk/credential-provider-ini 3.502.0 → 3.503.1

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,11 @@ var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile)
130
130
  ), "resolveProcessCredentials");
131
131
 
132
132
  // src/resolveSsoCredentials.ts
133
- var resolveSsoCredentials = /* @__PURE__ */ __name(async (data) => {
134
- const { fromSSO, validateSsoProfile } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-sso")));
135
- const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = validateSsoProfile(data);
133
+ var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => {
134
+ const { fromSSO } = await Promise.resolve().then(() => __toESM(require("@aws-sdk/credential-provider-sso")));
136
135
  return fromSSO({
137
- ssoStartUrl: sso_start_url,
138
- ssoAccountId: sso_account_id,
139
- ssoSession: sso_session,
140
- ssoRegion: sso_region,
141
- ssoRoleName: sso_role_name
136
+ profile,
137
+ logger: options.logger
142
138
  })();
143
139
  }, "resolveSsoCredentials");
144
140
  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");
@@ -163,7 +159,8 @@ var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, optio
163
159
  webIdentityTokenFile: profile.web_identity_token_file,
164
160
  roleArn: profile.role_arn,
165
161
  roleSessionName: profile.role_session_name,
166
- roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity
162
+ roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
163
+ logger: options.logger
167
164
  })()
168
165
  ), "resolveWebIdentityCredentials");
169
166
 
@@ -186,7 +183,7 @@ var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, op
186
183
  return resolveProcessCredentials(options, profileName);
187
184
  }
188
185
  if (isSsoProfile(data)) {
189
- return await resolveSsoCredentials(data);
186
+ return await resolveSsoCredentials(profileName, options);
190
187
  }
191
188
  throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
192
189
  }, "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(data);
25
+ return await resolveSsoCredentials(profileName, options);
26
26
  }
27
27
  throw new CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
28
28
  };
@@ -1,12 +1,8 @@
1
- export const resolveSsoCredentials = async (data) => {
2
- const { fromSSO, validateSsoProfile } = await import("@aws-sdk/credential-provider-sso");
3
- const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = validateSsoProfile(data);
1
+ export const resolveSsoCredentials = async (profile, options = {}) => {
2
+ const { fromSSO } = await import("@aws-sdk/credential-provider-sso");
4
3
  return fromSSO({
5
- ssoStartUrl: sso_start_url,
6
- ssoAccountId: sso_account_id,
7
- ssoSession: sso_session,
8
- ssoRegion: sso_region,
9
- ssoRoleName: sso_role_name,
4
+ profile,
5
+ logger: options.logger,
10
6
  })();
11
7
  };
12
8
  export const isSsoProfile = (arg) => arg &&
@@ -8,4 +8,5 @@ export const resolveWebIdentityCredentials = async (profile, options) => import(
8
8
  roleArn: profile.role_arn,
9
9
  roleSessionName: profile.role_session_name,
10
10
  roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
11
+ logger: options.logger,
11
12
  })());
@@ -1,9 +1,10 @@
1
1
  import type { SsoProfile } from "@aws-sdk/credential-provider-sso";
2
+ import type { CredentialProviderOptions } from "@aws-sdk/types";
2
3
  import type { Profile } from "@smithy/types";
3
4
  /**
4
5
  * @internal
5
6
  */
6
- export declare const resolveSsoCredentials: (data: Partial<SsoProfile>) => Promise<import("@smithy/types").AwsCredentialIdentity>;
7
+ export declare const resolveSsoCredentials: (profile: string, options?: CredentialProviderOptions) => Promise<import("@aws-sdk/types").AwsCredentialIdentity>;
7
8
  /**
8
9
  * @internal
9
10
  * duplicated from \@aws-sdk/credential-provider-sso to defer import.
@@ -1,6 +1,8 @@
1
1
  import { SsoProfile } from "@aws-sdk/credential-provider-sso";
2
+ import { CredentialProviderOptions } from "@aws-sdk/types";
2
3
  import { Profile } from "@smithy/types";
3
4
  export declare const resolveSsoCredentials: (
4
- data: Partial<SsoProfile>
5
- ) => Promise<import("@smithy/types").AwsCredentialIdentity>;
5
+ profile: string,
6
+ options?: CredentialProviderOptions
7
+ ) => Promise<import("@aws-sdk/types").AwsCredentialIdentity>;
6
8
  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.502.0",
3
+ "version": "3.503.1",
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",
@@ -27,7 +27,7 @@
27
27
  "@aws-sdk/client-sts": "3.502.0",
28
28
  "@aws-sdk/credential-provider-env": "3.502.0",
29
29
  "@aws-sdk/credential-provider-process": "3.502.0",
30
- "@aws-sdk/credential-provider-sso": "3.502.0",
30
+ "@aws-sdk/credential-provider-sso": "3.503.1",
31
31
  "@aws-sdk/credential-provider-web-identity": "3.502.0",
32
32
  "@aws-sdk/types": "3.502.0",
33
33
  "@smithy/credential-provider-imds": "^2.2.1",