@aws-amplify/core 6.11.4 → 6.11.5-local-stack.00864ae.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/dist/cjs/BackgroundProcessManager/types.js +5 -1
- package/dist/cjs/BackgroundProcessManager/types.js.map +1 -1
- package/dist/cjs/Cache/constants.js +3 -3
- package/dist/cjs/Cache/constants.js.map +1 -1
- package/dist/cjs/Cache/utils/cacheHelpers.js +4 -4
- package/dist/cjs/Cache/utils/cacheHelpers.js.map +1 -1
- package/dist/cjs/Cache/utils/errorHelpers.js +1 -1
- package/dist/cjs/Cache/utils/errorHelpers.js.map +1 -1
- package/dist/cjs/I18n/errorHelpers.js +1 -1
- package/dist/cjs/I18n/errorHelpers.js.map +1 -1
- package/dist/cjs/Logger/types.js +2 -1
- package/dist/cjs/Logger/types.js.map +1 -1
- package/dist/cjs/Platform/detectFramework.js +2 -2
- package/dist/cjs/Platform/detectFramework.js.map +1 -1
- package/dist/cjs/Platform/detection/Angular.js +2 -3
- package/dist/cjs/Platform/detection/Angular.js.map +1 -1
- package/dist/cjs/Platform/detection/Expo.js +1 -2
- package/dist/cjs/Platform/detection/Expo.js.map +1 -1
- package/dist/cjs/Platform/detection/Next.js +2 -3
- package/dist/cjs/Platform/detection/Next.js.map +1 -1
- package/dist/cjs/Platform/detection/Nuxt.js +2 -3
- package/dist/cjs/Platform/detection/Nuxt.js.map +1 -1
- package/dist/cjs/Platform/detection/React.js +2 -3
- package/dist/cjs/Platform/detection/React.js.map +1 -1
- package/dist/cjs/Platform/detection/ReactNative.js +1 -2
- package/dist/cjs/Platform/detection/ReactNative.js.map +1 -1
- package/dist/cjs/Platform/detection/Svelte.js +2 -3
- package/dist/cjs/Platform/detection/Svelte.js.map +1 -1
- package/dist/cjs/Platform/detection/Vue.js +2 -3
- package/dist/cjs/Platform/detection/Vue.js.map +1 -1
- package/dist/cjs/Platform/detection/Web.js +1 -2
- package/dist/cjs/Platform/detection/Web.js.map +1 -1
- package/dist/cjs/Platform/detection/index.js +1 -2
- package/dist/cjs/Platform/detection/index.js.map +1 -1
- package/dist/cjs/Platform/types.js +28 -14
- package/dist/cjs/Platform/types.js.map +1 -1
- package/dist/cjs/Platform/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/cjs/ServiceWorker/errorHelpers.js +1 -1
- package/dist/cjs/ServiceWorker/errorHelpers.js.map +1 -1
- package/dist/cjs/awsClients/pinpoint/errorHelpers.js +1 -1
- package/dist/cjs/awsClients/pinpoint/errorHelpers.js.map +1 -1
- package/dist/cjs/foundation/factories/middleware/createDisableCacheMiddleware.js +15 -0
- package/dist/cjs/foundation/factories/middleware/createDisableCacheMiddleware.js.map +1 -0
- package/dist/cjs/foundation/factories/middleware/index.js +9 -0
- package/dist/cjs/foundation/factories/middleware/index.js.map +1 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.js +14 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.js.map +1 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/constants.js +18 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/constants.js.map +1 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.js +37 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.js.map +1 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.js +32 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.js.map +1 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.js +17 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.js.map +1 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/index.js +9 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/handler/index.js.map +1 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/index.js +13 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/index.js.map +1 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.js +24 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.js.map +1 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/index.js +9 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/serde/index.js.map +1 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/index.js +9 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/index.js.map +1 -0
- package/dist/cjs/{awsClients/cognitoIdentity/types.js → foundation/factories/serviceClients/cognitoIdentity/types/sdk.js} +1 -1
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/sdk.js.map +1 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.js +6 -0
- package/dist/cjs/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.js.map +1 -0
- package/dist/cjs/index.js +6 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/parseAmplifyOutputs.js +3 -4
- package/dist/cjs/parseAmplifyOutputs.js.map +1 -1
- package/dist/cjs/providers/pinpoint/types/errors.js +2 -1
- package/dist/cjs/providers/pinpoint/types/errors.js.map +1 -1
- package/dist/cjs/singleton/API/types.js +5 -1
- package/dist/cjs/singleton/API/types.js.map +1 -1
- package/dist/cjs/singleton/Auth/index.js +12 -0
- package/dist/cjs/singleton/Auth/index.js.map +1 -1
- package/dist/cjs/singleton/Auth/utils/errorHelpers.js +1 -1
- package/dist/cjs/singleton/Auth/utils/errorHelpers.js.map +1 -1
- package/dist/cjs/singleton/Auth/utils/index.js +4 -5
- package/dist/cjs/singleton/Auth/utils/index.js.map +1 -1
- package/dist/cjs/singleton/apis/clearCredentials.js +1 -2
- package/dist/cjs/singleton/apis/clearCredentials.js.map +1 -1
- package/dist/cjs/types/errors.js +2 -1
- package/dist/cjs/types/errors.js.map +1 -1
- package/dist/cjs/utils/convert/base64/bytesToString.js +1 -2
- package/dist/cjs/utils/convert/base64/bytesToString.js.map +1 -1
- package/dist/cjs/utils/cryptoSecureRandomInt.js +1 -2
- package/dist/cjs/utils/cryptoSecureRandomInt.js.map +1 -1
- package/dist/cjs/utils/getClientInfo/getClientInfo.js +1 -2
- package/dist/cjs/utils/getClientInfo/getClientInfo.js.map +1 -1
- package/dist/cjs/utils/isTokenExpired.js +1 -2
- package/dist/cjs/utils/isTokenExpired.js.map +1 -1
- package/dist/cjs/utils/retry/jitteredBackoff.js +1 -2
- package/dist/cjs/utils/retry/jitteredBackoff.js.map +1 -1
- package/dist/cjs/utils/retry/retry.js +1 -2
- package/dist/cjs/utils/retry/retry.js.map +1 -1
- package/dist/cjs/utils/urlSafeDecode.js +1 -2
- package/dist/cjs/utils/urlSafeDecode.js.map +1 -1
- package/dist/cjs/utils/urlSafeEncode.js +1 -2
- package/dist/cjs/utils/urlSafeEncode.js.map +1 -1
- package/dist/esm/Cache/constants.mjs +3 -3
- package/dist/esm/Cache/constants.mjs.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/awsClients/pinpoint/base.d.ts +1 -1
- package/dist/esm/awsClients/pinpoint/getInAppMessages.d.ts +2 -2
- package/dist/esm/awsClients/pinpoint/putEvents.d.ts +2 -2
- package/dist/esm/awsClients/pinpoint/updateEndpoint.d.ts +2 -2
- package/dist/esm/clients/internal/composeServiceApi.d.ts +4 -1
- package/dist/esm/clients/internal/composeTransferHandler.d.ts +1 -1
- package/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.d.ts +1 -1
- package/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.d.ts +1 -1
- package/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.d.ts +1 -1
- package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.d.ts +5 -0
- package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.mjs +12 -0
- package/dist/esm/foundation/factories/middleware/createDisableCacheMiddleware.mjs.map +1 -0
- package/dist/esm/foundation/factories/middleware/index.d.ts +1 -0
- package/dist/esm/foundation/factories/middleware/index.mjs +2 -0
- package/dist/esm/{awsClients/cognitoIdentity → foundation/factories/middleware}/index.mjs.map +1 -1
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.d.ts +4 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.mjs +27 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.mjs.map +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.d.ts +10 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.mjs +34 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/constants.mjs.map +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.d.ts +14 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.mjs +50 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.mjs.map +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.d.ts +14 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.mjs +45 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.mjs.map +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.d.ts +8 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.mjs +31 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.mjs.map +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.d.ts +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.mjs +2 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/handler/index.mjs.map +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.d.ts +4 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.mjs +4 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/index.mjs.map +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.d.ts +3 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.mjs +20 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.mjs.map +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.d.ts +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.mjs +2 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/serde/index.mjs.map +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.d.ts +3 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.mjs +2 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/index.mjs.map +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/sdk.mjs +2 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/sdk.mjs.map +1 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.d.ts +6 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.mjs +2 -0
- package/dist/esm/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.mjs.map +1 -0
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.mjs +3 -2
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/singleton/Auth/index.mjs +13 -0
- package/dist/esm/singleton/Auth/index.mjs.map +1 -1
- package/dist/esm/singleton/Auth/types.d.ts +8 -0
- package/dist/esm/utils/amplifyUrl/index.d.ts +4 -3
- package/dist/esm/utils/amplifyUrl/index.native.d.ts +4 -3
- package/dist/esm/utils/queuedStorage/createQueuedStorage.native.d.ts +1 -1
- package/internals/aws-clients/cognitoIdentity/package.json +4 -4
- package/package.json +9 -10
- package/src/Platform/version.ts +1 -1
- package/src/foundation/factories/middleware/createDisableCacheMiddleware.ts +18 -0
- package/src/foundation/factories/middleware/index.ts +4 -0
- package/src/foundation/factories/serviceClients/cognitoIdentity/cognitoIdentityPoolEndpointResolver.ts +15 -0
- package/src/foundation/factories/serviceClients/cognitoIdentity/constants.ts +20 -0
- package/src/foundation/factories/serviceClients/cognitoIdentity/createGetCredentialsForIdentityClient.ts +62 -0
- package/src/foundation/factories/serviceClients/cognitoIdentity/createGetIdClient.ts +48 -0
- package/src/foundation/factories/serviceClients/cognitoIdentity/handler/cognitoIdentityTransferHandler.ts +23 -0
- package/src/foundation/factories/serviceClients/cognitoIdentity/handler/index.ts +4 -0
- package/src/foundation/factories/serviceClients/cognitoIdentity/index.ts +12 -0
- package/src/foundation/factories/serviceClients/cognitoIdentity/serde/createClientSerializer.ts +29 -0
- package/src/foundation/factories/serviceClients/cognitoIdentity/serde/index.ts +4 -0
- package/src/foundation/factories/serviceClients/cognitoIdentity/types/index.ts +9 -0
- package/src/{awsClients/cognitoIdentity/types.ts → foundation/factories/serviceClients/cognitoIdentity/types/sdk.ts} +0 -2
- package/src/foundation/factories/serviceClients/cognitoIdentity/types/serviceClient.ts +8 -0
- package/src/index.ts +5 -4
- package/src/singleton/Auth/index.ts +19 -0
- package/src/singleton/Auth/types.ts +8 -0
- package/dist/cjs/awsClients/cognitoIdentity/base.js +0 -69
- package/dist/cjs/awsClients/cognitoIdentity/base.js.map +0 -1
- package/dist/cjs/awsClients/cognitoIdentity/getCredentialsForIdentity.js +0 -41
- package/dist/cjs/awsClients/cognitoIdentity/getCredentialsForIdentity.js.map +0 -1
- package/dist/cjs/awsClients/cognitoIdentity/getId.js +0 -32
- package/dist/cjs/awsClients/cognitoIdentity/getId.js.map +0 -1
- package/dist/cjs/awsClients/cognitoIdentity/index.js +0 -11
- package/dist/cjs/awsClients/cognitoIdentity/index.js.map +0 -1
- package/dist/cjs/awsClients/cognitoIdentity/types.js.map +0 -1
- package/dist/esm/awsClients/cognitoIdentity/base.d.ts +0 -29
- package/dist/esm/awsClients/cognitoIdentity/base.mjs +0 -83
- package/dist/esm/awsClients/cognitoIdentity/base.mjs.map +0 -1
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.d.ts +0 -18
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs +0 -56
- package/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs.map +0 -1
- package/dist/esm/awsClients/cognitoIdentity/getId.d.ts +0 -18
- package/dist/esm/awsClients/cognitoIdentity/getId.mjs +0 -47
- package/dist/esm/awsClients/cognitoIdentity/getId.mjs.map +0 -1
- package/dist/esm/awsClients/cognitoIdentity/index.d.ts +0 -2
- package/dist/esm/awsClients/cognitoIdentity/index.mjs +0 -3
- package/dist/esm/awsClients/cognitoIdentity/types.mjs +0 -2
- package/dist/esm/awsClients/cognitoIdentity/types.mjs.map +0 -1
- package/src/awsClients/cognitoIdentity/base.ts +0 -101
- package/src/awsClients/cognitoIdentity/getCredentialsForIdentity.ts +0 -77
- package/src/awsClients/cognitoIdentity/getId.ts +0 -61
- package/src/awsClients/cognitoIdentity/index.ts +0 -9
- /package/dist/esm/{awsClients/cognitoIdentity/types.d.ts → foundation/factories/serviceClients/cognitoIdentity/types/sdk.d.ts} +0 -0
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.BackgroundProcessManagerState = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* All possible states a `BackgroundProcessManager` instance can be in.
|
|
9
|
+
*/
|
|
10
|
+
var BackgroundProcessManagerState;
|
|
7
11
|
(function (BackgroundProcessManagerState) {
|
|
8
12
|
/**
|
|
9
13
|
* Accepting new jobs.
|
|
@@ -17,5 +21,5 @@ exports.BackgroundProcessManagerState = void 0;
|
|
|
17
21
|
* Not accepting new jobs. All submitted jobs are complete.
|
|
18
22
|
*/
|
|
19
23
|
BackgroundProcessManagerState["Closed"] = "Closed";
|
|
20
|
-
})(
|
|
24
|
+
})(BackgroundProcessManagerState || (exports.BackgroundProcessManagerState = BackgroundProcessManagerState = {}));
|
|
21
25
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/BackgroundProcessManager/types.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.BackgroundProcessManagerState = void 0;\n/**\n * All possible states a `BackgroundProcessManager` instance can be in.\n */\nvar BackgroundProcessManagerState;\n(function (BackgroundProcessManagerState) {\n /**\n * Accepting new jobs.\n */\n BackgroundProcessManagerState[\"Open\"] = \"Open\";\n /**\n * Not accepting new jobs. Waiting for submitted jobs to complete.\n */\n BackgroundProcessManagerState[\"Closing\"] = \"Closing\";\n /**\n * Not accepting new jobs. All submitted jobs are complete.\n */\n BackgroundProcessManagerState[\"Closed\"] = \"Closed\";\n})(BackgroundProcessManagerState
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/BackgroundProcessManager/types.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.BackgroundProcessManagerState = void 0;\n/**\n * All possible states a `BackgroundProcessManager` instance can be in.\n */\nvar BackgroundProcessManagerState;\n(function (BackgroundProcessManagerState) {\n /**\n * Accepting new jobs.\n */\n BackgroundProcessManagerState[\"Open\"] = \"Open\";\n /**\n * Not accepting new jobs. Waiting for submitted jobs to complete.\n */\n BackgroundProcessManagerState[\"Closing\"] = \"Closing\";\n /**\n * Not accepting new jobs. All submitted jobs are complete.\n */\n BackgroundProcessManagerState[\"Closed\"] = \"Closed\";\n})(BackgroundProcessManagerState || (exports.BackgroundProcessManagerState = BackgroundProcessManagerState = {}));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,6BAA6B,GAAG,MAAM;AAC9C;AACA;AACA;AACA,IAAI,6BAA6B;AACjC,CAAC,UAAU,6BAA6B,EAAE;AAC1C;AACA;AACA;AACA,IAAI,6BAA6B,CAAC,MAAM,CAAC,GAAG,MAAM;AAClD;AACA;AACA;AACA,IAAI,6BAA6B,CAAC,SAAS,CAAC,GAAG,SAAS;AACxD;AACA;AACA;AACA,IAAI,6BAA6B,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACtD,CAAC,EAAE,6BAA6B,KAAK,OAAO,CAAC,6BAA6B,GAAG,6BAA6B,GAAG,EAAE,CAAC,CAAC;;"}
|
|
@@ -9,9 +9,9 @@ exports.currentSizeKey = exports.defaultConfig = void 0;
|
|
|
9
9
|
*/
|
|
10
10
|
exports.defaultConfig = {
|
|
11
11
|
keyPrefix: 'aws-amplify-cache',
|
|
12
|
-
capacityInBytes: 1048576,
|
|
13
|
-
itemMaxSize: 210000,
|
|
14
|
-
defaultTTL: 259200000,
|
|
12
|
+
capacityInBytes: 1048576, // 1MB
|
|
13
|
+
itemMaxSize: 210000, // about 200kb
|
|
14
|
+
defaultTTL: 259200000, // about 3 days
|
|
15
15
|
defaultPriority: 5,
|
|
16
16
|
warningThreshold: 0.8,
|
|
17
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../src/Cache/constants.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.currentSizeKey = exports.defaultConfig = void 0;\n/**\n * Default cache config\n */\nexports.defaultConfig = {\n keyPrefix: 'aws-amplify-cache',\n capacityInBytes: 1048576
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../src/Cache/constants.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.currentSizeKey = exports.defaultConfig = void 0;\n/**\n * Default cache config\n */\nexports.defaultConfig = {\n keyPrefix: 'aws-amplify-cache',\n capacityInBytes: 1048576, // 1MB\n itemMaxSize: 210000, // about 200kb\n defaultTTL: 259200000, // about 3 days\n defaultPriority: 5,\n warningThreshold: 0.8,\n};\nexports.currentSizeKey = 'CurSize';\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa,GAAG,MAAM;AACvD;AACA;AACA;AACA,OAAO,CAAC,aAAa,GAAG;AACxB,IAAI,SAAS,EAAE,mBAAmB;AAClC,IAAI,eAAe,EAAE,OAAO;AAC5B,IAAI,WAAW,EAAE,MAAM;AACvB,IAAI,UAAU,EAAE,SAAS;AACzB,IAAI,eAAe,EAAE,CAAC;AACtB,IAAI,gBAAgB,EAAE,GAAG;AACzB,CAAC;AACD,OAAO,CAAC,cAAc,GAAG,SAAS;;"}
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getCurrentSizeKey =
|
|
6
|
+
exports.getCurrentSizeKey = void 0;
|
|
7
|
+
exports.getByteLength = getByteLength;
|
|
8
|
+
exports.getCurrentTime = getCurrentTime;
|
|
9
|
+
exports.isInteger = isInteger;
|
|
7
10
|
const constants_1 = require("../constants");
|
|
8
11
|
/**
|
|
9
12
|
* return the byte size of the string
|
|
@@ -27,7 +30,6 @@ function getByteLength(str) {
|
|
|
27
30
|
}
|
|
28
31
|
return ret;
|
|
29
32
|
}
|
|
30
|
-
exports.getByteLength = getByteLength;
|
|
31
33
|
/**
|
|
32
34
|
* get current time
|
|
33
35
|
*/
|
|
@@ -35,7 +37,6 @@ function getCurrentTime() {
|
|
|
35
37
|
const currentTime = new Date();
|
|
36
38
|
return currentTime.getTime();
|
|
37
39
|
}
|
|
38
|
-
exports.getCurrentTime = getCurrentTime;
|
|
39
40
|
/**
|
|
40
41
|
* check if passed value is an integer
|
|
41
42
|
*/
|
|
@@ -45,7 +46,6 @@ function isInteger(value) {
|
|
|
45
46
|
}
|
|
46
47
|
return (typeof value === 'number' && isFinite(value) && Math.floor(value) === value);
|
|
47
48
|
}
|
|
48
|
-
exports.isInteger = isInteger;
|
|
49
49
|
const getCurrentSizeKey = (keyPrefix) => `${keyPrefix}${constants_1.currentSizeKey}`;
|
|
50
50
|
exports.getCurrentSizeKey = getCurrentSizeKey;
|
|
51
51
|
//# sourceMappingURL=cacheHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cacheHelpers.js","sources":["../../../../src/Cache/utils/cacheHelpers.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.getCurrentSizeKey =
|
|
1
|
+
{"version":3,"file":"cacheHelpers.js","sources":["../../../../src/Cache/utils/cacheHelpers.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.getCurrentSizeKey = void 0;\nexports.getByteLength = getByteLength;\nexports.getCurrentTime = getCurrentTime;\nexports.isInteger = isInteger;\nconst constants_1 = require(\"../constants\");\n/**\n * return the byte size of the string\n * @param str\n */\nfunction getByteLength(str) {\n let ret = 0;\n ret = str.length;\n for (let i = str.length; i >= 0; i -= 1) {\n const charCode = str.charCodeAt(i);\n if (charCode > 0x7f && charCode <= 0x7ff) {\n ret += 1;\n }\n else if (charCode > 0x7ff && charCode <= 0xffff) {\n ret += 2;\n }\n // trail surrogate\n if (charCode >= 0xdc00 && charCode <= 0xdfff) {\n i -= 1;\n }\n }\n return ret;\n}\n/**\n * get current time\n */\nfunction getCurrentTime() {\n const currentTime = new Date();\n return currentTime.getTime();\n}\n/**\n * check if passed value is an integer\n */\nfunction isInteger(value) {\n if (Number.isInteger) {\n return Number.isInteger(value);\n }\n return (typeof value === 'number' && isFinite(value) && Math.floor(value) === value);\n}\nconst getCurrentSizeKey = (keyPrefix) => `${keyPrefix}${constants_1.currentSizeKey}`;\nexports.getCurrentSizeKey = getCurrentSizeKey;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iBAAiB,GAAG,MAAM;AAClC,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,OAAO,CAAC,cAAc,GAAG,cAAc;AACvC,OAAO,CAAC,SAAS,GAAG,SAAS;AAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;AAC3C;AACA;AACA;AACA;AACA,SAAS,aAAa,CAAC,GAAG,EAAE;AAC5B,IAAI,IAAI,GAAG,GAAG,CAAC;AACf,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM;AACpB,IAAI,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;AAC7C,QAAQ,MAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;AAC1C,QAAQ,IAAI,QAAQ,GAAG,IAAI,IAAI,QAAQ,IAAI,KAAK,EAAE;AAClD,YAAY,GAAG,IAAI,CAAC;AACpB;AACA,aAAa,IAAI,QAAQ,GAAG,KAAK,IAAI,QAAQ,IAAI,MAAM,EAAE;AACzD,YAAY,GAAG,IAAI,CAAC;AACpB;AACA;AACA,QAAQ,IAAI,QAAQ,IAAI,MAAM,IAAI,QAAQ,IAAI,MAAM,EAAE;AACtD,YAAY,CAAC,IAAI,CAAC;AAClB;AACA;AACA,IAAI,OAAO,GAAG;AACd;AACA;AACA;AACA;AACA,SAAS,cAAc,GAAG;AAC1B,IAAI,MAAM,WAAW,GAAG,IAAI,IAAI,EAAE;AAClC,IAAI,OAAO,WAAW,CAAC,OAAO,EAAE;AAChC;AACA;AACA;AACA;AACA,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,IAAI,IAAI,MAAM,CAAC,SAAS,EAAE;AAC1B,QAAQ,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;AACtC;AACA,IAAI,QAAQ,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK;AACvF;AACA,MAAM,iBAAiB,GAAG,CAAC,SAAS,KAAK,CAAC,EAAE,SAAS,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;AACpF,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;;"}
|
|
@@ -10,7 +10,7 @@ var CacheErrorCode;
|
|
|
10
10
|
CacheErrorCode["NoCacheItem"] = "NoCacheItem";
|
|
11
11
|
CacheErrorCode["NullNextNode"] = "NullNextNode";
|
|
12
12
|
CacheErrorCode["NullPreviousNode"] = "NullPreviousNode";
|
|
13
|
-
})(CacheErrorCode
|
|
13
|
+
})(CacheErrorCode || (exports.CacheErrorCode = CacheErrorCode = {}));
|
|
14
14
|
const cacheErrorMap = {
|
|
15
15
|
[CacheErrorCode.NoCacheItem]: {
|
|
16
16
|
message: 'Item not found in the cache storage.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHelpers.js","sources":["../../../../src/Cache/utils/errorHelpers.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.assert = exports.CacheErrorCode = void 0;\nconst errors_1 = require(\"../../errors\");\nvar CacheErrorCode;\n(function (CacheErrorCode) {\n CacheErrorCode[\"NoCacheItem\"] = \"NoCacheItem\";\n CacheErrorCode[\"NullNextNode\"] = \"NullNextNode\";\n CacheErrorCode[\"NullPreviousNode\"] = \"NullPreviousNode\";\n})(CacheErrorCode
|
|
1
|
+
{"version":3,"file":"errorHelpers.js","sources":["../../../../src/Cache/utils/errorHelpers.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.assert = exports.CacheErrorCode = void 0;\nconst errors_1 = require(\"../../errors\");\nvar CacheErrorCode;\n(function (CacheErrorCode) {\n CacheErrorCode[\"NoCacheItem\"] = \"NoCacheItem\";\n CacheErrorCode[\"NullNextNode\"] = \"NullNextNode\";\n CacheErrorCode[\"NullPreviousNode\"] = \"NullPreviousNode\";\n})(CacheErrorCode || (exports.CacheErrorCode = CacheErrorCode = {}));\nconst cacheErrorMap = {\n [CacheErrorCode.NoCacheItem]: {\n message: 'Item not found in the cache storage.',\n },\n [CacheErrorCode.NullNextNode]: {\n message: 'Next node is null.',\n },\n [CacheErrorCode.NullPreviousNode]: {\n message: 'Previous node is null.',\n },\n};\nexports.assert = (0, errors_1.createAssertionFunction)(cacheErrorMap);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,MAAM;AAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;AACxC,IAAI,cAAc;AAClB,CAAC,UAAU,cAAc,EAAE;AAC3B,IAAI,cAAc,CAAC,aAAa,CAAC,GAAG,aAAa;AACjD,IAAI,cAAc,CAAC,cAAc,CAAC,GAAG,cAAc;AACnD,IAAI,cAAc,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;AAC3D,CAAC,EAAE,cAAc,KAAK,OAAO,CAAC,cAAc,GAAG,cAAc,GAAG,EAAE,CAAC,CAAC;AACpE,MAAM,aAAa,GAAG;AACtB,IAAI,CAAC,cAAc,CAAC,WAAW,GAAG;AAClC,QAAQ,OAAO,EAAE,sCAAsC;AACvD,KAAK;AACL,IAAI,CAAC,cAAc,CAAC,YAAY,GAAG;AACnC,QAAQ,OAAO,EAAE,oBAAoB;AACrC,KAAK;AACL,IAAI,CAAC,cAAc,CAAC,gBAAgB,GAAG;AACvC,QAAQ,OAAO,EAAE,wBAAwB;AACzC,KAAK;AACL,CAAC;AACD,OAAO,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,uBAAuB,EAAE,aAAa,CAAC;;"}
|
|
@@ -8,7 +8,7 @@ const errors_1 = require("../errors");
|
|
|
8
8
|
var I18nErrorCode;
|
|
9
9
|
(function (I18nErrorCode) {
|
|
10
10
|
I18nErrorCode["NotConfigured"] = "NotConfigured";
|
|
11
|
-
})(I18nErrorCode
|
|
11
|
+
})(I18nErrorCode || (exports.I18nErrorCode = I18nErrorCode = {}));
|
|
12
12
|
const i18nErrorMap = {
|
|
13
13
|
[I18nErrorCode.NotConfigured]: {
|
|
14
14
|
message: 'i18n is not configured.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHelpers.js","sources":["../../../src/I18n/errorHelpers.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.assert = exports.I18nErrorCode = void 0;\nconst errors_1 = require(\"../errors\");\nvar I18nErrorCode;\n(function (I18nErrorCode) {\n I18nErrorCode[\"NotConfigured\"] = \"NotConfigured\";\n})(I18nErrorCode
|
|
1
|
+
{"version":3,"file":"errorHelpers.js","sources":["../../../src/I18n/errorHelpers.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.assert = exports.I18nErrorCode = void 0;\nconst errors_1 = require(\"../errors\");\nvar I18nErrorCode;\n(function (I18nErrorCode) {\n I18nErrorCode[\"NotConfigured\"] = \"NotConfigured\";\n})(I18nErrorCode || (exports.I18nErrorCode = I18nErrorCode = {}));\nconst i18nErrorMap = {\n [I18nErrorCode.NotConfigured]: {\n message: 'i18n is not configured.',\n },\n};\nexports.assert = (0, errors_1.createAssertionFunction)(i18nErrorMap);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,MAAM;AAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;AACrC,IAAI,aAAa;AACjB,CAAC,UAAU,aAAa,EAAE;AAC1B,IAAI,aAAa,CAAC,eAAe,CAAC,GAAG,eAAe;AACpD,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,aAAa,GAAG,aAAa,GAAG,EAAE,CAAC,CAAC;AACjE,MAAM,YAAY,GAAG;AACrB,IAAI,CAAC,aAAa,CAAC,aAAa,GAAG;AACnC,QAAQ,OAAO,EAAE,yBAAyB;AAC1C,KAAK;AACL,CAAC;AACD,OAAO,CAAC,MAAM,GAAG,IAAI,QAAQ,CAAC,uBAAuB,EAAE,YAAY,CAAC;;"}
|
package/dist/cjs/Logger/types.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.LogType = void 0;
|
|
7
|
+
var LogType;
|
|
7
8
|
(function (LogType) {
|
|
8
9
|
LogType["DEBUG"] = "DEBUG";
|
|
9
10
|
LogType["ERROR"] = "ERROR";
|
|
@@ -11,5 +12,5 @@ exports.LogType = void 0;
|
|
|
11
12
|
LogType["WARN"] = "WARN";
|
|
12
13
|
LogType["VERBOSE"] = "VERBOSE";
|
|
13
14
|
LogType["NONE"] = "NONE";
|
|
14
|
-
})(
|
|
15
|
+
})(LogType || (exports.LogType = LogType = {}));
|
|
15
16
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/Logger/types.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.LogType = void 0;\nvar LogType;\n(function (LogType) {\n LogType[\"DEBUG\"] = \"DEBUG\";\n LogType[\"ERROR\"] = \"ERROR\";\n LogType[\"INFO\"] = \"INFO\";\n LogType[\"WARN\"] = \"WARN\";\n LogType[\"VERBOSE\"] = \"VERBOSE\";\n LogType[\"NONE\"] = \"NONE\";\n})(LogType
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/Logger/types.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.LogType = void 0;\nvar LogType;\n(function (LogType) {\n LogType[\"DEBUG\"] = \"DEBUG\";\n LogType[\"ERROR\"] = \"ERROR\";\n LogType[\"INFO\"] = \"INFO\";\n LogType[\"WARN\"] = \"WARN\";\n LogType[\"VERBOSE\"] = \"VERBOSE\";\n LogType[\"NONE\"] = \"NONE\";\n})(LogType || (exports.LogType = LogType = {}));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,OAAO,GAAG,MAAM;AACxB,IAAI,OAAO;AACX,CAAC,UAAU,OAAO,EAAE;AACpB,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO;AAC9B,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO;AAC9B,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM;AAC5B,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM;AAC5B,IAAI,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS;AAClC,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM;AAC5B,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,GAAG,OAAO,GAAG,EAAE,CAAC,CAAC;;"}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.observeFrameworkChanges = exports.detectFramework = exports.frameworkChangeObservers = void 0;
|
|
7
|
+
exports.clearCache = clearCache;
|
|
7
8
|
const types_1 = require("./types");
|
|
8
9
|
const detection_1 = require("./detection");
|
|
9
10
|
// We want to cache detection since the framework won't change
|
|
@@ -55,7 +56,6 @@ exports.observeFrameworkChanges = observeFrameworkChanges;
|
|
|
55
56
|
function clearCache() {
|
|
56
57
|
frameworkCache = undefined;
|
|
57
58
|
}
|
|
58
|
-
exports.clearCache = clearCache;
|
|
59
59
|
// For a framework type and a delay amount, setup the event to re-detect
|
|
60
60
|
// During the runtime boot, it is possible that framework detection will
|
|
61
61
|
// be triggered before the framework has made modifications to the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectFramework.js","sources":["../../../src/Platform/detectFramework.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.
|
|
1
|
+
{"version":3,"file":"detectFramework.js","sources":["../../../src/Platform/detectFramework.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.observeFrameworkChanges = exports.detectFramework = exports.frameworkChangeObservers = void 0;\nexports.clearCache = clearCache;\nconst types_1 = require(\"./types\");\nconst detection_1 = require(\"./detection\");\n// We want to cache detection since the framework won't change\nlet frameworkCache;\nexports.frameworkChangeObservers = [];\n// Setup the detection reset tracking / timeout delays\nlet resetTriggered = false;\nconst SSR_RESET_TIMEOUT = 10; // ms\nconst WEB_RESET_TIMEOUT = 10; // ms\nconst PRIME_FRAMEWORK_DELAY = 1000; // ms\nconst detectFramework = () => {\n if (!frameworkCache) {\n frameworkCache = (0, detection_1.detect)();\n if (resetTriggered) {\n // The final run of detectFramework:\n // Starting from this point, the `frameworkCache` becomes \"final\".\n // So we don't need to notify the observers again so the observer\n // can be removed after the final notice.\n while (exports.frameworkChangeObservers.length) {\n exports.frameworkChangeObservers.pop()?.();\n }\n }\n else {\n // The first run of detectFramework:\n // Every time we update the cache, call each observer function\n exports.frameworkChangeObservers.forEach(fcn => {\n fcn();\n });\n }\n // Retry once for either Unknown type after a delay (explained below)\n resetTimeout(types_1.Framework.ServerSideUnknown, SSR_RESET_TIMEOUT);\n resetTimeout(types_1.Framework.WebUnknown, WEB_RESET_TIMEOUT);\n }\n return frameworkCache;\n};\nexports.detectFramework = detectFramework;\n/**\n * @internal Setup observer callback that will be called everytime the framework changes\n */\nconst observeFrameworkChanges = (fcn) => {\n // When the `frameworkCache` won't be updated again, we ignore all incoming\n // observers.\n if (resetTriggered) {\n return;\n }\n exports.frameworkChangeObservers.push(fcn);\n};\nexports.observeFrameworkChanges = observeFrameworkChanges;\nfunction clearCache() {\n frameworkCache = undefined;\n}\n// For a framework type and a delay amount, setup the event to re-detect\n// During the runtime boot, it is possible that framework detection will\n// be triggered before the framework has made modifications to the\n// global/window/etc needed for detection. When no framework is detected\n// we will reset and try again to ensure we don't use a cached\n// non-framework detection result for all requests.\nfunction resetTimeout(framework, delay) {\n if (frameworkCache === framework && !resetTriggered) {\n setTimeout(() => {\n clearCache();\n resetTriggered = true;\n setTimeout(exports.detectFramework, PRIME_FRAMEWORK_DELAY);\n }, delay);\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,uBAAuB,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,wBAAwB,GAAG,MAAM;AACrG,OAAO,CAAC,UAAU,GAAG,UAAU;AAC/B,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAClC,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;AAC1C;AACA,IAAI,cAAc;AAClB,OAAO,CAAC,wBAAwB,GAAG,EAAE;AACrC;AACA,IAAI,cAAc,GAAG,KAAK;AAC1B,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,eAAe,GAAG,MAAM;AAC9B,IAAI,IAAI,CAAC,cAAc,EAAE;AACzB,QAAQ,cAAc,GAAG,IAAI,WAAW,CAAC,MAAM,GAAG;AAClD,QAAQ,IAAI,cAAc,EAAE;AAC5B;AACA;AACA;AACA;AACA,YAAY,OAAO,OAAO,CAAC,wBAAwB,CAAC,MAAM,EAAE;AAC5D,gBAAgB,OAAO,CAAC,wBAAwB,CAAC,GAAG,EAAE,IAAI;AAC1D;AACA;AACA,aAAa;AACb;AACA;AACA,YAAY,OAAO,CAAC,wBAAwB,CAAC,OAAO,CAAC,GAAG,IAAI;AAC5D,gBAAgB,GAAG,EAAE;AACrB,aAAa,CAAC;AACd;AACA;AACA,QAAQ,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;AAC5E,QAAQ,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,iBAAiB,CAAC;AACrE;AACA,IAAI,OAAO,cAAc;AACzB,CAAC;AACD,OAAO,CAAC,eAAe,GAAG,eAAe;AACzC;AACA;AACA;AACA,MAAM,uBAAuB,GAAG,CAAC,GAAG,KAAK;AACzC;AACA;AACA,IAAI,IAAI,cAAc,EAAE;AACxB,QAAQ;AACR;AACA,IAAI,OAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,GAAG,CAAC;AAC9C,CAAC;AACD,OAAO,CAAC,uBAAuB,GAAG,uBAAuB;AACzD,SAAS,UAAU,GAAG;AACtB,IAAI,cAAc,GAAG,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE;AACxC,IAAI,IAAI,cAAc,KAAK,SAAS,IAAI,CAAC,cAAc,EAAE;AACzD,QAAQ,UAAU,CAAC,MAAM;AACzB,YAAY,UAAU,EAAE;AACxB,YAAY,cAAc,GAAG,IAAI;AACjC,YAAY,UAAU,CAAC,OAAO,CAAC,eAAe,EAAE,qBAAqB,CAAC;AACtE,SAAS,EAAE,KAAK,CAAC;AACjB;AACA;;"}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.angularWebDetect = angularWebDetect;
|
|
7
|
+
exports.angularSSRDetect = angularSSRDetect;
|
|
7
8
|
const helpers_1 = require("./helpers");
|
|
8
9
|
// Tested with @angular/core 16.0.0
|
|
9
10
|
function angularWebDetect() {
|
|
@@ -11,12 +12,10 @@ function angularWebDetect() {
|
|
|
11
12
|
const angularContentSetInWindow = Boolean((0, helpers_1.windowExists)() && typeof window.ng !== 'undefined');
|
|
12
13
|
return angularVersionSetInDocument || angularContentSetInWindow;
|
|
13
14
|
}
|
|
14
|
-
exports.angularWebDetect = angularWebDetect;
|
|
15
15
|
function angularSSRDetect() {
|
|
16
16
|
return (((0, helpers_1.processExists)() &&
|
|
17
17
|
typeof process.env === 'object' &&
|
|
18
18
|
process.env.npm_lifecycle_script?.startsWith('ng ')) ||
|
|
19
19
|
false);
|
|
20
20
|
}
|
|
21
|
-
exports.angularSSRDetect = angularSSRDetect;
|
|
22
21
|
//# sourceMappingURL=Angular.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Angular.js","sources":["../../../../src/Platform/detection/Angular.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.
|
|
1
|
+
{"version":3,"file":"Angular.js","sources":["../../../../src/Platform/detection/Angular.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.angularWebDetect = angularWebDetect;\nexports.angularSSRDetect = angularSSRDetect;\nconst helpers_1 = require(\"./helpers\");\n// Tested with @angular/core 16.0.0\nfunction angularWebDetect() {\n const angularVersionSetInDocument = Boolean((0, helpers_1.documentExists)() && document.querySelector('[ng-version]'));\n const angularContentSetInWindow = Boolean((0, helpers_1.windowExists)() && typeof window.ng !== 'undefined');\n return angularVersionSetInDocument || angularContentSetInWindow;\n}\nfunction angularSSRDetect() {\n return (((0, helpers_1.processExists)() &&\n typeof process.env === 'object' &&\n process.env.npm_lifecycle_script?.startsWith('ng ')) ||\n false);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;AAC3C,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;AAC3C,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC;AACA,SAAS,gBAAgB,GAAG;AAC5B,IAAI,MAAM,2BAA2B,GAAG,OAAO,CAAC,IAAI,SAAS,CAAC,cAAc,GAAG,IAAI,QAAQ,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;AAC1H,IAAI,MAAM,yBAAyB,GAAG,OAAO,CAAC,IAAI,SAAS,CAAC,YAAY,GAAG,IAAI,OAAO,MAAM,CAAC,EAAE,KAAK,WAAW,CAAC;AAChH,IAAI,OAAO,2BAA2B,IAAI,yBAAyB;AACnE;AACA,SAAS,gBAAgB,GAAG;AAC5B,IAAI,QAAQ,CAAC,IAAI,SAAS,CAAC,aAAa,GAAG;AAC3C,QAAQ,OAAO,OAAO,CAAC,GAAG,KAAK,QAAQ;AACvC,QAAQ,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,UAAU,CAAC,KAAK,CAAC;AAC3D,QAAQ,KAAK;AACb;;"}
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.expoDetect =
|
|
6
|
+
exports.expoDetect = expoDetect;
|
|
7
7
|
const helpers_1 = require("./helpers");
|
|
8
8
|
// Tested with expo 48 / react-native 0.71.3
|
|
9
9
|
function expoDetect() {
|
|
10
10
|
return (0, helpers_1.globalExists)() && typeof global.expo !== 'undefined';
|
|
11
11
|
}
|
|
12
|
-
exports.expoDetect = expoDetect;
|
|
13
12
|
//# sourceMappingURL=Expo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Expo.js","sources":["../../../../src/Platform/detection/Expo.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.expoDetect =
|
|
1
|
+
{"version":3,"file":"Expo.js","sources":["../../../../src/Platform/detection/Expo.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.expoDetect = expoDetect;\nconst helpers_1 = require(\"./helpers\");\n// Tested with expo 48 / react-native 0.71.3\nfunction expoDetect() {\n return (0, helpers_1.globalExists)() && typeof global.expo !== 'undefined';\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,UAAU,GAAG,UAAU;AAC/B,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC;AACA,SAAS,UAAU,GAAG;AACtB,IAAI,OAAO,IAAI,SAAS,CAAC,YAAY,GAAG,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,WAAW;AAC9E;;"}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.nextWebDetect = nextWebDetect;
|
|
7
|
+
exports.nextSSRDetect = nextSSRDetect;
|
|
7
8
|
const helpers_1 = require("./helpers");
|
|
8
9
|
// Tested with next 13.4 / react 18.2
|
|
9
10
|
function nextWebDetect() {
|
|
@@ -11,10 +12,8 @@ function nextWebDetect() {
|
|
|
11
12
|
window.next &&
|
|
12
13
|
typeof window.next === 'object');
|
|
13
14
|
}
|
|
14
|
-
exports.nextWebDetect = nextWebDetect;
|
|
15
15
|
function nextSSRDetect() {
|
|
16
16
|
return ((0, helpers_1.globalExists)() &&
|
|
17
17
|
((0, helpers_1.keyPrefixMatch)(global, '__next') || (0, helpers_1.keyPrefixMatch)(global, '__NEXT')));
|
|
18
18
|
}
|
|
19
|
-
exports.nextSSRDetect = nextSSRDetect;
|
|
20
19
|
//# sourceMappingURL=Next.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Next.js","sources":["../../../../src/Platform/detection/Next.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.
|
|
1
|
+
{"version":3,"file":"Next.js","sources":["../../../../src/Platform/detection/Next.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.nextWebDetect = nextWebDetect;\nexports.nextSSRDetect = nextSSRDetect;\nconst helpers_1 = require(\"./helpers\");\n// Tested with next 13.4 / react 18.2\nfunction nextWebDetect() {\n return ((0, helpers_1.windowExists)() &&\n window.next &&\n typeof window.next === 'object');\n}\nfunction nextSSRDetect() {\n return ((0, helpers_1.globalExists)() &&\n ((0, helpers_1.keyPrefixMatch)(global, '__next') || (0, helpers_1.keyPrefixMatch)(global, '__NEXT')));\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC;AACA,SAAS,aAAa,GAAG;AACzB,IAAI,QAAQ,IAAI,SAAS,CAAC,YAAY,GAAG;AACzC,QAAQ,MAAM,CAAC,IAAI;AACnB,QAAQ,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ;AACvC;AACA,SAAS,aAAa,GAAG;AACzB,IAAI,QAAQ,IAAI,SAAS,CAAC,YAAY,GAAG;AACzC,SAAS,IAAI,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,IAAI,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC5G;;"}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.nuxtWebDetect = nuxtWebDetect;
|
|
7
|
+
exports.nuxtSSRDetect = nuxtSSRDetect;
|
|
7
8
|
const helpers_1 = require("./helpers");
|
|
8
9
|
// Tested with nuxt 2.15 / vue 2.7
|
|
9
10
|
function nuxtWebDetect() {
|
|
@@ -11,9 +12,7 @@ function nuxtWebDetect() {
|
|
|
11
12
|
(window.__NUXT__ !== undefined ||
|
|
12
13
|
window.$nuxt !== undefined));
|
|
13
14
|
}
|
|
14
|
-
exports.nuxtWebDetect = nuxtWebDetect;
|
|
15
15
|
function nuxtSSRDetect() {
|
|
16
16
|
return ((0, helpers_1.globalExists)() && typeof global.__NUXT_PATHS__ !== 'undefined');
|
|
17
17
|
}
|
|
18
|
-
exports.nuxtSSRDetect = nuxtSSRDetect;
|
|
19
18
|
//# sourceMappingURL=Nuxt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Nuxt.js","sources":["../../../../src/Platform/detection/Nuxt.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.
|
|
1
|
+
{"version":3,"file":"Nuxt.js","sources":["../../../../src/Platform/detection/Nuxt.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.nuxtWebDetect = nuxtWebDetect;\nexports.nuxtSSRDetect = nuxtSSRDetect;\nconst helpers_1 = require(\"./helpers\");\n// Tested with nuxt 2.15 / vue 2.7\nfunction nuxtWebDetect() {\n return ((0, helpers_1.windowExists)() &&\n (window.__NUXT__ !== undefined ||\n window.$nuxt !== undefined));\n}\nfunction nuxtSSRDetect() {\n return ((0, helpers_1.globalExists)() && typeof global.__NUXT_PATHS__ !== 'undefined');\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC;AACA,SAAS,aAAa,GAAG;AACzB,IAAI,QAAQ,IAAI,SAAS,CAAC,YAAY,GAAG;AACzC,SAAS,MAAM,CAAC,QAAQ,KAAK,SAAS;AACtC,YAAY,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC;AACvC;AACA,SAAS,aAAa,GAAG;AACzB,IAAI,QAAQ,IAAI,SAAS,CAAC,YAAY,GAAG,IAAI,OAAO,MAAM,CAAC,cAAc,KAAK,WAAW;AACzF;;"}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.reactWebDetect = reactWebDetect;
|
|
7
|
+
exports.reactSSRDetect = reactSSRDetect;
|
|
7
8
|
const helpers_1 = require("./helpers");
|
|
8
9
|
// Tested with react 18.2 - built using Vite
|
|
9
10
|
function reactWebDetect() {
|
|
@@ -16,12 +17,10 @@ function reactWebDetect() {
|
|
|
16
17
|
const allElementsWithId = () => Array.from(document.querySelectorAll('[id]'));
|
|
17
18
|
return (0, helpers_1.documentExists)() && allElementsWithId().some(elementIsReactEnabled);
|
|
18
19
|
}
|
|
19
|
-
exports.reactWebDetect = reactWebDetect;
|
|
20
20
|
function reactSSRDetect() {
|
|
21
21
|
return ((0, helpers_1.processExists)() &&
|
|
22
22
|
typeof process.env !== 'undefined' &&
|
|
23
23
|
!!Object.keys(process.env).find(key => key.includes('react')));
|
|
24
24
|
}
|
|
25
|
-
exports.reactSSRDetect = reactSSRDetect;
|
|
26
25
|
// use the some
|
|
27
26
|
//# sourceMappingURL=React.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"React.js","sources":["../../../../src/Platform/detection/React.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.
|
|
1
|
+
{"version":3,"file":"React.js","sources":["../../../../src/Platform/detection/React.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.reactWebDetect = reactWebDetect;\nexports.reactSSRDetect = reactSSRDetect;\nconst helpers_1 = require(\"./helpers\");\n// Tested with react 18.2 - built using Vite\nfunction reactWebDetect() {\n const elementKeyPrefixedWithReact = (key) => {\n return key.startsWith('_react') || key.startsWith('__react');\n };\n const elementIsReactEnabled = (element) => {\n return Object.keys(element).find(elementKeyPrefixedWithReact);\n };\n const allElementsWithId = () => Array.from(document.querySelectorAll('[id]'));\n return (0, helpers_1.documentExists)() && allElementsWithId().some(elementIsReactEnabled);\n}\nfunction reactSSRDetect() {\n return ((0, helpers_1.processExists)() &&\n typeof process.env !== 'undefined' &&\n !!Object.keys(process.env).find(key => key.includes('react')));\n}\n// use the some\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,cAAc,GAAG,cAAc;AACvC,OAAO,CAAC,cAAc,GAAG,cAAc;AACvC,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC;AACA,SAAS,cAAc,GAAG;AAC1B,IAAI,MAAM,2BAA2B,GAAG,CAAC,GAAG,KAAK;AACjD,QAAQ,OAAO,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC;AACpE,KAAK;AACL,IAAI,MAAM,qBAAqB,GAAG,CAAC,OAAO,KAAK;AAC/C,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC;AACrE,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;AACjF,IAAI,OAAO,IAAI,SAAS,CAAC,cAAc,GAAG,IAAI,iBAAiB,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC;AAC7F;AACA,SAAS,cAAc,GAAG;AAC1B,IAAI,QAAQ,IAAI,SAAS,CAAC,aAAa,GAAG;AAC1C,QAAQ,OAAO,OAAO,CAAC,GAAG,KAAK,WAAW;AAC1C,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACrE;AACA;;"}
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.reactNativeDetect =
|
|
6
|
+
exports.reactNativeDetect = reactNativeDetect;
|
|
7
7
|
// Tested with react-native 0.17.7
|
|
8
8
|
function reactNativeDetect() {
|
|
9
9
|
return (typeof navigator !== 'undefined' &&
|
|
10
10
|
typeof navigator.product !== 'undefined' &&
|
|
11
11
|
navigator.product === 'ReactNative');
|
|
12
12
|
}
|
|
13
|
-
exports.reactNativeDetect = reactNativeDetect;
|
|
14
13
|
//# sourceMappingURL=ReactNative.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactNative.js","sources":["../../../../src/Platform/detection/ReactNative.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.reactNativeDetect =
|
|
1
|
+
{"version":3,"file":"ReactNative.js","sources":["../../../../src/Platform/detection/ReactNative.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.reactNativeDetect = reactNativeDetect;\n// Tested with react-native 0.17.7\nfunction reactNativeDetect() {\n return (typeof navigator !== 'undefined' &&\n typeof navigator.product !== 'undefined' &&\n navigator.product === 'ReactNative');\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;AAC7C;AACA,SAAS,iBAAiB,GAAG;AAC7B,IAAI,QAAQ,OAAO,SAAS,KAAK,WAAW;AAC5C,QAAQ,OAAO,SAAS,CAAC,OAAO,KAAK,WAAW;AAChD,QAAQ,SAAS,CAAC,OAAO,KAAK,aAAa;AAC3C;;"}
|
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.svelteWebDetect = svelteWebDetect;
|
|
7
|
+
exports.svelteSSRDetect = svelteSSRDetect;
|
|
7
8
|
const helpers_1 = require("./helpers");
|
|
8
9
|
// Tested with svelte 3.59
|
|
9
10
|
function svelteWebDetect() {
|
|
10
11
|
return (0, helpers_1.windowExists)() && (0, helpers_1.keyPrefixMatch)(window, '__SVELTE');
|
|
11
12
|
}
|
|
12
|
-
exports.svelteWebDetect = svelteWebDetect;
|
|
13
13
|
function svelteSSRDetect() {
|
|
14
14
|
return ((0, helpers_1.processExists)() &&
|
|
15
15
|
typeof process.env !== 'undefined' &&
|
|
16
16
|
!!Object.keys(process.env).find(key => key.includes('svelte')));
|
|
17
17
|
}
|
|
18
|
-
exports.svelteSSRDetect = svelteSSRDetect;
|
|
19
18
|
//# sourceMappingURL=Svelte.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Svelte.js","sources":["../../../../src/Platform/detection/Svelte.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.
|
|
1
|
+
{"version":3,"file":"Svelte.js","sources":["../../../../src/Platform/detection/Svelte.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.svelteWebDetect = svelteWebDetect;\nexports.svelteSSRDetect = svelteSSRDetect;\nconst helpers_1 = require(\"./helpers\");\n// Tested with svelte 3.59\nfunction svelteWebDetect() {\n return (0, helpers_1.windowExists)() && (0, helpers_1.keyPrefixMatch)(window, '__SVELTE');\n}\nfunction svelteSSRDetect() {\n return ((0, helpers_1.processExists)() &&\n typeof process.env !== 'undefined' &&\n !!Object.keys(process.env).find(key => key.includes('svelte')));\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,eAAe,GAAG,eAAe;AACzC,OAAO,CAAC,eAAe,GAAG,eAAe;AACzC,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC;AACA,SAAS,eAAe,GAAG;AAC3B,IAAI,OAAO,IAAI,SAAS,CAAC,YAAY,GAAG,IAAI,IAAI,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,UAAU,CAAC;AAC7F;AACA,SAAS,eAAe,GAAG;AAC3B,IAAI,QAAQ,IAAI,SAAS,CAAC,aAAa,GAAG;AAC1C,QAAQ,OAAO,OAAO,CAAC,GAAG,KAAK,WAAW;AAC1C,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACtE;;"}
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.vueWebDetect = vueWebDetect;
|
|
7
|
+
exports.vueSSRDetect = vueSSRDetect;
|
|
7
8
|
const helpers_1 = require("./helpers");
|
|
8
9
|
// Tested with vue 3.3.2
|
|
9
10
|
function vueWebDetect() {
|
|
10
11
|
return (0, helpers_1.windowExists)() && (0, helpers_1.keyPrefixMatch)(window, '__VUE');
|
|
11
12
|
}
|
|
12
|
-
exports.vueWebDetect = vueWebDetect;
|
|
13
13
|
function vueSSRDetect() {
|
|
14
14
|
return (0, helpers_1.globalExists)() && (0, helpers_1.keyPrefixMatch)(global, '__VUE');
|
|
15
15
|
}
|
|
16
|
-
exports.vueSSRDetect = vueSSRDetect;
|
|
17
16
|
//# sourceMappingURL=Vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Vue.js","sources":["../../../../src/Platform/detection/Vue.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.
|
|
1
|
+
{"version":3,"file":"Vue.js","sources":["../../../../src/Platform/detection/Vue.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.vueWebDetect = vueWebDetect;\nexports.vueSSRDetect = vueSSRDetect;\nconst helpers_1 = require(\"./helpers\");\n// Tested with vue 3.3.2\nfunction vueWebDetect() {\n return (0, helpers_1.windowExists)() && (0, helpers_1.keyPrefixMatch)(window, '__VUE');\n}\nfunction vueSSRDetect() {\n return (0, helpers_1.globalExists)() && (0, helpers_1.keyPrefixMatch)(global, '__VUE');\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,YAAY;AACnC,OAAO,CAAC,YAAY,GAAG,YAAY;AACnC,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC;AACA,SAAS,YAAY,GAAG;AACxB,IAAI,OAAO,IAAI,SAAS,CAAC,YAAY,GAAG,IAAI,IAAI,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC;AAC1F;AACA,SAAS,YAAY,GAAG;AACxB,IAAI,OAAO,IAAI,SAAS,CAAC,YAAY,GAAG,IAAI,IAAI,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC;AAC1F;;"}
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.webDetect =
|
|
6
|
+
exports.webDetect = webDetect;
|
|
7
7
|
const helpers_1 = require("./helpers");
|
|
8
8
|
function webDetect() {
|
|
9
9
|
return (0, helpers_1.windowExists)();
|
|
10
10
|
}
|
|
11
|
-
exports.webDetect = webDetect;
|
|
12
11
|
//# sourceMappingURL=Web.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Web.js","sources":["../../../../src/Platform/detection/Web.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.webDetect =
|
|
1
|
+
{"version":3,"file":"Web.js","sources":["../../../../src/Platform/detection/Web.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.webDetect = webDetect;\nconst helpers_1 = require(\"./helpers\");\nfunction webDetect() {\n return (0, helpers_1.windowExists)();\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,SAAS,GAAG,SAAS;AAC7B,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC,SAAS,SAAS,GAAG;AACrB,IAAI,OAAO,IAAI,SAAS,CAAC,YAAY,GAAG;AACxC;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.detect =
|
|
6
|
+
exports.detect = detect;
|
|
7
7
|
const types_1 = require("../types");
|
|
8
8
|
const React_1 = require("./React");
|
|
9
9
|
const Vue_1 = require("./Vue");
|
|
@@ -39,5 +39,4 @@ function detect() {
|
|
|
39
39
|
return (detectionMap.find(detectionEntry => detectionEntry.detectionMethod())
|
|
40
40
|
?.platform || types_1.Framework.ServerSideUnknown);
|
|
41
41
|
}
|
|
42
|
-
exports.detect = detect;
|
|
43
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/Platform/detection/index.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.detect =
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/Platform/detection/index.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.detect = detect;\nconst types_1 = require(\"../types\");\nconst React_1 = require(\"./React\");\nconst Vue_1 = require(\"./Vue\");\nconst Svelte_1 = require(\"./Svelte\");\nconst Next_1 = require(\"./Next\");\nconst Nuxt_1 = require(\"./Nuxt\");\nconst Angular_1 = require(\"./Angular\");\nconst ReactNative_1 = require(\"./ReactNative\");\nconst Expo_1 = require(\"./Expo\");\nconst Web_1 = require(\"./Web\");\n// These are in the order of detection where when both are detectable, the early Framework will be reported\nconst detectionMap = [\n // First, detect mobile\n { platform: types_1.Framework.Expo, detectionMethod: Expo_1.expoDetect },\n { platform: types_1.Framework.ReactNative, detectionMethod: ReactNative_1.reactNativeDetect },\n // Next, detect web frameworks\n { platform: types_1.Framework.NextJs, detectionMethod: Next_1.nextWebDetect },\n { platform: types_1.Framework.Nuxt, detectionMethod: Nuxt_1.nuxtWebDetect },\n { platform: types_1.Framework.Angular, detectionMethod: Angular_1.angularWebDetect },\n { platform: types_1.Framework.React, detectionMethod: React_1.reactWebDetect },\n { platform: types_1.Framework.VueJs, detectionMethod: Vue_1.vueWebDetect },\n { platform: types_1.Framework.Svelte, detectionMethod: Svelte_1.svelteWebDetect },\n { platform: types_1.Framework.WebUnknown, detectionMethod: Web_1.webDetect },\n // Last, detect ssr frameworks\n { platform: types_1.Framework.NextJsSSR, detectionMethod: Next_1.nextSSRDetect },\n { platform: types_1.Framework.NuxtSSR, detectionMethod: Nuxt_1.nuxtSSRDetect },\n { platform: types_1.Framework.ReactSSR, detectionMethod: React_1.reactSSRDetect },\n { platform: types_1.Framework.VueJsSSR, detectionMethod: Vue_1.vueSSRDetect },\n { platform: types_1.Framework.AngularSSR, detectionMethod: Angular_1.angularSSRDetect },\n { platform: types_1.Framework.SvelteSSR, detectionMethod: Svelte_1.svelteSSRDetect },\n];\nfunction detect() {\n return (detectionMap.find(detectionEntry => detectionEntry.detectionMethod())\n ?.platform || types_1.Framework.ServerSideUnknown);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,MAAM,GAAG,MAAM;AACvB,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;AAClC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;AAC9B,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;AACpC,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;AAChC,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;AAChC,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC,MAAM,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;AAC9C,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;AAChC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;AAC9B;AACA,MAAM,YAAY,GAAG;AACrB;AACA,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,UAAU,EAAE;AAC5E,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,eAAe,EAAE,aAAa,CAAC,iBAAiB,EAAE;AACjG;AACA,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,CAAC,aAAa,EAAE;AACjF,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,aAAa,EAAE;AAC/E,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,eAAe,EAAE,SAAS,CAAC,gBAAgB,EAAE;AACxF,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,cAAc,EAAE;AAClF,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,CAAC,YAAY,EAAE;AAC9E,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,QAAQ,CAAC,eAAe,EAAE;AACrF,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,eAAe,EAAE,KAAK,CAAC,SAAS,EAAE;AAChF;AACA,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,eAAe,EAAE,MAAM,CAAC,aAAa,EAAE;AACpF,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,CAAC,aAAa,EAAE;AAClF,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,eAAe,EAAE,OAAO,CAAC,cAAc,EAAE;AACrF,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,CAAC,YAAY,EAAE;AACjF,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,eAAe,EAAE,SAAS,CAAC,gBAAgB,EAAE;AAC3F,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,eAAe,EAAE,QAAQ,CAAC,eAAe,EAAE;AACxF,CAAC;AACD,SAAS,MAAM,GAAG;AAClB,IAAI,QAAQ,YAAY,CAAC,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC,eAAe,EAAE;AAChF,UAAU,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,iBAAiB;AACzD;;"}
|