@aws-sdk/credential-provider-cognito-identity 3.54.1 → 3.55.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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.55.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.54.1...v3.55.0) (2022-03-21)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/credential-provider-cognito-identity
9
+
10
+
11
+
12
+
13
+
6
14
  ## [3.54.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.54.0...v3.54.1) (2022-03-15)
7
15
 
8
16
  **Note:** Version bump only for package @aws-sdk/credential-provider-cognito-identity
@@ -9,7 +9,7 @@ function fromCognitoIdentity(parameters) {
9
9
  const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(), Expiration, SecretKey = throwOnMissingSecretKey(), SessionToken, } = throwOnMissingCredentials(), } = await parameters.client.send(new client_cognito_identity_1.GetCredentialsForIdentityCommand({
10
10
  CustomRoleArn: parameters.customRoleArn,
11
11
  IdentityId: parameters.identityId,
12
- Logins: parameters.logins ? await resolveLogins_1.resolveLogins(parameters.logins) : undefined,
12
+ Logins: parameters.logins ? await (0, resolveLogins_1.resolveLogins)(parameters.logins) : undefined,
13
13
  }));
14
14
  return {
15
15
  identityId: parameters.identityId,
@@ -6,7 +6,7 @@ const property_provider_1 = require("@aws-sdk/property-provider");
6
6
  const fromCognitoIdentity_1 = require("./fromCognitoIdentity");
7
7
  const localStorage_1 = require("./localStorage");
8
8
  const resolveLogins_1 = require("./resolveLogins");
9
- function fromCognitoIdentityPool({ accountId, cache = localStorage_1.localStorage(), client, customRoleArn, identityPoolId, logins, userIdentifier = !logins || Object.keys(logins).length === 0 ? "ANONYMOUS" : undefined, }) {
9
+ function fromCognitoIdentityPool({ accountId, cache = (0, localStorage_1.localStorage)(), client, customRoleArn, identityPoolId, logins, userIdentifier = !logins || Object.keys(logins).length === 0 ? "ANONYMOUS" : undefined, }) {
10
10
  const cacheKey = userIdentifier ? `aws:cognito-identity-credentials:${identityPoolId}:${userIdentifier}` : undefined;
11
11
  let provider = async () => {
12
12
  let identityId = cacheKey && (await cache.getItem(cacheKey));
@@ -14,14 +14,14 @@ function fromCognitoIdentityPool({ accountId, cache = localStorage_1.localStorag
14
14
  const { IdentityId = throwOnMissingId() } = await client.send(new client_cognito_identity_1.GetIdCommand({
15
15
  AccountId: accountId,
16
16
  IdentityPoolId: identityPoolId,
17
- Logins: logins ? await resolveLogins_1.resolveLogins(logins) : undefined,
17
+ Logins: logins ? await (0, resolveLogins_1.resolveLogins)(logins) : undefined,
18
18
  }));
19
19
  identityId = IdentityId;
20
20
  if (cacheKey) {
21
21
  Promise.resolve(cache.setItem(cacheKey, identityId)).catch(() => { });
22
22
  }
23
23
  }
24
- provider = fromCognitoIdentity_1.fromCognitoIdentity({
24
+ provider = (0, fromCognitoIdentity_1.fromCognitoIdentity)({
25
25
  client,
26
26
  customRoleArn,
27
27
  logins,
@@ -7,7 +7,7 @@ import { resolveLogins } from "./resolveLogins";
7
7
  export function fromCognitoIdentityPool(_a) {
8
8
  var _this = this;
9
9
  var accountId = _a.accountId, _b = _a.cache, cache = _b === void 0 ? localStorage() : _b, client = _a.client, customRoleArn = _a.customRoleArn, identityPoolId = _a.identityPoolId, logins = _a.logins, _c = _a.userIdentifier, userIdentifier = _c === void 0 ? !logins || Object.keys(logins).length === 0 ? "ANONYMOUS" : undefined : _c;
10
- var cacheKey = userIdentifier ? "aws:cognito-identity-credentials:" + identityPoolId + ":" + userIdentifier : undefined;
10
+ var cacheKey = userIdentifier ? "aws:cognito-identity-credentials:".concat(identityPoolId, ":").concat(userIdentifier) : undefined;
11
11
  var provider = function () { return __awaiter(_this, void 0, void 0, function () {
12
12
  var identityId, _a, _b, IdentityId, _c, _d, _e, _f;
13
13
  var _g;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-cognito-identity",
3
- "version": "3.54.1",
3
+ "version": "3.55.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,10 +20,10 @@
20
20
  },
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
- "@aws-sdk/client-cognito-identity": "3.54.1",
24
- "@aws-sdk/property-provider": "3.54.1",
25
- "@aws-sdk/types": "3.54.1",
26
- "tslib": "^2.3.0"
23
+ "@aws-sdk/client-cognito-identity": "3.55.0",
24
+ "@aws-sdk/property-provider": "3.55.0",
25
+ "@aws-sdk/types": "3.55.0",
26
+ "tslib": "^2.3.1"
27
27
  },
28
28
  "engines": {
29
29
  "node": ">= 12.0.0"
@@ -50,6 +50,6 @@
50
50
  "downlevel-dts": "0.7.0",
51
51
  "rimraf": "3.0.2",
52
52
  "typedoc": "0.19.2",
53
- "typescript": "~4.3.5"
53
+ "typescript": "~4.6.2"
54
54
  }
55
55
  }