@aws-amplify/core 6.5.2 → 6.5.3
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/Platform/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/cjs/storage/utils.js +2 -2
- package/dist/cjs/storage/utils.js.map +1 -1
- package/dist/esm/Platform/version.d.ts +1 -1
- package/dist/esm/Platform/version.mjs +1 -1
- package/dist/esm/Platform/version.mjs.map +1 -1
- package/dist/esm/storage/utils.mjs +2 -2
- package/dist/esm/storage/utils.mjs.map +1 -1
- package/package.json +2 -2
- package/src/Platform/version.ts +1 -1
- package/src/storage/utils.ts +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.8.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.8.2';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;AACzB;AACA,OAAO,CAAC,OAAO,GAAG,OAAO;;"}
|
|
@@ -20,7 +20,7 @@ const getLocalStorageWithFallback = () => {
|
|
|
20
20
|
}
|
|
21
21
|
catch (e) {
|
|
22
22
|
// Handle any errors related to localStorage access
|
|
23
|
-
logger.
|
|
23
|
+
logger.info('localStorage not found. InMemoryStorage is used as a fallback.');
|
|
24
24
|
}
|
|
25
25
|
// Return in-memory storage as a fallback if localStorage is not accessible
|
|
26
26
|
return new InMemoryStorage_1.InMemoryStorage();
|
|
@@ -42,7 +42,7 @@ const getSessionStorageWithFallback = () => {
|
|
|
42
42
|
}
|
|
43
43
|
catch (e) {
|
|
44
44
|
// Handle any errors related to sessionStorage access
|
|
45
|
-
logger.
|
|
45
|
+
logger.info('sessionStorage not found. InMemoryStorage is used as a fallback.');
|
|
46
46
|
return new InMemoryStorage_1.InMemoryStorage();
|
|
47
47
|
}
|
|
48
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/storage/utils.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSessionStorageWithFallback = exports.getLocalStorageWithFallback = void 0;\nconst Logger_1 = require(\"../Logger\");\nconst InMemoryStorage_1 = require(\"./InMemoryStorage\");\n/**\n * @internal\n * @returns Either a reference to window.localStorage or an in-memory storage as fallback\n */\nconst logger = new Logger_1.ConsoleLogger('CoreStorageUtils');\nconst getLocalStorageWithFallback = () => {\n try {\n // Attempt to use localStorage directly\n if (typeof window !== 'undefined' && window.localStorage) {\n return window.localStorage;\n }\n }\n catch (e) {\n // Handle any errors related to localStorage access\n logger.
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/storage/utils.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSessionStorageWithFallback = exports.getLocalStorageWithFallback = void 0;\nconst Logger_1 = require(\"../Logger\");\nconst InMemoryStorage_1 = require(\"./InMemoryStorage\");\n/**\n * @internal\n * @returns Either a reference to window.localStorage or an in-memory storage as fallback\n */\nconst logger = new Logger_1.ConsoleLogger('CoreStorageUtils');\nconst getLocalStorageWithFallback = () => {\n try {\n // Attempt to use localStorage directly\n if (typeof window !== 'undefined' && window.localStorage) {\n return window.localStorage;\n }\n }\n catch (e) {\n // Handle any errors related to localStorage access\n logger.info('localStorage not found. InMemoryStorage is used as a fallback.');\n }\n // Return in-memory storage as a fallback if localStorage is not accessible\n return new InMemoryStorage_1.InMemoryStorage();\n};\nexports.getLocalStorageWithFallback = getLocalStorageWithFallback;\n/**\n * @internal\n * @returns Either a reference to window.sessionStorage or an in-memory storage as fallback\n */\nconst getSessionStorageWithFallback = () => {\n try {\n // Attempt to use sessionStorage directly\n if (typeof window !== 'undefined' && window.sessionStorage) {\n // Verify we can actually use it by testing access\n window.sessionStorage.getItem('test');\n return window.sessionStorage;\n }\n throw new Error('sessionStorage is not defined');\n }\n catch (e) {\n // Handle any errors related to sessionStorage access\n logger.info('sessionStorage not found. InMemoryStorage is used as a fallback.');\n return new InMemoryStorage_1.InMemoryStorage();\n }\n};\nexports.getSessionStorageWithFallback = getSessionStorageWithFallback;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,6BAA6B,GAAG,OAAO,CAAC,2BAA2B,GAAG,KAAK,CAAC,CAAC;AACrF,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACtC,MAAM,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AACvD;AACA;AACA;AACA;AACA,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;AAC9D,MAAM,2BAA2B,GAAG,MAAM;AAC1C,IAAI,IAAI;AACR;AACA,QAAQ,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,YAAY,EAAE;AAClE,YAAY,OAAO,MAAM,CAAC,YAAY,CAAC;AACvC,SAAS;AACT,KAAK;AACL,IAAI,OAAO,CAAC,EAAE;AACd;AACA,QAAQ,MAAM,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAC;AACtF,KAAK;AACL;AACA,IAAI,OAAO,IAAI,iBAAiB,CAAC,eAAe,EAAE,CAAC;AACnD,CAAC,CAAC;AACF,OAAO,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;AAClE;AACA;AACA;AACA;AACA,MAAM,6BAA6B,GAAG,MAAM;AAC5C,IAAI,IAAI;AACR;AACA,QAAQ,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,cAAc,EAAE;AACpE;AACA,YAAY,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAClD,YAAY,OAAO,MAAM,CAAC,cAAc,CAAC;AACzC,SAAS;AACT,QAAQ,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;AACzD,KAAK;AACL,IAAI,OAAO,CAAC,EAAE;AACd;AACA,QAAQ,MAAM,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;AACxF,QAAQ,OAAO,IAAI,iBAAiB,CAAC,eAAe,EAAE,CAAC;AACvD,KAAK;AACL,CAAC,CAAC;AACF,OAAO,CAAC,6BAA6B,GAAG,6BAA6B;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.8.
|
|
1
|
+
export declare const version = "6.8.2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.8.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.8.2';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -17,7 +17,7 @@ const getLocalStorageWithFallback = () => {
|
|
|
17
17
|
}
|
|
18
18
|
catch (e) {
|
|
19
19
|
// Handle any errors related to localStorage access
|
|
20
|
-
logger.
|
|
20
|
+
logger.info('localStorage not found. InMemoryStorage is used as a fallback.');
|
|
21
21
|
}
|
|
22
22
|
// Return in-memory storage as a fallback if localStorage is not accessible
|
|
23
23
|
return new InMemoryStorage();
|
|
@@ -38,7 +38,7 @@ const getSessionStorageWithFallback = () => {
|
|
|
38
38
|
}
|
|
39
39
|
catch (e) {
|
|
40
40
|
// Handle any errors related to sessionStorage access
|
|
41
|
-
logger.
|
|
41
|
+
logger.info('sessionStorage not found. InMemoryStorage is used as a fallback.');
|
|
42
42
|
return new InMemoryStorage();
|
|
43
43
|
}
|
|
44
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../../src/storage/utils.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ConsoleLogger } from '../Logger';\nimport { InMemoryStorage } from './InMemoryStorage';\n/**\n * @internal\n * @returns Either a reference to window.localStorage or an in-memory storage as fallback\n */\nconst logger = new ConsoleLogger('CoreStorageUtils');\nexport const getLocalStorageWithFallback = () => {\n try {\n // Attempt to use localStorage directly\n if (typeof window !== 'undefined' && window.localStorage) {\n return window.localStorage;\n }\n }\n catch (e) {\n // Handle any errors related to localStorage access\n logger.
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../../src/storage/utils.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ConsoleLogger } from '../Logger';\nimport { InMemoryStorage } from './InMemoryStorage';\n/**\n * @internal\n * @returns Either a reference to window.localStorage or an in-memory storage as fallback\n */\nconst logger = new ConsoleLogger('CoreStorageUtils');\nexport const getLocalStorageWithFallback = () => {\n try {\n // Attempt to use localStorage directly\n if (typeof window !== 'undefined' && window.localStorage) {\n return window.localStorage;\n }\n }\n catch (e) {\n // Handle any errors related to localStorage access\n logger.info('localStorage not found. InMemoryStorage is used as a fallback.');\n }\n // Return in-memory storage as a fallback if localStorage is not accessible\n return new InMemoryStorage();\n};\n/**\n * @internal\n * @returns Either a reference to window.sessionStorage or an in-memory storage as fallback\n */\nexport const getSessionStorageWithFallback = () => {\n try {\n // Attempt to use sessionStorage directly\n if (typeof window !== 'undefined' && window.sessionStorage) {\n // Verify we can actually use it by testing access\n window.sessionStorage.getItem('test');\n return window.sessionStorage;\n }\n throw new Error('sessionStorage is not defined');\n }\n catch (e) {\n // Handle any errors related to sessionStorage access\n logger.info('sessionStorage not found. InMemoryStorage is used as a fallback.');\n return new InMemoryStorage();\n }\n};\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,kBAAkB,CAAC,CAAC;AACzC,MAAC,2BAA2B,GAAG,MAAM;AACjD,IAAI,IAAI;AACR;AACA,QAAQ,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,YAAY,EAAE;AAClE,YAAY,OAAO,MAAM,CAAC,YAAY,CAAC;AACvC,SAAS;AACT,KAAK;AACL,IAAI,OAAO,CAAC,EAAE;AACd;AACA,QAAQ,MAAM,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAC;AACtF,KAAK;AACL;AACA,IAAI,OAAO,IAAI,eAAe,EAAE,CAAC;AACjC,EAAE;AACF;AACA;AACA;AACA;AACY,MAAC,6BAA6B,GAAG,MAAM;AACnD,IAAI,IAAI;AACR;AACA,QAAQ,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,cAAc,EAAE;AACpE;AACA,YAAY,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAClD,YAAY,OAAO,MAAM,CAAC,cAAc,CAAC;AACzC,SAAS;AACT,QAAQ,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;AACzD,KAAK;AACL,IAAI,OAAO,CAAC,EAAE;AACd;AACA,QAAQ,MAAM,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;AACxF,QAAQ,OAAO,IAAI,eAAe,EAAE,CAAC;AACrC,KAAK;AACL;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.3",
|
|
4
4
|
"description": "Core category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -192,5 +192,5 @@
|
|
|
192
192
|
]
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
-
"gitHead": "
|
|
195
|
+
"gitHead": "02b3769ac17b556b058d4b2856d543792c3a5e85"
|
|
196
196
|
}
|
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '6.8.
|
|
2
|
+
export const version = '6.8.2';
|
package/src/storage/utils.ts
CHANGED
|
@@ -20,7 +20,9 @@ export const getLocalStorageWithFallback = (): Storage => {
|
|
|
20
20
|
}
|
|
21
21
|
} catch (e) {
|
|
22
22
|
// Handle any errors related to localStorage access
|
|
23
|
-
logger.
|
|
23
|
+
logger.info(
|
|
24
|
+
'localStorage not found. InMemoryStorage is used as a fallback.',
|
|
25
|
+
);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
// Return in-memory storage as a fallback if localStorage is not accessible
|
|
@@ -44,7 +46,9 @@ export const getSessionStorageWithFallback = (): Storage => {
|
|
|
44
46
|
throw new Error('sessionStorage is not defined');
|
|
45
47
|
} catch (e) {
|
|
46
48
|
// Handle any errors related to sessionStorage access
|
|
47
|
-
logger.
|
|
49
|
+
logger.info(
|
|
50
|
+
'sessionStorage not found. InMemoryStorage is used as a fallback.',
|
|
51
|
+
);
|
|
48
52
|
|
|
49
53
|
return new InMemoryStorage();
|
|
50
54
|
}
|