@aws-amplify/core 5.8.17 → 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/AwsClients/CognitoIdentity/base.js +2 -2
- package/lib/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +2 -2
- package/lib/AwsClients/CognitoIdentity/getId.js +2 -2
- package/lib/AwsClients/Pinpoint/getInAppMessages.js +2 -2
- package/lib/AwsClients/Pinpoint/putEvents.js +2 -2
- package/lib/AwsClients/Pinpoint/updateEndpoint.js +2 -2
- package/lib/ClientDevice/browser.js +3 -4
- 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 +18 -8
- package/lib/Errors.d.ts +10 -0
- package/lib/Errors.js +12 -3
- 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 +6 -2
- package/lib/OAuthHelper/FacebookOAuth.js +2 -2
- package/lib/OAuthHelper/GoogleOAuth.js +2 -2
- package/lib/OAuthHelper/index.d.ts +10 -0
- package/lib/OAuthHelper/index.js +10 -0
- package/lib/Platform/detectFramework.js +2 -2
- package/lib/Platform/detection/Angular.js +2 -3
- package/lib/Platform/detection/Expo.js +1 -2
- package/lib/Platform/detection/Next.js +2 -3
- package/lib/Platform/detection/Nuxt.js +2 -3
- package/lib/Platform/detection/React.js +2 -3
- package/lib/Platform/detection/ReactNative.js +1 -2
- package/lib/Platform/detection/Svelte.js +2 -3
- package/lib/Platform/detection/Vue.js +2 -3
- package/lib/Platform/detection/Web.js +1 -2
- package/lib/Platform/detection/index.js +1 -2
- 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 +78 -13
- 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 +7 -2
- 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 +12 -3
- package/lib/Util/Constants.d.ts +35 -0
- package/lib/Util/Constants.js +35 -0
- package/lib/Util/DateUtils.d.ts +24 -1
- 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 +24 -5
- package/lib/Util/StringUtils.d.ts +10 -0
- package/lib/Util/StringUtils.js +12 -3
- package/lib/clients/handlers/fetch.js +47 -49
- package/lib/clients/internal/composeServiceApi.js +2 -2
- package/lib/clients/internal/composeTransferHandler.d.ts +1 -1
- package/lib/clients/middleware/retry/defaultRetryDecider.js +2 -2
- package/lib/clients/middleware/retry/middleware.js +3 -3
- package/lib/clients/middleware/signing/middleware.js +2 -2
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.d.ts +1 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.d.ts +1 -1
- package/lib/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.d.ts +1 -1
- package/lib/clients/middleware/userAgent/middleware.js +2 -2
- package/lib/clients/serde/json.js +2 -2
- 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/AwsClients/CognitoIdentity/base.js +2 -2
- package/lib-esm/AwsClients/CognitoIdentity/getCredentialsForIdentity.js +2 -2
- package/lib-esm/AwsClients/CognitoIdentity/getId.js +2 -2
- package/lib-esm/AwsClients/Pinpoint/getInAppMessages.js +2 -2
- package/lib-esm/AwsClients/Pinpoint/putEvents.js +2 -2
- package/lib-esm/AwsClients/Pinpoint/updateEndpoint.js +2 -2
- 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 +18 -8
- 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 +5 -1
- package/lib-esm/OAuthHelper/FacebookOAuth.js +2 -2
- package/lib-esm/OAuthHelper/GoogleOAuth.js +2 -2
- 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 +7 -2
- 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 +11 -2
- package/lib-esm/Util/Constants.d.ts +35 -0
- package/lib-esm/Util/Constants.js +35 -0
- package/lib-esm/Util/DateUtils.d.ts +24 -1
- 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 +21 -2
- package/lib-esm/Util/StringUtils.d.ts +10 -0
- package/lib-esm/Util/StringUtils.js +10 -0
- package/lib-esm/clients/handlers/fetch.js +47 -49
- package/lib-esm/clients/internal/composeServiceApi.js +2 -2
- package/lib-esm/clients/internal/composeTransferHandler.d.ts +1 -1
- package/lib-esm/clients/middleware/retry/defaultRetryDecider.js +2 -2
- package/lib-esm/clients/middleware/retry/middleware.js +3 -3
- package/lib-esm/clients/middleware/signing/middleware.js +2 -2
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.d.ts +1 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.d.ts +1 -1
- package/lib-esm/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.d.ts +1 -1
- package/lib-esm/clients/middleware/userAgent/middleware.js +2 -2
- package/lib-esm/clients/serde/json.js +2 -2
- 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 +31 -14
- 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
|
@@ -22,8 +22,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
25
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
26
|
-
return g =
|
|
25
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
26
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
27
27
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
28
28
|
function step(op) {
|
|
29
29
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -55,52 +55,50 @@ var memoization_1 = require("../utils/memoization");
|
|
|
55
55
|
var shouldSendBody = function (method) {
|
|
56
56
|
return !['HEAD', 'GET', 'DELETE'].includes(method.toUpperCase());
|
|
57
57
|
};
|
|
58
|
-
var fetchTransferHandler = function (_a, _b) {
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
});
|
|
58
|
+
var fetchTransferHandler = function (_a, _b) { return __awaiter(void 0, [_a, _b], void 0, function (_c, _d) {
|
|
59
|
+
var resp, e_1, responseHeaders, httpResponse, bodyWithMixin;
|
|
60
|
+
var _e, _f;
|
|
61
|
+
var url = _c.url, method = _c.method, headers = _c.headers, body = _c.body;
|
|
62
|
+
var abortSignal = _d.abortSignal;
|
|
63
|
+
return __generator(this, function (_g) {
|
|
64
|
+
switch (_g.label) {
|
|
65
|
+
case 0:
|
|
66
|
+
_g.trys.push([0, 2, , 3]);
|
|
67
|
+
return [4 /*yield*/, fetch(url, {
|
|
68
|
+
method: method,
|
|
69
|
+
headers: headers,
|
|
70
|
+
body: shouldSendBody(method) ? body : undefined,
|
|
71
|
+
signal: abortSignal,
|
|
72
|
+
})];
|
|
73
|
+
case 1:
|
|
74
|
+
resp = _g.sent();
|
|
75
|
+
return [3 /*break*/, 3];
|
|
76
|
+
case 2:
|
|
77
|
+
e_1 = _g.sent();
|
|
78
|
+
// TODO: needs to revise error handling in v6
|
|
79
|
+
// For now this is a thin wrapper over original fetch error similar to cognito-identity-js package.
|
|
80
|
+
// Ref: https://github.com/aws-amplify/amplify-js/blob/4fbc8c0a2be7526aab723579b4c95b552195a80b/packages/amazon-cognito-identity-js/src/Client.js#L103-L108
|
|
81
|
+
if (e_1 instanceof TypeError) {
|
|
82
|
+
throw new Error('Network error');
|
|
83
|
+
}
|
|
84
|
+
throw e_1;
|
|
85
|
+
case 3:
|
|
86
|
+
responseHeaders = {};
|
|
87
|
+
(_e = resp.headers) === null || _e === void 0 ? void 0 : _e.forEach(function (value, key) {
|
|
88
|
+
responseHeaders[key.toLowerCase()] = value;
|
|
89
|
+
});
|
|
90
|
+
httpResponse = {
|
|
91
|
+
statusCode: resp.status,
|
|
92
|
+
headers: responseHeaders,
|
|
93
|
+
body: null,
|
|
94
|
+
};
|
|
95
|
+
bodyWithMixin = Object.assign((_f = resp.body) !== null && _f !== void 0 ? _f : {}, {
|
|
96
|
+
text: (0, memoization_1.withMemoization)(function () { return resp.text(); }),
|
|
97
|
+
blob: (0, memoization_1.withMemoization)(function () { return resp.blob(); }),
|
|
98
|
+
json: (0, memoization_1.withMemoization)(function () { return resp.json(); }),
|
|
99
|
+
});
|
|
100
|
+
return [2 /*return*/, __assign(__assign({}, httpResponse), { body: bodyWithMixin })];
|
|
101
|
+
}
|
|
104
102
|
});
|
|
105
|
-
};
|
|
103
|
+
}); };
|
|
106
104
|
exports.fetchTransferHandler = fetchTransferHandler;
|
|
@@ -22,8 +22,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
25
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
26
|
-
return g =
|
|
25
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
26
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
27
27
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
28
28
|
function step(op) {
|
|
29
29
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -7,7 +7,7 @@ import { Middleware, TransferHandler, Request as RequestBase, Response as Respon
|
|
|
7
7
|
* transfer handler's option type and the middleware's option type.
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
|
-
export declare const composeTransferHandler: <MiddlewareOptionsArr extends any[] = [],
|
|
10
|
+
export declare const composeTransferHandler: <MiddlewareOptionsArr extends any[] = [], Request extends RequestBase = RequestBase, Response extends ResponseBase = ResponseBase, CoreHandler extends TransferHandler<Request, Response, any> = TransferHandler<Request, Response, {}>>(coreHandler: CoreHandler, middleware: OptionToMiddleware<Request, Response, MiddlewareOptionsArr>) => (request: Request, options: MergeNoConflictKeys<[...MiddlewareOptionsArr, InferOptionTypeFromTransferHandler<CoreHandler>]>) => Promise<Response>;
|
|
11
11
|
/**
|
|
12
12
|
* Type to convert a middleware option type to a middleware type with the given
|
|
13
13
|
* option type.
|
|
@@ -11,8 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
14
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
15
|
-
return g =
|
|
14
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
15
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
16
16
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
17
17
|
function step(op) {
|
|
18
18
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -22,8 +22,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
25
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
26
|
-
return g =
|
|
25
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
26
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
27
27
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
28
28
|
function step(op) {
|
|
29
29
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -61,9 +61,9 @@ var retryMiddleware = function (_a) {
|
|
|
61
61
|
}
|
|
62
62
|
return function (next, context) {
|
|
63
63
|
return function retryMiddleware(request) {
|
|
64
|
-
var _a;
|
|
65
64
|
return __awaiter(this, void 0, void 0, function () {
|
|
66
65
|
var error, attemptsCount, response, handleTerminalErrorOrResponse, e_1, delay;
|
|
66
|
+
var _a;
|
|
67
67
|
return __generator(this, function (_b) {
|
|
68
68
|
switch (_b.label) {
|
|
69
69
|
case 0:
|
|
@@ -11,8 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
14
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
15
|
-
return g =
|
|
14
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
15
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
16
16
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
17
17
|
function step(op) {
|
|
18
18
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -11,8 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
14
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
15
|
-
return g =
|
|
14
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
15
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
16
16
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
17
17
|
function step(op) {
|
|
18
18
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -11,8 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
14
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
15
|
-
return g =
|
|
14
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
15
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
16
16
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
17
17
|
function step(op) {
|
|
18
18
|
if (f) throw new TypeError("Generator is already executing.");
|
package/lib/constants.d.ts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
3
|
+
* See the migration guide:
|
|
4
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
5
|
+
*/
|
|
1
6
|
export declare const INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER: string | symbol;
|
|
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
|
+
*/
|
|
2
12
|
export declare const USER_AGENT_HEADER = "x-amz-user-agent";
|
package/lib/constants.js
CHANGED
|
@@ -8,7 +8,17 @@ exports.USER_AGENT_HEADER = exports.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDE
|
|
|
8
8
|
* is used for AppSync/GraphQL subscriptions in the API category.
|
|
9
9
|
*/
|
|
10
10
|
var hasSymbol = typeof Symbol !== 'undefined' && typeof Symbol.for === 'function';
|
|
11
|
+
/**
|
|
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/
|
|
15
|
+
*/
|
|
11
16
|
exports.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER = hasSymbol
|
|
12
17
|
? Symbol.for('INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER')
|
|
13
18
|
: '@@INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER';
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
21
|
+
* See the migration guide:
|
|
22
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
23
|
+
*/
|
|
14
24
|
exports.USER_AGENT_HEADER = 'x-amz-user-agent';
|
package/lib/index.d.ts
CHANGED
|
@@ -20,6 +20,11 @@ export { UniversalStorage } from './UniversalStorage';
|
|
|
20
20
|
export { Platform, getAmplifyUserAgentObject, getAmplifyUserAgent, } from './Platform';
|
|
21
21
|
export { ApiAction, AuthAction, AnalyticsAction, Category, CustomUserAgentDetails, DataStoreAction, Framework, GeoAction, InteractionsAction, InAppMessagingAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction, } from './Platform/types';
|
|
22
22
|
export { INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER, USER_AGENT_HEADER, } from './constants';
|
|
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 declare const Constants: {
|
|
24
29
|
userAgent: string;
|
|
25
30
|
};
|
package/lib/index.js
CHANGED
|
@@ -79,6 +79,11 @@ Object.defineProperty(exports, "StorageAction", { enumerable: true, get: functio
|
|
|
79
79
|
var constants_1 = require("./constants");
|
|
80
80
|
Object.defineProperty(exports, "INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER", { enumerable: true, get: function () { return constants_1.INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER; } });
|
|
81
81
|
Object.defineProperty(exports, "USER_AGENT_HEADER", { enumerable: true, get: function () { return constants_1.USER_AGENT_HEADER; } });
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
84
|
+
* See the migration guide:
|
|
85
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
86
|
+
*/
|
|
82
87
|
exports.Constants = {
|
|
83
88
|
userAgent: Platform_1.Platform.userAgent,
|
|
84
89
|
};
|
package/lib/parseAWSExports.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { AmplifyConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
4
|
+
* See the migration guide:
|
|
5
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
6
|
+
*/
|
|
2
7
|
export declare const parseAWSExports: (config: any) => AmplifyConfig;
|
package/lib/parseAWSExports.js
CHANGED
|
@@ -14,6 +14,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
exports.parseAWSExports = void 0;
|
|
15
15
|
var Logger_1 = require("./Logger");
|
|
16
16
|
var logger = new Logger_1.ConsoleLogger('Parser');
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
19
|
+
* See the migration guide:
|
|
20
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
21
|
+
*/
|
|
17
22
|
var parseAWSExports = function (config) {
|
|
18
23
|
var amplifyConfig = {};
|
|
19
24
|
// Analytics
|