@aws-amplify/core 6.0.1-api-v6-models.8035dfc.0 → 6.0.1-api-v6-models.3eb7748.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.
Files changed (341) hide show
  1. package/lib/Cache/StorageCache.d.ts +14 -31
  2. package/lib/Cache/StorageCache.js +97 -102
  3. package/lib/Cache/StorageCache.native.d.ts +19 -0
  4. package/lib/Cache/StorageCache.native.js +164 -0
  5. package/{lib-esm/Cache/AsyncStorageCache.d.ts → lib/Cache/StorageCacheCommon.d.ts} +124 -99
  6. package/lib/Cache/{AsyncStorageCache.js → StorageCacheCommon.js} +494 -432
  7. package/lib/Cache/constants.d.ts +6 -0
  8. package/lib/Cache/constants.js +17 -0
  9. package/lib/Cache/index.d.ts +2 -0
  10. package/lib/Cache/index.js +7 -0
  11. package/lib/Cache/types/cache.d.ts +38 -0
  12. package/lib/Cache/types/index.d.ts +1 -1
  13. package/lib/Cache/types/index.js +1 -1
  14. package/lib/Cache/{Utils → utils}/CacheList.d.ts +1 -1
  15. package/lib/Cache/{Utils → utils}/CacheList.js +2 -1
  16. package/lib/Cache/utils/cacheHelpers.d.ts +14 -0
  17. package/lib/Cache/utils/cacheHelpers.js +51 -0
  18. package/lib/Cache/{Utils → utils}/errorHelpers.d.ts +0 -1
  19. package/lib/Cache/{Utils → utils}/errorHelpers.js +0 -4
  20. package/lib/Cache/utils/index.d.ts +2 -0
  21. package/lib/Cache/utils/index.js +12 -0
  22. package/lib/I18n/I18n.js +1 -6
  23. package/lib/Platform/types.d.ts +18 -8
  24. package/lib/Platform/types.js +10 -2
  25. package/lib/Platform/version.d.ts +1 -1
  26. package/lib/Platform/version.js +1 -1
  27. package/lib/Reachability/Reachability.d.ts +1 -0
  28. package/lib/Reachability/Reachability.js +42 -1
  29. package/lib/ServiceWorker/ServiceWorker.js +69 -17
  30. package/lib/ServiceWorker/index.d.ts +0 -12
  31. package/lib/ServiceWorker/index.js +0 -12
  32. package/lib/Signer/Signer.js +3 -2
  33. package/lib/awsClients/cognitoIdentity/base.js +2 -1
  34. package/lib/awsClients/pinpoint/base.js +2 -1
  35. package/lib/awsClients/pinpoint/getInAppMessages.js +2 -1
  36. package/lib/awsClients/pinpoint/putEvents.js +2 -1
  37. package/lib/awsClients/pinpoint/updateEndpoint.js +2 -1
  38. package/lib/clients/middleware/signing/signer/signatureV4/index.d.ts +0 -1
  39. package/lib/clients/middleware/signing/signer/signatureV4/index.js +0 -1
  40. package/lib/clients/middleware/signing/signer/signatureV4/presignUrl.js +2 -1
  41. package/lib/errors/errorHelpers.d.ts +2 -0
  42. package/lib/errors/errorHelpers.js +20 -0
  43. package/lib/errors/index.d.ts +1 -0
  44. package/lib/errors/index.js +3 -1
  45. package/lib/index.d.ts +4 -4
  46. package/lib/index.js +9 -6
  47. package/lib/libraryUtils.d.ts +8 -7
  48. package/lib/libraryUtils.js +17 -17
  49. package/lib/parseAWSExports.js +34 -19
  50. package/lib/providers/pinpoint/apis/flushEvents.d.ts +2 -2
  51. package/lib/providers/pinpoint/apis/record.d.ts +1 -1
  52. package/lib/providers/pinpoint/apis/record.js +8 -24
  53. package/lib/providers/pinpoint/apis/updateEndpoint.js +6 -6
  54. package/lib/providers/pinpoint/index.d.ts +2 -2
  55. package/lib/providers/pinpoint/index.js +4 -2
  56. package/lib/providers/pinpoint/types/errors.d.ts +9 -0
  57. package/lib/providers/pinpoint/types/errors.js +15 -0
  58. package/lib/providers/pinpoint/types/index.d.ts +1 -0
  59. package/lib/providers/pinpoint/types/index.js +3 -0
  60. package/lib/providers/pinpoint/types/pinpoint.d.ts +3 -3
  61. package/lib/providers/pinpoint/utils/index.d.ts +1 -0
  62. package/lib/providers/pinpoint/utils/index.js +3 -1
  63. package/lib/providers/pinpoint/utils/resolveEndpointId.d.ts +8 -0
  64. package/lib/providers/pinpoint/utils/resolveEndpointId.js +85 -0
  65. package/lib/singleton/Amplify.d.ts +2 -2
  66. package/lib/singleton/Amplify.js +6 -5
  67. package/lib/singleton/Auth/types.d.ts +3 -3
  68. package/lib/singleton/Cache/types.d.ts +18 -0
  69. package/lib/singleton/Cache/types.js +4 -0
  70. package/lib/singleton/Interactions/types.d.ts +21 -0
  71. package/lib/singleton/Interactions/types.js +4 -0
  72. package/lib/singleton/Notifications/PushNotification/types.d.ts +2 -0
  73. package/lib/singleton/Notifications/PushNotification/types.js +4 -0
  74. package/lib/singleton/Notifications/types.d.ts +3 -1
  75. package/lib/singleton/types.d.ts +3 -3
  76. package/lib/storage/CookieStorage.js +8 -5
  77. package/lib/storage/DefaultStorage.js +1 -1
  78. package/lib/storage/utils.d.ts +1 -1
  79. package/lib/storage/utils.js +3 -3
  80. package/lib/tsconfig.tsbuildinfo +1 -1
  81. package/lib/types/errors.d.ts +1 -0
  82. package/lib/types/errors.js +1 -0
  83. package/lib/utils/amplifyUrl/index.d.ts +13 -0
  84. package/lib/utils/amplifyUrl/index.js +10 -0
  85. package/lib/utils/amplifyUrl/polyfill.d.ts +0 -0
  86. package/lib/utils/amplifyUrl/polyfill.js +4 -0
  87. package/lib/utils/amplifyUrl/polyfill.native.d.ts +1 -0
  88. package/lib/utils/amplifyUuid/index.d.ts +3 -0
  89. package/lib/utils/amplifyUuid/index.js +9 -0
  90. package/lib/utils/amplifyUuid/polyfill.d.ts +0 -0
  91. package/lib/utils/amplifyUuid/polyfill.js +4 -0
  92. package/lib/utils/amplifyUuid/polyfill.native.d.ts +1 -0
  93. package/lib/utils/amplifyUuid/polyfill.native.js +6 -0
  94. package/lib/utils/deepFreeze.d.ts +1 -0
  95. package/lib/utils/deepFreeze.js +38 -0
  96. package/lib/{ClientDevice/android.d.ts → utils/getClientInfo/getClientInfo.android.d.ts} +1 -1
  97. package/lib/{ClientDevice/android.js → utils/getClientInfo/getClientInfo.android.js} +4 -4
  98. package/lib/{ClientDevice/browser.d.ts → utils/getClientInfo/getClientInfo.d.ts} +1 -9
  99. package/lib/{ClientDevice/ios.d.ts → utils/getClientInfo/getClientInfo.ios.d.ts} +1 -1
  100. package/lib/{ClientDevice/ios.js → utils/getClientInfo/getClientInfo.ios.js} +4 -4
  101. package/lib/{ClientDevice/browser.js → utils/getClientInfo/getClientInfo.js} +6 -18
  102. package/lib/utils/getClientInfo/index.d.ts +1 -0
  103. package/lib/utils/getClientInfo/index.js +7 -0
  104. package/lib/utils/index.d.ts +2 -0
  105. package/lib/utils/index.js +5 -1
  106. package/lib/utils/sessionListener/SessionListener.d.ts +10 -0
  107. package/lib/utils/sessionListener/SessionListener.js +55 -0
  108. package/lib/utils/sessionListener/SessionListener.native.d.ts +10 -0
  109. package/lib/utils/sessionListener/SessionListener.native.js +54 -0
  110. package/lib/utils/sessionListener/index.d.ts +2 -0
  111. package/lib/utils/sessionListener/index.js +7 -0
  112. package/lib/utils/sessionListener/types.d.ts +6 -0
  113. package/lib/utils/sessionListener/types.js +4 -0
  114. package/lib-esm/Cache/StorageCache.d.ts +14 -31
  115. package/lib-esm/Cache/StorageCache.js +97 -102
  116. package/lib-esm/Cache/StorageCache.native.d.ts +19 -0
  117. package/lib-esm/Cache/StorageCache.native.js +161 -0
  118. package/{lib/Cache/AsyncStorageCache.d.ts → lib-esm/Cache/StorageCacheCommon.d.ts} +124 -99
  119. package/lib-esm/Cache/{AsyncStorageCache.js → StorageCacheCommon.js} +493 -430
  120. package/lib-esm/Cache/constants.d.ts +6 -0
  121. package/lib-esm/Cache/constants.js +14 -0
  122. package/lib-esm/Cache/index.d.ts +2 -0
  123. package/lib-esm/Cache/index.js +4 -0
  124. package/lib-esm/Cache/types/cache.d.ts +38 -0
  125. package/lib-esm/Cache/types/index.d.ts +1 -1
  126. package/lib-esm/Cache/types/index.js +1 -1
  127. package/lib-esm/Cache/{Utils → utils}/CacheList.d.ts +1 -1
  128. package/lib-esm/Cache/{Utils → utils}/CacheList.js +1 -1
  129. package/lib-esm/Cache/utils/cacheHelpers.d.ts +14 -0
  130. package/lib-esm/Cache/utils/cacheHelpers.js +44 -0
  131. package/lib-esm/Cache/{Utils → utils}/errorHelpers.d.ts +0 -1
  132. package/lib-esm/Cache/{Utils → utils}/errorHelpers.js +0 -4
  133. package/lib-esm/Cache/utils/index.d.ts +2 -0
  134. package/lib-esm/Cache/utils/index.js +4 -0
  135. package/lib-esm/I18n/I18n.js +1 -6
  136. package/lib-esm/Platform/types.d.ts +18 -8
  137. package/lib-esm/Platform/types.js +10 -2
  138. package/lib-esm/Platform/version.d.ts +1 -1
  139. package/lib-esm/Platform/version.js +1 -1
  140. package/lib-esm/Reachability/Reachability.d.ts +1 -0
  141. package/lib-esm/Reachability/Reachability.js +43 -2
  142. package/lib-esm/ServiceWorker/ServiceWorker.js +69 -17
  143. package/lib-esm/ServiceWorker/index.d.ts +0 -12
  144. package/lib-esm/ServiceWorker/index.js +0 -12
  145. package/lib-esm/Signer/Signer.js +3 -2
  146. package/lib-esm/awsClients/cognitoIdentity/base.js +2 -1
  147. package/lib-esm/awsClients/pinpoint/base.js +2 -1
  148. package/lib-esm/awsClients/pinpoint/getInAppMessages.js +2 -1
  149. package/lib-esm/awsClients/pinpoint/putEvents.js +2 -1
  150. package/lib-esm/awsClients/pinpoint/updateEndpoint.js +2 -1
  151. package/lib-esm/clients/middleware/signing/signer/signatureV4/index.d.ts +0 -1
  152. package/lib-esm/clients/middleware/signing/signer/signatureV4/index.js +0 -1
  153. package/lib-esm/clients/middleware/signing/signer/signatureV4/presignUrl.js +2 -1
  154. package/lib-esm/errors/errorHelpers.d.ts +2 -0
  155. package/lib-esm/errors/errorHelpers.js +17 -0
  156. package/lib-esm/errors/index.d.ts +1 -0
  157. package/lib-esm/errors/index.js +1 -0
  158. package/lib-esm/index.d.ts +4 -4
  159. package/lib-esm/index.js +5 -4
  160. package/lib-esm/libraryUtils.d.ts +8 -7
  161. package/lib-esm/libraryUtils.js +7 -7
  162. package/lib-esm/parseAWSExports.js +34 -19
  163. package/lib-esm/providers/pinpoint/apis/flushEvents.d.ts +2 -2
  164. package/lib-esm/providers/pinpoint/apis/record.d.ts +1 -1
  165. package/lib-esm/providers/pinpoint/apis/record.js +9 -25
  166. package/lib-esm/providers/pinpoint/apis/updateEndpoint.js +6 -6
  167. package/lib-esm/providers/pinpoint/index.d.ts +2 -2
  168. package/lib-esm/providers/pinpoint/index.js +2 -1
  169. package/lib-esm/providers/pinpoint/types/errors.d.ts +9 -0
  170. package/lib-esm/providers/pinpoint/types/errors.js +12 -0
  171. package/lib-esm/providers/pinpoint/types/index.d.ts +1 -0
  172. package/lib-esm/providers/pinpoint/types/index.js +1 -0
  173. package/lib-esm/providers/pinpoint/types/pinpoint.d.ts +3 -3
  174. package/lib-esm/providers/pinpoint/utils/index.d.ts +1 -0
  175. package/lib-esm/providers/pinpoint/utils/index.js +1 -0
  176. package/lib-esm/providers/pinpoint/utils/resolveEndpointId.d.ts +8 -0
  177. package/lib-esm/providers/pinpoint/utils/resolveEndpointId.js +81 -0
  178. package/lib-esm/singleton/Amplify.d.ts +2 -2
  179. package/lib-esm/singleton/Amplify.js +6 -5
  180. package/lib-esm/singleton/Auth/types.d.ts +3 -3
  181. package/lib-esm/singleton/Cache/types.d.ts +18 -0
  182. package/lib-esm/singleton/Cache/types.js +3 -0
  183. package/lib-esm/singleton/Interactions/types.d.ts +21 -0
  184. package/lib-esm/singleton/Interactions/types.js +3 -0
  185. package/lib-esm/singleton/Notifications/PushNotification/types.d.ts +2 -0
  186. package/lib-esm/singleton/Notifications/PushNotification/types.js +3 -0
  187. package/lib-esm/singleton/Notifications/types.d.ts +3 -1
  188. package/lib-esm/singleton/types.d.ts +3 -3
  189. package/lib-esm/storage/CookieStorage.js +5 -5
  190. package/lib-esm/storage/DefaultStorage.js +2 -2
  191. package/lib-esm/storage/utils.d.ts +1 -1
  192. package/lib-esm/storage/utils.js +1 -1
  193. package/lib-esm/tsconfig.tsbuildinfo +1 -1
  194. package/lib-esm/types/errors.d.ts +1 -0
  195. package/lib-esm/types/errors.js +1 -0
  196. package/lib-esm/utils/amplifyUrl/index.d.ts +13 -0
  197. package/lib-esm/utils/amplifyUrl/index.js +6 -0
  198. package/lib-esm/utils/amplifyUuid/index.d.ts +3 -0
  199. package/lib-esm/utils/amplifyUuid/index.js +6 -0
  200. package/lib-esm/utils/amplifyUuid/polyfill.native.js +4 -0
  201. package/lib-esm/utils/deepFreeze.d.ts +1 -0
  202. package/lib-esm/utils/deepFreeze.js +34 -0
  203. package/lib-esm/{ClientDevice/android.d.ts → utils/getClientInfo/getClientInfo.android.d.ts} +1 -1
  204. package/lib-esm/{ClientDevice/android.js → utils/getClientInfo/getClientInfo.android.js} +2 -2
  205. package/lib-esm/{ClientDevice/browser.d.ts → utils/getClientInfo/getClientInfo.d.ts} +1 -9
  206. package/lib-esm/{ClientDevice/ios.d.ts → utils/getClientInfo/getClientInfo.ios.d.ts} +1 -1
  207. package/lib-esm/{ClientDevice/ios.js → utils/getClientInfo/getClientInfo.ios.js} +2 -2
  208. package/lib-esm/{ClientDevice/browser.js → utils/getClientInfo/getClientInfo.js} +4 -14
  209. package/lib-esm/utils/getClientInfo/index.d.ts +1 -0
  210. package/lib-esm/utils/getClientInfo/index.js +3 -0
  211. package/lib-esm/utils/index.d.ts +2 -0
  212. package/lib-esm/utils/index.js +2 -0
  213. package/lib-esm/utils/sessionListener/SessionListener.d.ts +10 -0
  214. package/lib-esm/utils/sessionListener/SessionListener.js +52 -0
  215. package/lib-esm/utils/sessionListener/SessionListener.native.d.ts +10 -0
  216. package/lib-esm/utils/sessionListener/SessionListener.native.js +51 -0
  217. package/lib-esm/utils/sessionListener/index.d.ts +2 -0
  218. package/lib-esm/utils/sessionListener/index.js +4 -0
  219. package/lib-esm/utils/sessionListener/types.d.ts +6 -0
  220. package/lib-esm/utils/sessionListener/types.js +3 -0
  221. package/package.json +9 -19
  222. package/src/Cache/StorageCache.native.ts +65 -0
  223. package/src/Cache/StorageCache.ts +61 -158
  224. package/src/Cache/StorageCacheCommon.ts +577 -0
  225. package/src/Cache/constants.ts +18 -0
  226. package/src/Cache/index.ts +6 -0
  227. package/src/Cache/types/cache.ts +51 -0
  228. package/src/Cache/types/index.ts +4 -4
  229. package/src/Cache/{Utils → utils}/CacheList.ts +185 -185
  230. package/src/Cache/utils/cacheHelpers.ts +52 -0
  231. package/src/Cache/{Utils → utils}/errorHelpers.ts +0 -4
  232. package/src/Cache/{Utils → utils}/index.ts +4 -5
  233. package/src/I18n/I18n.ts +1 -6
  234. package/src/Platform/types.ts +20 -11
  235. package/src/Platform/version.ts +1 -1
  236. package/src/Reachability/Reachability.ts +22 -2
  237. package/src/ServiceWorker/ServiceWorker.ts +20 -17
  238. package/src/ServiceWorker/index.ts +0 -12
  239. package/src/Signer/Signer.ts +3 -2
  240. package/src/awsClients/cognitoIdentity/base.ts +4 -1
  241. package/src/awsClients/pinpoint/base.ts +2 -1
  242. package/src/awsClients/pinpoint/getInAppMessages.ts +2 -1
  243. package/src/awsClients/pinpoint/putEvents.ts +2 -1
  244. package/src/awsClients/pinpoint/updateEndpoint.ts +2 -1
  245. package/src/clients/middleware/signing/signer/signatureV4/index.ts +0 -2
  246. package/src/clients/middleware/signing/signer/signatureV4/presignUrl.ts +2 -1
  247. package/src/errors/errorHelpers.ts +20 -0
  248. package/src/errors/index.ts +1 -0
  249. package/src/index.ts +8 -4
  250. package/src/libraryUtils.ts +17 -11
  251. package/src/parseAWSExports.ts +28 -9
  252. package/src/providers/pinpoint/apis/flushEvents.ts +2 -2
  253. package/src/providers/pinpoint/apis/record.ts +14 -28
  254. package/src/providers/pinpoint/apis/updateEndpoint.ts +6 -6
  255. package/src/providers/pinpoint/index.ts +6 -2
  256. package/src/providers/pinpoint/types/errors.ts +12 -0
  257. package/src/providers/pinpoint/types/index.ts +1 -0
  258. package/src/providers/pinpoint/types/pinpoint.ts +3 -2
  259. package/src/providers/pinpoint/utils/index.ts +1 -0
  260. package/src/providers/pinpoint/utils/resolveEndpointId.ts +46 -0
  261. package/src/singleton/Amplify.ts +10 -8
  262. package/src/singleton/Auth/types.ts +3 -3
  263. package/src/singleton/Cache/types.ts +27 -0
  264. package/src/singleton/Interactions/types.ts +29 -0
  265. package/src/singleton/Notifications/PushNotification/types.ts +6 -0
  266. package/src/singleton/Notifications/types.ts +3 -1
  267. package/src/singleton/types.ts +3 -5
  268. package/src/storage/CookieStorage.ts +5 -9
  269. package/src/storage/DefaultStorage.ts +2 -2
  270. package/src/storage/utils.ts +1 -1
  271. package/src/types/errors.ts +1 -0
  272. package/src/utils/amplifyUrl/index.ts +9 -0
  273. package/src/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.ts → utils/amplifyUrl/polyfill.native.ts} +1 -0
  274. package/src/utils/amplifyUuid/index.ts +9 -0
  275. package/src/utils/amplifyUuid/polyfill.native.ts +6 -0
  276. package/src/utils/amplifyUuid/polyfill.ts +4 -0
  277. package/src/utils/deepFreeze.ts +16 -0
  278. package/src/{ClientDevice/android.ts → utils/getClientInfo/getClientInfo.android.ts} +2 -2
  279. package/src/{ClientDevice/ios.ts → utils/getClientInfo/getClientInfo.ios.ts} +3 -3
  280. package/src/{ClientDevice/browser.ts → utils/getClientInfo/getClientInfo.ts} +4 -16
  281. package/src/utils/getClientInfo/index.ts +4 -0
  282. package/src/utils/index.ts +2 -0
  283. package/src/utils/sessionListener/SessionListener.native.ts +70 -0
  284. package/src/utils/sessionListener/SessionListener.ts +74 -0
  285. package/src/utils/sessionListener/index.ts +6 -0
  286. package/src/utils/sessionListener/types.ts +11 -0
  287. package/lib/Amplify.d.ts +0 -29
  288. package/lib/Amplify.js +0 -118
  289. package/lib/Cache/BrowserStorageCache.d.ts +0 -166
  290. package/lib/Cache/BrowserStorageCache.js +0 -456
  291. package/lib/Cache/InMemoryCache.d.ts +0 -129
  292. package/lib/Cache/InMemoryCache.js +0 -342
  293. package/lib/Cache/Utils/CacheUtils.d.ts +0 -25
  294. package/lib/Cache/Utils/CacheUtils.js +0 -86
  295. package/lib/Cache/Utils/index.d.ts +0 -2
  296. package/lib/Cache/Utils/index.js +0 -16
  297. package/lib/Cache/reactnative.d.ts +0 -3
  298. package/lib/Cache/reactnative.js +0 -8
  299. package/lib/Cache/types/Cache.d.ts +0 -55
  300. package/lib/ClientDevice/index.d.ts +0 -23
  301. package/lib/ClientDevice/index.js +0 -18
  302. package/lib/ClientDevice/reactnative.d.ts +0 -7
  303. package/lib/ClientDevice/reactnative.js +0 -24
  304. package/lib-esm/Amplify.d.ts +0 -29
  305. package/lib-esm/Amplify.js +0 -115
  306. package/lib-esm/Cache/BrowserStorageCache.d.ts +0 -166
  307. package/lib-esm/Cache/BrowserStorageCache.js +0 -453
  308. package/lib-esm/Cache/InMemoryCache.d.ts +0 -129
  309. package/lib-esm/Cache/InMemoryCache.js +0 -339
  310. package/lib-esm/Cache/Utils/CacheUtils.d.ts +0 -25
  311. package/lib-esm/Cache/Utils/CacheUtils.js +0 -79
  312. package/lib-esm/Cache/Utils/index.d.ts +0 -2
  313. package/lib-esm/Cache/Utils/index.js +0 -4
  314. package/lib-esm/Cache/reactnative.d.ts +0 -3
  315. package/lib-esm/Cache/reactnative.js +0 -6
  316. package/lib-esm/Cache/types/Cache.d.ts +0 -55
  317. package/lib-esm/ClientDevice/index.d.ts +0 -23
  318. package/lib-esm/ClientDevice/index.js +0 -15
  319. package/lib-esm/ClientDevice/reactnative.d.ts +0 -7
  320. package/lib-esm/ClientDevice/reactnative.js +0 -21
  321. package/src/Amplify.ts +0 -106
  322. package/src/Cache/AsyncStorageCache.ts +0 -495
  323. package/src/Cache/BrowserStorageCache.ts +0 -504
  324. package/src/Cache/CHANGELOG.md +0 -1239
  325. package/src/Cache/InMemoryCache.ts +0 -347
  326. package/src/Cache/Utils/CacheUtils.ts +0 -90
  327. package/src/Cache/reactnative.ts +0 -9
  328. package/src/Cache/types/Cache.ts +0 -75
  329. package/src/ClientDevice/index.ts +0 -14
  330. package/src/ClientDevice/reactnative.ts +0 -18
  331. package/lib/Cache/types/{Cache.js → cache.js} +0 -0
  332. package/lib/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.js → utils/amplifyUrl/polyfill.native.js} +1 -1
  333. /package/lib-esm/Cache/types/{Cache.js → cache.js} +0 -0
  334. /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.d.ts → utils/amplifyUrl/polyfill.d.ts} +0 -0
  335. /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.js → utils/amplifyUrl/polyfill.js} +0 -0
  336. /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.d.ts → utils/amplifyUrl/polyfill.native.d.ts} +0 -0
  337. /package/lib-esm/{clients/middleware/signing/signer/signatureV4/polyfills/index.native.js → utils/amplifyUrl/polyfill.native.js} +0 -0
  338. /package/{lib/clients/middleware/signing/signer/signatureV4/polyfills/index.d.ts → lib-esm/utils/amplifyUuid/polyfill.d.ts} +0 -0
  339. /package/{lib/clients/middleware/signing/signer/signatureV4/polyfills/index.js → lib-esm/utils/amplifyUuid/polyfill.js} +0 -0
  340. /package/{lib/clients/middleware/signing/signer/signatureV4/polyfills/index.native.d.ts → lib-esm/utils/amplifyUuid/polyfill.native.d.ts} +0 -0
  341. /package/src/{clients/middleware/signing/signer/signatureV4/polyfills/index.ts → utils/amplifyUrl/polyfill.ts} +0 -0
@@ -1,166 +0,0 @@
1
- import { StorageCache } from './StorageCache';
2
- import { ICache, CacheConfig, CacheItemOptions } from './types';
3
- /**
4
- * Customized storage based on the SessionStorage or LocalStorage with LRU implemented
5
- */
6
- export declare class BrowserStorageCacheClass extends StorageCache implements ICache {
7
- /**
8
- * initialize the cache
9
- * @param config - the configuration of the cache
10
- */
11
- constructor(config?: CacheConfig);
12
- private getStorage;
13
- /**
14
- * decrease current size of the cache
15
- *
16
- * @private
17
- * @param amount - the amount of the cache size which needs to be decreased
18
- */
19
- private _decreaseCurSizeInBytes;
20
- /**
21
- * increase current size of the cache
22
- *
23
- * @private
24
- * @param amount - the amount of the cache szie which need to be increased
25
- */
26
- private _increaseCurSizeInBytes;
27
- /**
28
- * update the visited time if item has been visited
29
- *
30
- * @private
31
- * @param item - the item which need to be refreshed
32
- * @param prefixedKey - the key of the item
33
- *
34
- * @return the refreshed item
35
- */
36
- private _refreshItem;
37
- /**
38
- * check wether item is expired
39
- *
40
- * @private
41
- * @param key - the key of the item
42
- *
43
- * @return true if the item is expired.
44
- */
45
- private _isExpired;
46
- /**
47
- * delete item from cache
48
- *
49
- * @private
50
- * @param prefixedKey - the key of the item
51
- * @param size - optional, the byte size of the item
52
- */
53
- private _removeItem;
54
- /**
55
- * put item into cache
56
- *
57
- * @private
58
- * @param prefixedKey - the key of the item
59
- * @param itemData - the value of the item
60
- * @param itemSizeInBytes - the byte size of the item
61
- */
62
- private _setItem;
63
- /**
64
- * total space needed when poping out items
65
- *
66
- * @private
67
- * @param itemSize
68
- *
69
- * @return total space needed
70
- */
71
- private _sizeToPop;
72
- /**
73
- * see whether cache is full
74
- *
75
- * @private
76
- * @param itemSize
77
- *
78
- * @return true if cache is full
79
- */
80
- private _isCacheFull;
81
- /**
82
- * scan the storage and find out all the keys owned by this cache
83
- * also clean the expired keys while scanning
84
- *
85
- * @private
86
- *
87
- * @return array of keys
88
- */
89
- private _findValidKeys;
90
- /**
91
- * get all the items we have, sort them by their priority,
92
- * if priority is same, sort them by their last visited time
93
- * pop out items from the low priority (5 is the lowest)
94
- *
95
- * @private
96
- * @param keys - all the keys in this cache
97
- * @param sizeToPop - the total size of the items which needed to be poped out
98
- */
99
- private _popOutItems;
100
- /**
101
- * Set item into cache. You can put number, string, boolean or object.
102
- * The cache will first check whether has the same key.
103
- * If it has, it will delete the old item and then put the new item in
104
- * The cache will pop out items if it is full
105
- * You can specify the cache item options. The cache will abort and output a warning:
106
- * If the key is invalid
107
- * If the size of the item exceeds itemMaxSize.
108
- * If the value is undefined
109
- * If incorrect cache item configuration
110
- * If error happened with browser storage
111
- *
112
- * @param key - the key of the item
113
- * @param value - the value of the item
114
- * @param {Object} [options] - optional, the specified meta-data
115
- */
116
- setItem(key: string, value: object | number | string | boolean, options?: CacheItemOptions): void;
117
- /**
118
- * Get item from cache. It will return null if item doesn’t exist or it has been expired.
119
- * If you specified callback function in the options,
120
- * then the function will be executed if no such item in the cache
121
- * and finally put the return value into cache.
122
- * Please make sure the callback function will return the value you want to put into the cache.
123
- * The cache will abort output a warning:
124
- * If the key is invalid
125
- * If error happened with browser storage
126
- *
127
- * @param key - the key of the item
128
- * @param {Object} [options] - the options of callback function
129
- *
130
- * @return - return the value of the item
131
- */
132
- getItem(key: string, options?: CacheItemOptions): any;
133
- /**
134
- * remove item from the cache
135
- * The cache will abort output a warning:
136
- * If error happened with browser storage
137
- * @param key - the key of the item
138
- */
139
- removeItem(key: string): void;
140
- /**
141
- * clear the entire cache
142
- * The cache will abort output a warning:
143
- * If error happened with browser storage
144
- */
145
- clear(): void;
146
- /**
147
- * Return all the keys in the cache.
148
- *
149
- * @return - all keys in the cache
150
- */
151
- getAllKeys(): string[];
152
- /**
153
- * return the current size of the cache
154
- *
155
- * @return - current size of the cache
156
- */
157
- getCacheCurSize(): number;
158
- /**
159
- * Return a new instance of cache with customized configuration.
160
- * @param config - the customized configuration
161
- *
162
- * @return - new instance of Cache
163
- */
164
- createInstance(config: CacheConfig): ICache;
165
- }
166
- export declare const BrowserStorageCache: ICache;
@@ -1,456 +0,0 @@
1
- "use strict";
2
- // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- // SPDX-License-Identifier: Apache-2.0
4
- var __extends = (this && this.__extends) || (function () {
5
- var extendStatics = function (d, b) {
6
- extendStatics = Object.setPrototypeOf ||
7
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
8
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
9
- return extendStatics(d, b);
10
- };
11
- return function (d, b) {
12
- if (typeof b !== "function" && b !== null)
13
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
14
- extendStatics(d, b);
15
- function __() { this.constructor = d; }
16
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
- };
18
- })();
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.BrowserStorageCache = exports.BrowserStorageCacheClass = void 0;
21
- var Logger_1 = require("../Logger");
22
- var Utils_1 = require("./Utils");
23
- var StorageCache_1 = require("./StorageCache");
24
- var CacheUtils_1 = require("./Utils/CacheUtils");
25
- var errorHelpers_1 = require("./Utils/errorHelpers");
26
- var logger = new Logger_1.ConsoleLogger('Cache');
27
- /**
28
- * Customized storage based on the SessionStorage or LocalStorage with LRU implemented
29
- */
30
- var BrowserStorageCacheClass = /** @class */ (function (_super) {
31
- __extends(BrowserStorageCacheClass, _super);
32
- /**
33
- * initialize the cache
34
- * @param config - the configuration of the cache
35
- */
36
- function BrowserStorageCacheClass(config) {
37
- var _this = _super.call(this, config) || this;
38
- (0, errorHelpers_1.assert)(!!_this.cacheConfig.storage, errorHelpers_1.CacheErrorCode.NoCacheStorage);
39
- _this.cacheConfig.storage = _this.cacheConfig.storage;
40
- _this.getItem = _this.getItem.bind(_this);
41
- _this.setItem = _this.setItem.bind(_this);
42
- _this.removeItem = _this.removeItem.bind(_this);
43
- return _this;
44
- }
45
- BrowserStorageCacheClass.prototype.getStorage = function () {
46
- (0, errorHelpers_1.assert)(!!this.cacheConfig.storage, errorHelpers_1.CacheErrorCode.NoCacheStorage);
47
- return this.cacheConfig.storage;
48
- };
49
- /**
50
- * decrease current size of the cache
51
- *
52
- * @private
53
- * @param amount - the amount of the cache size which needs to be decreased
54
- */
55
- BrowserStorageCacheClass.prototype._decreaseCurSizeInBytes = function (amount) {
56
- var curSize = this.getCacheCurSize();
57
- this.getStorage().setItem((0, CacheUtils_1.getCurrSizeKey)(this.cacheConfig.keyPrefix), (curSize - amount).toString());
58
- };
59
- /**
60
- * increase current size of the cache
61
- *
62
- * @private
63
- * @param amount - the amount of the cache szie which need to be increased
64
- */
65
- BrowserStorageCacheClass.prototype._increaseCurSizeInBytes = function (amount) {
66
- var curSize = this.getCacheCurSize();
67
- this.getStorage().setItem((0, CacheUtils_1.getCurrSizeKey)(this.cacheConfig.keyPrefix), (curSize + amount).toString());
68
- };
69
- /**
70
- * update the visited time if item has been visited
71
- *
72
- * @private
73
- * @param item - the item which need to be refreshed
74
- * @param prefixedKey - the key of the item
75
- *
76
- * @return the refreshed item
77
- */
78
- BrowserStorageCacheClass.prototype._refreshItem = function (item, prefixedKey) {
79
- item.visitedTime = (0, Utils_1.getCurrTime)();
80
- this.getStorage().setItem(prefixedKey, JSON.stringify(item));
81
- return item;
82
- };
83
- /**
84
- * check wether item is expired
85
- *
86
- * @private
87
- * @param key - the key of the item
88
- *
89
- * @return true if the item is expired.
90
- */
91
- BrowserStorageCacheClass.prototype._isExpired = function (key) {
92
- var text = this.getStorage().getItem(key);
93
- (0, errorHelpers_1.assert)(text !== null, errorHelpers_1.CacheErrorCode.NoCacheItem, "Key: ".concat(key));
94
- var item = JSON.parse(text);
95
- if ((0, Utils_1.getCurrTime)() >= item.expires) {
96
- return true;
97
- }
98
- return false;
99
- };
100
- /**
101
- * delete item from cache
102
- *
103
- * @private
104
- * @param prefixedKey - the key of the item
105
- * @param size - optional, the byte size of the item
106
- */
107
- BrowserStorageCacheClass.prototype._removeItem = function (prefixedKey, size) {
108
- var item = this.getStorage().getItem(prefixedKey);
109
- (0, errorHelpers_1.assert)(item !== null, errorHelpers_1.CacheErrorCode.NoCacheItem, "Key: ".concat(prefixedKey));
110
- var itemSize = size !== null && size !== void 0 ? size : JSON.parse(item).byteSize;
111
- this._decreaseCurSizeInBytes(itemSize);
112
- // remove the cache item
113
- this.getStorage().removeItem(prefixedKey);
114
- };
115
- /**
116
- * put item into cache
117
- *
118
- * @private
119
- * @param prefixedKey - the key of the item
120
- * @param itemData - the value of the item
121
- * @param itemSizeInBytes - the byte size of the item
122
- */
123
- BrowserStorageCacheClass.prototype._setItem = function (prefixedKey, item) {
124
- // update the cache size
125
- this._increaseCurSizeInBytes(item.byteSize);
126
- try {
127
- this.getStorage().setItem(prefixedKey, JSON.stringify(item));
128
- }
129
- catch (setItemErr) {
130
- // if failed, we need to rollback the cache size
131
- this._decreaseCurSizeInBytes(item.byteSize);
132
- logger.error("Failed to set item ".concat(setItemErr));
133
- }
134
- };
135
- /**
136
- * total space needed when poping out items
137
- *
138
- * @private
139
- * @param itemSize
140
- *
141
- * @return total space needed
142
- */
143
- BrowserStorageCacheClass.prototype._sizeToPop = function (itemSize) {
144
- var spaceItemNeed = this.getCacheCurSize() + itemSize - this.cacheConfig.capacityInBytes;
145
- var cacheThresholdSpace = (1 - this.cacheConfig.warningThreshold) *
146
- this.cacheConfig.capacityInBytes;
147
- return spaceItemNeed > cacheThresholdSpace
148
- ? spaceItemNeed
149
- : cacheThresholdSpace;
150
- };
151
- /**
152
- * see whether cache is full
153
- *
154
- * @private
155
- * @param itemSize
156
- *
157
- * @return true if cache is full
158
- */
159
- BrowserStorageCacheClass.prototype._isCacheFull = function (itemSize) {
160
- return itemSize + this.getCacheCurSize() > this.cacheConfig.capacityInBytes;
161
- };
162
- /**
163
- * scan the storage and find out all the keys owned by this cache
164
- * also clean the expired keys while scanning
165
- *
166
- * @private
167
- *
168
- * @return array of keys
169
- */
170
- BrowserStorageCacheClass.prototype._findValidKeys = function () {
171
- var keys = [];
172
- var keyInCache = [];
173
- // get all keys in Storage
174
- for (var i = 0; i < this.getStorage().length; i += 1) {
175
- var key = this.getStorage().key(i);
176
- if (key) {
177
- keyInCache.push(key);
178
- }
179
- }
180
- // find those items which belong to our cache and also clean those expired items
181
- for (var i = 0; i < keyInCache.length; i += 1) {
182
- var key = keyInCache[i];
183
- if (key.indexOf(this.cacheConfig.keyPrefix) === 0 &&
184
- key !== (0, CacheUtils_1.getCurrSizeKey)(this.cacheConfig.keyPrefix)) {
185
- if (this._isExpired(key)) {
186
- this._removeItem(key);
187
- }
188
- else {
189
- keys.push(key);
190
- }
191
- }
192
- }
193
- return keys;
194
- };
195
- /**
196
- * get all the items we have, sort them by their priority,
197
- * if priority is same, sort them by their last visited time
198
- * pop out items from the low priority (5 is the lowest)
199
- *
200
- * @private
201
- * @param keys - all the keys in this cache
202
- * @param sizeToPop - the total size of the items which needed to be poped out
203
- */
204
- BrowserStorageCacheClass.prototype._popOutItems = function (keys, sizeToPop) {
205
- var items = [];
206
- var remainedSize = sizeToPop;
207
- // get the items from Storage
208
- for (var i = 0; i < keys.length; i += 1) {
209
- var val = this.getStorage().getItem(keys[i]);
210
- if (val != null) {
211
- var item = JSON.parse(val);
212
- items.push(item);
213
- }
214
- }
215
- // first compare priority
216
- // then compare visited time
217
- items.sort(function (a, b) {
218
- if (a.priority > b.priority) {
219
- return -1;
220
- }
221
- else if (a.priority < b.priority) {
222
- return 1;
223
- }
224
- else {
225
- if (a.visitedTime < b.visitedTime) {
226
- return -1;
227
- }
228
- else
229
- return 1;
230
- }
231
- });
232
- for (var i = 0; i < items.length; i += 1) {
233
- // pop out items until we have enough room for new item
234
- this._removeItem(items[i].key, items[i].byteSize);
235
- remainedSize -= items[i].byteSize;
236
- if (remainedSize <= 0) {
237
- return;
238
- }
239
- }
240
- };
241
- /**
242
- * Set item into cache. You can put number, string, boolean or object.
243
- * The cache will first check whether has the same key.
244
- * If it has, it will delete the old item and then put the new item in
245
- * The cache will pop out items if it is full
246
- * You can specify the cache item options. The cache will abort and output a warning:
247
- * If the key is invalid
248
- * If the size of the item exceeds itemMaxSize.
249
- * If the value is undefined
250
- * If incorrect cache item configuration
251
- * If error happened with browser storage
252
- *
253
- * @param key - the key of the item
254
- * @param value - the value of the item
255
- * @param {Object} [options] - optional, the specified meta-data
256
- */
257
- BrowserStorageCacheClass.prototype.setItem = function (key, value, options) {
258
- logger.log("Set item: key is ".concat(key, ", value is ").concat(value, " with options: ").concat(options));
259
- var prefixedKey = this.cacheConfig.keyPrefix + key;
260
- // invalid keys
261
- if (prefixedKey === this.cacheConfig.keyPrefix ||
262
- prefixedKey === (0, CacheUtils_1.getCurrSizeKey)(this.cacheConfig.keyPrefix)) {
263
- logger.warn("Invalid key: should not be empty or 'CurSize'");
264
- return;
265
- }
266
- if (typeof value === 'undefined') {
267
- logger.warn("The value of item should not be undefined!");
268
- return;
269
- }
270
- var cacheItemOptions = {
271
- priority: options && options.priority !== undefined
272
- ? options.priority
273
- : this.cacheConfig.defaultPriority,
274
- expires: options && options.expires !== undefined
275
- ? options.expires
276
- : this.cacheConfig.defaultTTL + (0, Utils_1.getCurrTime)(),
277
- };
278
- if (cacheItemOptions.priority < 1 || cacheItemOptions.priority > 5) {
279
- logger.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");
280
- return;
281
- }
282
- var item = this.fillCacheItem(prefixedKey, value, cacheItemOptions);
283
- // check wether this item is too big;
284
- if (item.byteSize > this.cacheConfig.itemMaxSize) {
285
- logger.warn("Item with key: ".concat(key, " you are trying to put into is too big!"));
286
- return;
287
- }
288
- try {
289
- // first look into the storage, if it exists, delete it.
290
- var val = this.getStorage().getItem(prefixedKey);
291
- if (val) {
292
- this._removeItem(prefixedKey, JSON.parse(val).byteSize);
293
- }
294
- // check whether the cache is full
295
- if (this._isCacheFull(item.byteSize)) {
296
- var validKeys = this._findValidKeys();
297
- // check again and then pop out items
298
- if (this._isCacheFull(item.byteSize)) {
299
- var sizeToPop = this._sizeToPop(item.byteSize);
300
- this._popOutItems(validKeys, sizeToPop);
301
- }
302
- }
303
- // put item in the cache
304
- // may failed due to storage full
305
- this._setItem(prefixedKey, item);
306
- }
307
- catch (e) {
308
- logger.warn("setItem failed! ".concat(e));
309
- }
310
- };
311
- /**
312
- * Get item from cache. It will return null if item doesn’t exist or it has been expired.
313
- * If you specified callback function in the options,
314
- * then the function will be executed if no such item in the cache
315
- * and finally put the return value into cache.
316
- * Please make sure the callback function will return the value you want to put into the cache.
317
- * The cache will abort output a warning:
318
- * If the key is invalid
319
- * If error happened with browser storage
320
- *
321
- * @param key - the key of the item
322
- * @param {Object} [options] - the options of callback function
323
- *
324
- * @return - return the value of the item
325
- */
326
- BrowserStorageCacheClass.prototype.getItem = function (key, options) {
327
- logger.log("Get item: key is ".concat(key, " with options ").concat(options));
328
- var ret = null;
329
- var prefixedKey = this.cacheConfig.keyPrefix + key;
330
- if (prefixedKey === this.cacheConfig.keyPrefix ||
331
- prefixedKey === (0, CacheUtils_1.getCurrSizeKey)(this.cacheConfig.keyPrefix)) {
332
- logger.warn("Invalid key: should not be empty or 'CurSize'");
333
- return null;
334
- }
335
- try {
336
- ret = this.getStorage().getItem(prefixedKey);
337
- if (ret != null) {
338
- if (this._isExpired(prefixedKey)) {
339
- // if expired, remove that item and return null
340
- this._removeItem(prefixedKey, JSON.parse(ret).byteSize);
341
- ret = null;
342
- }
343
- else {
344
- // if not expired, great, return the value and refresh it
345
- var item = JSON.parse(ret);
346
- item = this._refreshItem(item, prefixedKey);
347
- return item.data;
348
- }
349
- }
350
- if (options && options.callback !== undefined) {
351
- var val = options.callback();
352
- if (val !== null) {
353
- this.setItem(key, val, options);
354
- }
355
- return val;
356
- }
357
- return null;
358
- }
359
- catch (e) {
360
- logger.warn("getItem failed! ".concat(e));
361
- return null;
362
- }
363
- };
364
- /**
365
- * remove item from the cache
366
- * The cache will abort output a warning:
367
- * If error happened with browser storage
368
- * @param key - the key of the item
369
- */
370
- BrowserStorageCacheClass.prototype.removeItem = function (key) {
371
- logger.log("Remove item: key is ".concat(key));
372
- var prefixedKey = this.cacheConfig.keyPrefix + key;
373
- if (prefixedKey === this.cacheConfig.keyPrefix ||
374
- prefixedKey === (0, CacheUtils_1.getCurrSizeKey)(this.cacheConfig.keyPrefix)) {
375
- return;
376
- }
377
- try {
378
- var val = this.getStorage().getItem(prefixedKey);
379
- if (val) {
380
- this._removeItem(prefixedKey, JSON.parse(val).byteSize);
381
- }
382
- }
383
- catch (e) {
384
- logger.warn("removeItem failed! ".concat(e));
385
- }
386
- };
387
- /**
388
- * clear the entire cache
389
- * The cache will abort output a warning:
390
- * If error happened with browser storage
391
- */
392
- BrowserStorageCacheClass.prototype.clear = function () {
393
- logger.log("Clear Cache");
394
- var keysToRemove = [];
395
- for (var i = 0; i < this.getStorage().length; i += 1) {
396
- var key = this.getStorage().key(i);
397
- if ((key === null || key === void 0 ? void 0 : key.indexOf(this.cacheConfig.keyPrefix)) === 0) {
398
- keysToRemove.push(key);
399
- }
400
- }
401
- try {
402
- for (var i = 0; i < keysToRemove.length; i += 1) {
403
- this.getStorage().removeItem(keysToRemove[i]);
404
- }
405
- }
406
- catch (e) {
407
- logger.warn("clear failed! ".concat(e));
408
- }
409
- };
410
- /**
411
- * Return all the keys in the cache.
412
- *
413
- * @return - all keys in the cache
414
- */
415
- BrowserStorageCacheClass.prototype.getAllKeys = function () {
416
- var keys = [];
417
- for (var i = 0; i < this.getStorage().length; i += 1) {
418
- var key = this.getStorage().key(i);
419
- if (key &&
420
- key.indexOf(this.cacheConfig.keyPrefix) === 0 &&
421
- key !== (0, CacheUtils_1.getCurrSizeKey)(this.cacheConfig.keyPrefix)) {
422
- keys.push(key.substring(this.cacheConfig.keyPrefix.length));
423
- }
424
- }
425
- return keys;
426
- };
427
- /**
428
- * return the current size of the cache
429
- *
430
- * @return - current size of the cache
431
- */
432
- BrowserStorageCacheClass.prototype.getCacheCurSize = function () {
433
- var ret = this.getStorage().getItem((0, CacheUtils_1.getCurrSizeKey)(this.cacheConfig.keyPrefix));
434
- if (!ret) {
435
- this.getStorage().setItem((0, CacheUtils_1.getCurrSizeKey)(this.cacheConfig.keyPrefix), '0');
436
- ret = '0';
437
- }
438
- return Number(ret);
439
- };
440
- /**
441
- * Return a new instance of cache with customized configuration.
442
- * @param config - the customized configuration
443
- *
444
- * @return - new instance of Cache
445
- */
446
- BrowserStorageCacheClass.prototype.createInstance = function (config) {
447
- if (!config.keyPrefix || config.keyPrefix === Utils_1.defaultConfig.keyPrefix) {
448
- logger.error('invalid keyPrefix, setting keyPrefix with timeStamp');
449
- config.keyPrefix = Utils_1.getCurrTime.toString();
450
- }
451
- return new BrowserStorageCacheClass(config);
452
- };
453
- return BrowserStorageCacheClass;
454
- }(StorageCache_1.StorageCache));
455
- exports.BrowserStorageCacheClass = BrowserStorageCacheClass;
456
- exports.BrowserStorageCache = new BrowserStorageCacheClass();