@aws-amplify/core 6.0.20-unstable.1a45c2f.0 → 6.0.21-gen2-storage.7da2b89.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/Logger/ConsoleLogger.js +9 -0
- package/dist/cjs/Logger/ConsoleLogger.js.map +1 -1
- package/dist/cjs/Platform/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/cjs/libraryUtils.js +4 -5
- package/dist/cjs/libraryUtils.js.map +1 -1
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/types/utils.js +6 -0
- package/dist/cjs/types/utils.js.map +1 -0
- package/dist/cjs/utils/WordArray.js +2 -1
- package/dist/cjs/utils/WordArray.js.map +1 -1
- package/dist/esm/Logger/ConsoleLogger.d.ts +1 -0
- package/dist/esm/Logger/ConsoleLogger.mjs +9 -0
- package/dist/esm/Logger/ConsoleLogger.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/libraryUtils.d.ts +3 -3
- package/dist/esm/libraryUtils.mjs +1 -1
- package/dist/esm/singleton/Auth/types.d.ts +1 -3
- package/dist/esm/singleton/Auth/utils/index.d.ts +2 -1
- package/dist/esm/singleton/Storage/types.d.ts +10 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/utils.d.ts +8 -0
- package/dist/esm/types/utils.mjs +2 -0
- package/dist/esm/types/utils.mjs.map +1 -0
- package/dist/esm/utils/WordArray.d.ts +1 -1
- package/dist/esm/utils/WordArray.mjs +1 -1
- package/dist/esm/utils/WordArray.mjs.map +1 -1
- package/package.json +3 -3
- package/src/Logger/ConsoleLogger.ts +9 -0
- package/src/Platform/version.ts +1 -1
- package/src/libraryUtils.ts +4 -3
- package/src/singleton/Auth/types.ts +1 -6
- package/src/singleton/Auth/utils/index.ts +1 -1
- package/src/singleton/Storage/types.ts +10 -0
- package/src/types/index.ts +1 -0
- package/src/types/utils.ts +14 -0
- package/src/utils/WordArray.ts +1 -1
|
@@ -71,6 +71,14 @@ class ConsoleLogger {
|
|
|
71
71
|
if (type === types_1.LogType.WARN && console.warn) {
|
|
72
72
|
log = console.warn.bind(console);
|
|
73
73
|
}
|
|
74
|
+
if (ConsoleLogger.BIND_ALL_LOG_LEVELS) {
|
|
75
|
+
if (type === types_1.LogType.INFO && console.info) {
|
|
76
|
+
log = console.info.bind(console);
|
|
77
|
+
}
|
|
78
|
+
if (type === types_1.LogType.DEBUG && console.debug) {
|
|
79
|
+
log = console.debug.bind(console);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
74
82
|
const prefix = `[${type}] ${this._ts()} ${this.name}`;
|
|
75
83
|
let message = '';
|
|
76
84
|
if (msg.length === 1 && typeof msg[0] === 'string') {
|
|
@@ -164,4 +172,5 @@ class ConsoleLogger {
|
|
|
164
172
|
}
|
|
165
173
|
exports.ConsoleLogger = ConsoleLogger;
|
|
166
174
|
ConsoleLogger.LOG_LEVEL = null;
|
|
175
|
+
ConsoleLogger.BIND_ALL_LOG_LEVELS = false;
|
|
167
176
|
//# sourceMappingURL=ConsoleLogger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleLogger.js","sources":["../../../src/Logger/ConsoleLogger.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.ConsoleLogger = void 0;\nconst constants_1 = require(\"../constants\");\nconst types_1 = require(\"./types\");\nconst LOG_LEVELS = {\n VERBOSE: 1,\n DEBUG: 2,\n INFO: 3,\n WARN: 4,\n ERROR: 5,\n NONE: 6,\n};\n/**\n * Write logs\n * @class Logger\n */\nclass ConsoleLogger {\n /**\n * @constructor\n * @param {string} name - Name of the logger\n */\n constructor(name, level = types_1.LogType.WARN) {\n this.name = name;\n this.level = level;\n this._pluggables = [];\n }\n _padding(n) {\n return n < 10 ? '0' + n : '' + n;\n }\n _ts() {\n const dt = new Date();\n return ([this._padding(dt.getMinutes()), this._padding(dt.getSeconds())].join(':') +\n '.' +\n dt.getMilliseconds());\n }\n configure(config) {\n if (!config)\n return this._config;\n this._config = config;\n return this._config;\n }\n /**\n * Write log\n * @method\n * @memeberof Logger\n * @param {LogType|string} type - log type, default INFO\n * @param {string|object} msg - Logging message or object\n */\n _log(type, ...msg) {\n let loggerLevelName = this.level;\n if (ConsoleLogger.LOG_LEVEL) {\n loggerLevelName = ConsoleLogger.LOG_LEVEL;\n }\n if (typeof window !== 'undefined' && window.LOG_LEVEL) {\n loggerLevelName = window.LOG_LEVEL;\n }\n const loggerLevel = LOG_LEVELS[loggerLevelName];\n const typeLevel = LOG_LEVELS[type];\n if (!(typeLevel >= loggerLevel)) {\n // Do nothing if type is not greater than or equal to logger level (handle undefined)\n return;\n }\n let log = console.log.bind(console);\n if (type === types_1.LogType.ERROR && console.error) {\n log = console.error.bind(console);\n }\n if (type === types_1.LogType.WARN && console.warn) {\n log = console.warn.bind(console);\n }\n const prefix = `[${type}] ${this._ts()} ${this.name}`;\n let message = '';\n if (msg.length === 1 && typeof msg[0] === 'string') {\n message = `${prefix} - ${msg[0]}`;\n log(message);\n }\n else if (msg.length === 1) {\n message = `${prefix} ${msg[0]}`;\n log(prefix, msg[0]);\n }\n else if (typeof msg[0] === 'string') {\n let obj = msg.slice(1);\n if (obj.length === 1) {\n obj = obj[0];\n }\n message = `${prefix} - ${msg[0]} ${obj}`;\n log(`${prefix} - ${msg[0]}`, obj);\n }\n else {\n message = `${prefix} ${msg}`;\n log(prefix, msg);\n }\n for (const plugin of this._pluggables) {\n const logEvent = { message, timestamp: Date.now() };\n plugin.pushLogs([logEvent]);\n }\n }\n /**\n * Write General log. Default to INFO\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n log(...msg) {\n this._log(types_1.LogType.INFO, ...msg);\n }\n /**\n * Write INFO log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n info(...msg) {\n this._log(types_1.LogType.INFO, ...msg);\n }\n /**\n * Write WARN log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n warn(...msg) {\n this._log(types_1.LogType.WARN, ...msg);\n }\n /**\n * Write ERROR log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n error(...msg) {\n this._log(types_1.LogType.ERROR, ...msg);\n }\n /**\n * Write DEBUG log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n debug(...msg) {\n this._log(types_1.LogType.DEBUG, ...msg);\n }\n /**\n * Write VERBOSE log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n verbose(...msg) {\n this._log(types_1.LogType.VERBOSE, ...msg);\n }\n addPluggable(pluggable) {\n if (pluggable && pluggable.getCategoryName() === constants_1.AWS_CLOUDWATCH_CATEGORY) {\n this._pluggables.push(pluggable);\n pluggable.configure(this._config);\n }\n }\n listPluggables() {\n return this._pluggables;\n }\n}\nexports.ConsoleLogger = ConsoleLogger;\nConsoleLogger.LOG_LEVEL = null;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACnC,MAAM,UAAU,GAAG;AACnB,IAAI,OAAO,EAAE,CAAC;AACd,IAAI,KAAK,EAAE,CAAC;AACZ,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,KAAK,EAAE,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F,YAAY,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC7C,YAAY,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC9C,SAAS;AACT,KAAK;AACL,IAAI,cAAc,GAAG;AACrB,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC;AAChC,KAAK;AACL,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa,CAAC;AACtC,aAAa,CAAC,SAAS,GAAG,IAAI;;"}
|
|
1
|
+
{"version":3,"file":"ConsoleLogger.js","sources":["../../../src/Logger/ConsoleLogger.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.ConsoleLogger = void 0;\nconst constants_1 = require(\"../constants\");\nconst types_1 = require(\"./types\");\nconst LOG_LEVELS = {\n VERBOSE: 1,\n DEBUG: 2,\n INFO: 3,\n WARN: 4,\n ERROR: 5,\n NONE: 6,\n};\n/**\n * Write logs\n * @class Logger\n */\nclass ConsoleLogger {\n /**\n * @constructor\n * @param {string} name - Name of the logger\n */\n constructor(name, level = types_1.LogType.WARN) {\n this.name = name;\n this.level = level;\n this._pluggables = [];\n }\n _padding(n) {\n return n < 10 ? '0' + n : '' + n;\n }\n _ts() {\n const dt = new Date();\n return ([this._padding(dt.getMinutes()), this._padding(dt.getSeconds())].join(':') +\n '.' +\n dt.getMilliseconds());\n }\n configure(config) {\n if (!config)\n return this._config;\n this._config = config;\n return this._config;\n }\n /**\n * Write log\n * @method\n * @memeberof Logger\n * @param {LogType|string} type - log type, default INFO\n * @param {string|object} msg - Logging message or object\n */\n _log(type, ...msg) {\n let loggerLevelName = this.level;\n if (ConsoleLogger.LOG_LEVEL) {\n loggerLevelName = ConsoleLogger.LOG_LEVEL;\n }\n if (typeof window !== 'undefined' && window.LOG_LEVEL) {\n loggerLevelName = window.LOG_LEVEL;\n }\n const loggerLevel = LOG_LEVELS[loggerLevelName];\n const typeLevel = LOG_LEVELS[type];\n if (!(typeLevel >= loggerLevel)) {\n // Do nothing if type is not greater than or equal to logger level (handle undefined)\n return;\n }\n let log = console.log.bind(console);\n if (type === types_1.LogType.ERROR && console.error) {\n log = console.error.bind(console);\n }\n if (type === types_1.LogType.WARN && console.warn) {\n log = console.warn.bind(console);\n }\n if (ConsoleLogger.BIND_ALL_LOG_LEVELS) {\n if (type === types_1.LogType.INFO && console.info) {\n log = console.info.bind(console);\n }\n if (type === types_1.LogType.DEBUG && console.debug) {\n log = console.debug.bind(console);\n }\n }\n const prefix = `[${type}] ${this._ts()} ${this.name}`;\n let message = '';\n if (msg.length === 1 && typeof msg[0] === 'string') {\n message = `${prefix} - ${msg[0]}`;\n log(message);\n }\n else if (msg.length === 1) {\n message = `${prefix} ${msg[0]}`;\n log(prefix, msg[0]);\n }\n else if (typeof msg[0] === 'string') {\n let obj = msg.slice(1);\n if (obj.length === 1) {\n obj = obj[0];\n }\n message = `${prefix} - ${msg[0]} ${obj}`;\n log(`${prefix} - ${msg[0]}`, obj);\n }\n else {\n message = `${prefix} ${msg}`;\n log(prefix, msg);\n }\n for (const plugin of this._pluggables) {\n const logEvent = { message, timestamp: Date.now() };\n plugin.pushLogs([logEvent]);\n }\n }\n /**\n * Write General log. Default to INFO\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n log(...msg) {\n this._log(types_1.LogType.INFO, ...msg);\n }\n /**\n * Write INFO log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n info(...msg) {\n this._log(types_1.LogType.INFO, ...msg);\n }\n /**\n * Write WARN log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n warn(...msg) {\n this._log(types_1.LogType.WARN, ...msg);\n }\n /**\n * Write ERROR log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n error(...msg) {\n this._log(types_1.LogType.ERROR, ...msg);\n }\n /**\n * Write DEBUG log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n debug(...msg) {\n this._log(types_1.LogType.DEBUG, ...msg);\n }\n /**\n * Write VERBOSE log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n verbose(...msg) {\n this._log(types_1.LogType.VERBOSE, ...msg);\n }\n addPluggable(pluggable) {\n if (pluggable && pluggable.getCategoryName() === constants_1.AWS_CLOUDWATCH_CATEGORY) {\n this._pluggables.push(pluggable);\n pluggable.configure(this._config);\n }\n }\n listPluggables() {\n return this._pluggables;\n }\n}\nexports.ConsoleLogger = ConsoleLogger;\nConsoleLogger.LOG_LEVEL = null;\nConsoleLogger.BIND_ALL_LOG_LEVELS = false;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACnC,MAAM,UAAU,GAAG;AACnB,IAAI,OAAO,EAAE,CAAC;AACd,IAAI,KAAK,EAAE,CAAC;AACZ,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,KAAK,EAAE,CAAC;AACZ,IAAI,IAAI,EAAE,CAAC;AACX,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA,MAAM,aAAa,CAAC;AACpB;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE;AACpD,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AAC3B,Q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AAY,CAAC,SAAS,EAAE;AAC5B,QAAQ,IAAI,SAAS,IAAI,SAAS,CAAC,eAAe,EAAE,KAAK,WAAW,CAAC,uBAAuB,EAAE;AAC9F,YAAY,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC7C,YAAY,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC9C,SAAS;AACT,KAAK;AACL,IAAI,cAAc,GAAG;AACrB,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC;AAChC,KAAK;AACL,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa,CAAC;AACtC,aAAa,CAAC,SAAS,GAAG,IAAI,CAAC;AAC/B,aAAa,CAAC,mBAAmB,GAAG,KAAK;;"}
|
|
@@ -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.0.
|
|
6
|
+
exports.version = '6.0.21-gen2-storage.7da2b89.0+7da2b89';
|
|
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.0.
|
|
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.0.21-gen2-storage.7da2b89.0+7da2b89';\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,uCAAuC;;"}
|
package/dist/cjs/libraryUtils.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
6
|
exports.fetchAuthSession = exports.USER_AGENT_HEADER = exports.Reachability = exports.Mutex = exports.BackgroundProcessManager = exports.AmplifyErrorCode = exports.ApiError = exports.createAssertionFunction = exports.PlatformNotSupportedError = exports.AmplifyError = exports.setCustomUserAgent = exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InAppMessagingAction = exports.InteractionsAction = exports.GeoAction = exports.Framework = exports.DataStoreAction = exports.Category = exports.AnalyticsAction = exports.AuthAction = exports.ApiAction = exports.getAmplifyUserAgent = exports.getAmplifyUserAgentObject = exports.Platform = exports.haveCredentialsChanged = exports.Signer = exports.isTokenExpired = exports.assertOAuthConfig = exports.assertIdentityPoolIdConfig = exports.assertTokenProviderConfig = exports.decodeJWT = exports.AmplifyUrlSearchParams = exports.AmplifyUrl = exports.amplifyUuid = exports.ADD_OAUTH_LISTENER = exports.parseAWSExports = exports.deDupeAsyncFunction = exports.urlSafeEncode = exports.urlSafeDecode = exports.retry = exports.NonRetryableError = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isWebWorker = exports.isNonRetryableError = exports.isBrowser = exports.generateRandomString = void 0;
|
|
5
7
|
exports.SESSION_STOP_EVENT = exports.SESSION_START_EVENT = exports.sessionListener = exports.HubInternal = exports.WordArray = exports.cryptoSecureRandomInt = exports.getCrypto = exports.base64Encoder = exports.base64Decoder = exports.AMPLIFY_SYMBOL = void 0;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
8
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
9
|
-
const WordArray_1 = tslib_1.__importDefault(require("./utils/WordArray"));
|
|
10
|
-
exports.WordArray = WordArray_1.default;
|
|
11
8
|
/*
|
|
12
9
|
This file maps top-level exports from `@aws-amplify/core/internals/utils`. These are intended to be internal
|
|
13
10
|
utils for use throughout the library.
|
|
@@ -95,6 +92,8 @@ var globalHelpers_1 = require("./utils/globalHelpers");
|
|
|
95
92
|
Object.defineProperty(exports, "getCrypto", { enumerable: true, get: function () { return globalHelpers_1.getCrypto; } });
|
|
96
93
|
var cryptoSecureRandomInt_1 = require("./utils/cryptoSecureRandomInt");
|
|
97
94
|
Object.defineProperty(exports, "cryptoSecureRandomInt", { enumerable: true, get: function () { return cryptoSecureRandomInt_1.cryptoSecureRandomInt; } });
|
|
95
|
+
var WordArray_1 = require("./utils/WordArray");
|
|
96
|
+
Object.defineProperty(exports, "WordArray", { enumerable: true, get: function () { return WordArray_1.WordArray; } });
|
|
98
97
|
// Hub
|
|
99
98
|
var Hub_2 = require("./Hub");
|
|
100
99
|
Object.defineProperty(exports, "HubInternal", { enumerable: true, get: function () { return Hub_2.HubInternal; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libraryUtils.js","sources":["../../src/libraryUtils.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchAuthSession = exports.USER_AGENT_HEADER = exports.Reachability = exports.Mutex = exports.BackgroundProcessManager = exports.AmplifyErrorCode = exports.ApiError = exports.createAssertionFunction = exports.PlatformNotSupportedError = exports.AmplifyError = exports.setCustomUserAgent = exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InAppMessagingAction = exports.InteractionsAction = exports.GeoAction = exports.Framework = exports.DataStoreAction = exports.Category = exports.AnalyticsAction = exports.AuthAction = exports.ApiAction = exports.getAmplifyUserAgent = exports.getAmplifyUserAgentObject = exports.Platform = exports.haveCredentialsChanged = exports.Signer = exports.isTokenExpired = exports.assertOAuthConfig = exports.assertIdentityPoolIdConfig = exports.assertTokenProviderConfig = exports.decodeJWT = exports.AmplifyUrlSearchParams = exports.AmplifyUrl = exports.amplifyUuid = exports.ADD_OAUTH_LISTENER = exports.parseAWSExports = exports.deDupeAsyncFunction = exports.urlSafeEncode = exports.urlSafeDecode = exports.retry = exports.NonRetryableError = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isWebWorker = exports.isNonRetryableError = exports.isBrowser = exports.generateRandomString = void 0;\nexports.SESSION_STOP_EVENT = exports.SESSION_START_EVENT = exports.sessionListener = exports.HubInternal = exports.WordArray = exports.cryptoSecureRandomInt = exports.getCrypto = exports.base64Encoder = exports.base64Decoder = exports.AMPLIFY_SYMBOL = void 0;\nconst tslib_1 = require(\"tslib\");\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst WordArray_1 = tslib_1.__importDefault(require(\"./utils/WordArray\"));\nexports.WordArray = WordArray_1.default;\n/*\nThis file maps top-level exports from `@aws-amplify/core/internals/utils`. These are intended to be internal\nutils for use throughout the library.\n*/\n// Core utilities\nvar utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"generateRandomString\", { enumerable: true, get: function () { return utils_1.generateRandomString; } });\nObject.defineProperty(exports, \"isBrowser\", { enumerable: true, get: function () { return utils_1.isBrowser; } });\nObject.defineProperty(exports, \"isNonRetryableError\", { enumerable: true, get: function () { return utils_1.isNonRetryableError; } });\nObject.defineProperty(exports, \"isWebWorker\", { enumerable: true, get: function () { return utils_1.isWebWorker; } });\nObject.defineProperty(exports, \"jitteredBackoff\", { enumerable: true, get: function () { return utils_1.jitteredBackoff; } });\nObject.defineProperty(exports, \"jitteredExponentialRetry\", { enumerable: true, get: function () { return utils_1.jitteredExponentialRetry; } });\nObject.defineProperty(exports, \"NonRetryableError\", { enumerable: true, get: function () { return utils_1.NonRetryableError; } });\nObject.defineProperty(exports, \"retry\", { enumerable: true, get: function () { return utils_1.retry; } });\nObject.defineProperty(exports, \"urlSafeDecode\", { enumerable: true, get: function () { return utils_1.urlSafeDecode; } });\nObject.defineProperty(exports, \"urlSafeEncode\", { enumerable: true, get: function () { return utils_1.urlSafeEncode; } });\nObject.defineProperty(exports, \"deDupeAsyncFunction\", { enumerable: true, get: function () { return utils_1.deDupeAsyncFunction; } });\nvar parseAWSExports_1 = require(\"./parseAWSExports\");\nObject.defineProperty(exports, \"parseAWSExports\", { enumerable: true, get: function () { return parseAWSExports_1.parseAWSExports; } });\nvar constants_1 = require(\"./singleton/constants\");\nObject.defineProperty(exports, \"ADD_OAUTH_LISTENER\", { enumerable: true, get: function () { return constants_1.ADD_OAUTH_LISTENER; } });\nvar amplifyUuid_1 = require(\"./utils/amplifyUuid\");\nObject.defineProperty(exports, \"amplifyUuid\", { enumerable: true, get: function () { return amplifyUuid_1.amplifyUuid; } });\nvar amplifyUrl_1 = require(\"./utils/amplifyUrl\");\nObject.defineProperty(exports, \"AmplifyUrl\", { enumerable: true, get: function () { return amplifyUrl_1.AmplifyUrl; } });\nObject.defineProperty(exports, \"AmplifyUrlSearchParams\", { enumerable: true, get: function () { return amplifyUrl_1.AmplifyUrlSearchParams; } });\n// Auth utilities\nvar utils_2 = require(\"./singleton/Auth/utils\");\nObject.defineProperty(exports, \"decodeJWT\", { enumerable: true, get: function () { return utils_2.decodeJWT; } });\nObject.defineProperty(exports, \"assertTokenProviderConfig\", { enumerable: true, get: function () { return utils_2.assertTokenProviderConfig; } });\nObject.defineProperty(exports, \"assertIdentityPoolIdConfig\", { enumerable: true, get: function () { return utils_2.assertIdentityPoolIdConfig; } });\nObject.defineProperty(exports, \"assertOAuthConfig\", { enumerable: true, get: function () { return utils_2.assertOAuthConfig; } });\nvar Auth_1 = require(\"./singleton/Auth\");\nObject.defineProperty(exports, \"isTokenExpired\", { enumerable: true, get: function () { return Auth_1.isTokenExpired; } });\nvar Signer_1 = require(\"./Signer\");\nObject.defineProperty(exports, \"Signer\", { enumerable: true, get: function () { return Signer_1.Signer; } });\nvar haveCredentialsChanged_1 = require(\"./utils/haveCredentialsChanged\");\nObject.defineProperty(exports, \"haveCredentialsChanged\", { enumerable: true, get: function () { return haveCredentialsChanged_1.haveCredentialsChanged; } });\n// Platform & user-agent utilities\nvar Platform_1 = require(\"./Platform\");\nObject.defineProperty(exports, \"Platform\", { enumerable: true, get: function () { return Platform_1.Platform; } });\nObject.defineProperty(exports, \"getAmplifyUserAgentObject\", { enumerable: true, get: function () { return Platform_1.getAmplifyUserAgentObject; } });\nObject.defineProperty(exports, \"getAmplifyUserAgent\", { enumerable: true, get: function () { return Platform_1.getAmplifyUserAgent; } });\nvar types_1 = require(\"./Platform/types\");\nObject.defineProperty(exports, \"ApiAction\", { enumerable: true, get: function () { return types_1.ApiAction; } });\nObject.defineProperty(exports, \"AuthAction\", { enumerable: true, get: function () { return types_1.AuthAction; } });\nObject.defineProperty(exports, \"AnalyticsAction\", { enumerable: true, get: function () { return types_1.AnalyticsAction; } });\nObject.defineProperty(exports, \"Category\", { enumerable: true, get: function () { return types_1.Category; } });\nObject.defineProperty(exports, \"DataStoreAction\", { enumerable: true, get: function () { return types_1.DataStoreAction; } });\nObject.defineProperty(exports, \"Framework\", { enumerable: true, get: function () { return types_1.Framework; } });\nObject.defineProperty(exports, \"GeoAction\", { enumerable: true, get: function () { return types_1.GeoAction; } });\nObject.defineProperty(exports, \"InteractionsAction\", { enumerable: true, get: function () { return types_1.InteractionsAction; } });\nObject.defineProperty(exports, \"InAppMessagingAction\", { enumerable: true, get: function () { return types_1.InAppMessagingAction; } });\nObject.defineProperty(exports, \"PredictionsAction\", { enumerable: true, get: function () { return types_1.PredictionsAction; } });\nObject.defineProperty(exports, \"PubSubAction\", { enumerable: true, get: function () { return types_1.PubSubAction; } });\nObject.defineProperty(exports, \"PushNotificationAction\", { enumerable: true, get: function () { return types_1.PushNotificationAction; } });\nObject.defineProperty(exports, \"StorageAction\", { enumerable: true, get: function () { return types_1.StorageAction; } });\nvar customUserAgent_1 = require(\"./Platform/customUserAgent\");\nObject.defineProperty(exports, \"setCustomUserAgent\", { enumerable: true, get: function () { return customUserAgent_1.setCustomUserAgent; } });\n// Error handling\nvar errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"AmplifyError\", { enumerable: true, get: function () { return errors_1.AmplifyError; } });\nObject.defineProperty(exports, \"PlatformNotSupportedError\", { enumerable: true, get: function () { return errors_1.PlatformNotSupportedError; } });\nObject.defineProperty(exports, \"createAssertionFunction\", { enumerable: true, get: function () { return errors_1.createAssertionFunction; } });\nObject.defineProperty(exports, \"ApiError\", { enumerable: true, get: function () { return errors_1.ApiError; } });\nvar types_2 = require(\"./types\");\nObject.defineProperty(exports, \"AmplifyErrorCode\", { enumerable: true, get: function () { return types_2.AmplifyErrorCode; } });\n// Other utilities & constants\nvar BackgroundProcessManager_1 = require(\"./BackgroundProcessManager\");\nObject.defineProperty(exports, \"BackgroundProcessManager\", { enumerable: true, get: function () { return BackgroundProcessManager_1.BackgroundProcessManager; } });\nvar Mutex_1 = require(\"./Mutex\");\nObject.defineProperty(exports, \"Mutex\", { enumerable: true, get: function () { return Mutex_1.Mutex; } });\nvar Reachability_1 = require(\"./Reachability\");\nObject.defineProperty(exports, \"Reachability\", { enumerable: true, get: function () { return Reachability_1.Reachability; } });\nvar constants_2 = require(\"./constants\");\nObject.defineProperty(exports, \"USER_AGENT_HEADER\", { enumerable: true, get: function () { return constants_2.USER_AGENT_HEADER; } });\nvar fetchAuthSession_1 = require(\"./singleton/apis/internal/fetchAuthSession\");\nObject.defineProperty(exports, \"fetchAuthSession\", { enumerable: true, get: function () { return fetchAuthSession_1.fetchAuthSession; } });\nvar Hub_1 = require(\"./Hub\");\nObject.defineProperty(exports, \"AMPLIFY_SYMBOL\", { enumerable: true, get: function () { return Hub_1.AMPLIFY_SYMBOL; } });\nvar convert_1 = require(\"./utils/convert\");\nObject.defineProperty(exports, \"base64Decoder\", { enumerable: true, get: function () { return convert_1.base64Decoder; } });\nObject.defineProperty(exports, \"base64Encoder\", { enumerable: true, get: function () { return convert_1.base64Encoder; } });\nvar globalHelpers_1 = require(\"./utils/globalHelpers\");\nObject.defineProperty(exports, \"getCrypto\", { enumerable: true, get: function () { return globalHelpers_1.getCrypto; } });\nvar cryptoSecureRandomInt_1 = require(\"./utils/cryptoSecureRandomInt\");\nObject.defineProperty(exports, \"cryptoSecureRandomInt\", { enumerable: true, get: function () { return cryptoSecureRandomInt_1.cryptoSecureRandomInt; } });\n// Hub\nvar Hub_2 = require(\"./Hub\");\nObject.defineProperty(exports, \"HubInternal\", { enumerable: true, get: function () { return Hub_2.HubInternal; } });\n// Session listener\nvar sessionListener_1 = require(\"./utils/sessionListener\");\nObject.defineProperty(exports, \"sessionListener\", { enumerable: true, get: function () { return sessionListener_1.sessionListener; } });\nvar sessionListener_2 = require(\"./utils/sessionListener\");\nObject.defineProperty(exports, \"SESSION_START_EVENT\", { enumerable: true, get: function () { return sessionListener_2.SESSION_START_EVENT; } });\nObject.defineProperty(exports, \"SESSION_STOP_EVENT\", { enumerable: true, get: function () { return sessionListener_2.SESSION_STOP_EVENT; } });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,kBAA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CAAC;AAC3D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,qBAAqB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,iBAAiB,CAAC,mBAAmB,CAAC,EAAE,EAAE,CAAC,CAAC;AAChJ,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,iBAAiB,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;;"}
|
|
1
|
+
{"version":3,"file":"libraryUtils.js","sources":["../../src/libraryUtils.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.fetchAuthSession = exports.USER_AGENT_HEADER = exports.Reachability = exports.Mutex = exports.BackgroundProcessManager = exports.AmplifyErrorCode = exports.ApiError = exports.createAssertionFunction = exports.PlatformNotSupportedError = exports.AmplifyError = exports.setCustomUserAgent = exports.StorageAction = exports.PushNotificationAction = exports.PubSubAction = exports.PredictionsAction = exports.InAppMessagingAction = exports.InteractionsAction = exports.GeoAction = exports.Framework = exports.DataStoreAction = exports.Category = exports.AnalyticsAction = exports.AuthAction = exports.ApiAction = exports.getAmplifyUserAgent = exports.getAmplifyUserAgentObject = exports.Platform = exports.haveCredentialsChanged = exports.Signer = exports.isTokenExpired = exports.assertOAuthConfig = exports.assertIdentityPoolIdConfig = exports.assertTokenProviderConfig = exports.decodeJWT = exports.AmplifyUrlSearchParams = exports.AmplifyUrl = exports.amplifyUuid = exports.ADD_OAUTH_LISTENER = exports.parseAWSExports = exports.deDupeAsyncFunction = exports.urlSafeEncode = exports.urlSafeDecode = exports.retry = exports.NonRetryableError = exports.jitteredExponentialRetry = exports.jitteredBackoff = exports.isWebWorker = exports.isNonRetryableError = exports.isBrowser = exports.generateRandomString = void 0;\nexports.SESSION_STOP_EVENT = exports.SESSION_START_EVENT = exports.sessionListener = exports.HubInternal = exports.WordArray = exports.cryptoSecureRandomInt = exports.getCrypto = exports.base64Encoder = exports.base64Decoder = exports.AMPLIFY_SYMBOL = void 0;\n/*\nThis file maps top-level exports from `@aws-amplify/core/internals/utils`. These are intended to be internal\nutils for use throughout the library.\n*/\n// Core utilities\nvar utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"generateRandomString\", { enumerable: true, get: function () { return utils_1.generateRandomString; } });\nObject.defineProperty(exports, \"isBrowser\", { enumerable: true, get: function () { return utils_1.isBrowser; } });\nObject.defineProperty(exports, \"isNonRetryableError\", { enumerable: true, get: function () { return utils_1.isNonRetryableError; } });\nObject.defineProperty(exports, \"isWebWorker\", { enumerable: true, get: function () { return utils_1.isWebWorker; } });\nObject.defineProperty(exports, \"jitteredBackoff\", { enumerable: true, get: function () { return utils_1.jitteredBackoff; } });\nObject.defineProperty(exports, \"jitteredExponentialRetry\", { enumerable: true, get: function () { return utils_1.jitteredExponentialRetry; } });\nObject.defineProperty(exports, \"NonRetryableError\", { enumerable: true, get: function () { return utils_1.NonRetryableError; } });\nObject.defineProperty(exports, \"retry\", { enumerable: true, get: function () { return utils_1.retry; } });\nObject.defineProperty(exports, \"urlSafeDecode\", { enumerable: true, get: function () { return utils_1.urlSafeDecode; } });\nObject.defineProperty(exports, \"urlSafeEncode\", { enumerable: true, get: function () { return utils_1.urlSafeEncode; } });\nObject.defineProperty(exports, \"deDupeAsyncFunction\", { enumerable: true, get: function () { return utils_1.deDupeAsyncFunction; } });\nvar parseAWSExports_1 = require(\"./parseAWSExports\");\nObject.defineProperty(exports, \"parseAWSExports\", { enumerable: true, get: function () { return parseAWSExports_1.parseAWSExports; } });\nvar constants_1 = require(\"./singleton/constants\");\nObject.defineProperty(exports, \"ADD_OAUTH_LISTENER\", { enumerable: true, get: function () { return constants_1.ADD_OAUTH_LISTENER; } });\nvar amplifyUuid_1 = require(\"./utils/amplifyUuid\");\nObject.defineProperty(exports, \"amplifyUuid\", { enumerable: true, get: function () { return amplifyUuid_1.amplifyUuid; } });\nvar amplifyUrl_1 = require(\"./utils/amplifyUrl\");\nObject.defineProperty(exports, \"AmplifyUrl\", { enumerable: true, get: function () { return amplifyUrl_1.AmplifyUrl; } });\nObject.defineProperty(exports, \"AmplifyUrlSearchParams\", { enumerable: true, get: function () { return amplifyUrl_1.AmplifyUrlSearchParams; } });\n// Auth utilities\nvar utils_2 = require(\"./singleton/Auth/utils\");\nObject.defineProperty(exports, \"decodeJWT\", { enumerable: true, get: function () { return utils_2.decodeJWT; } });\nObject.defineProperty(exports, \"assertTokenProviderConfig\", { enumerable: true, get: function () { return utils_2.assertTokenProviderConfig; } });\nObject.defineProperty(exports, \"assertIdentityPoolIdConfig\", { enumerable: true, get: function () { return utils_2.assertIdentityPoolIdConfig; } });\nObject.defineProperty(exports, \"assertOAuthConfig\", { enumerable: true, get: function () { return utils_2.assertOAuthConfig; } });\nvar Auth_1 = require(\"./singleton/Auth\");\nObject.defineProperty(exports, \"isTokenExpired\", { enumerable: true, get: function () { return Auth_1.isTokenExpired; } });\nvar Signer_1 = require(\"./Signer\");\nObject.defineProperty(exports, \"Signer\", { enumerable: true, get: function () { return Signer_1.Signer; } });\nvar haveCredentialsChanged_1 = require(\"./utils/haveCredentialsChanged\");\nObject.defineProperty(exports, \"haveCredentialsChanged\", { enumerable: true, get: function () { return haveCredentialsChanged_1.haveCredentialsChanged; } });\n// Platform & user-agent utilities\nvar Platform_1 = require(\"./Platform\");\nObject.defineProperty(exports, \"Platform\", { enumerable: true, get: function () { return Platform_1.Platform; } });\nObject.defineProperty(exports, \"getAmplifyUserAgentObject\", { enumerable: true, get: function () { return Platform_1.getAmplifyUserAgentObject; } });\nObject.defineProperty(exports, \"getAmplifyUserAgent\", { enumerable: true, get: function () { return Platform_1.getAmplifyUserAgent; } });\nvar types_1 = require(\"./Platform/types\");\nObject.defineProperty(exports, \"ApiAction\", { enumerable: true, get: function () { return types_1.ApiAction; } });\nObject.defineProperty(exports, \"AuthAction\", { enumerable: true, get: function () { return types_1.AuthAction; } });\nObject.defineProperty(exports, \"AnalyticsAction\", { enumerable: true, get: function () { return types_1.AnalyticsAction; } });\nObject.defineProperty(exports, \"Category\", { enumerable: true, get: function () { return types_1.Category; } });\nObject.defineProperty(exports, \"DataStoreAction\", { enumerable: true, get: function () { return types_1.DataStoreAction; } });\nObject.defineProperty(exports, \"Framework\", { enumerable: true, get: function () { return types_1.Framework; } });\nObject.defineProperty(exports, \"GeoAction\", { enumerable: true, get: function () { return types_1.GeoAction; } });\nObject.defineProperty(exports, \"InteractionsAction\", { enumerable: true, get: function () { return types_1.InteractionsAction; } });\nObject.defineProperty(exports, \"InAppMessagingAction\", { enumerable: true, get: function () { return types_1.InAppMessagingAction; } });\nObject.defineProperty(exports, \"PredictionsAction\", { enumerable: true, get: function () { return types_1.PredictionsAction; } });\nObject.defineProperty(exports, \"PubSubAction\", { enumerable: true, get: function () { return types_1.PubSubAction; } });\nObject.defineProperty(exports, \"PushNotificationAction\", { enumerable: true, get: function () { return types_1.PushNotificationAction; } });\nObject.defineProperty(exports, \"StorageAction\", { enumerable: true, get: function () { return types_1.StorageAction; } });\nvar customUserAgent_1 = require(\"./Platform/customUserAgent\");\nObject.defineProperty(exports, \"setCustomUserAgent\", { enumerable: true, get: function () { return customUserAgent_1.setCustomUserAgent; } });\n// Error handling\nvar errors_1 = require(\"./errors\");\nObject.defineProperty(exports, \"AmplifyError\", { enumerable: true, get: function () { return errors_1.AmplifyError; } });\nObject.defineProperty(exports, \"PlatformNotSupportedError\", { enumerable: true, get: function () { return errors_1.PlatformNotSupportedError; } });\nObject.defineProperty(exports, \"createAssertionFunction\", { enumerable: true, get: function () { return errors_1.createAssertionFunction; } });\nObject.defineProperty(exports, \"ApiError\", { enumerable: true, get: function () { return errors_1.ApiError; } });\nvar types_2 = require(\"./types\");\nObject.defineProperty(exports, \"AmplifyErrorCode\", { enumerable: true, get: function () { return types_2.AmplifyErrorCode; } });\n// Other utilities & constants\nvar BackgroundProcessManager_1 = require(\"./BackgroundProcessManager\");\nObject.defineProperty(exports, \"BackgroundProcessManager\", { enumerable: true, get: function () { return BackgroundProcessManager_1.BackgroundProcessManager; } });\nvar Mutex_1 = require(\"./Mutex\");\nObject.defineProperty(exports, \"Mutex\", { enumerable: true, get: function () { return Mutex_1.Mutex; } });\nvar Reachability_1 = require(\"./Reachability\");\nObject.defineProperty(exports, \"Reachability\", { enumerable: true, get: function () { return Reachability_1.Reachability; } });\nvar constants_2 = require(\"./constants\");\nObject.defineProperty(exports, \"USER_AGENT_HEADER\", { enumerable: true, get: function () { return constants_2.USER_AGENT_HEADER; } });\nvar fetchAuthSession_1 = require(\"./singleton/apis/internal/fetchAuthSession\");\nObject.defineProperty(exports, \"fetchAuthSession\", { enumerable: true, get: function () { return fetchAuthSession_1.fetchAuthSession; } });\nvar Hub_1 = require(\"./Hub\");\nObject.defineProperty(exports, \"AMPLIFY_SYMBOL\", { enumerable: true, get: function () { return Hub_1.AMPLIFY_SYMBOL; } });\nvar convert_1 = require(\"./utils/convert\");\nObject.defineProperty(exports, \"base64Decoder\", { enumerable: true, get: function () { return convert_1.base64Decoder; } });\nObject.defineProperty(exports, \"base64Encoder\", { enumerable: true, get: function () { return convert_1.base64Encoder; } });\nvar globalHelpers_1 = require(\"./utils/globalHelpers\");\nObject.defineProperty(exports, \"getCrypto\", { enumerable: true, get: function () { return globalHelpers_1.getCrypto; } });\nvar cryptoSecureRandomInt_1 = require(\"./utils/cryptoSecureRandomInt\");\nObject.defineProperty(exports, \"cryptoSecureRandomInt\", { enumerable: true, get: function () { return cryptoSecureRandomInt_1.cryptoSecureRandomInt; } });\nvar WordArray_1 = require(\"./utils/WordArray\");\nObject.defineProperty(exports, \"WordArray\", { enumerable: true, get: function () { return WordArray_1.WordArray; } });\n// Hub\nvar Hub_2 = require(\"./Hub\");\nObject.defineProperty(exports, \"HubInternal\", { enumerable: true, get: function () { return Hub_2.HubInternal; } });\n// Session listener\nvar sessionListener_1 = require(\"./utils/sessionListener\");\nObject.defineProperty(exports, \"sessionListener\", { enumerable: true, get: function () { return sessionListener_1.sessionListener; } });\nvar sessionListener_2 = require(\"./utils/sessionListener\");\nObject.defineProperty(exports, \"SESSION_START_EVENT\", { enumerable: true, get: function () { return sessionListener_2.SESSION_START_EVENT; } });\nObject.defineProperty(exports, \"SESSION_STOP_EVENT\", { enumerable: true, get: function () { return sessionListener_2.SESSION_STOP_EVENT; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC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cjs/types/index.js
CHANGED
|
@@ -7,4 +7,5 @@ const tslib_1 = require("tslib");
|
|
|
7
7
|
tslib_1.__exportStar(require("./core"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./errors"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./storage"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./utils"), exports);
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/types/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 });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./core\"), exports);\ntslib_1.__exportStar(require(\"./errors\"), exports);\ntslib_1.__exportStar(require(\"./storage\"), exports);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACjC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;AACjD,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;AACnD,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/types/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 });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./core\"), exports);\ntslib_1.__exportStar(require(\"./errors\"), exports);\ntslib_1.__exportStar(require(\"./storage\"), exports);\ntslib_1.__exportStar(require(\"./utils\"), exports);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACjC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;AACjD,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;AACnD,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC;AACpD,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/types/utils.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -3,6 +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.WordArray = void 0;
|
|
6
7
|
const cryptoSecureRandomInt_1 = require("./cryptoSecureRandomInt");
|
|
7
8
|
/**
|
|
8
9
|
* Hex encoding strategy.
|
|
@@ -47,5 +48,5 @@ class WordArray {
|
|
|
47
48
|
return hexStringify(this);
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
exports.
|
|
51
|
+
exports.WordArray = WordArray;
|
|
51
52
|
//# sourceMappingURL=WordArray.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WordArray.js","sources":["../../../src/utils/WordArray.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 });\nconst cryptoSecureRandomInt_1 = require(\"./cryptoSecureRandomInt\");\n/**\n * Hex encoding strategy.\n * Converts a word array to a hex string.\n * @param {WordArray} wordArray The word array.\n * @return {string} The hex string.\n * @static\n */\nfunction hexStringify(wordArray) {\n // Shortcuts\n const { words } = wordArray;\n const { sigBytes } = wordArray;\n // Convert\n const hexChars = [];\n for (let i = 0; i < sigBytes; i++) {\n const bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n hexChars.push((bite >>> 4).toString(16));\n hexChars.push((bite & 0x0f).toString(16));\n }\n return hexChars.join('');\n}\nclass WordArray {\n constructor(words, sigBytes) {\n this.words = [];\n let Words = words;\n Words = this.words = Words || [];\n if (sigBytes !== undefined) {\n this.sigBytes = sigBytes;\n }\n else {\n this.sigBytes = Words.length * 4;\n }\n }\n random(nBytes) {\n const words = [];\n for (let i = 0; i < nBytes; i += 4) {\n words.push((0, cryptoSecureRandomInt_1.cryptoSecureRandomInt)());\n }\n return new WordArray(words, nBytes);\n }\n toString() {\n return hexStringify(this);\n }\n}\nexports.
|
|
1
|
+
{"version":3,"file":"WordArray.js","sources":["../../../src/utils/WordArray.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.WordArray = void 0;\nconst cryptoSecureRandomInt_1 = require(\"./cryptoSecureRandomInt\");\n/**\n * Hex encoding strategy.\n * Converts a word array to a hex string.\n * @param {WordArray} wordArray The word array.\n * @return {string} The hex string.\n * @static\n */\nfunction hexStringify(wordArray) {\n // Shortcuts\n const { words } = wordArray;\n const { sigBytes } = wordArray;\n // Convert\n const hexChars = [];\n for (let i = 0; i < sigBytes; i++) {\n const bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n hexChars.push((bite >>> 4).toString(16));\n hexChars.push((bite & 0x0f).toString(16));\n }\n return hexChars.join('');\n}\nclass WordArray {\n constructor(words, sigBytes) {\n this.words = [];\n let Words = words;\n Words = this.words = Words || [];\n if (sigBytes !== undefined) {\n this.sigBytes = sigBytes;\n }\n else {\n this.sigBytes = Words.length * 4;\n }\n }\n random(nBytes) {\n const words = [];\n for (let i = 0; i < nBytes; i += 4) {\n words.push((0, cryptoSecureRandomInt_1.cryptoSecureRandomInt)());\n }\n return new WordArray(words, nBytes);\n }\n toString() {\n return hexStringify(this);\n }\n}\nexports.WordArray = WordArray;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;AAC3B,MAAM,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,SAAS,EAAE;AACjC;AACA,IAAI,MAAM,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC;AAChC,IAAI,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;AACnC;AACA,IAAI,MAAM,QAAQ,GAAG,EAAE,CAAC;AACxB,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE;AACvC,QAAQ,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,GAA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CAAC;AAClC,KAAK;AACL,CAAC;AACD,OAAO,CAAC,SAAS,GAAG,SAAS;;"}
|
|
@@ -14,6 +14,7 @@ export declare class ConsoleLogger implements Logger {
|
|
|
14
14
|
*/
|
|
15
15
|
constructor(name: string, level?: LogType | string);
|
|
16
16
|
static LOG_LEVEL: string | null;
|
|
17
|
+
static BIND_ALL_LOG_LEVELS: boolean;
|
|
17
18
|
_padding(n: number): string;
|
|
18
19
|
_ts(): string;
|
|
19
20
|
configure(config?: object): object | undefined;
|
|
@@ -68,6 +68,14 @@ class ConsoleLogger {
|
|
|
68
68
|
if (type === LogType.WARN && console.warn) {
|
|
69
69
|
log = console.warn.bind(console);
|
|
70
70
|
}
|
|
71
|
+
if (ConsoleLogger.BIND_ALL_LOG_LEVELS) {
|
|
72
|
+
if (type === LogType.INFO && console.info) {
|
|
73
|
+
log = console.info.bind(console);
|
|
74
|
+
}
|
|
75
|
+
if (type === LogType.DEBUG && console.debug) {
|
|
76
|
+
log = console.debug.bind(console);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
71
79
|
const prefix = `[${type}] ${this._ts()} ${this.name}`;
|
|
72
80
|
let message = '';
|
|
73
81
|
if (msg.length === 1 && typeof msg[0] === 'string') {
|
|
@@ -160,6 +168,7 @@ class ConsoleLogger {
|
|
|
160
168
|
}
|
|
161
169
|
}
|
|
162
170
|
ConsoleLogger.LOG_LEVEL = null;
|
|
171
|
+
ConsoleLogger.BIND_ALL_LOG_LEVELS = false;
|
|
163
172
|
|
|
164
173
|
export { ConsoleLogger };
|
|
165
174
|
//# sourceMappingURL=ConsoleLogger.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleLogger.mjs","sources":["../../../src/Logger/ConsoleLogger.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AWS_CLOUDWATCH_CATEGORY } from '../constants';\nimport { LogType } from './types';\nconst LOG_LEVELS = {\n VERBOSE: 1,\n DEBUG: 2,\n INFO: 3,\n WARN: 4,\n ERROR: 5,\n NONE: 6,\n};\n/**\n * Write logs\n * @class Logger\n */\nexport class ConsoleLogger {\n /**\n * @constructor\n * @param {string} name - Name of the logger\n */\n constructor(name, level = LogType.WARN) {\n this.name = name;\n this.level = level;\n this._pluggables = [];\n }\n _padding(n) {\n return n < 10 ? '0' + n : '' + n;\n }\n _ts() {\n const dt = new Date();\n return ([this._padding(dt.getMinutes()), this._padding(dt.getSeconds())].join(':') +\n '.' +\n dt.getMilliseconds());\n }\n configure(config) {\n if (!config)\n return this._config;\n this._config = config;\n return this._config;\n }\n /**\n * Write log\n * @method\n * @memeberof Logger\n * @param {LogType|string} type - log type, default INFO\n * @param {string|object} msg - Logging message or object\n */\n _log(type, ...msg) {\n let loggerLevelName = this.level;\n if (ConsoleLogger.LOG_LEVEL) {\n loggerLevelName = ConsoleLogger.LOG_LEVEL;\n }\n if (typeof window !== 'undefined' && window.LOG_LEVEL) {\n loggerLevelName = window.LOG_LEVEL;\n }\n const loggerLevel = LOG_LEVELS[loggerLevelName];\n const typeLevel = LOG_LEVELS[type];\n if (!(typeLevel >= loggerLevel)) {\n // Do nothing if type is not greater than or equal to logger level (handle undefined)\n return;\n }\n let log = console.log.bind(console);\n if (type === LogType.ERROR && console.error) {\n log = console.error.bind(console);\n }\n if (type === LogType.WARN && console.warn) {\n log = console.warn.bind(console);\n }\n const prefix = `[${type}] ${this._ts()} ${this.name}`;\n let message = '';\n if (msg.length === 1 && typeof msg[0] === 'string') {\n message = `${prefix} - ${msg[0]}`;\n log(message);\n }\n else if (msg.length === 1) {\n message = `${prefix} ${msg[0]}`;\n log(prefix, msg[0]);\n }\n else if (typeof msg[0] === 'string') {\n let obj = msg.slice(1);\n if (obj.length === 1) {\n obj = obj[0];\n }\n message = `${prefix} - ${msg[0]} ${obj}`;\n log(`${prefix} - ${msg[0]}`, obj);\n }\n else {\n message = `${prefix} ${msg}`;\n log(prefix, msg);\n }\n for (const plugin of this._pluggables) {\n const logEvent = { message, timestamp: Date.now() };\n plugin.pushLogs([logEvent]);\n }\n }\n /**\n * Write General log. Default to INFO\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n log(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write INFO log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n info(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write WARN log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n warn(...msg) {\n this._log(LogType.WARN, ...msg);\n }\n /**\n * Write ERROR log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n error(...msg) {\n this._log(LogType.ERROR, ...msg);\n }\n /**\n * Write DEBUG log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n debug(...msg) {\n this._log(LogType.DEBUG, ...msg);\n }\n /**\n * Write VERBOSE log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n verbose(...msg) {\n this._log(LogType.VERBOSE, ...msg);\n }\n addPluggable(pluggable) {\n if (pluggable && pluggable.getCategoryName() === AWS_CLOUDWATCH_CATEGORY) {\n this._pluggables.push(pluggable);\n pluggable.configure(this._config);\n }\n }\n listPluggables() {\n return this._pluggables;\n }\n}\nConsoleLogger.LOG_LEVEL = null;\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA,MAAM,UAAU,GAAG;AACnB,IAAI,OAAO,EAAE,CAAC;AACd,IAAI,KAAK,EAAE,CAAC;AACZ,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,KAAK,EAAE,CAAC;AACZ,IAAI,IAAI,EAAE,CAAC;AACX,CAAC,CAAC;AACF;AACA;AACA;AACA;AACO,MAAM,aAAa,CAAC;AAC3B;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,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1
|
+
{"version":3,"file":"ConsoleLogger.mjs","sources":["../../../src/Logger/ConsoleLogger.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AWS_CLOUDWATCH_CATEGORY } from '../constants';\nimport { LogType } from './types';\nconst LOG_LEVELS = {\n VERBOSE: 1,\n DEBUG: 2,\n INFO: 3,\n WARN: 4,\n ERROR: 5,\n NONE: 6,\n};\n/**\n * Write logs\n * @class Logger\n */\nexport class ConsoleLogger {\n /**\n * @constructor\n * @param {string} name - Name of the logger\n */\n constructor(name, level = LogType.WARN) {\n this.name = name;\n this.level = level;\n this._pluggables = [];\n }\n _padding(n) {\n return n < 10 ? '0' + n : '' + n;\n }\n _ts() {\n const dt = new Date();\n return ([this._padding(dt.getMinutes()), this._padding(dt.getSeconds())].join(':') +\n '.' +\n dt.getMilliseconds());\n }\n configure(config) {\n if (!config)\n return this._config;\n this._config = config;\n return this._config;\n }\n /**\n * Write log\n * @method\n * @memeberof Logger\n * @param {LogType|string} type - log type, default INFO\n * @param {string|object} msg - Logging message or object\n */\n _log(type, ...msg) {\n let loggerLevelName = this.level;\n if (ConsoleLogger.LOG_LEVEL) {\n loggerLevelName = ConsoleLogger.LOG_LEVEL;\n }\n if (typeof window !== 'undefined' && window.LOG_LEVEL) {\n loggerLevelName = window.LOG_LEVEL;\n }\n const loggerLevel = LOG_LEVELS[loggerLevelName];\n const typeLevel = LOG_LEVELS[type];\n if (!(typeLevel >= loggerLevel)) {\n // Do nothing if type is not greater than or equal to logger level (handle undefined)\n return;\n }\n let log = console.log.bind(console);\n if (type === LogType.ERROR && console.error) {\n log = console.error.bind(console);\n }\n if (type === LogType.WARN && console.warn) {\n log = console.warn.bind(console);\n }\n if (ConsoleLogger.BIND_ALL_LOG_LEVELS) {\n if (type === LogType.INFO && console.info) {\n log = console.info.bind(console);\n }\n if (type === LogType.DEBUG && console.debug) {\n log = console.debug.bind(console);\n }\n }\n const prefix = `[${type}] ${this._ts()} ${this.name}`;\n let message = '';\n if (msg.length === 1 && typeof msg[0] === 'string') {\n message = `${prefix} - ${msg[0]}`;\n log(message);\n }\n else if (msg.length === 1) {\n message = `${prefix} ${msg[0]}`;\n log(prefix, msg[0]);\n }\n else if (typeof msg[0] === 'string') {\n let obj = msg.slice(1);\n if (obj.length === 1) {\n obj = obj[0];\n }\n message = `${prefix} - ${msg[0]} ${obj}`;\n log(`${prefix} - ${msg[0]}`, obj);\n }\n else {\n message = `${prefix} ${msg}`;\n log(prefix, msg);\n }\n for (const plugin of this._pluggables) {\n const logEvent = { message, timestamp: Date.now() };\n plugin.pushLogs([logEvent]);\n }\n }\n /**\n * Write General log. Default to INFO\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n log(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write INFO log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n info(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write WARN log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n warn(...msg) {\n this._log(LogType.WARN, ...msg);\n }\n /**\n * Write ERROR log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n error(...msg) {\n this._log(LogType.ERROR, ...msg);\n }\n /**\n * Write DEBUG log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n debug(...msg) {\n this._log(LogType.DEBUG, ...msg);\n }\n /**\n * Write VERBOSE log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n verbose(...msg) {\n this._log(LogType.VERBOSE, ...msg);\n }\n addPluggable(pluggable) {\n if (pluggable && pluggable.getCategoryName() === AWS_CLOUDWATCH_CATEGORY) {\n this._pluggables.push(pluggable);\n pluggable.configure(this._config);\n }\n }\n listPluggables() {\n return this._pluggables;\n }\n}\nConsoleLogger.LOG_LEVEL = null;\nConsoleLogger.BIND_ALL_LOG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G,GAAG,CAAC,CAAC;AACzC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,KAAK,CAAC,GAAG,GAAG,EAAE;AAClB,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC,CAAC;AACzC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,GAAG,GAAG,EAAE;AACpB,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC,CAAC;AAC3C,KAAK;AACL,IAAI,YAAY,CAAC,SAAS,EAAE;AAC5B,QAAQ,IAAI,SAAS,IAAI,SAAS,CAAC,eAAe,EAAE,KAAK,uBAAuB,EAAE;AAClF,YAAY,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC7C,YAAY,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC9C,SAAS;AACT,KAAK;AACL,IAAI,cAAc,GAAG;AACrB,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC;AAChC,KAAK;AACL,CAAC;AACD,aAAa,CAAC,SAAS,GAAG,IAAI,CAAC;AAC/B,aAAa,CAAC,mBAAmB,GAAG,KAAK;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.0.
|
|
1
|
+
export declare const version = "6.0.21-gen2-storage.7da2b89.0+7da2b89";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.0.21-gen2-storage.7da2b89.0+7da2b89';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import WordArray from './utils/WordArray';
|
|
2
1
|
export { generateRandomString, isBrowser, isNonRetryableError, isWebWorker, jitteredBackoff, jitteredExponentialRetry, NonRetryableError, retry, urlSafeDecode, urlSafeEncode, deDupeAsyncFunction, } from './utils';
|
|
3
2
|
export { parseAWSExports } from './parseAWSExports';
|
|
4
3
|
export { LegacyConfig } from './singleton/types';
|
|
@@ -9,7 +8,7 @@ export { decodeJWT, assertTokenProviderConfig, assertIdentityPoolIdConfig, asser
|
|
|
9
8
|
export { isTokenExpired } from './singleton/Auth';
|
|
10
9
|
export { AssociationBelongsTo, AssociationHasMany, AssociationHasOne, DocumentType, GraphQLAuthMode, ModelFieldType, NonModelFieldType, ModelIntrospectionSchema, SchemaModel, SchemaModels, SchemaNonModel, SchemaNonModels, CustomOperations, CustomOperation, CustomOperationArguments, CustomOperationArgument, ModelAttribute, SecondaryIndexAttribute, GraphQLProviderConfig, } from './singleton/API/types';
|
|
11
10
|
export { Signer } from './Signer';
|
|
12
|
-
export { JWT,
|
|
11
|
+
export { JWT, CognitoIdentityPoolConfig, JwtPayload, AuthStandardAttributeKey, AuthVerifiableAttributeKey, AWSCredentials, } from './singleton/Auth/types';
|
|
13
12
|
export { haveCredentialsChanged } from './utils/haveCredentialsChanged';
|
|
14
13
|
export { Platform, getAmplifyUserAgentObject, getAmplifyUserAgent, } from './Platform';
|
|
15
14
|
export { ApiAction, AuthAction, AnalyticsAction, Category, CustomUserAgentDetails, DataStoreAction, Framework, GeoAction, InteractionsAction, InAppMessagingAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction, SetCustomUserAgentInput, StorageUserAgentInput, AuthUserAgentInput, InAppMessagingUserAgentInput, GeoUserAgentInput, } from './Platform/types';
|
|
@@ -22,10 +21,11 @@ export { Reachability } from './Reachability';
|
|
|
22
21
|
export { USER_AGENT_HEADER } from './constants';
|
|
23
22
|
export { fetchAuthSession } from './singleton/apis/internal/fetchAuthSession';
|
|
24
23
|
export { AMPLIFY_SYMBOL } from './Hub';
|
|
24
|
+
export { StrictUnion } from './types';
|
|
25
25
|
export { base64Decoder, base64Encoder } from './utils/convert';
|
|
26
26
|
export { getCrypto } from './utils/globalHelpers';
|
|
27
27
|
export { cryptoSecureRandomInt } from './utils/cryptoSecureRandomInt';
|
|
28
|
-
export { WordArray };
|
|
28
|
+
export { WordArray } from './utils/WordArray';
|
|
29
29
|
export { HubInternal } from './Hub';
|
|
30
30
|
export { sessionListener } from './utils/sessionListener';
|
|
31
31
|
export { SessionState } from './utils/sessionListener/types';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { default as WordArray } from './utils/WordArray.mjs';
|
|
2
1
|
export { generateRandomString } from './utils/generateRandomString.mjs';
|
|
3
2
|
import './utils/getClientInfo/getClientInfo.mjs';
|
|
4
3
|
export { isBrowser } from './utils/isBrowser.mjs';
|
|
@@ -38,6 +37,7 @@ export { base64Decoder } from './utils/convert/base64/base64Decoder.mjs';
|
|
|
38
37
|
export { base64Encoder } from './utils/convert/base64/base64Encoder.mjs';
|
|
39
38
|
export { getCrypto } from './utils/globalHelpers/index.mjs';
|
|
40
39
|
export { cryptoSecureRandomInt } from './utils/cryptoSecureRandomInt.mjs';
|
|
40
|
+
export { WordArray } from './utils/WordArray.mjs';
|
|
41
41
|
export { sessionListener } from './utils/sessionListener/index.mjs';
|
|
42
42
|
export { SESSION_START_EVENT, SESSION_STOP_EVENT } from './utils/sessionListener/constants.mjs';
|
|
43
43
|
//# sourceMappingURL=libraryUtils.mjs.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StrictUnion } from '../../types';
|
|
1
2
|
import { AtLeastOne } from '../types';
|
|
2
3
|
interface JwtPayloadStandardFields {
|
|
3
4
|
exp?: number;
|
|
@@ -65,9 +66,6 @@ export type AuthConfigUserAttributes = Partial<Record<AuthStandardAttributeKey,
|
|
|
65
66
|
}>>;
|
|
66
67
|
export type AuthConfig = AtLeastOne<CognitoProviderConfig>;
|
|
67
68
|
export type CognitoProviderConfig = StrictUnion<AuthIdentityPoolConfig | AuthUserPoolConfig | AuthUserPoolAndIdentityPoolConfig>;
|
|
68
|
-
type UnionKeys<T> = T extends T ? keyof T : never;
|
|
69
|
-
type StrictUnionHelper<T, TAll> = T extends any ? T & Partial<Record<Exclude<UnionKeys<TAll>, keyof T>, never>> : never;
|
|
70
|
-
export type StrictUnion<T> = StrictUnionHelper<T, T>;
|
|
71
69
|
export interface AuthIdentityPoolConfig {
|
|
72
70
|
Cognito: CognitoIdentityPoolConfig & {
|
|
73
71
|
userPoolClientId?: never;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StrictUnion } from '../../../types';
|
|
2
|
+
import { AuthConfig, CognitoIdentityPoolConfig, CognitoUserPoolAndIdentityPoolConfig, CognitoUserPoolConfig, JWT, OAuthConfig } from '../types';
|
|
2
3
|
export declare function assertTokenProviderConfig(cognitoConfig?: StrictUnion<CognitoUserPoolConfig | CognitoUserPoolAndIdentityPoolConfig | CognitoIdentityPoolConfig>): asserts cognitoConfig is CognitoUserPoolAndIdentityPoolConfig | CognitoUserPoolConfig;
|
|
3
4
|
export declare function assertOAuthConfig(cognitoConfig?: AuthConfig['Cognito']): asserts cognitoConfig is AuthConfig['Cognito'] & {
|
|
4
5
|
loginWith: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AtLeastOne } from '../types';
|
|
2
|
+
/** @deprecated This may be removed in the next major version. */
|
|
2
3
|
export type StorageAccessLevel = 'guest' | 'protected' | 'private';
|
|
3
4
|
export interface S3ProviderConfig {
|
|
4
5
|
S3: {
|
|
@@ -13,13 +14,22 @@ export interface S3ProviderConfig {
|
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
16
|
export type StorageConfig = AtLeastOne<S3ProviderConfig>;
|
|
17
|
+
/** @deprecated This may be removed in the next major version. */
|
|
16
18
|
type StoragePrefixResolver = (params: {
|
|
17
19
|
accessLevel: StorageAccessLevel;
|
|
18
20
|
targetIdentityId?: string;
|
|
19
21
|
}) => Promise<string>;
|
|
20
22
|
export interface LibraryStorageOptions {
|
|
21
23
|
S3: {
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated This may be removed in the next major version.
|
|
26
|
+
* This is currently used for Storage API signature using key as input parameter.
|
|
27
|
+
* */
|
|
22
28
|
prefixResolver?: StoragePrefixResolver;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated This may be removed in the next major version.
|
|
31
|
+
* This is currently used for Storage API signature using key as input parameter.
|
|
32
|
+
* */
|
|
23
33
|
defaultAccessLevel?: StorageAccessLevel;
|
|
24
34
|
isObjectLockEnabled?: boolean;
|
|
25
35
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type UnionKeys<T> = T extends T ? keyof T : never;
|
|
2
|
+
type StrictUnionHelper<T, TAll> = T extends any ? T & Partial<Record<Exclude<UnionKeys<TAll>, keyof T>, never>> : never;
|
|
3
|
+
/**
|
|
4
|
+
* Makes a union 'strict', such that members are disallowed from including the keys of other members. E.g.,
|
|
5
|
+
* `{x: 1, y: 1}` is a valid member of `{x: number} | {y: number}` but not of StrictUnion<{x: number} | {y: number}>.
|
|
6
|
+
*/
|
|
7
|
+
export type StrictUnion<T> = StrictUnionHelper<T, T>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WordArray.mjs","sources":["../../../src/utils/WordArray.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { cryptoSecureRandomInt } from './cryptoSecureRandomInt';\n/**\n * Hex encoding strategy.\n * Converts a word array to a hex string.\n * @param {WordArray} wordArray The word array.\n * @return {string} The hex string.\n * @static\n */\nfunction hexStringify(wordArray) {\n // Shortcuts\n const { words } = wordArray;\n const { sigBytes } = wordArray;\n // Convert\n const hexChars = [];\n for (let i = 0; i < sigBytes; i++) {\n const bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n hexChars.push((bite >>> 4).toString(16));\n hexChars.push((bite & 0x0f).toString(16));\n }\n return hexChars.join('');\n}\nexport
|
|
1
|
+
{"version":3,"file":"WordArray.mjs","sources":["../../../src/utils/WordArray.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { cryptoSecureRandomInt } from './cryptoSecureRandomInt';\n/**\n * Hex encoding strategy.\n * Converts a word array to a hex string.\n * @param {WordArray} wordArray The word array.\n * @return {string} The hex string.\n * @static\n */\nfunction hexStringify(wordArray) {\n // Shortcuts\n const { words } = wordArray;\n const { sigBytes } = wordArray;\n // Convert\n const hexChars = [];\n for (let i = 0; i < sigBytes; i++) {\n const bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n hexChars.push((bite >>> 4).toString(16));\n hexChars.push((bite & 0x0f).toString(16));\n }\n return hexChars.join('');\n}\nexport class WordArray {\n constructor(words, sigBytes) {\n this.words = [];\n let Words = words;\n Words = this.words = Words || [];\n if (sigBytes !== undefined) {\n this.sigBytes = sigBytes;\n }\n else {\n this.sigBytes = Words.length * 4;\n }\n }\n random(nBytes) {\n const words = [];\n for (let i = 0; i < nBytes; i += 4) {\n words.push(cryptoSecureRandomInt());\n }\n return new WordArray(words, nBytes);\n }\n toString() {\n return hexStringify(this);\n }\n}\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY,CAAC,SAAS,EAAE;AACjC;AACA,IAAI,MAAM,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC;AAChC,IAAI,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;AACnC;AACA,IAAI,MAAM,QAAQ,GAAG,EAAE,CAAC;AACxB,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC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S,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC5C,KAAK;AACL,IAAI,QAAQ,GAAG;AACf,QAAQ,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;AAClC,KAAK;AACL;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.21-gen2-storage.7da2b89.0+7da2b89",
|
|
4
4
|
"description": "Core category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"uuid": "^9.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@aws-amplify/react-native": "1.0.
|
|
63
|
+
"@aws-amplify/react-native": "1.0.21-gen2-storage.7da2b89.0+7da2b89",
|
|
64
64
|
"@types/js-cookie": "3.0.2",
|
|
65
65
|
"genversion": "^2.2.0",
|
|
66
66
|
"typescript": "5.0.2"
|
|
@@ -192,5 +192,5 @@
|
|
|
192
192
|
]
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
-
"gitHead": "
|
|
195
|
+
"gitHead": "7da2b89404ba47b1a3f774a4b799e591b8cbebfb"
|
|
196
196
|
}
|
|
@@ -35,6 +35,7 @@ export class ConsoleLogger implements Logger {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
static LOG_LEVEL: string | null = null;
|
|
38
|
+
static BIND_ALL_LOG_LEVELS = false;
|
|
38
39
|
|
|
39
40
|
_padding(n: number) {
|
|
40
41
|
return n < 10 ? '0' + n : '' + n;
|
|
@@ -89,6 +90,14 @@ export class ConsoleLogger implements Logger {
|
|
|
89
90
|
if (type === LogType.WARN && console.warn) {
|
|
90
91
|
log = console.warn.bind(console);
|
|
91
92
|
}
|
|
93
|
+
if (ConsoleLogger.BIND_ALL_LOG_LEVELS) {
|
|
94
|
+
if (type === LogType.INFO && console.info) {
|
|
95
|
+
log = console.info.bind(console);
|
|
96
|
+
}
|
|
97
|
+
if (type === LogType.DEBUG && console.debug) {
|
|
98
|
+
log = console.debug.bind(console);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
92
101
|
|
|
93
102
|
const prefix = `[${type}] ${this._ts()} ${this.name}`;
|
|
94
103
|
let message = '';
|
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '6.0.
|
|
2
|
+
export const version = '6.0.21-gen2-storage.7da2b89.0+7da2b89';
|
package/src/libraryUtils.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
/*
|
|
5
5
|
This file maps top-level exports from `@aws-amplify/core/internals/utils`. These are intended to be internal
|
|
6
6
|
utils for use throughout the library.
|
|
7
7
|
*/
|
|
8
|
+
|
|
8
9
|
// Core utilities
|
|
9
10
|
export {
|
|
10
11
|
generateRandomString,
|
|
@@ -57,7 +58,6 @@ export {
|
|
|
57
58
|
export { Signer } from './Signer';
|
|
58
59
|
export {
|
|
59
60
|
JWT,
|
|
60
|
-
StrictUnion,
|
|
61
61
|
CognitoIdentityPoolConfig,
|
|
62
62
|
JwtPayload,
|
|
63
63
|
AuthStandardAttributeKey,
|
|
@@ -119,10 +119,11 @@ export { Reachability } from './Reachability';
|
|
|
119
119
|
export { USER_AGENT_HEADER } from './constants';
|
|
120
120
|
export { fetchAuthSession } from './singleton/apis/internal/fetchAuthSession';
|
|
121
121
|
export { AMPLIFY_SYMBOL } from './Hub';
|
|
122
|
+
export { StrictUnion } from './types';
|
|
122
123
|
export { base64Decoder, base64Encoder } from './utils/convert';
|
|
123
124
|
export { getCrypto } from './utils/globalHelpers';
|
|
124
125
|
export { cryptoSecureRandomInt } from './utils/cryptoSecureRandomInt';
|
|
125
|
-
export { WordArray };
|
|
126
|
+
export { WordArray } from './utils/WordArray';
|
|
126
127
|
|
|
127
128
|
// Hub
|
|
128
129
|
export { HubInternal } from './Hub';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import { StrictUnion } from '../../types';
|
|
4
5
|
import { AtLeastOne } from '../types';
|
|
5
6
|
|
|
6
7
|
// From https://github.com/awslabs/aws-jwt-verify/blob/main/src/safe-json-parse.ts
|
|
@@ -119,12 +120,6 @@ export type CognitoProviderConfig = StrictUnion<
|
|
|
119
120
|
| AuthUserPoolAndIdentityPoolConfig
|
|
120
121
|
>;
|
|
121
122
|
|
|
122
|
-
type UnionKeys<T> = T extends T ? keyof T : never;
|
|
123
|
-
type StrictUnionHelper<T, TAll> = T extends any
|
|
124
|
-
? T & Partial<Record<Exclude<UnionKeys<TAll>, keyof T>, never>>
|
|
125
|
-
: never;
|
|
126
|
-
export type StrictUnion<T> = StrictUnionHelper<T, T>;
|
|
127
|
-
|
|
128
123
|
export interface AuthIdentityPoolConfig {
|
|
129
124
|
Cognito: CognitoIdentityPoolConfig & {
|
|
130
125
|
userPoolClientId?: never;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { base64Decoder } from '../../../utils/convert';
|
|
4
|
+
import { StrictUnion } from '../../../types';
|
|
4
5
|
import {
|
|
5
6
|
AuthConfig,
|
|
6
7
|
CognitoIdentityPoolConfig,
|
|
@@ -8,7 +9,6 @@ import {
|
|
|
8
9
|
CognitoUserPoolConfig,
|
|
9
10
|
JWT,
|
|
10
11
|
OAuthConfig,
|
|
11
|
-
StrictUnion,
|
|
12
12
|
} from '../types';
|
|
13
13
|
|
|
14
14
|
import { AuthConfigurationErrorCode, assert } from './errorHelpers';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { AtLeastOne } from '../types';
|
|
5
5
|
|
|
6
|
+
/** @deprecated This may be removed in the next major version. */
|
|
6
7
|
export type StorageAccessLevel = 'guest' | 'protected' | 'private';
|
|
7
8
|
|
|
8
9
|
export interface S3ProviderConfig {
|
|
@@ -20,6 +21,7 @@ export interface S3ProviderConfig {
|
|
|
20
21
|
|
|
21
22
|
export type StorageConfig = AtLeastOne<S3ProviderConfig>;
|
|
22
23
|
|
|
24
|
+
/** @deprecated This may be removed in the next major version. */
|
|
23
25
|
type StoragePrefixResolver = (params: {
|
|
24
26
|
accessLevel: StorageAccessLevel;
|
|
25
27
|
targetIdentityId?: string;
|
|
@@ -27,7 +29,15 @@ type StoragePrefixResolver = (params: {
|
|
|
27
29
|
|
|
28
30
|
export interface LibraryStorageOptions {
|
|
29
31
|
S3: {
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated This may be removed in the next major version.
|
|
34
|
+
* This is currently used for Storage API signature using key as input parameter.
|
|
35
|
+
* */
|
|
30
36
|
prefixResolver?: StoragePrefixResolver;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated This may be removed in the next major version.
|
|
39
|
+
* This is currently used for Storage API signature using key as input parameter.
|
|
40
|
+
* */
|
|
31
41
|
defaultAccessLevel?: StorageAccessLevel;
|
|
32
42
|
isObjectLockEnabled?: boolean;
|
|
33
43
|
};
|
package/src/types/index.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
type UnionKeys<T> = T extends T ? keyof T : never;
|
|
5
|
+
|
|
6
|
+
type StrictUnionHelper<T, TAll> = T extends any
|
|
7
|
+
? T & Partial<Record<Exclude<UnionKeys<TAll>, keyof T>, never>>
|
|
8
|
+
: never;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Makes a union 'strict', such that members are disallowed from including the keys of other members. E.g.,
|
|
12
|
+
* `{x: 1, y: 1}` is a valid member of `{x: number} | {y: number}` but not of StrictUnion<{x: number} | {y: number}>.
|
|
13
|
+
*/
|
|
14
|
+
export type StrictUnion<T> = StrictUnionHelper<T, T>;
|