@aws-amplify/core 5.8.18 → 5.8.19
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/Amplify.d.ts +10 -0
- package/lib/Amplify.js +10 -0
- package/lib/ClientDevice/index.d.ts +5 -0
- package/lib/ClientDevice/index.js +5 -0
- package/lib/Credentials.d.ts +10 -0
- package/lib/Credentials.js +10 -0
- package/lib/Errors.d.ts +10 -0
- package/lib/Errors.js +10 -0
- package/lib/Hub.d.ts +20 -0
- package/lib/Hub.js +5 -0
- package/lib/I18n/index.d.ts +3 -0
- package/lib/I18n/index.js +3 -0
- package/lib/JS.d.ts +54 -0
- package/lib/JS.js +54 -0
- package/lib/Logger/ConsoleLogger.d.ts +3 -0
- package/lib/Logger/ConsoleLogger.js +3 -0
- package/lib/OAuthHelper/index.d.ts +10 -0
- package/lib/OAuthHelper/index.js +10 -0
- package/lib/Platform/index.d.ts +15 -0
- package/lib/Platform/index.js +15 -0
- package/lib/Platform/types.d.ts +70 -0
- package/lib/Platform/types.js +65 -0
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/Providers/AWSCloudWatchProvider.d.ts +5 -0
- package/lib/Providers/AWSCloudWatchProvider.js +5 -0
- package/lib/RNComponents/index.d.ts +15 -0
- package/lib/RNComponents/index.js +15 -0
- package/lib/ServiceWorker/ServiceWorker.d.ts +3 -0
- package/lib/ServiceWorker/ServiceWorker.js +3 -0
- package/lib/Signer.d.ts +5 -0
- package/lib/Signer.js +5 -0
- package/lib/StorageHelper/index.d.ts +11 -1
- package/lib/StorageHelper/index.js +11 -1
- package/lib/UniversalStorage/index.d.ts +5 -0
- package/lib/UniversalStorage/index.js +5 -0
- package/lib/Util/BackgroundProcessManager.d.ts +9 -0
- package/lib/Util/BackgroundProcessManager.js +9 -0
- package/lib/Util/Constants.d.ts +35 -0
- package/lib/Util/Constants.js +35 -0
- package/lib/Util/DateUtils.d.ts +5 -0
- package/lib/Util/DateUtils.js +5 -0
- package/lib/Util/Mutex.d.ts +5 -0
- package/lib/Util/Mutex.js +5 -0
- package/lib/Util/Reachability.d.ts +5 -0
- package/lib/Util/Reachability.js +5 -0
- package/lib/Util/Retry.d.ts +19 -0
- package/lib/Util/Retry.js +19 -0
- package/lib/Util/StringUtils.d.ts +10 -0
- package/lib/Util/StringUtils.js +10 -0
- package/lib/constants.d.ts +10 -0
- package/lib/constants.js +10 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +5 -0
- package/lib/parseAWSExports.d.ts +5 -0
- package/lib/parseAWSExports.js +5 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/types.d.ts +5 -0
- package/lib-esm/Amplify.d.ts +10 -0
- package/lib-esm/Amplify.js +10 -0
- package/lib-esm/ClientDevice/index.d.ts +5 -0
- package/lib-esm/ClientDevice/index.js +5 -0
- package/lib-esm/Credentials.d.ts +10 -0
- package/lib-esm/Credentials.js +10 -0
- package/lib-esm/Errors.d.ts +10 -0
- package/lib-esm/Errors.js +10 -0
- package/lib-esm/Hub.d.ts +20 -0
- package/lib-esm/Hub.js +5 -0
- package/lib-esm/I18n/index.d.ts +3 -0
- package/lib-esm/I18n/index.js +3 -0
- package/lib-esm/JS.d.ts +54 -0
- package/lib-esm/JS.js +54 -0
- package/lib-esm/Logger/ConsoleLogger.d.ts +3 -0
- package/lib-esm/Logger/ConsoleLogger.js +3 -0
- package/lib-esm/OAuthHelper/index.d.ts +10 -0
- package/lib-esm/OAuthHelper/index.js +10 -0
- package/lib-esm/Platform/index.d.ts +15 -0
- package/lib-esm/Platform/index.js +15 -0
- package/lib-esm/Platform/types.d.ts +70 -0
- package/lib-esm/Platform/types.js +65 -0
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/Providers/AWSCloudWatchProvider.d.ts +5 -0
- package/lib-esm/Providers/AWSCloudWatchProvider.js +5 -0
- package/lib-esm/RNComponents/index.d.ts +15 -0
- package/lib-esm/RNComponents/index.js +15 -0
- package/lib-esm/ServiceWorker/ServiceWorker.d.ts +3 -0
- package/lib-esm/ServiceWorker/ServiceWorker.js +3 -0
- package/lib-esm/Signer.d.ts +5 -0
- package/lib-esm/Signer.js +5 -0
- package/lib-esm/StorageHelper/index.d.ts +11 -1
- package/lib-esm/StorageHelper/index.js +11 -1
- package/lib-esm/UniversalStorage/index.d.ts +5 -0
- package/lib-esm/UniversalStorage/index.js +5 -0
- package/lib-esm/Util/BackgroundProcessManager.d.ts +9 -0
- package/lib-esm/Util/BackgroundProcessManager.js +9 -0
- package/lib-esm/Util/Constants.d.ts +35 -0
- package/lib-esm/Util/Constants.js +35 -0
- package/lib-esm/Util/DateUtils.d.ts +5 -0
- package/lib-esm/Util/DateUtils.js +5 -0
- package/lib-esm/Util/Mutex.d.ts +5 -0
- package/lib-esm/Util/Mutex.js +5 -0
- package/lib-esm/Util/Reachability.d.ts +5 -0
- package/lib-esm/Util/Reachability.js +5 -0
- package/lib-esm/Util/Retry.d.ts +19 -0
- package/lib-esm/Util/Retry.js +19 -0
- package/lib-esm/Util/StringUtils.d.ts +10 -0
- package/lib-esm/Util/StringUtils.js +10 -0
- package/lib-esm/constants.d.ts +10 -0
- package/lib-esm/constants.js +10 -0
- package/lib-esm/index.d.ts +5 -0
- package/lib-esm/index.js +5 -0
- package/lib-esm/parseAWSExports.d.ts +5 -0
- package/lib-esm/parseAWSExports.js +5 -0
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/types.d.ts +5 -0
- package/package.json +2 -2
- package/src/Amplify.ts +10 -0
- package/src/ClientDevice/index.ts +5 -0
- package/src/Credentials.ts +10 -0
- package/src/Errors.ts +10 -0
- package/src/Hub.ts +20 -0
- package/src/I18n/index.ts +3 -0
- package/src/JS.ts +54 -0
- package/src/Logger/ConsoleLogger.ts +3 -0
- package/src/OAuthHelper/index.ts +10 -0
- package/src/Platform/index.ts +15 -0
- package/src/Platform/types.ts +70 -0
- package/src/Platform/version.ts +1 -1
- package/src/Providers/AWSCloudWatchProvider.ts +5 -0
- package/src/RNComponents/index.ts +15 -0
- package/src/ServiceWorker/ServiceWorker.ts +3 -0
- package/src/Signer.ts +5 -0
- package/src/StorageHelper/index.ts +11 -1
- package/src/UniversalStorage/index.ts +5 -0
- package/src/Util/BackgroundProcessManager.ts +9 -0
- package/src/Util/Constants.ts +35 -0
- package/src/Util/DateUtils.ts +5 -0
- package/src/Util/Mutex.ts +5 -0
- package/src/Util/Reachability.ts +5 -0
- package/src/Util/Retry.ts +19 -0
- package/src/Util/StringUtils.ts +10 -0
- package/src/constants.ts +10 -0
- package/src/index.ts +5 -0
- package/src/parseAWSExports.ts +5 -0
- package/src/types/types.ts +5 -0
package/lib-esm/types/types.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ export interface AmplifyConfig {
|
|
|
13
13
|
};
|
|
14
14
|
ssr?: boolean;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
18
|
+
* See the migration guide:
|
|
19
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
20
|
+
*/
|
|
16
21
|
export interface ICredentials {
|
|
17
22
|
accessKeyId: string;
|
|
18
23
|
sessionToken: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.19",
|
|
4
4
|
"description": "Core category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -204,5 +204,5 @@
|
|
|
204
204
|
"lib-esm"
|
|
205
205
|
]
|
|
206
206
|
},
|
|
207
|
-
"gitHead": "
|
|
207
|
+
"gitHead": "d0b923913b92145813d1470bfbdc9b4dfa915c20"
|
|
208
208
|
}
|
package/src/Amplify.ts
CHANGED
|
@@ -4,6 +4,11 @@ import { ConsoleLogger as LoggerClass } from './Logger';
|
|
|
4
4
|
|
|
5
5
|
const logger = new LoggerClass('Amplify');
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
9
|
+
* See the migration guide:
|
|
10
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
11
|
+
*/
|
|
7
12
|
export class AmplifyClass {
|
|
8
13
|
// Everything that is `register`ed is tracked here
|
|
9
14
|
private _components = [];
|
|
@@ -113,4 +118,9 @@ export class AmplifyClass {
|
|
|
113
118
|
}
|
|
114
119
|
}
|
|
115
120
|
|
|
121
|
+
/**
|
|
122
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
123
|
+
* See the migration guide:
|
|
124
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
125
|
+
*/
|
|
116
126
|
export const Amplify = new AmplifyClass();
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
import { clientInfo, dimension } from './browser';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
8
|
+
* See the migration guide:
|
|
9
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
10
|
+
*/
|
|
6
11
|
export class ClientDevice {
|
|
7
12
|
static clientInfo() {
|
|
8
13
|
return clientInfo();
|
package/src/Credentials.ts
CHANGED
|
@@ -31,6 +31,11 @@ const dispatchCredentialsEvent = (
|
|
|
31
31
|
Hub.dispatch('core', { event, data, message }, 'Credentials', AMPLIFY_SYMBOL);
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
36
|
+
* See the migration guide:
|
|
37
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
38
|
+
*/
|
|
34
39
|
export class CredentialsClass {
|
|
35
40
|
private _config;
|
|
36
41
|
private _credentials;
|
|
@@ -629,6 +634,11 @@ export class CredentialsClass {
|
|
|
629
634
|
}
|
|
630
635
|
}
|
|
631
636
|
|
|
637
|
+
/**
|
|
638
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
639
|
+
* See the migration guide:
|
|
640
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
641
|
+
*/
|
|
632
642
|
export const Credentials = new CredentialsClass(null);
|
|
633
643
|
|
|
634
644
|
Amplify.register(Credentials);
|
package/src/Errors.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
6
|
+
* See the migration guide:
|
|
7
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
8
|
+
*/
|
|
4
9
|
export function missingConfig(name: string) {
|
|
5
10
|
return new Error('Missing config value of ' + name);
|
|
6
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
14
|
+
* See the migration guide:
|
|
15
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
16
|
+
*/
|
|
7
17
|
export function invalidParameter(name: string) {
|
|
8
18
|
return new Error('Invalid parameter value of ' + name);
|
|
9
19
|
}
|
package/src/Hub.ts
CHANGED
|
@@ -20,6 +20,11 @@ interface IListener {
|
|
|
20
20
|
callback: HubCallback;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
25
|
+
* See the migration guide:
|
|
26
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
27
|
+
*/
|
|
23
28
|
export type HubCapsule = {
|
|
24
29
|
channel: string;
|
|
25
30
|
payload: HubPayload;
|
|
@@ -27,12 +32,22 @@ export type HubCapsule = {
|
|
|
27
32
|
patternInfo?: string[];
|
|
28
33
|
};
|
|
29
34
|
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
37
|
+
* See the migration guide:
|
|
38
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
39
|
+
*/
|
|
30
40
|
export type HubPayload = {
|
|
31
41
|
event: string;
|
|
32
42
|
data?: any;
|
|
33
43
|
message?: string;
|
|
34
44
|
};
|
|
35
45
|
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
48
|
+
* See the migration guide:
|
|
49
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
50
|
+
*/
|
|
36
51
|
export type HubCallback = (capsule: HubCapsule) => void;
|
|
37
52
|
|
|
38
53
|
export type LegacyCallback = { onHubCapsule: HubCallback };
|
|
@@ -232,4 +247,9 @@ export class HubClass {
|
|
|
232
247
|
/*We export a __default__ instance of HubClass to use it as a
|
|
233
248
|
pseudo Singleton for the main messaging bus, however you can still create
|
|
234
249
|
your own instance of HubClass() for a separate "private bus" of events.*/
|
|
250
|
+
/**
|
|
251
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
252
|
+
* See the migration guide:
|
|
253
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
254
|
+
*/
|
|
235
255
|
export const Hub = new HubClass('__default__');
|
package/src/I18n/index.ts
CHANGED
|
@@ -13,6 +13,9 @@ let _i18n = null;
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Export I18n APIs
|
|
16
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
17
|
+
* See the migration guide:
|
|
18
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
16
19
|
*/
|
|
17
20
|
export class I18n {
|
|
18
21
|
/**
|
package/src/JS.ts
CHANGED
|
@@ -45,8 +45,18 @@ const MIME_MAP = [
|
|
|
45
45
|
{ type: 'message/rfc822', ext: 'eml' },
|
|
46
46
|
];
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
50
|
+
* See the migration guide:
|
|
51
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
52
|
+
*/
|
|
48
53
|
export const isEmpty = (obj = {}) => Object.keys(obj).length === 0;
|
|
49
54
|
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
57
|
+
* See the migration guide:
|
|
58
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
59
|
+
*/
|
|
50
60
|
export const sortByField = (list, field, dir) => {
|
|
51
61
|
if (!list || !list.sort) {
|
|
52
62
|
return false;
|
|
@@ -78,6 +88,11 @@ export const sortByField = (list, field, dir) => {
|
|
|
78
88
|
return true;
|
|
79
89
|
};
|
|
80
90
|
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
93
|
+
* See the migration guide:
|
|
94
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
95
|
+
*/
|
|
81
96
|
export const objectLessAttributes = (obj, less) => {
|
|
82
97
|
const ret = Object.assign({}, obj);
|
|
83
98
|
if (less) {
|
|
@@ -93,6 +108,11 @@ export const objectLessAttributes = (obj, less) => {
|
|
|
93
108
|
return ret;
|
|
94
109
|
};
|
|
95
110
|
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
113
|
+
* See the migration guide:
|
|
114
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
115
|
+
*/
|
|
96
116
|
export const filenameToContentType = (
|
|
97
117
|
filename,
|
|
98
118
|
defVal = 'application/octet-stream'
|
|
@@ -103,6 +123,11 @@ export const filenameToContentType = (
|
|
|
103
123
|
return filtered.length > 0 ? filtered[0].type : defVal;
|
|
104
124
|
};
|
|
105
125
|
|
|
126
|
+
/**
|
|
127
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
128
|
+
* See the migration guide:
|
|
129
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
130
|
+
*/
|
|
106
131
|
export const isTextFile = contentType => {
|
|
107
132
|
const type = contentType.toLowerCase();
|
|
108
133
|
if (type.startsWith('text/')) {
|
|
@@ -115,6 +140,11 @@ export const isTextFile = contentType => {
|
|
|
115
140
|
);
|
|
116
141
|
};
|
|
117
142
|
|
|
143
|
+
/**
|
|
144
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
145
|
+
* See the migration guide:
|
|
146
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
147
|
+
*/
|
|
118
148
|
export const generateRandomString = () => {
|
|
119
149
|
let result = '';
|
|
120
150
|
const chars =
|
|
@@ -125,6 +155,11 @@ export const generateRandomString = () => {
|
|
|
125
155
|
return result;
|
|
126
156
|
};
|
|
127
157
|
|
|
158
|
+
/**
|
|
159
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
160
|
+
* See the migration guide:
|
|
161
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
162
|
+
*/
|
|
128
163
|
export const makeQuerablePromise = promise => {
|
|
129
164
|
if (promise.isResolved) return promise;
|
|
130
165
|
|
|
@@ -152,6 +187,11 @@ export const makeQuerablePromise = promise => {
|
|
|
152
187
|
return result;
|
|
153
188
|
};
|
|
154
189
|
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
192
|
+
* See the migration guide:
|
|
193
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
194
|
+
*/
|
|
155
195
|
export const isWebWorker = () => {
|
|
156
196
|
if (typeof self === 'undefined') {
|
|
157
197
|
return false;
|
|
@@ -163,6 +203,11 @@ export const isWebWorker = () => {
|
|
|
163
203
|
);
|
|
164
204
|
};
|
|
165
205
|
|
|
206
|
+
/**
|
|
207
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
208
|
+
* See the migration guide:
|
|
209
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
210
|
+
*/
|
|
166
211
|
export const browserOrNode = () => {
|
|
167
212
|
const isBrowser =
|
|
168
213
|
typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
@@ -182,6 +227,9 @@ export const browserOrNode = () => {
|
|
|
182
227
|
* @param {Object} obj - the object need to be transferred
|
|
183
228
|
* @param {Array} whiteListForItself - whitelist itself from being transferred
|
|
184
229
|
* @param {Array} whiteListForChildren - whitelist its children keys from being transferred
|
|
230
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
231
|
+
* See the migration guide:
|
|
232
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
185
233
|
*/
|
|
186
234
|
export const transferKeyToLowerCase = (
|
|
187
235
|
obj,
|
|
@@ -215,6 +263,9 @@ export const transferKeyToLowerCase = (
|
|
|
215
263
|
* @param {Object} obj - the object need to be transferred
|
|
216
264
|
* @param {Array} whiteListForItself - whitelist itself from being transferred
|
|
217
265
|
* @param {Array} whiteListForChildren - whitelist its children keys from being transferred
|
|
266
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
267
|
+
* See the migration guide:
|
|
268
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
218
269
|
*/
|
|
219
270
|
export const transferKeyToUpperCase = (
|
|
220
271
|
obj,
|
|
@@ -246,6 +297,9 @@ export const transferKeyToUpperCase = (
|
|
|
246
297
|
* Return true if the object is a strict object
|
|
247
298
|
* which means it's not Array, Function, Number, String, Boolean or Null
|
|
248
299
|
* @param obj the Object
|
|
300
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
301
|
+
* See the migration guide:
|
|
302
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
249
303
|
*/
|
|
250
304
|
export const isStrictObject = obj => {
|
|
251
305
|
return (
|
|
@@ -25,6 +25,9 @@ export enum LOG_TYPE {
|
|
|
25
25
|
/**
|
|
26
26
|
* Write logs
|
|
27
27
|
* @class Logger
|
|
28
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
29
|
+
* See the migration guide:
|
|
30
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
28
31
|
*/
|
|
29
32
|
export class ConsoleLogger implements Logger {
|
|
30
33
|
name: string;
|
package/src/OAuthHelper/index.ts
CHANGED
|
@@ -3,5 +3,15 @@
|
|
|
3
3
|
import { GoogleOAuth as GoogleOAuthClass } from './GoogleOAuth';
|
|
4
4
|
import { FacebookOAuth as FacebookOAuthClass } from './FacebookOAuth';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
8
|
+
* See the migration guide:
|
|
9
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
10
|
+
*/
|
|
6
11
|
export const GoogleOAuth = new GoogleOAuthClass();
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
14
|
+
* See the migration guide:
|
|
15
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
16
|
+
*/
|
|
7
17
|
export const FacebookOAuth = new FacebookOAuthClass();
|
package/src/Platform/index.ts
CHANGED
|
@@ -26,8 +26,18 @@ class PlatformBuilder {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
31
|
+
* See the migration guide:
|
|
32
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
33
|
+
*/
|
|
29
34
|
export const Platform = new PlatformBuilder();
|
|
30
35
|
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
38
|
+
* See the migration guide:
|
|
39
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
40
|
+
*/
|
|
31
41
|
export const getAmplifyUserAgentObject = ({
|
|
32
42
|
category,
|
|
33
43
|
action,
|
|
@@ -42,6 +52,11 @@ export const getAmplifyUserAgentObject = ({
|
|
|
42
52
|
return userAgent;
|
|
43
53
|
};
|
|
44
54
|
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
57
|
+
* See the migration guide:
|
|
58
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
59
|
+
*/
|
|
45
60
|
export const getAmplifyUserAgent = (
|
|
46
61
|
customUserAgentDetails?: CustomUserAgentDetails
|
|
47
62
|
): string => {
|
package/src/Platform/types.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
6
|
+
* See the migration guide:
|
|
7
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
8
|
+
*/
|
|
4
9
|
export enum Framework {
|
|
5
10
|
// < 100 - Web frameworks
|
|
6
11
|
WebUnknown = '0',
|
|
@@ -25,6 +30,11 @@ export enum Framework {
|
|
|
25
30
|
Expo = '202',
|
|
26
31
|
}
|
|
27
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
35
|
+
* See the migration guide:
|
|
36
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
37
|
+
*/
|
|
28
38
|
export enum Category {
|
|
29
39
|
API = 'api',
|
|
30
40
|
Auth = 'auth',
|
|
@@ -39,10 +49,20 @@ export enum Category {
|
|
|
39
49
|
Storage = 'storage',
|
|
40
50
|
}
|
|
41
51
|
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
54
|
+
* See the migration guide:
|
|
55
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
56
|
+
*/
|
|
42
57
|
export enum AnalyticsAction {
|
|
43
58
|
Record = '1',
|
|
44
59
|
UpdateEndpoint = '2',
|
|
45
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
63
|
+
* See the migration guide:
|
|
64
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
65
|
+
*/
|
|
46
66
|
export enum ApiAction {
|
|
47
67
|
GraphQl = '1',
|
|
48
68
|
Get = '2',
|
|
@@ -52,6 +72,11 @@ export enum ApiAction {
|
|
|
52
72
|
Del = '6',
|
|
53
73
|
Head = '7',
|
|
54
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
77
|
+
* See the migration guide:
|
|
78
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
79
|
+
*/
|
|
55
80
|
export enum AuthAction {
|
|
56
81
|
// SignUp = '1',
|
|
57
82
|
// ConfirmSignUp = '2',
|
|
@@ -88,30 +113,70 @@ export enum AuthAction {
|
|
|
88
113
|
// ForgetDevice = '33',
|
|
89
114
|
// FetchDevices = '34',
|
|
90
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
118
|
+
* See the migration guide:
|
|
119
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
120
|
+
*/
|
|
91
121
|
export enum DataStoreAction {
|
|
92
122
|
Subscribe = '1',
|
|
93
123
|
GraphQl = '2',
|
|
94
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
127
|
+
* See the migration guide:
|
|
128
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
129
|
+
*/
|
|
95
130
|
export enum GeoAction {
|
|
96
131
|
None = '0',
|
|
97
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
135
|
+
* See the migration guide:
|
|
136
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
137
|
+
*/
|
|
98
138
|
export enum InAppMessagingAction {
|
|
99
139
|
None = '0',
|
|
100
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
143
|
+
* See the migration guide:
|
|
144
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
145
|
+
*/
|
|
101
146
|
export enum InteractionsAction {
|
|
102
147
|
None = '0',
|
|
103
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
151
|
+
* See the migration guide:
|
|
152
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
153
|
+
*/
|
|
104
154
|
export enum PredictionsAction {
|
|
105
155
|
Convert = '1',
|
|
106
156
|
Identify = '2',
|
|
107
157
|
Interpret = '3',
|
|
108
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
161
|
+
* See the migration guide:
|
|
162
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
163
|
+
*/
|
|
109
164
|
export enum PubSubAction {
|
|
110
165
|
Subscribe = '1',
|
|
111
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
169
|
+
* See the migration guide:
|
|
170
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
171
|
+
*/
|
|
112
172
|
export enum PushNotificationAction {
|
|
113
173
|
None = '0',
|
|
114
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
177
|
+
* See the migration guide:
|
|
178
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
179
|
+
*/
|
|
115
180
|
export enum StorageAction {
|
|
116
181
|
Put = '1',
|
|
117
182
|
Get = '2',
|
|
@@ -145,6 +210,11 @@ type CustomUserAgentDetailsBase = {
|
|
|
145
210
|
framework?: Framework;
|
|
146
211
|
};
|
|
147
212
|
|
|
213
|
+
/**
|
|
214
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
215
|
+
* See the migration guide:
|
|
216
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
217
|
+
*/
|
|
148
218
|
export type CustomUserAgentDetails =
|
|
149
219
|
| (CustomUserAgentDetailsBase & { category?: never; action?: never })
|
|
150
220
|
| UserAgentDetailsWithCategory<Category.API>
|
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '5.3.
|
|
2
|
+
export const version = '5.3.41';
|
|
@@ -46,6 +46,11 @@ import {
|
|
|
46
46
|
|
|
47
47
|
const logger = new Logger('AWSCloudWatch');
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
51
|
+
* See the migration guide:
|
|
52
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
53
|
+
*/
|
|
49
54
|
class AWSCloudWatchProvider implements LoggingProvider {
|
|
50
55
|
static readonly PROVIDER_NAME = AWS_CLOUDWATCH_PROVIDER_NAME;
|
|
51
56
|
static readonly CATEGORY = AWS_CLOUDWATCH_CATEGORY;
|
|
@@ -4,12 +4,27 @@
|
|
|
4
4
|
import { browserOrNode } from '../JS';
|
|
5
5
|
import { StorageHelper } from '../StorageHelper';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
9
|
+
* See the migration guide:
|
|
10
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
11
|
+
*/
|
|
7
12
|
export const Linking = {};
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
15
|
+
* See the migration guide:
|
|
16
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
17
|
+
*/
|
|
8
18
|
export const AppState = {
|
|
9
19
|
addEventListener: (action, handler) => undefined,
|
|
10
20
|
};
|
|
11
21
|
|
|
12
22
|
// if not in react native, just use local storage
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
25
|
+
* See the migration guide:
|
|
26
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
27
|
+
*/
|
|
13
28
|
export const AsyncStorage = browserOrNode().isBrowser
|
|
14
29
|
? new StorageHelper().getStorage()
|
|
15
30
|
: undefined;
|
|
@@ -26,6 +26,9 @@ import { Amplify } from '../Amplify';
|
|
|
26
26
|
* At the minmum this class will register the service worker and listen
|
|
27
27
|
* and attempt to dispatch messages on state change and record analytics
|
|
28
28
|
* events based on the service worker lifecycle.
|
|
29
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
30
|
+
* See the migration guide:
|
|
31
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
29
32
|
*/
|
|
30
33
|
export class ServiceWorkerClass {
|
|
31
34
|
// The active service worker will be set once it is registered
|
package/src/Signer.ts
CHANGED
|
@@ -12,6 +12,11 @@ const IOT_SERVICE_NAME = 'iotdevicegateway';
|
|
|
12
12
|
// Best practice regex to parse the service and region from an AWS endpoint
|
|
13
13
|
const AWS_ENDPOINT_REGEX = /([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(.cn)?$/;
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
17
|
+
* See the migration guide:
|
|
18
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
19
|
+
*/
|
|
15
20
|
export class Signer {
|
|
16
21
|
/**
|
|
17
22
|
* Sign a HTTP request, add 'Authorization' header to request param
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
let dataMemory = {};
|
|
5
5
|
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @class
|
|
8
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
9
|
+
* See the migration guide:
|
|
10
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
11
|
+
*/
|
|
7
12
|
export class MemoryStorage {
|
|
8
13
|
/**
|
|
9
14
|
* This is used to set a specific item in storage
|
|
@@ -47,6 +52,11 @@ export class MemoryStorage {
|
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
54
|
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
57
|
+
* See the migration guide:
|
|
58
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
59
|
+
*/
|
|
50
60
|
export class StorageHelper {
|
|
51
61
|
private storageWindow: any;
|
|
52
62
|
/**
|
|
@@ -12,6 +12,11 @@ type Context = { req?: any };
|
|
|
12
12
|
|
|
13
13
|
const ONE_YEAR_IN_MS = 365 * 24 * 60 * 60 * 1000;
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
17
|
+
* See the migration guide:
|
|
18
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
19
|
+
*/
|
|
15
20
|
export class UniversalStorage implements Storage {
|
|
16
21
|
cookies = new Cookies();
|
|
17
22
|
store: Store = isBrowser ? window.localStorage : Object.create(null);
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* As work completes on its own prior to close, the manager removes them
|
|
11
11
|
* from the registry to avoid holding references to completed jobs.
|
|
12
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
13
|
+
* See the migration guide:
|
|
14
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
12
15
|
*/
|
|
13
16
|
export class BackgroundProcessManager {
|
|
14
17
|
/**
|
|
@@ -396,6 +399,9 @@ export class BackgroundProcessManager {
|
|
|
396
399
|
|
|
397
400
|
/**
|
|
398
401
|
*
|
|
402
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
403
|
+
* See the migration guide:
|
|
404
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
399
405
|
*/
|
|
400
406
|
export class BackgroundManagerNotOpenError extends Error {
|
|
401
407
|
constructor(message: string) {
|
|
@@ -405,6 +411,9 @@ export class BackgroundManagerNotOpenError extends Error {
|
|
|
405
411
|
|
|
406
412
|
/**
|
|
407
413
|
* All possible states a `BackgroundProcessManager` instance can be in.
|
|
414
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
415
|
+
* See the migration guide:
|
|
416
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
408
417
|
*/
|
|
409
418
|
export enum BackgroundProcessManagerState {
|
|
410
419
|
/**
|