@aws-amplify/core 6.9.4-unstable.289f3e8.0 → 6.9.4-unstable.b8f57f2.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/Platform/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/cjs/utils/generateRandomString.js +7 -4
- package/dist/cjs/utils/generateRandomString.js.map +1 -1
- package/dist/esm/Platform/version.d.ts +1 -1
- package/dist/esm/Platform/version.mjs +1 -1
- package/dist/esm/Platform/version.mjs.map +1 -1
- package/dist/esm/Reachability/Reachability.mjs +2 -0
- package/dist/esm/Reachability/Reachability.mjs.map +1 -1
- package/dist/esm/ServiceWorker/ServiceWorker.mjs +3 -3
- package/dist/esm/clients/handlers/authenticated.mjs +2 -1
- package/dist/esm/clients/handlers/authenticated.mjs.map +1 -1
- package/dist/esm/clients/handlers/unauthenticated.mjs +2 -1
- package/dist/esm/clients/handlers/unauthenticated.mjs.map +1 -1
- package/dist/esm/clients/middleware/retry/jitteredBackoff.mjs +2 -0
- package/dist/esm/clients/middleware/retry/jitteredBackoff.mjs.map +1 -1
- package/dist/esm/providers/pinpoint/apis/updateEndpoint.mjs +2 -2
- package/dist/esm/providers/pinpoint/utils/PinpointEventBuffer.mjs +2 -2
- package/dist/esm/singleton/Amplify.mjs +2 -2
- package/dist/esm/utils/generateRandomString.mjs +8 -4
- package/dist/esm/utils/generateRandomString.mjs.map +1 -1
- package/package.json +3 -3
- package/src/Platform/version.ts +1 -1
- package/src/utils/generateRandomString.ts +9 -6
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.version = void 0;
|
|
5
5
|
// generated by genversion
|
|
6
|
-
exports.version = '6.12.4-unstable.
|
|
6
|
+
exports.version = '6.12.4-unstable.b8f57f2.0+b8f57f2';
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.12.4-unstable.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.12.4-unstable.b8f57f2.0+b8f57f2';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;AACzB;AACA,OAAO,CAAC,OAAO,GAAG,mCAAmC;;"}
|
|
@@ -4,13 +4,16 @@
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.generateRandomString = void 0;
|
|
7
|
+
const globalHelpers_1 = require("./globalHelpers");
|
|
7
8
|
const generateRandomString = (length) => {
|
|
8
9
|
const STATE_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const result = [];
|
|
11
|
+
const randomNums = new Uint8Array(length);
|
|
12
|
+
(0, globalHelpers_1.getCrypto)().getRandomValues(randomNums);
|
|
13
|
+
for (const num of randomNums) {
|
|
14
|
+
result.push(STATE_CHARSET[num % STATE_CHARSET.length]);
|
|
12
15
|
}
|
|
13
|
-
return result;
|
|
16
|
+
return result.join('');
|
|
14
17
|
};
|
|
15
18
|
exports.generateRandomString = generateRandomString;
|
|
16
19
|
//# sourceMappingURL=generateRandomString.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateRandomString.js","sources":["../../../src/utils/generateRandomString.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.generateRandomString = void 0;\nconst generateRandomString = (length) => {\n const STATE_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n
|
|
1
|
+
{"version":3,"file":"generateRandomString.js","sources":["../../../src/utils/generateRandomString.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.generateRandomString = void 0;\nconst globalHelpers_1 = require(\"./globalHelpers\");\nconst generateRandomString = (length) => {\n const STATE_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n const result = [];\n const randomNums = new Uint8Array(length);\n (0, globalHelpers_1.getCrypto)().getRandomValues(randomNums);\n for (const num of randomNums) {\n result.push(STATE_CHARSET[num % STATE_CHARSET.length]);\n }\n return result.join('');\n};\nexports.generateRandomString = generateRandomString;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,oBAAoB,GAAG,KAAK,CAAC,CAAC;AACtC,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACnD,MAAM,oBAAoB,GAAG,CAAC,MAAM,KAAK;AACzC,IAAI,MAAM,aAAa,GAAG,gEAAgE,CAAC;AAC3F,IAAI,MAAM,MAAM,GAAG,EAAE,CAAC;AACtB,IAAI,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;AAC9C,IAAI,IAAI,eAAe,CAAC,SAAS,GAAG,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;AACjE,IAAI,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;AAClC,QAAQ,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/D,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3B,CAAC,CAAC;AACF,OAAO,CAAC,oBAAoB,GAAG,oBAAoB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.12.4-unstable.
|
|
1
|
+
export declare const version = "6.12.4-unstable.b8f57f2.0+b8f57f2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.12.4-unstable.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.12.4-unstable.b8f57f2.0+b8f57f2';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reachability.mjs","sources":["../../../src/Reachability/Reachability.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Observable, from } from 'rxjs';\nimport { isWebWorker } from '../utils';\nexport class Reachability {\n networkMonitor(_) {\n const globalObj = isWebWorker()\n ? self\n : typeof window !== 'undefined' && window;\n if (!globalObj) {\n return from([{ online: true }]);\n }\n return new Observable(observer => {\n observer.next({ online: globalObj.navigator.onLine });\n const notifyOnline = () => {\n observer.next({ online: true });\n };\n const notifyOffline = () => {\n observer.next({ online: false });\n };\n globalObj.addEventListener('online', notifyOnline);\n globalObj.addEventListener('offline', notifyOffline);\n Reachability._observers.push(observer);\n return () => {\n globalObj.removeEventListener('online', notifyOnline);\n globalObj.removeEventListener('offline', notifyOffline);\n Reachability._observers = Reachability._observers.filter(_observer => _observer !== observer);\n };\n });\n }\n // expose observers to simulate offline mode for integration testing\n static _observerOverride(status) {\n for (const observer of this._observers) {\n if (observer.closed) {\n this._observers = this._observers.filter(_observer => _observer !== observer);\n continue;\n }\n observer?.next && observer.next(status);\n }\n }\n}\nReachability._observers = [];\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Reachability.mjs","sources":["../../../src/Reachability/Reachability.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Observable, from } from 'rxjs';\nimport { isWebWorker } from '../utils';\nexport class Reachability {\n networkMonitor(_) {\n const globalObj = isWebWorker()\n ? self\n : typeof window !== 'undefined' && window;\n if (!globalObj) {\n return from([{ online: true }]);\n }\n return new Observable(observer => {\n observer.next({ online: globalObj.navigator.onLine });\n const notifyOnline = () => {\n observer.next({ online: true });\n };\n const notifyOffline = () => {\n observer.next({ online: false });\n };\n globalObj.addEventListener('online', notifyOnline);\n globalObj.addEventListener('offline', notifyOffline);\n Reachability._observers.push(observer);\n return () => {\n globalObj.removeEventListener('online', notifyOnline);\n globalObj.removeEventListener('offline', notifyOffline);\n Reachability._observers = Reachability._observers.filter(_observer => _observer !== observer);\n };\n });\n }\n // expose observers to simulate offline mode for integration testing\n static _observerOverride(status) {\n for (const observer of this._observers) {\n if (observer.closed) {\n this._observers = this._observers.filter(_observer => _observer !== observer);\n continue;\n }\n observer?.next && observer.next(status);\n }\n }\n}\nReachability._observers = [];\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;AAGO,MAAM,YAAY,CAAC;AAC1B,IAAI,cAAc,CAAC,CAAC,EAAE;AACtB,QAAQ,MAAM,SAAS,GAAG,WAAW,EAAE;AACvC,cAAc,IAAI;AAClB,cAAc,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC;AACtD,QAAQ,IAAI,CAAC,SAAS,EAAE;AACxB,YAAY,OAAO,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC5C,SAAS;AACT,QAAQ,OAAO,IAAI,UAAU,CAAC,QAAQ,IAAI;AAC1C,YAAY,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;AAClE,YAAY,MAAM,YAAY,GAAG,MAAM;AACvC,gBAAgB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAChD,aAAa,CAAC;AACd,YAAY,MAAM,aAAa,GAAG,MAAM;AACxC,gBAAgB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AACjD,aAAa,CAAC;AACd,YAAY,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AAC/D,YAAY,SAAS,CAAC,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;AACjE,YAAY,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACnD,YAAY,OAAO,MAAM;AACzB,gBAAgB,SAAS,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AACtE,gBAAgB,SAAS,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;AACxE,gBAAgB,YAAY,CAAC,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,IAAI,SAAS,KAAK,QAAQ,CAAC,CAAC;AAC9G,aAAa,CAAC;AACd,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA,IAAI,OAAO,iBAAiB,CAAC,MAAM,EAAE;AACrC,QAAQ,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;AAChD,YAAY,IAAI,QAAQ,CAAC,MAAM,EAAE;AACjC,gBAAgB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,IAAI,SAAS,KAAK,QAAQ,CAAC,CAAC;AAC9F,gBAAgB,SAAS;AACzB,aAAa;AACb,YAAY,QAAQ,EAAE,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACpD,SAAS;AACT,KAAK;AACL,CAAC;AACD,YAAY,CAAC,UAAU,GAAG,EAAE;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';
|
|
2
|
-
import '../utils/getClientInfo/getClientInfo.mjs';
|
|
3
|
-
import { isBrowser } from '../utils/isBrowser.mjs';
|
|
4
|
-
import '../utils/retry/retry.mjs';
|
|
5
2
|
import { AmplifyError } from '../errors/AmplifyError.mjs';
|
|
6
3
|
import '../types/errors.mjs';
|
|
7
4
|
import '../errors/errorHelpers.mjs';
|
|
5
|
+
import '../utils/getClientInfo/getClientInfo.mjs';
|
|
6
|
+
import { isBrowser } from '../utils/isBrowser.mjs';
|
|
7
|
+
import '../utils/retry/retry.mjs';
|
|
8
8
|
import '@aws-crypto/sha256-js';
|
|
9
9
|
import '@smithy/util-hex-encoding';
|
|
10
10
|
import '../awsClients/pinpoint/base.mjs';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { retryMiddlewareFactory } from '../middleware/retry/middleware.mjs';
|
|
2
|
+
import '../../types/errors.mjs';
|
|
3
|
+
import '../../errors/errorHelpers.mjs';
|
|
2
4
|
import '../../utils/getClientInfo/getClientInfo.mjs';
|
|
3
5
|
import '../../utils/retry/retry.mjs';
|
|
4
|
-
import '../../types/errors.mjs';
|
|
5
6
|
import { signingMiddlewareFactory } from '../middleware/signing/middleware.mjs';
|
|
6
7
|
import { userAgentMiddlewareFactory } from '../middleware/userAgent/middleware.mjs';
|
|
7
8
|
import { composeTransferHandler } from '../internal/composeTransferHandler.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticated.mjs","sources":["../../../../src/clients/handlers/authenticated.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { retryMiddlewareFactory } from '../middleware/retry';\nimport { signingMiddlewareFactory, } from '../middleware/signing';\nimport { userAgentMiddlewareFactory, } from '../middleware/userAgent';\nimport { composeTransferHandler } from '../internal/composeTransferHandler';\nimport { fetchTransferHandler } from './fetch';\nexport const authenticatedHandler = composeTransferHandler(fetchTransferHandler, [\n userAgentMiddlewareFactory,\n retryMiddlewareFactory,\n signingMiddlewareFactory,\n]);\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authenticated.mjs","sources":["../../../../src/clients/handlers/authenticated.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { retryMiddlewareFactory } from '../middleware/retry';\nimport { signingMiddlewareFactory, } from '../middleware/signing';\nimport { userAgentMiddlewareFactory, } from '../middleware/userAgent';\nimport { composeTransferHandler } from '../internal/composeTransferHandler';\nimport { fetchTransferHandler } from './fetch';\nexport const authenticatedHandler = composeTransferHandler(fetchTransferHandler, [\n userAgentMiddlewareFactory,\n retryMiddlewareFactory,\n signingMiddlewareFactory,\n]);\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AAMY,MAAC,oBAAoB,GAAG,sBAAsB,CAAC,oBAAoB,EAAE;AACjF,IAAI,0BAA0B;AAC9B,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,CAAC;;;;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { retryMiddlewareFactory } from '../middleware/retry/middleware.mjs';
|
|
2
|
+
import '../../types/errors.mjs';
|
|
3
|
+
import '../../errors/errorHelpers.mjs';
|
|
2
4
|
import '../../utils/getClientInfo/getClientInfo.mjs';
|
|
3
5
|
import '../../utils/retry/retry.mjs';
|
|
4
|
-
import '../../types/errors.mjs';
|
|
5
6
|
import { userAgentMiddlewareFactory } from '../middleware/userAgent/middleware.mjs';
|
|
6
7
|
import { composeTransferHandler } from '../internal/composeTransferHandler.mjs';
|
|
7
8
|
import { fetchTransferHandler } from './fetch.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unauthenticated.mjs","sources":["../../../../src/clients/handlers/unauthenticated.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { retryMiddlewareFactory } from '../middleware/retry';\nimport { userAgentMiddlewareFactory, } from '../middleware/userAgent';\nimport { composeTransferHandler } from '../internal/composeTransferHandler';\nimport { fetchTransferHandler } from './fetch';\nexport const unauthenticatedHandler = composeTransferHandler(fetchTransferHandler, [userAgentMiddlewareFactory, retryMiddlewareFactory]);\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unauthenticated.mjs","sources":["../../../../src/clients/handlers/unauthenticated.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { retryMiddlewareFactory } from '../middleware/retry';\nimport { userAgentMiddlewareFactory, } from '../middleware/userAgent';\nimport { composeTransferHandler } from '../internal/composeTransferHandler';\nimport { fetchTransferHandler } from './fetch';\nexport const unauthenticatedHandler = composeTransferHandler(fetchTransferHandler, [userAgentMiddlewareFactory, retryMiddlewareFactory]);\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAKY,MAAC,sBAAsB,GAAG,sBAAsB,CAAC,oBAAoB,EAAE,CAAC,0BAA0B,EAAE,sBAAsB,CAAC;;;;"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '../../../types/errors.mjs';
|
|
2
|
+
import '../../../errors/errorHelpers.mjs';
|
|
1
3
|
import '../../../utils/getClientInfo/getClientInfo.mjs';
|
|
2
4
|
import { jitteredBackoff as jitteredBackoff$1 } from '../../../utils/retry/jitteredBackoff.mjs';
|
|
3
5
|
import '../../../utils/retry/retry.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jitteredBackoff.mjs","sources":["../../../../../src/clients/middleware/retry/jitteredBackoff.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { jitteredBackoff as jitteredBackoffUtil } from '../../../utils';\n// TODO: [v6] The separate retry utility is used by Data packages now and will replaced by retry middleware.\nconst DEFAULT_MAX_DELAY_MS = 5 * 60 * 1000;\nexport const jitteredBackoff = attempt => {\n const delayFunction = jitteredBackoffUtil(DEFAULT_MAX_DELAY_MS);\n const delay = delayFunction(attempt);\n // The delayFunction returns false when the delay is greater than the max delay(5 mins).\n // In this case, the retry middleware will delay 5 mins instead, as a ceiling of the delay.\n return delay === false ? DEFAULT_MAX_DELAY_MS : delay;\n};\n"],"names":["jitteredBackoffUtil"],"mappings":"
|
|
1
|
+
{"version":3,"file":"jitteredBackoff.mjs","sources":["../../../../../src/clients/middleware/retry/jitteredBackoff.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { jitteredBackoff as jitteredBackoffUtil } from '../../../utils';\n// TODO: [v6] The separate retry utility is used by Data packages now and will replaced by retry middleware.\nconst DEFAULT_MAX_DELAY_MS = 5 * 60 * 1000;\nexport const jitteredBackoff = attempt => {\n const delayFunction = jitteredBackoffUtil(DEFAULT_MAX_DELAY_MS);\n const delay = delayFunction(attempt);\n // The delayFunction returns false when the delay is greater than the max delay(5 mins).\n // In this case, the retry middleware will delay 5 mins instead, as a ceiling of the delay.\n return delay === false ? DEFAULT_MAX_DELAY_MS : delay;\n};\n"],"names":["jitteredBackoffUtil"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAC/B,MAAC,eAAe,GAAG,OAAO,IAAI;AAC1C,IAAI,MAAM,aAAa,GAAGA,iBAAmB,CAAC,oBAAoB,CAAC,CAAC;AACpE,IAAI,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;AACzC;AACA;AACA,IAAI,OAAO,KAAK,KAAK,KAAK,GAAG,oBAAoB,GAAG,KAAK,CAAC;AAC1D;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import '../../../types/errors.mjs';
|
|
2
|
+
import '../../../errors/errorHelpers.mjs';
|
|
1
3
|
import { getClientInfo } from '../../../utils/getClientInfo/getClientInfo.mjs';
|
|
2
4
|
import '../../../utils/retry/retry.mjs';
|
|
3
|
-
import '../../../types/errors.mjs';
|
|
4
5
|
import '@aws-crypto/sha256-js';
|
|
5
6
|
import '@smithy/util-hex-encoding';
|
|
6
|
-
import '../../../errors/errorHelpers.mjs';
|
|
7
7
|
import '../../../awsClients/pinpoint/base.mjs';
|
|
8
8
|
import '../../../awsClients/pinpoint/errorHelpers.mjs';
|
|
9
9
|
import { updateEndpoint as updateEndpoint$1 } from '../../../awsClients/pinpoint/updateEndpoint.mjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ConsoleLogger } from '../../../Logger/ConsoleLogger.mjs';
|
|
2
|
+
import '../../../types/errors.mjs';
|
|
3
|
+
import '../../../errors/errorHelpers.mjs';
|
|
2
4
|
import '../../../utils/getClientInfo/getClientInfo.mjs';
|
|
3
5
|
import '../../../utils/retry/retry.mjs';
|
|
4
|
-
import '../../../types/errors.mjs';
|
|
5
6
|
import '@aws-crypto/sha256-js';
|
|
6
7
|
import '@smithy/util-hex-encoding';
|
|
7
|
-
import '../../../errors/errorHelpers.mjs';
|
|
8
8
|
import '../../../awsClients/pinpoint/base.mjs';
|
|
9
9
|
import { putEvents } from '../../../awsClients/pinpoint/putEvents.mjs';
|
|
10
10
|
import { isAppInForeground } from './isAppInForeground.mjs';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Hub, AMPLIFY_SYMBOL } from '../Hub/index.mjs';
|
|
2
|
+
import '../types/errors.mjs';
|
|
3
|
+
import '../errors/errorHelpers.mjs';
|
|
2
4
|
import '../utils/getClientInfo/getClientInfo.mjs';
|
|
3
5
|
import '../utils/retry/retry.mjs';
|
|
4
6
|
import { deepFreeze } from '../utils/deepFreeze.mjs';
|
|
@@ -6,8 +8,6 @@ import '../parseAWSExports.mjs';
|
|
|
6
8
|
import { ADD_OAUTH_LISTENER } from './constants.mjs';
|
|
7
9
|
import 'uuid';
|
|
8
10
|
import { parseAmplifyConfig } from '../utils/parseAmplifyConfig.mjs';
|
|
9
|
-
import '../types/errors.mjs';
|
|
10
|
-
import '../errors/errorHelpers.mjs';
|
|
11
11
|
import './Auth/utils/errorHelpers.mjs';
|
|
12
12
|
import '@aws-crypto/sha256-js';
|
|
13
13
|
import '@smithy/util-hex-encoding';
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import { getCrypto } from './globalHelpers/index.mjs';
|
|
2
|
+
|
|
1
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
5
|
const generateRandomString = (length) => {
|
|
4
6
|
const STATE_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
const result = [];
|
|
8
|
+
const randomNums = new Uint8Array(length);
|
|
9
|
+
getCrypto().getRandomValues(randomNums);
|
|
10
|
+
for (const num of randomNums) {
|
|
11
|
+
result.push(STATE_CHARSET[num % STATE_CHARSET.length]);
|
|
8
12
|
}
|
|
9
|
-
return result;
|
|
13
|
+
return result.join('');
|
|
10
14
|
};
|
|
11
15
|
|
|
12
16
|
export { generateRandomString };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateRandomString.mjs","sources":["../../../src/utils/generateRandomString.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const generateRandomString = (length) => {\n const STATE_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n
|
|
1
|
+
{"version":3,"file":"generateRandomString.mjs","sources":["../../../src/utils/generateRandomString.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getCrypto } from './globalHelpers';\nexport const generateRandomString = (length) => {\n const STATE_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n const result = [];\n const randomNums = new Uint8Array(length);\n getCrypto().getRandomValues(randomNums);\n for (const num of randomNums) {\n result.push(STATE_CHARSET[num % STATE_CHARSET.length]);\n }\n return result.join('');\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEY,MAAC,oBAAoB,GAAG,CAAC,MAAM,KAAK;AAChD,IAAI,MAAM,aAAa,GAAG,gEAAgE,CAAC;AAC3F,IAAI,MAAM,MAAM,GAAG,EAAE,CAAC;AACtB,IAAI,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;AAC9C,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;AAC5C,IAAI,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;AAClC,QAAQ,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/D,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3B;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core",
|
|
3
|
-
"version": "6.9.4-unstable.
|
|
3
|
+
"version": "6.9.4-unstable.b8f57f2.0+b8f57f2",
|
|
4
4
|
"description": "Core category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"uuid": "^9.0.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@aws-amplify/react-native": "1.1.8-unstable.
|
|
64
|
+
"@aws-amplify/react-native": "1.1.8-unstable.b8f57f2.0+b8f57f2",
|
|
65
65
|
"@types/js-cookie": "3.0.2",
|
|
66
66
|
"genversion": "^2.2.0",
|
|
67
67
|
"typescript": "5.0.2"
|
|
@@ -193,5 +193,5 @@
|
|
|
193
193
|
]
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
|
-
"gitHead": "
|
|
196
|
+
"gitHead": "b8f57f25ea29e027fd90727979c386d9deeeb41e"
|
|
197
197
|
}
|
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '6.12.4-unstable.
|
|
2
|
+
export const version = '6.12.4-unstable.b8f57f2.0+b8f57f2';
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import { getCrypto } from './globalHelpers';
|
|
5
|
+
|
|
4
6
|
export const generateRandomString = (length: number) => {
|
|
5
7
|
const STATE_CHARSET =
|
|
6
8
|
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
7
|
-
|
|
9
|
+
const result: string[] = [];
|
|
10
|
+
const randomNums = new Uint8Array(length);
|
|
11
|
+
|
|
12
|
+
getCrypto().getRandomValues(randomNums);
|
|
8
13
|
|
|
9
|
-
for (
|
|
10
|
-
result
|
|
11
|
-
Math.floor(Math.random() * STATE_CHARSET.length),
|
|
12
|
-
);
|
|
14
|
+
for (const num of randomNums) {
|
|
15
|
+
result.push(STATE_CHARSET[num % STATE_CHARSET.length]);
|
|
13
16
|
}
|
|
14
17
|
|
|
15
|
-
return result;
|
|
18
|
+
return result.join('');
|
|
16
19
|
};
|