@aws-amplify/core 6.0.1-console-preview.f7f118b.0 → 6.0.1-console-preview.5a31ca1.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/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/storage/CookieStorage.js +8 -5
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/storage/CookieStorage.js +5 -5
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/Platform/version.ts +1 -1
- package/src/storage/CookieStorage.ts +5 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core",
|
|
3
|
-
"version": "6.0.1-console-preview.
|
|
3
|
+
"version": "6.0.1-console-preview.5a31ca1.0+5a31ca1",
|
|
4
4
|
"description": "Core category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"@aws-crypto/sha256-js": "5.0.0",
|
|
59
59
|
"@aws-sdk/types": "3.398.0",
|
|
60
60
|
"@smithy/util-hex-encoding": "2.0.0",
|
|
61
|
-
"js-cookie": "^
|
|
61
|
+
"js-cookie": "^3.0.5",
|
|
62
62
|
"rxjs": "^7.8.1",
|
|
63
63
|
"tslib": "^2.5.0",
|
|
64
64
|
"uuid": "^9.0.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@aws-amplify/react-native": "1.0.1-console-preview.
|
|
68
|
-
"@types/js-cookie": "
|
|
67
|
+
"@aws-amplify/react-native": "1.0.1-console-preview.5a31ca1.0+5a31ca1",
|
|
68
|
+
"@types/js-cookie": "3.0.2",
|
|
69
69
|
"@types/uuid": "^9.0.0",
|
|
70
70
|
"find": "^0.2.7",
|
|
71
71
|
"genversion": "^2.2.0",
|
|
@@ -169,5 +169,5 @@
|
|
|
169
169
|
"lib-esm"
|
|
170
170
|
]
|
|
171
171
|
},
|
|
172
|
-
"gitHead": "
|
|
172
|
+
"gitHead": "5a31ca110861fbb0762e9c4d817064acd474f83f"
|
|
173
173
|
}
|
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '6.0.1-console-preview.
|
|
2
|
+
export const version = '6.0.1-console-preview.5a31ca1.0+5a31ca1';
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
get as getJsCookie,
|
|
6
|
-
remove as removeJsCookie,
|
|
7
|
-
set as setJsCookie,
|
|
8
|
-
} from 'js-cookie';
|
|
4
|
+
import JsCookie from 'js-cookie';
|
|
9
5
|
import {
|
|
10
6
|
CookieStorageData,
|
|
11
7
|
KeyValueStorageInterface,
|
|
@@ -42,20 +38,20 @@ export class CookieStorage implements KeyValueStorageInterface {
|
|
|
42
38
|
}
|
|
43
39
|
|
|
44
40
|
async setItem(key: string, value: string) {
|
|
45
|
-
|
|
41
|
+
JsCookie.set(key, value, this.getData());
|
|
46
42
|
}
|
|
47
43
|
|
|
48
44
|
async getItem(key: string) {
|
|
49
|
-
const item =
|
|
45
|
+
const item = JsCookie.get(key);
|
|
50
46
|
return item ?? null;
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
async removeItem(key: string) {
|
|
54
|
-
|
|
50
|
+
JsCookie.remove(key, this.getData());
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
async clear() {
|
|
58
|
-
const cookie =
|
|
54
|
+
const cookie = JsCookie.get();
|
|
59
55
|
const promises = Object.keys(cookie).map(key => this.removeItem(key));
|
|
60
56
|
await Promise.all(promises);
|
|
61
57
|
}
|