@aws-amplify/auth 6.11.6-unstable.cde36a7.0 → 6.11.6

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.
@@ -5,9 +5,7 @@ export type TokenRefresher = ({ tokens, authConfig, username, }: {
5
5
  authConfig?: AuthConfig;
6
6
  username: string;
7
7
  }) => Promise<CognitoAuthTokens>;
8
- export type AuthKeys<AuthKey extends string> = {
9
- [Key in AuthKey]: string;
10
- };
8
+ export type AuthKeys<AuthKey extends string> = Record<AuthKey, string>;
11
9
  export declare const AuthTokenStorageKeys: {
12
10
  accessToken: string;
13
11
  idToken: string;
@@ -16,9 +16,7 @@ export declare enum AuthErrorTypes {
16
16
  AutoSignInError = "autoSignInError",
17
17
  OAuthSignInError = "oauthSignInError"
18
18
  }
19
- export type AuthErrorMessages = {
20
- [key in AuthErrorTypes]: AuthErrorMessage;
21
- };
19
+ export type AuthErrorMessages = Record<AuthErrorTypes, AuthErrorMessage>;
22
20
  export interface AuthErrorMessage {
23
21
  message: string;
24
22
  log?: string;
@@ -201,9 +201,7 @@ export type AuthNextSignInStep<UserAttributeKey extends AuthUserAttributeKey = A
201
201
  /**
202
202
  * Key/value pairs describing a user attributes.
203
203
  */
204
- export type AuthUserAttributes<UserAttributeKey extends AuthUserAttributeKey = AuthUserAttributeKey> = {
205
- [Attribute in UserAttributeKey]?: string;
206
- };
204
+ export type AuthUserAttributes<UserAttributeKey extends AuthUserAttributeKey = AuthUserAttributeKey> = Partial<Record<UserAttributeKey, string>>;
207
205
  /**
208
206
  * The interface of a user attribute.
209
207
  */
@@ -16,6 +16,4 @@ export interface AuthUpdateUserAttributeOutput<UserAttributeKey extends AuthUser
16
16
  isUpdated: boolean;
17
17
  nextStep: AuthNextUpdateAttributeStep<UserAttributeKey>;
18
18
  }
19
- export type AuthUpdateUserAttributesOutput<UserAttributeKey extends AuthUserAttributeKey = AuthUserAttributeKey> = {
20
- [authKey in UserAttributeKey]: AuthUpdateUserAttributeOutput<UserAttributeKey>;
21
- };
19
+ export type AuthUpdateUserAttributesOutput<UserAttributeKey extends AuthUserAttributeKey = AuthUserAttributeKey> = Record<UserAttributeKey, AuthUpdateUserAttributeOutput<UserAttributeKey>>;
package/package.json CHANGED
@@ -1,108 +1,108 @@
1
1
  {
2
- "name": "@aws-amplify/auth",
3
- "version": "6.11.6-unstable.cde36a7.0+cde36a7",
4
- "description": "Auth category of aws-amplify",
5
- "main": "./dist/cjs/index.js",
6
- "module": "./dist/esm/index.mjs",
7
- "typings": "./dist/esm/index.d.ts",
8
- "react-native": "./src/index.ts",
9
- "sideEffects": [
10
- "./dist/cjs/providers/cognito/apis/signInWithRedirect.js",
11
- "./dist/esm/providers/cognito/apis/signInWithRedirect.mjs",
12
- "./dist/cjs/providers/cognito/utils/oauth/enableOAuthListener.js",
13
- "./dist/esm/providers/cognito/utils/oauth/enableOAuthListener.mjs"
14
- ],
15
- "publishConfig": {
16
- "access": "public"
17
- },
18
- "scripts": {
19
- "test": "yarn lint --fix && jest -w 1 --coverage --logHeapUsage",
20
- "build-with-test": "npm test && npm run build",
21
- "build:umd": "webpack && webpack --config ./webpack.config.dev.js",
22
- "build:esm-cjs": "rollup --forceExit -c rollup.config.mjs",
23
- "build:watch": "npm run build:esm-cjs -- --watch",
24
- "build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
25
- "clean": "npm run clean:size && rimraf lib-esm lib dist",
26
- "clean:size": "rimraf dual-publish-tmp tmp*",
27
- "format": "echo \"Not implemented\"",
28
- "lint": "eslint '**/*.{ts,tsx}' && npm run ts-coverage",
29
- "lint:fix": "eslint '**/*.{ts,tsx}' --fix",
30
- "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 91.18"
31
- },
32
- "typesVersions": {
33
- ">=4.2": {
34
- "cognito": [
35
- "./dist/esm/providers/cognito/index.d.ts"
36
- ],
37
- "cognito/server": [
38
- "./dist/esm/providers/cognito/apis/server/index.d.ts"
39
- ],
40
- "server": [
41
- "./dist/esm/server.d.ts"
42
- ]
43
- }
44
- },
45
- "exports": {
46
- ".": {
47
- "types": "./dist/esm/index.d.ts",
48
- "import": "./dist/esm/index.mjs",
49
- "require": "./dist/cjs/index.js",
50
- "react-native": "./src/index.ts"
51
- },
52
- "./cognito": {
53
- "types": "./dist/esm/providers/cognito/index.d.ts",
54
- "import": "./dist/esm/providers/cognito/index.mjs",
55
- "require": "./dist/cjs/providers/cognito/index.js",
56
- "react-native": "./src/providers/cognito/index.ts"
57
- },
58
- "./cognito/server": {
59
- "types": "./dist/esm/providers/cognito/apis/server/index.d.ts",
60
- "import": "./dist/esm/providers/cognito/apis/server/index.mjs",
61
- "require": "./dist/cjs/providers/cognito/apis/server/index.js"
62
- },
63
- "./server": {
64
- "types": "./dist/esm/server.d.ts",
65
- "import": "./dist/esm/server.mjs",
66
- "require": "./dist/cjs/server.js"
67
- },
68
- "./enable-oauth-listener": {
69
- "types": "./dist/esm/providers/cognito/utils/oauth/enableOAuthListener.d.ts",
70
- "import": "./dist/esm/providers/cognito/utils/oauth/enableOAuthListener.mjs",
71
- "require": "./dist/cjs/providers/cognito/utils/oauth/enableOAuthListener.js"
72
- },
73
- "./package.json": "./package.json"
74
- },
75
- "repository": {
76
- "type": "git",
77
- "url": "https://github.com/aws-amplify/amplify-js.git"
78
- },
79
- "author": "Amazon Web Services",
80
- "license": "Apache-2.0",
81
- "bugs": {
82
- "url": "https://github.com/aws/aws-amplify/issues"
83
- },
84
- "homepage": "https://aws-amplify.github.io/",
85
- "files": [
86
- "dist/cjs",
87
- "dist/esm",
88
- "src",
89
- "cognito",
90
- "server",
91
- "enable-oauth-listener"
92
- ],
93
- "dependencies": {
94
- "@aws-crypto/sha256-js": "5.2.0",
95
- "@smithy/types": "^3.3.0",
96
- "tslib": "^2.5.0"
97
- },
98
- "peerDependencies": {
99
- "@aws-amplify/core": "6.10.6-unstable.cde36a7.0+cde36a7"
100
- },
101
- "devDependencies": {
102
- "@aws-amplify/core": "6.10.6-unstable.cde36a7.0+cde36a7",
103
- "@aws-amplify/react-native": "1.1.8-unstable.cde36a7.0+cde36a7",
104
- "@jest/test-sequencer": "^29.7.0",
105
- "typescript": "5.0.2"
106
- },
107
- "gitHead": "cde36a7b5ca5254a6821db46832a80c9e0ea54fd"
2
+ "name": "@aws-amplify/auth",
3
+ "version": "6.11.6",
4
+ "description": "Auth category of aws-amplify",
5
+ "main": "./dist/cjs/index.js",
6
+ "module": "./dist/esm/index.mjs",
7
+ "typings": "./dist/esm/index.d.ts",
8
+ "react-native": "./src/index.ts",
9
+ "sideEffects": [
10
+ "./dist/cjs/providers/cognito/apis/signInWithRedirect.js",
11
+ "./dist/esm/providers/cognito/apis/signInWithRedirect.mjs",
12
+ "./dist/cjs/providers/cognito/utils/oauth/enableOAuthListener.js",
13
+ "./dist/esm/providers/cognito/utils/oauth/enableOAuthListener.mjs"
14
+ ],
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "scripts": {
19
+ "test": "yarn lint --fix && jest -w 1 --coverage --logHeapUsage",
20
+ "build-with-test": "npm test && npm run build",
21
+ "build:umd": "webpack && webpack --config ./webpack.config.dev.js",
22
+ "build:esm-cjs": "rollup --forceExit -c rollup.config.mjs",
23
+ "build:watch": "npm run build:esm-cjs -- --watch",
24
+ "build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
25
+ "clean": "npm run clean:size && rimraf lib-esm lib dist",
26
+ "clean:size": "rimraf dual-publish-tmp tmp*",
27
+ "format": "echo \"Not implemented\"",
28
+ "lint": "eslint '**/*.{ts,tsx}' && npm run ts-coverage",
29
+ "lint:fix": "eslint '**/*.{ts,tsx}' --fix",
30
+ "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 91.18"
31
+ },
32
+ "typesVersions": {
33
+ ">=4.2": {
34
+ "cognito": [
35
+ "./dist/esm/providers/cognito/index.d.ts"
36
+ ],
37
+ "cognito/server": [
38
+ "./dist/esm/providers/cognito/apis/server/index.d.ts"
39
+ ],
40
+ "server": [
41
+ "./dist/esm/server.d.ts"
42
+ ]
43
+ }
44
+ },
45
+ "exports": {
46
+ ".": {
47
+ "types": "./dist/esm/index.d.ts",
48
+ "import": "./dist/esm/index.mjs",
49
+ "require": "./dist/cjs/index.js",
50
+ "react-native": "./src/index.ts"
51
+ },
52
+ "./cognito": {
53
+ "types": "./dist/esm/providers/cognito/index.d.ts",
54
+ "import": "./dist/esm/providers/cognito/index.mjs",
55
+ "require": "./dist/cjs/providers/cognito/index.js",
56
+ "react-native": "./src/providers/cognito/index.ts"
57
+ },
58
+ "./cognito/server": {
59
+ "types": "./dist/esm/providers/cognito/apis/server/index.d.ts",
60
+ "import": "./dist/esm/providers/cognito/apis/server/index.mjs",
61
+ "require": "./dist/cjs/providers/cognito/apis/server/index.js"
62
+ },
63
+ "./server": {
64
+ "types": "./dist/esm/server.d.ts",
65
+ "import": "./dist/esm/server.mjs",
66
+ "require": "./dist/cjs/server.js"
67
+ },
68
+ "./enable-oauth-listener": {
69
+ "types": "./dist/esm/providers/cognito/utils/oauth/enableOAuthListener.d.ts",
70
+ "import": "./dist/esm/providers/cognito/utils/oauth/enableOAuthListener.mjs",
71
+ "require": "./dist/cjs/providers/cognito/utils/oauth/enableOAuthListener.js"
72
+ },
73
+ "./package.json": "./package.json"
74
+ },
75
+ "repository": {
76
+ "type": "git",
77
+ "url": "https://github.com/aws-amplify/amplify-js.git"
78
+ },
79
+ "author": "Amazon Web Services",
80
+ "license": "Apache-2.0",
81
+ "bugs": {
82
+ "url": "https://github.com/aws/aws-amplify/issues"
83
+ },
84
+ "homepage": "https://aws-amplify.github.io/",
85
+ "files": [
86
+ "dist/cjs",
87
+ "dist/esm",
88
+ "src",
89
+ "cognito",
90
+ "server",
91
+ "enable-oauth-listener"
92
+ ],
93
+ "dependencies": {
94
+ "@aws-crypto/sha256-js": "5.2.0",
95
+ "@smithy/types": "^3.3.0",
96
+ "tslib": "^2.5.0"
97
+ },
98
+ "peerDependencies": {
99
+ "@aws-amplify/core": "^6.1.0"
100
+ },
101
+ "devDependencies": {
102
+ "@aws-amplify/core": "6.10.6",
103
+ "@aws-amplify/react-native": "1.1.7",
104
+ "@jest/test-sequencer": "^29.7.0",
105
+ "typescript": "5.0.2"
106
+ },
107
+ "gitHead": "52d159e1d01615d17689ca4710110759e2bb82c8"
108
108
  }
@@ -20,9 +20,7 @@ export type TokenRefresher = ({
20
20
  username: string;
21
21
  }) => Promise<CognitoAuthTokens>;
22
22
 
23
- export type AuthKeys<AuthKey extends string> = {
24
- [Key in AuthKey]: string;
25
- };
23
+ export type AuthKeys<AuthKey extends string> = Record<AuthKey, string>;
26
24
 
27
25
  export const AuthTokenStorageKeys = {
28
26
  accessToken: 'accessToken',
package/src/types/Auth.ts CHANGED
@@ -20,7 +20,7 @@ export enum AuthErrorTypes {
20
20
  OAuthSignInError = 'oauthSignInError',
21
21
  }
22
22
 
23
- export type AuthErrorMessages = { [key in AuthErrorTypes]: AuthErrorMessage };
23
+ export type AuthErrorMessages = Record<AuthErrorTypes, AuthErrorMessage>;
24
24
 
25
25
  export interface AuthErrorMessage {
26
26
  message: string;
@@ -251,9 +251,7 @@ export type AuthNextSignInStep<
251
251
  */
252
252
  export type AuthUserAttributes<
253
253
  UserAttributeKey extends AuthUserAttributeKey = AuthUserAttributeKey,
254
- > = {
255
- [Attribute in UserAttributeKey]?: string;
256
- };
254
+ > = Partial<Record<UserAttributeKey, string>>;
257
255
 
258
256
  /**
259
257
  * The interface of a user attribute.
@@ -40,6 +40,4 @@ export interface AuthUpdateUserAttributeOutput<
40
40
 
41
41
  export type AuthUpdateUserAttributesOutput<
42
42
  UserAttributeKey extends AuthUserAttributeKey = AuthUserAttributeKey,
43
- > = {
44
- [authKey in UserAttributeKey]: AuthUpdateUserAttributeOutput<UserAttributeKey>;
45
- };
43
+ > = Record<UserAttributeKey, AuthUpdateUserAttributeOutput<UserAttributeKey>>;