@aws-sdk/credential-provider-ini 3.620.0 → 3.621.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
@@ -180,7 +180,7 @@ var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {})
180
180
  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");
181
181
 
182
182
  // src/resolveStaticCredentials.ts
183
- var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1, "isStaticCredsProfile");
183
+ var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile");
184
184
  var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => {
185
185
  var _a;
186
186
  (_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
@@ -188,7 +188,8 @@ var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => {
188
188
  accessKeyId: profile.aws_access_key_id,
189
189
  secretAccessKey: profile.aws_secret_access_key,
190
190
  sessionToken: profile.aws_session_token,
191
- credentialScope: profile.aws_credential_scope
191
+ ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
192
+ ...profile.aws_account_id && { accountId: profile.aws_account_id }
192
193
  });
193
194
  }, "resolveStaticCredentials");
194
195
 
@@ -2,13 +2,15 @@ export const isStaticCredsProfile = (arg) => Boolean(arg) &&
2
2
  typeof arg === "object" &&
3
3
  typeof arg.aws_access_key_id === "string" &&
4
4
  typeof arg.aws_secret_access_key === "string" &&
5
- ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1;
5
+ ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 &&
6
+ ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
6
7
  export const resolveStaticCredentials = (profile, options) => {
7
8
  options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
8
9
  return Promise.resolve({
9
10
  accessKeyId: profile.aws_access_key_id,
10
11
  secretAccessKey: profile.aws_secret_access_key,
11
12
  sessionToken: profile.aws_session_token,
12
- credentialScope: profile.aws_credential_scope,
13
+ ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),
14
+ ...(profile.aws_account_id && { accountId: profile.aws_account_id }),
13
15
  });
14
16
  };
@@ -8,6 +8,7 @@ export interface StaticCredsProfile extends Profile {
8
8
  aws_secret_access_key: string;
9
9
  aws_session_token?: string;
10
10
  aws_credential_scope?: string;
11
+ aws_account_id?: string;
11
12
  }
12
13
  /**
13
14
  * @internal
@@ -5,6 +5,7 @@ export interface StaticCredsProfile extends Profile {
5
5
  aws_secret_access_key: string;
6
6
  aws_session_token?: string;
7
7
  aws_credential_scope?: string;
8
+ aws_account_id?: string;
8
9
  }
9
10
  export declare const isStaticCredsProfile: (
10
11
  arg: any
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-ini",
3
- "version": "3.620.0",
3
+ "version": "3.621.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",
@@ -24,11 +24,11 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@aws-sdk/credential-provider-env": "3.609.0",
28
- "@aws-sdk/credential-provider-http": "3.620.0",
29
- "@aws-sdk/credential-provider-process": "3.614.0",
30
- "@aws-sdk/credential-provider-sso": "3.620.0",
31
- "@aws-sdk/credential-provider-web-identity": "3.609.0",
27
+ "@aws-sdk/credential-provider-env": "3.620.1",
28
+ "@aws-sdk/credential-provider-http": "3.621.0",
29
+ "@aws-sdk/credential-provider-process": "3.620.1",
30
+ "@aws-sdk/credential-provider-sso": "3.621.0",
31
+ "@aws-sdk/credential-provider-web-identity": "3.621.0",
32
32
  "@aws-sdk/types": "3.609.0",
33
33
  "@smithy/credential-provider-imds": "^3.2.0",
34
34
  "@smithy/property-provider": "^3.1.3",
@@ -45,7 +45,7 @@
45
45
  "typescript": "~4.9.5"
46
46
  },
47
47
  "peerDependencies": {
48
- "@aws-sdk/client-sts": "^3.620.0"
48
+ "@aws-sdk/client-sts": "^3.621.0"
49
49
  },
50
50
  "types": "./dist-types/index.d.ts",
51
51
  "engines": {