@aws-amplify/cache 4.0.22-unstable.4 → 4.0.23-in-app-messaging.35

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/CHANGELOG.md CHANGED
@@ -3,657 +3,350 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [4.0.21](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.20...@aws-amplify/cache@4.0.21) (2021-09-30)
6
+ ## [4.0.24](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.23...@aws-amplify/cache@4.0.24) (2021-10-28)
7
7
 
8
8
  **Note:** Version bump only for package @aws-amplify/cache
9
9
 
10
+ ## [4.0.23](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.22...@aws-amplify/cache@4.0.23) (2021-10-21)
10
11
 
12
+ **Note:** Version bump only for package @aws-amplify/cache
11
13
 
12
-
13
-
14
- ## [4.0.20](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.19...@aws-amplify/cache@4.0.20) (2021-09-24)
14
+ ## [4.0.22](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.21...@aws-amplify/cache@4.0.22) (2021-10-07)
15
15
 
16
16
  **Note:** Version bump only for package @aws-amplify/cache
17
17
 
18
+ ## [4.0.21](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.20...@aws-amplify/cache@4.0.21) (2021-09-30)
18
19
 
20
+ **Note:** Version bump only for package @aws-amplify/cache
19
21
 
22
+ ## [4.0.20](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.19...@aws-amplify/cache@4.0.20) (2021-09-24)
20
23
 
24
+ **Note:** Version bump only for package @aws-amplify/cache
21
25
 
22
26
  ## [4.0.19](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.18...@aws-amplify/cache@4.0.19) (2021-09-22)
23
27
 
24
28
  **Note:** Version bump only for package @aws-amplify/cache
25
29
 
26
-
27
-
28
-
29
-
30
30
  ## [4.0.18](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.17...@aws-amplify/cache@4.0.18) (2021-09-17)
31
31
 
32
32
  **Note:** Version bump only for package @aws-amplify/cache
33
33
 
34
-
35
-
36
-
37
-
38
34
  ## [4.0.17](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.16...@aws-amplify/cache@4.0.17) (2021-09-09)
39
35
 
40
36
  **Note:** Version bump only for package @aws-amplify/cache
41
37
 
42
-
43
-
44
-
45
-
46
38
  ## [4.0.16](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.15...@aws-amplify/cache@4.0.16) (2021-09-07)
47
39
 
48
40
  **Note:** Version bump only for package @aws-amplify/cache
49
41
 
50
-
51
-
52
-
53
-
54
42
  ## [4.0.15](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.14...@aws-amplify/cache@4.0.15) (2021-09-04)
55
43
 
56
44
  **Note:** Version bump only for package @aws-amplify/cache
57
45
 
58
-
59
-
60
-
61
-
62
46
  ## [4.0.14](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.13...@aws-amplify/cache@4.0.14) (2021-09-02)
63
47
 
64
48
  **Note:** Version bump only for package @aws-amplify/cache
65
49
 
66
-
67
-
68
-
69
-
70
50
  ## [4.0.13](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.12...@aws-amplify/cache@4.0.13) (2021-08-26)
71
51
 
72
52
  **Note:** Version bump only for package @aws-amplify/cache
73
53
 
74
-
75
-
76
-
77
-
78
54
  ## [4.0.12](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.11...@aws-amplify/cache@4.0.12) (2021-08-19)
79
55
 
80
56
  **Note:** Version bump only for package @aws-amplify/cache
81
57
 
82
-
83
-
84
-
85
-
86
58
  ## [4.0.11](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.10...@aws-amplify/cache@4.0.11) (2021-08-12)
87
59
 
88
60
  **Note:** Version bump only for package @aws-amplify/cache
89
61
 
90
-
91
-
92
-
93
-
94
62
  ## [4.0.10](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.9...@aws-amplify/cache@4.0.10) (2021-07-28)
95
63
 
96
64
  **Note:** Version bump only for package @aws-amplify/cache
97
65
 
98
-
99
-
100
-
101
-
102
66
  ## [4.0.9](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.8...@aws-amplify/cache@4.0.9) (2021-07-22)
103
67
 
104
68
  **Note:** Version bump only for package @aws-amplify/cache
105
69
 
106
-
107
-
108
-
109
-
110
70
  ## [4.0.8](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.7...@aws-amplify/cache@4.0.8) (2021-07-16)
111
71
 
112
72
  **Note:** Version bump only for package @aws-amplify/cache
113
73
 
114
-
115
-
116
-
117
-
118
74
  ## [4.0.7](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.6...@aws-amplify/cache@4.0.7) (2021-07-08)
119
75
 
120
76
  **Note:** Version bump only for package @aws-amplify/cache
121
77
 
122
-
123
-
124
-
125
-
126
78
  ## [4.0.6](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.5...@aws-amplify/cache@4.0.6) (2021-06-24)
127
79
 
128
80
  **Note:** Version bump only for package @aws-amplify/cache
129
81
 
130
-
131
-
132
-
133
-
134
82
  ## [4.0.5](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.4...@aws-amplify/cache@4.0.5) (2021-06-18)
135
83
 
136
84
  **Note:** Version bump only for package @aws-amplify/cache
137
85
 
138
-
139
-
140
-
141
-
142
86
  ## [4.0.4](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.3...@aws-amplify/cache@4.0.4) (2021-06-10)
143
87
 
144
88
  **Note:** Version bump only for package @aws-amplify/cache
145
89
 
146
-
147
-
148
-
149
-
150
90
  ## [4.0.3](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.1...@aws-amplify/cache@4.0.3) (2021-05-26)
151
91
 
152
92
  **Note:** Version bump only for package @aws-amplify/cache
153
93
 
154
-
155
-
156
-
157
-
158
94
  ## [4.0.1](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@4.0.0...@aws-amplify/cache@4.0.1) (2021-05-14)
159
95
 
160
96
  **Note:** Version bump only for package @aws-amplify/cache
161
97
 
162
-
163
-
164
-
165
-
166
98
  # [4.0.0](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.56...@aws-amplify/cache@4.0.0) (2021-05-11)
167
99
 
168
-
169
- * chore!: Upgrade to @react-native-async-storage/async-storage (#8250) ([1de4853](https://github.com/aws-amplify/amplify-js/commit/1de48531b68e3c53c3b7dbf4487da4578cb79888)), closes [#8250](https://github.com/aws-amplify/amplify-js/issues/8250)
170
-
100
+ - chore!: Upgrade to @react-native-async-storage/async-storage (#8250) ([1de4853](https://github.com/aws-amplify/amplify-js/commit/1de48531b68e3c53c3b7dbf4487da4578cb79888)), closes [#8250](https://github.com/aws-amplify/amplify-js/issues/8250)
171
101
 
172
102
  ### BREAKING CHANGES
173
103
 
174
- * Upgrade from React Native AsyncStorage to @react-native-async-storage/async-storage
104
+ - Upgrade from React Native AsyncStorage to @react-native-async-storage/async-storage
175
105
 
176
106
  Co-authored-by: Ashish Nanda <ashish.nanda.5591@gmail.com>
177
107
  Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
178
108
 
179
-
180
-
181
-
182
-
183
109
  ## [3.1.56](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.55...@aws-amplify/cache@3.1.56) (2021-05-06)
184
110
 
185
111
  **Note:** Version bump only for package @aws-amplify/cache
186
112
 
187
-
188
-
189
-
190
-
191
113
  ## [3.1.55](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.54...@aws-amplify/cache@3.1.55) (2021-04-15)
192
114
 
193
115
  **Note:** Version bump only for package @aws-amplify/cache
194
116
 
195
-
196
-
197
-
198
-
199
117
  ## [3.1.54](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.53...@aws-amplify/cache@3.1.54) (2021-03-25)
200
118
 
201
119
  **Note:** Version bump only for package @aws-amplify/cache
202
120
 
203
-
204
-
205
-
206
-
207
121
  ## [3.1.53](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.52...@aws-amplify/cache@3.1.53) (2021-03-18)
208
122
 
209
123
  **Note:** Version bump only for package @aws-amplify/cache
210
124
 
211
-
212
-
213
-
214
-
215
125
  ## [3.1.52](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.51...@aws-amplify/cache@3.1.52) (2021-03-12)
216
126
 
217
127
  **Note:** Version bump only for package @aws-amplify/cache
218
128
 
219
-
220
-
221
-
222
-
223
129
  ## [3.1.51](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.50...@aws-amplify/cache@3.1.51) (2021-03-08)
224
130
 
225
131
  **Note:** Version bump only for package @aws-amplify/cache
226
132
 
227
-
228
-
229
-
230
-
231
133
  ## [3.1.50](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.49...@aws-amplify/cache@3.1.50) (2021-03-03)
232
134
 
233
135
  **Note:** Version bump only for package @aws-amplify/cache
234
136
 
235
-
236
-
237
-
238
-
239
137
  ## [3.1.49](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.48...@aws-amplify/cache@3.1.49) (2021-02-25)
240
138
 
241
139
  **Note:** Version bump only for package @aws-amplify/cache
242
140
 
243
-
244
-
245
-
246
-
247
141
  ## [3.1.48](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.47...@aws-amplify/cache@3.1.48) (2021-02-18)
248
142
 
249
143
  **Note:** Version bump only for package @aws-amplify/cache
250
144
 
251
-
252
-
253
-
254
-
255
145
  ## [3.1.47](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.46...@aws-amplify/cache@3.1.47) (2021-02-15)
256
146
 
257
147
  **Note:** Version bump only for package @aws-amplify/cache
258
148
 
259
-
260
-
261
-
262
-
263
149
  ## [3.1.46](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.45...@aws-amplify/cache@3.1.46) (2021-02-09)
264
150
 
265
151
  **Note:** Version bump only for package @aws-amplify/cache
266
152
 
267
-
268
-
269
-
270
-
271
153
  ## [3.1.45](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.44...@aws-amplify/cache@3.1.45) (2021-02-03)
272
154
 
273
155
  **Note:** Version bump only for package @aws-amplify/cache
274
156
 
275
-
276
-
277
-
278
-
279
157
  ## [3.1.44](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.43...@aws-amplify/cache@3.1.44) (2021-02-01)
280
158
 
281
159
  **Note:** Version bump only for package @aws-amplify/cache
282
160
 
283
-
284
-
285
-
286
-
287
161
  ## [3.1.43](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.42...@aws-amplify/cache@3.1.43) (2021-01-29)
288
162
 
289
163
  **Note:** Version bump only for package @aws-amplify/cache
290
164
 
291
-
292
-
293
-
294
-
295
165
  ## [3.1.42](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.41...@aws-amplify/cache@3.1.42) (2021-01-07)
296
166
 
297
167
  **Note:** Version bump only for package @aws-amplify/cache
298
168
 
299
-
300
-
301
-
302
-
303
169
  ## [3.1.41](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.40...@aws-amplify/cache@3.1.41) (2020-12-17)
304
170
 
305
171
  **Note:** Version bump only for package @aws-amplify/cache
306
172
 
307
-
308
-
309
-
310
-
311
173
  ## [3.1.40](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.39...@aws-amplify/cache@3.1.40) (2020-12-10)
312
174
 
313
175
  **Note:** Version bump only for package @aws-amplify/cache
314
176
 
315
-
316
-
317
-
318
-
319
177
  ## [3.1.39](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.38...@aws-amplify/cache@3.1.39) (2020-11-30)
320
178
 
321
179
  **Note:** Version bump only for package @aws-amplify/cache
322
180
 
323
-
324
-
325
-
326
-
327
181
  ## [3.1.38](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.37...@aws-amplify/cache@3.1.38) (2020-11-23)
328
182
 
329
183
  **Note:** Version bump only for package @aws-amplify/cache
330
184
 
331
-
332
-
333
-
334
-
335
185
  ## [3.1.37](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.36...@aws-amplify/cache@3.1.37) (2020-11-20)
336
186
 
337
187
  **Note:** Version bump only for package @aws-amplify/cache
338
188
 
339
-
340
-
341
-
342
-
343
189
  ## [3.1.36](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.35...@aws-amplify/cache@3.1.36) (2020-11-13)
344
190
 
345
191
  **Note:** Version bump only for package @aws-amplify/cache
346
192
 
347
-
348
-
349
-
350
-
351
193
  ## [3.1.35](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.34...@aws-amplify/cache@3.1.35) (2020-11-03)
352
194
 
353
195
  **Note:** Version bump only for package @aws-amplify/cache
354
196
 
355
-
356
-
357
-
358
-
359
197
  ## [3.1.34](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.33...@aws-amplify/cache@3.1.34) (2020-10-31)
360
198
 
361
-
362
199
  ### Bug Fixes
363
200
 
364
- * **amazon-cognito-identity-js:** update random implementation ([#7090](https://github.com/aws-amplify/amplify-js/issues/7090)) ([7048453](https://github.com/aws-amplify/amplify-js/commit/70484532da8a9953384b00b223b2b3ba0c0e845e))
365
-
366
-
367
-
368
-
201
+ - **amazon-cognito-identity-js:** update random implementation ([#7090](https://github.com/aws-amplify/amplify-js/issues/7090)) ([7048453](https://github.com/aws-amplify/amplify-js/commit/70484532da8a9953384b00b223b2b3ba0c0e845e))
369
202
 
370
203
  ## [3.1.33](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.32...@aws-amplify/cache@3.1.33) (2020-10-29)
371
204
 
372
205
  **Note:** Version bump only for package @aws-amplify/cache
373
206
 
374
-
375
-
376
-
377
-
378
207
  ## [3.1.32](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.31...@aws-amplify/cache@3.1.32) (2020-10-15)
379
208
 
380
209
  **Note:** Version bump only for package @aws-amplify/cache
381
210
 
382
-
383
-
384
-
385
-
386
211
  ## [3.1.31](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.30...@aws-amplify/cache@3.1.31) (2020-10-01)
387
212
 
388
213
  **Note:** Version bump only for package @aws-amplify/cache
389
214
 
390
-
391
-
392
-
393
-
394
215
  ## [3.1.30](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.29...@aws-amplify/cache@3.1.30) (2020-09-25)
395
216
 
396
-
397
217
  ### Bug Fixes
398
218
 
399
- * Add files with Amplify.register to sideEffects array ([#6867](https://github.com/aws-amplify/amplify-js/issues/6867)) ([58ddbf8](https://github.com/aws-amplify/amplify-js/commit/58ddbf8811e44695d97b6ab8be8f7cd2a2242921))
400
-
401
-
402
-
403
-
219
+ - Add files with Amplify.register to sideEffects array ([#6867](https://github.com/aws-amplify/amplify-js/issues/6867)) ([58ddbf8](https://github.com/aws-amplify/amplify-js/commit/58ddbf8811e44695d97b6ab8be8f7cd2a2242921))
404
220
 
405
221
  ## [3.1.29](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.28...@aws-amplify/cache@3.1.29) (2020-09-16)
406
222
 
407
223
  **Note:** Version bump only for package @aws-amplify/cache
408
224
 
409
-
410
-
411
-
412
-
413
225
  ## [3.1.28](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.27...@aws-amplify/cache@3.1.28) (2020-09-15)
414
226
 
415
227
  **Note:** Version bump only for package @aws-amplify/cache
416
228
 
417
-
418
-
419
-
420
-
421
229
  ## [3.1.27](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.26...@aws-amplify/cache@3.1.27) (2020-09-10)
422
230
 
423
231
  **Note:** Version bump only for package @aws-amplify/cache
424
232
 
425
-
426
-
427
-
428
-
429
233
  ## [3.1.26](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.25...@aws-amplify/cache@3.1.26) (2020-09-03)
430
234
 
431
235
  **Note:** Version bump only for package @aws-amplify/cache
432
236
 
433
-
434
-
435
-
436
-
437
237
  ## [3.1.25](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.24...@aws-amplify/cache@3.1.25) (2020-09-03)
438
238
 
439
239
  **Note:** Version bump only for package @aws-amplify/cache
440
240
 
441
-
442
-
443
-
444
-
445
241
  ## [3.1.24](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.23...@aws-amplify/cache@3.1.24) (2020-09-01)
446
242
 
447
243
  **Note:** Version bump only for package @aws-amplify/cache
448
244
 
449
-
450
-
451
-
452
-
453
245
  ## [3.1.23](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.22...@aws-amplify/cache@3.1.23) (2020-08-19)
454
246
 
455
247
  **Note:** Version bump only for package @aws-amplify/cache
456
248
 
457
-
458
-
459
-
460
-
461
249
  ## [3.1.22](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.21...@aws-amplify/cache@3.1.22) (2020-08-06)
462
250
 
463
251
  **Note:** Version bump only for package @aws-amplify/cache
464
252
 
465
-
466
-
467
-
468
-
469
253
  ## [3.1.21](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.20...@aws-amplify/cache@3.1.21) (2020-07-27)
470
254
 
471
255
  **Note:** Version bump only for package @aws-amplify/cache
472
256
 
473
-
474
-
475
-
476
-
477
257
  ## [3.1.20](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.19...@aws-amplify/cache@3.1.20) (2020-07-22)
478
258
 
479
259
  **Note:** Version bump only for package @aws-amplify/cache
480
260
 
481
-
482
-
483
-
484
-
485
261
  ## [3.1.19](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.18...@aws-amplify/cache@3.1.19) (2020-07-09)
486
262
 
487
263
  **Note:** Version bump only for package @aws-amplify/cache
488
264
 
489
-
490
-
491
-
492
-
493
265
  ## [3.1.18](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.17...@aws-amplify/cache@3.1.18) (2020-07-07)
494
266
 
495
267
  **Note:** Version bump only for package @aws-amplify/cache
496
268
 
497
-
498
-
499
-
500
-
501
269
  ## [3.1.17](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.16...@aws-amplify/cache@3.1.17) (2020-06-18)
502
270
 
503
271
  **Note:** Version bump only for package @aws-amplify/cache
504
272
 
505
-
506
-
507
-
508
-
509
273
  ## [3.1.16](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.15...@aws-amplify/cache@3.1.16) (2020-06-09)
510
274
 
511
275
  **Note:** Version bump only for package @aws-amplify/cache
512
276
 
513
-
514
-
515
-
516
-
517
277
  ## [3.1.15](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.14...@aws-amplify/cache@3.1.15) (2020-06-04)
518
278
 
519
279
  **Note:** Version bump only for package @aws-amplify/cache
520
280
 
521
-
522
-
523
-
524
-
525
281
  ## [3.1.14](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.13...@aws-amplify/cache@3.1.14) (2020-06-03)
526
282
 
527
283
  **Note:** Version bump only for package @aws-amplify/cache
528
284
 
529
-
530
-
531
-
532
-
533
285
  ## [3.1.13](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.12...@aws-amplify/cache@3.1.13) (2020-06-02)
534
286
 
535
287
  **Note:** Version bump only for package @aws-amplify/cache
536
288
 
537
-
538
-
539
-
540
-
541
289
  ## [3.1.12](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.11...@aws-amplify/cache@3.1.12) (2020-05-26)
542
290
 
543
291
  **Note:** Version bump only for package @aws-amplify/cache
544
292
 
545
-
546
-
547
-
548
-
549
293
  ## [3.1.11](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.10...@aws-amplify/cache@3.1.11) (2020-05-22)
550
294
 
551
295
  **Note:** Version bump only for package @aws-amplify/cache
552
296
 
553
-
554
-
555
-
556
-
557
297
  ## [3.1.10](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.9...@aws-amplify/cache@3.1.10) (2020-05-14)
558
298
 
559
299
  **Note:** Version bump only for package @aws-amplify/cache
560
300
 
561
-
562
-
563
-
564
-
565
301
  ## [3.1.9](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.8...@aws-amplify/cache@3.1.9) (2020-04-30)
566
302
 
567
303
  **Note:** Version bump only for package @aws-amplify/cache
568
304
 
569
-
570
-
571
-
572
-
573
305
  ## [3.1.8](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.7...@aws-amplify/cache@3.1.8) (2020-04-24)
574
306
 
575
307
  **Note:** Version bump only for package @aws-amplify/cache
576
308
 
577
-
578
-
579
-
580
-
581
309
  ## [3.1.7](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.6...@aws-amplify/cache@3.1.7) (2020-04-14)
582
310
 
583
311
  **Note:** Version bump only for package @aws-amplify/cache
584
312
 
585
-
586
-
587
-
588
-
589
313
  ## [3.1.6](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.5...@aws-amplify/cache@3.1.6) (2020-04-08)
590
314
 
591
315
  **Note:** Version bump only for package @aws-amplify/cache
592
316
 
593
-
594
-
595
-
596
-
597
317
  ## [3.1.5](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.4...@aws-amplify/cache@3.1.5) (2020-04-07)
598
318
 
599
319
  **Note:** Version bump only for package @aws-amplify/cache
600
320
 
601
-
602
-
603
-
604
-
605
321
  ## [3.1.4](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.3...@aws-amplify/cache@3.1.4) (2020-04-03)
606
322
 
607
323
  **Note:** Version bump only for package @aws-amplify/cache
608
324
 
609
-
610
-
611
-
612
-
613
325
  ## [3.1.3](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.2...@aws-amplify/cache@3.1.3) (2020-04-02)
614
326
 
615
327
  **Note:** Version bump only for package @aws-amplify/cache
616
328
 
617
-
618
-
619
-
620
-
621
329
  ## [3.1.2](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.1...@aws-amplify/cache@3.1.2) (2020-04-01)
622
330
 
623
331
  **Note:** Version bump only for package @aws-amplify/cache
624
332
 
625
-
626
-
627
-
628
-
629
333
  ## [3.1.1](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@3.1.0...@aws-amplify/cache@3.1.1) (2020-04-01)
630
334
 
631
335
  **Note:** Version bump only for package @aws-amplify/cache
632
336
 
633
-
634
-
635
-
636
-
637
337
  # [3.1.0](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@2.1.8...@aws-amplify/cache@3.1.0) (2020-03-31)
638
338
 
639
-
640
339
  ### Bug Fixes
641
340
 
642
- * **@aws-amplify/cache:** expose tree-shaking for Webpack ([32061ac](https://github.com/aws-amplify/amplify-js/commit/32061ac8cdd16f0b0a675912b29e0dbfc44513fb))
643
-
341
+ - **@aws-amplify/cache:** expose tree-shaking for Webpack ([32061ac](https://github.com/aws-amplify/amplify-js/commit/32061ac8cdd16f0b0a675912b29e0dbfc44513fb))
644
342
 
645
343
  ### Features
646
344
 
647
- * **@aws-amplify/cache:** publish ES2015/ESM artifacts ([22da40e](https://github.com/aws-amplify/amplify-js/commit/22da40e4a72827bce51059b34fa45e5ea3f2367c))
648
-
345
+ - **@aws-amplify/cache:** publish ES2015/ESM artifacts ([22da40e](https://github.com/aws-amplify/amplify-js/commit/22da40e4a72827bce51059b34fa45e5ea3f2367c))
649
346
 
650
347
  ### Reverts
651
348
 
652
- * Revert "Publish" ([1319d31](https://github.com/aws-amplify/amplify-js/commit/1319d319b69717e76660fbfa6f1a845195c6d635))
653
-
654
-
655
-
656
-
349
+ - Revert "Publish" ([1319d31](https://github.com/aws-amplify/amplify-js/commit/1319d319b69717e76660fbfa6f1a845195c6d635))
657
350
 
658
351
  ## [2.1.8](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/cache@2.1.7...@aws-amplify/cache@2.1.8) (2020-03-30)
659
352
 
@@ -157,7 +157,9 @@ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["ConsoleLogger"]
157
157
  * Customized storage based on the SessionStorage or LocalStorage with LRU implemented
158
158
  */
159
159
 
160
- var BrowserStorageCacheClass = function (_super) {
160
+ var BrowserStorageCacheClass =
161
+ /** @class */
162
+ function (_super) {
161
163
  __extends(BrowserStorageCacheClass, _super);
162
164
  /**
163
165
  * initialize the cache
@@ -725,7 +727,9 @@ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_2__["ConsoleLogger"]
725
727
  * @member cacheSizeLimit - the limit of cache size
726
728
  */
727
729
 
728
- var InMemoryCacheClass = function (_super) {
730
+ var InMemoryCacheClass =
731
+ /** @class */
732
+ function (_super) {
729
733
  __extends(InMemoryCacheClass, _super);
730
734
  /**
731
735
  * initialize the cache
@@ -1141,7 +1145,9 @@ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]
1141
1145
  *
1142
1146
  */
1143
1147
 
1144
- var StorageCache = function () {
1148
+ var StorageCache =
1149
+ /** @class */
1150
+ function () {
1145
1151
  /**
1146
1152
  * Initialize the cache
1147
1153
  * @param config - the configuration of the cache
@@ -1298,7 +1304,9 @@ var __values = undefined && undefined.__values || function (o) {
1298
1304
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1299
1305
  };
1300
1306
 
1301
- var DoubleLinkedNode = function () {
1307
+ var DoubleLinkedNode =
1308
+ /** @class */
1309
+ function () {
1302
1310
  function DoubleLinkedNode(keyVal) {
1303
1311
  this.key = keyVal ? keyVal : '';
1304
1312
  this.prevNode = null;
@@ -1320,7 +1328,9 @@ var DoubleLinkedNode = function () {
1320
1328
  */
1321
1329
 
1322
1330
 
1323
- var CacheList = function () {
1331
+ var CacheList =
1332
+ /** @class */
1333
+ function () {
1324
1334
  /**
1325
1335
  * initialization
1326
1336
  */
@@ -1601,7 +1611,9 @@ function _isInteger(value) {
1601
1611
 
1602
1612
  var store = {};
1603
1613
 
1604
- var CacheObject = function () {
1614
+ var CacheObject =
1615
+ /** @class */
1616
+ function () {
1605
1617
  function CacheObject() {}
1606
1618
 
1607
1619
  CacheObject.clear = function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///../src/BrowserStorageCache.ts","webpack:///../src/InMemoryCache.ts","webpack:///../src/StorageCache.ts","webpack:///../../src/Utils/CacheList.ts","webpack:///../../src/Utils/CacheUtils.ts","webpack:///../../src/Utils/index.ts","webpack:///../src/index.ts","webpack:///external \"aws_amplify_core\""],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;AAWG;AAEH;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;AAWG;AAEH;AACA;AACA;AAGA;AACA;;AAEG;;AACH;AAEA,yDAAO,CAAP,mF;;;;;;;;;;;ACxBA,+D","file":"aws-amplify-cache.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"aws_amplify_core\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"aws_amplify_cache\", [\"aws_amplify_core\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"aws_amplify_cache\"] = factory(require(\"aws_amplify_core\"));\n\telse\n\t\troot[\"aws_amplify_cache\"] = factory(root[\"aws_amplify_core\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE__aws_amplify_core__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./lib-esm/index.js\");\n","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { defaultConfig, getCurrTime } from './Utils';\nimport { StorageCache } from './StorageCache';\nimport { ConsoleLogger as Logger } from '@aws-amplify/core';\nvar logger = new Logger('Cache');\n/**\n * Customized storage based on the SessionStorage or LocalStorage with LRU implemented\n */\nvar BrowserStorageCacheClass = /** @class */ (function (_super) {\n __extends(BrowserStorageCacheClass, _super);\n /**\n * initialize the cache\n * @param config - the configuration of the cache\n */\n function BrowserStorageCacheClass(config) {\n var _this = this;\n var cacheConfig = config\n ? Object.assign({}, defaultConfig, config)\n : defaultConfig;\n _this = _super.call(this, cacheConfig) || this;\n _this.config.storage = cacheConfig.storage;\n _this.getItem = _this.getItem.bind(_this);\n _this.setItem = _this.setItem.bind(_this);\n _this.removeItem = _this.removeItem.bind(_this);\n return _this;\n }\n /**\n * decrease current size of the cache\n *\n * @private\n * @param amount - the amount of the cache size which needs to be decreased\n */\n BrowserStorageCacheClass.prototype._decreaseCurSizeInBytes = function (amount) {\n var curSize = this.getCacheCurSize();\n this.config.storage.setItem(this.cacheCurSizeKey, (curSize - amount).toString());\n };\n /**\n * increase current size of the cache\n *\n * @private\n * @param amount - the amount of the cache szie which need to be increased\n */\n BrowserStorageCacheClass.prototype._increaseCurSizeInBytes = function (amount) {\n var curSize = this.getCacheCurSize();\n this.config.storage.setItem(this.cacheCurSizeKey, (curSize + amount).toString());\n };\n /**\n * update the visited time if item has been visited\n *\n * @private\n * @param item - the item which need to be refreshed\n * @param prefixedKey - the key of the item\n *\n * @return the refreshed item\n */\n BrowserStorageCacheClass.prototype._refreshItem = function (item, prefixedKey) {\n item.visitedTime = getCurrTime();\n this.config.storage.setItem(prefixedKey, JSON.stringify(item));\n return item;\n };\n /**\n * check wether item is expired\n *\n * @private\n * @param key - the key of the item\n *\n * @return true if the item is expired.\n */\n BrowserStorageCacheClass.prototype._isExpired = function (key) {\n var text = this.config.storage.getItem(key);\n var item = JSON.parse(text);\n if (getCurrTime() >= item.expires) {\n return true;\n }\n return false;\n };\n /**\n * delete item from cache\n *\n * @private\n * @param prefixedKey - the key of the item\n * @param size - optional, the byte size of the item\n */\n BrowserStorageCacheClass.prototype._removeItem = function (prefixedKey, size) {\n var itemSize = size\n ? size\n : JSON.parse(this.config.storage.getItem(prefixedKey)).byteSize;\n this._decreaseCurSizeInBytes(itemSize);\n // remove the cache item\n this.config.storage.removeItem(prefixedKey);\n };\n /**\n * put item into cache\n *\n * @private\n * @param prefixedKey - the key of the item\n * @param itemData - the value of the item\n * @param itemSizeInBytes - the byte size of the item\n */\n BrowserStorageCacheClass.prototype._setItem = function (prefixedKey, item) {\n // update the cache size\n this._increaseCurSizeInBytes(item.byteSize);\n try {\n this.config.storage.setItem(prefixedKey, JSON.stringify(item));\n }\n catch (setItemErr) {\n // if failed, we need to rollback the cache size\n this._decreaseCurSizeInBytes(item.byteSize);\n logger.error(\"Failed to set item \" + setItemErr);\n }\n };\n /**\n * total space needed when poping out items\n *\n * @private\n * @param itemSize\n *\n * @return total space needed\n */\n BrowserStorageCacheClass.prototype._sizeToPop = function (itemSize) {\n var spaceItemNeed = this.getCacheCurSize() + itemSize - this.config.capacityInBytes;\n var cacheThresholdSpace = (1 - this.config.warningThreshold) * this.config.capacityInBytes;\n return spaceItemNeed > cacheThresholdSpace\n ? spaceItemNeed\n : cacheThresholdSpace;\n };\n /**\n * see whether cache is full\n *\n * @private\n * @param itemSize\n *\n * @return true if cache is full\n */\n BrowserStorageCacheClass.prototype._isCacheFull = function (itemSize) {\n return itemSize + this.getCacheCurSize() > this.config.capacityInBytes;\n };\n /**\n * scan the storage and find out all the keys owned by this cache\n * also clean the expired keys while scanning\n *\n * @private\n *\n * @return array of keys\n */\n BrowserStorageCacheClass.prototype._findValidKeys = function () {\n var keys = [];\n var keyInCache = [];\n // get all keys in Storage\n for (var i = 0; i < this.config.storage.length; i += 1) {\n keyInCache.push(this.config.storage.key(i));\n }\n // find those items which belong to our cache and also clean those expired items\n for (var i = 0; i < keyInCache.length; i += 1) {\n var key = keyInCache[i];\n if (key.indexOf(this.config.keyPrefix) === 0 &&\n key !== this.cacheCurSizeKey) {\n if (this._isExpired(key)) {\n this._removeItem(key);\n }\n else {\n keys.push(key);\n }\n }\n }\n return keys;\n };\n /**\n * get all the items we have, sort them by their priority,\n * if priority is same, sort them by their last visited time\n * pop out items from the low priority (5 is the lowest)\n *\n * @private\n * @param keys - all the keys in this cache\n * @param sizeToPop - the total size of the items which needed to be poped out\n */\n BrowserStorageCacheClass.prototype._popOutItems = function (keys, sizeToPop) {\n var items = [];\n var remainedSize = sizeToPop;\n // get the items from Storage\n for (var i = 0; i < keys.length; i += 1) {\n var val = this.config.storage.getItem(keys[i]);\n if (val != null) {\n var item = JSON.parse(val);\n items.push(item);\n }\n }\n // first compare priority\n // then compare visited time\n items.sort(function (a, b) {\n if (a.priority > b.priority) {\n return -1;\n }\n else if (a.priority < b.priority) {\n return 1;\n }\n else {\n if (a.visitedTime < b.visitedTime) {\n return -1;\n }\n else\n return 1;\n }\n });\n for (var i = 0; i < items.length; i += 1) {\n // pop out items until we have enough room for new item\n this._removeItem(items[i].key, items[i].byteSize);\n remainedSize -= items[i].byteSize;\n if (remainedSize <= 0) {\n return;\n }\n }\n };\n /**\n * Set item into cache. You can put number, string, boolean or object.\n * The cache will first check whether has the same key.\n * If it has, it will delete the old item and then put the new item in\n * The cache will pop out items if it is full\n * You can specify the cache item options. The cache will abort and output a warning:\n * If the key is invalid\n * If the size of the item exceeds itemMaxSize.\n * If the value is undefined\n * If incorrect cache item configuration\n * If error happened with browser storage\n *\n * @param key - the key of the item\n * @param value - the value of the item\n * @param {Object} [options] - optional, the specified meta-data\n */\n BrowserStorageCacheClass.prototype.setItem = function (key, value, options) {\n logger.log(\"Set item: key is \" + key + \", value is \" + value + \" with options: \" + options);\n var prefixedKey = this.config.keyPrefix + key;\n // invalid keys\n if (prefixedKey === this.config.keyPrefix ||\n prefixedKey === this.cacheCurSizeKey) {\n logger.warn(\"Invalid key: should not be empty or 'CurSize'\");\n return;\n }\n if (typeof value === 'undefined') {\n logger.warn(\"The value of item should not be undefined!\");\n return;\n }\n var cacheItemOptions = {\n priority: options && options.priority !== undefined\n ? options.priority\n : this.config.defaultPriority,\n expires: options && options.expires !== undefined\n ? options.expires\n : this.config.defaultTTL + getCurrTime(),\n };\n if (cacheItemOptions.priority < 1 || cacheItemOptions.priority > 5) {\n logger.warn(\"Invalid parameter: priority due to out or range. It should be within 1 and 5.\");\n return;\n }\n var item = this.fillCacheItem(prefixedKey, value, cacheItemOptions);\n // check wether this item is too big;\n if (item.byteSize > this.config.itemMaxSize) {\n logger.warn(\"Item with key: \" + key + \" you are trying to put into is too big!\");\n return;\n }\n try {\n // first look into the storage, if it exists, delete it.\n var val = this.config.storage.getItem(prefixedKey);\n if (val) {\n this._removeItem(prefixedKey, JSON.parse(val).byteSize);\n }\n // check whether the cache is full\n if (this._isCacheFull(item.byteSize)) {\n var validKeys = this._findValidKeys();\n // check again and then pop out items\n if (this._isCacheFull(item.byteSize)) {\n var sizeToPop = this._sizeToPop(item.byteSize);\n this._popOutItems(validKeys, sizeToPop);\n }\n }\n // put item in the cache\n // may failed due to storage full\n this._setItem(prefixedKey, item);\n }\n catch (e) {\n logger.warn(\"setItem failed! \" + e);\n }\n };\n /**\n * Get item from cache. It will return null if item doesn’t exist or it has been expired.\n * If you specified callback function in the options,\n * then the function will be executed if no such item in the cache\n * and finally put the return value into cache.\n * Please make sure the callback function will return the value you want to put into the cache.\n * The cache will abort output a warning:\n * If the key is invalid\n * If error happened with browser storage\n *\n * @param key - the key of the item\n * @param {Object} [options] - the options of callback function\n *\n * @return - return the value of the item\n */\n BrowserStorageCacheClass.prototype.getItem = function (key, options) {\n logger.log(\"Get item: key is \" + key + \" with options \" + options);\n var ret = null;\n var prefixedKey = this.config.keyPrefix + key;\n if (prefixedKey === this.config.keyPrefix ||\n prefixedKey === this.cacheCurSizeKey) {\n logger.warn(\"Invalid key: should not be empty or 'CurSize'\");\n return null;\n }\n try {\n ret = this.config.storage.getItem(prefixedKey);\n if (ret != null) {\n if (this._isExpired(prefixedKey)) {\n // if expired, remove that item and return null\n this._removeItem(prefixedKey, JSON.parse(ret).byteSize);\n ret = null;\n }\n else {\n // if not expired, great, return the value and refresh it\n var item = JSON.parse(ret);\n item = this._refreshItem(item, prefixedKey);\n return item.data;\n }\n }\n if (options && options.callback !== undefined) {\n var val = options.callback();\n if (val !== null) {\n this.setItem(key, val, options);\n }\n return val;\n }\n return null;\n }\n catch (e) {\n logger.warn(\"getItem failed! \" + e);\n return null;\n }\n };\n /**\n * remove item from the cache\n * The cache will abort output a warning:\n * If error happened with browser storage\n * @param key - the key of the item\n */\n BrowserStorageCacheClass.prototype.removeItem = function (key) {\n logger.log(\"Remove item: key is \" + key);\n var prefixedKey = this.config.keyPrefix + key;\n if (prefixedKey === this.config.keyPrefix ||\n prefixedKey === this.cacheCurSizeKey) {\n return;\n }\n try {\n var val = this.config.storage.getItem(prefixedKey);\n if (val) {\n this._removeItem(prefixedKey, JSON.parse(val).byteSize);\n }\n }\n catch (e) {\n logger.warn(\"removeItem failed! \" + e);\n }\n };\n /**\n * clear the entire cache\n * The cache will abort output a warning:\n * If error happened with browser storage\n */\n BrowserStorageCacheClass.prototype.clear = function () {\n logger.log(\"Clear Cache\");\n var keysToRemove = [];\n for (var i = 0; i < this.config.storage.length; i += 1) {\n var key = this.config.storage.key(i);\n if (key.indexOf(this.config.keyPrefix) === 0) {\n keysToRemove.push(key);\n }\n }\n try {\n for (var i = 0; i < keysToRemove.length; i += 1) {\n this.config.storage.removeItem(keysToRemove[i]);\n }\n }\n catch (e) {\n logger.warn(\"clear failed! \" + e);\n }\n };\n /**\n * Return all the keys in the cache.\n *\n * @return - all keys in the cache\n */\n BrowserStorageCacheClass.prototype.getAllKeys = function () {\n var keys = [];\n for (var i = 0; i < this.config.storage.length; i += 1) {\n var key = this.config.storage.key(i);\n if (key.indexOf(this.config.keyPrefix) === 0 &&\n key !== this.cacheCurSizeKey) {\n keys.push(key.substring(this.config.keyPrefix.length));\n }\n }\n return keys;\n };\n /**\n * return the current size of the cache\n *\n * @return - current size of the cache\n */\n BrowserStorageCacheClass.prototype.getCacheCurSize = function () {\n var ret = this.config.storage.getItem(this.cacheCurSizeKey);\n if (!ret) {\n this.config.storage.setItem(this.cacheCurSizeKey, '0');\n ret = '0';\n }\n return Number(ret);\n };\n /**\n * Return a new instance of cache with customized configuration.\n * @param config - the customized configuration\n *\n * @return - new instance of Cache\n */\n BrowserStorageCacheClass.prototype.createInstance = function (config) {\n if (!config.keyPrefix || config.keyPrefix === defaultConfig.keyPrefix) {\n logger.error('invalid keyPrefix, setting keyPrefix with timeStamp');\n config.keyPrefix = getCurrTime.toString();\n }\n return new BrowserStorageCacheClass(config);\n };\n return BrowserStorageCacheClass;\n}(StorageCache));\nexport { BrowserStorageCacheClass };\nexport var BrowserStorageCache = new BrowserStorageCacheClass();\n/**\n * @deprecated use named import\n */\nexport default BrowserStorageCache;\n//# sourceMappingURL=BrowserStorageCache.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { CacheList, defaultConfig, getCurrTime, CacheObject } from './Utils';\nimport { StorageCache } from './StorageCache';\nimport { ConsoleLogger as Logger } from '@aws-amplify/core';\nvar logger = new Logger('InMemoryCache');\n/**\n * Customized in-memory cache with LRU implemented\n * @member cacheObj - object which store items\n * @member cacheList - list of keys in the cache with LRU\n * @member curSizeInBytes - current size of the cache\n * @member maxPriority - max of the priority\n * @member cacheSizeLimit - the limit of cache size\n */\nvar InMemoryCacheClass = /** @class */ (function (_super) {\n __extends(InMemoryCacheClass, _super);\n /**\n * initialize the cache\n *\n * @param config - the configuration of the cache\n */\n function InMemoryCacheClass(config) {\n var _this = this;\n var cacheConfig = config\n ? Object.assign({}, defaultConfig, config)\n : defaultConfig;\n _this = _super.call(this, cacheConfig) || this;\n logger.debug('now we start!');\n _this.cacheList = [];\n _this.curSizeInBytes = 0;\n _this.maxPriority = 5;\n _this.getItem = _this.getItem.bind(_this);\n _this.setItem = _this.setItem.bind(_this);\n _this.removeItem = _this.removeItem.bind(_this);\n // initialize list for every priority\n for (var i = 0; i < _this.maxPriority; i += 1) {\n _this.cacheList[i] = new CacheList();\n }\n return _this;\n }\n /**\n * decrease current size of the cache\n *\n * @param amount - the amount of the cache size which needs to be decreased\n */\n InMemoryCacheClass.prototype._decreaseCurSizeInBytes = function (amount) {\n this.curSizeInBytes -= amount;\n };\n /**\n * increase current size of the cache\n *\n * @param amount - the amount of the cache szie which need to be increased\n */\n InMemoryCacheClass.prototype._increaseCurSizeInBytes = function (amount) {\n this.curSizeInBytes += amount;\n };\n /**\n * check whether item is expired\n *\n * @param key - the key of the item\n *\n * @return true if the item is expired.\n */\n InMemoryCacheClass.prototype._isExpired = function (key) {\n var text = CacheObject.getItem(key);\n var item = JSON.parse(text);\n if (getCurrTime() >= item.expires) {\n return true;\n }\n return false;\n };\n /**\n * delete item from cache\n *\n * @param prefixedKey - the key of the item\n * @param listIdx - indicates which cache list the key belongs to\n */\n InMemoryCacheClass.prototype._removeItem = function (prefixedKey, listIdx) {\n // delete the key from the list\n this.cacheList[listIdx].removeItem(prefixedKey);\n // decrease the current size of the cache\n this._decreaseCurSizeInBytes(JSON.parse(CacheObject.getItem(prefixedKey)).byteSize);\n // finally remove the item from memory\n CacheObject.removeItem(prefixedKey);\n };\n /**\n * put item into cache\n *\n * @param prefixedKey - the key of the item\n * @param itemData - the value of the item\n * @param itemSizeInBytes - the byte size of the item\n * @param listIdx - indicates which cache list the key belongs to\n */\n InMemoryCacheClass.prototype._setItem = function (prefixedKey, item, listIdx) {\n // insert the key into the list\n this.cacheList[listIdx].insertItem(prefixedKey);\n // increase the current size of the cache\n this._increaseCurSizeInBytes(item.byteSize);\n // finally add the item into memory\n CacheObject.setItem(prefixedKey, JSON.stringify(item));\n };\n /**\n * see whether cache is full\n *\n * @param itemSize\n *\n * @return true if cache is full\n */\n InMemoryCacheClass.prototype._isCacheFull = function (itemSize) {\n return this.curSizeInBytes + itemSize > this.config.capacityInBytes;\n };\n /**\n * check whether the cache contains the key\n *\n * @param key\n */\n InMemoryCacheClass.prototype.containsKey = function (key) {\n var prefixedKey = this.config.keyPrefix + key;\n for (var i = 0; i < this.maxPriority; i += 1) {\n if (this.cacheList[i].containsKey(prefixedKey)) {\n return i + 1;\n }\n }\n return -1;\n };\n /**\n * * Set item into cache. You can put number, string, boolean or object.\n * The cache will first check whether has the same key.\n * If it has, it will delete the old item and then put the new item in\n * The cache will pop out items if it is full\n * You can specify the cache item options. The cache will abort and output a warning:\n * If the key is invalid\n * If the size of the item exceeds itemMaxSize.\n * If the value is undefined\n * If incorrect cache item configuration\n * If error happened with browser storage\n *\n * @param key - the key of the item\n * @param value - the value of the item\n * @param options - optional, the specified meta-data\n *\n * @throws if the item is too big which exceeds the limit of single item size\n * @throws if the key is invalid\n */\n InMemoryCacheClass.prototype.setItem = function (key, value, options) {\n var prefixedKey = this.config.keyPrefix + key;\n // invalid keys\n if (prefixedKey === this.config.keyPrefix ||\n prefixedKey === this.cacheCurSizeKey) {\n logger.warn(\"Invalid key: should not be empty or 'CurSize'\");\n return;\n }\n if (typeof value === 'undefined') {\n logger.warn(\"The value of item should not be undefined!\");\n return;\n }\n var cacheItemOptions = {\n priority: options && options.priority !== undefined\n ? options.priority\n : this.config.defaultPriority,\n expires: options && options.expires !== undefined\n ? options.expires\n : this.config.defaultTTL + getCurrTime(),\n };\n if (cacheItemOptions.priority < 1 || cacheItemOptions.priority > 5) {\n logger.warn(\"Invalid parameter: priority due to out or range. It should be within 1 and 5.\");\n return;\n }\n var item = this.fillCacheItem(prefixedKey, value, cacheItemOptions);\n // check wether this item is too big;\n if (item.byteSize > this.config.itemMaxSize) {\n logger.warn(\"Item with key: \" + key + \" you are trying to put into is too big!\");\n return;\n }\n // if key already in the cache, then delete it.\n var presentKeyPrio = this.containsKey(key);\n if (presentKeyPrio !== -1) {\n this._removeItem(prefixedKey, presentKeyPrio - 1);\n }\n // pop out items in the cache when cache is full based on LRU\n // first start from lowest priority cache list\n var cacheListIdx = this.maxPriority - 1;\n while (this._isCacheFull(item.byteSize) && cacheListIdx >= 0) {\n if (!this.cacheList[cacheListIdx].isEmpty()) {\n var popedItemKey = this.cacheList[cacheListIdx].getLastItem();\n this._removeItem(popedItemKey, cacheListIdx);\n }\n else {\n cacheListIdx -= 1;\n }\n }\n this._setItem(prefixedKey, item, Number(item.priority) - 1);\n };\n /**\n * Get item from cache. It will return null if item doesn’t exist or it has been expired.\n * If you specified callback function in the options,\n * then the function will be executed if no such item in the cache\n * and finally put the return value into cache.\n * Please make sure the callback function will return the value you want to put into the cache.\n * The cache will abort output a warning:\n * If the key is invalid\n *\n * @param key - the key of the item\n * @param options - the options of callback function\n */\n InMemoryCacheClass.prototype.getItem = function (key, options) {\n var ret = null;\n var prefixedKey = this.config.keyPrefix + key;\n if (prefixedKey === this.config.keyPrefix ||\n prefixedKey === this.cacheCurSizeKey) {\n logger.warn(\"Invalid key: should not be empty or 'CurSize'\");\n return null;\n }\n // check whether it's in the cachelist\n var presentKeyPrio = this.containsKey(key);\n if (presentKeyPrio !== -1) {\n if (this._isExpired(prefixedKey)) {\n // if expired, remove that item and return null\n this._removeItem(prefixedKey, presentKeyPrio - 1);\n }\n else {\n // if not expired, great, return the value and refresh it\n ret = CacheObject.getItem(prefixedKey);\n var item = JSON.parse(ret);\n this.cacheList[item.priority - 1].refresh(prefixedKey);\n return item.data;\n }\n }\n if (options && options.callback !== undefined) {\n var val = options.callback();\n if (val !== null) {\n this.setItem(key, val, options);\n }\n return val;\n }\n return null;\n };\n /**\n * remove item from the cache\n *\n * @param key - the key of the item\n */\n InMemoryCacheClass.prototype.removeItem = function (key) {\n var prefixedKey = this.config.keyPrefix + key;\n // check if the key is in the cache\n var presentKeyPrio = this.containsKey(key);\n if (presentKeyPrio !== -1) {\n this._removeItem(prefixedKey, presentKeyPrio - 1);\n }\n };\n /**\n * clear the entire cache\n */\n InMemoryCacheClass.prototype.clear = function () {\n var e_1, _a;\n for (var i = 0; i < this.maxPriority; i += 1) {\n try {\n for (var _b = (e_1 = void 0, __values(this.cacheList[i].getKeys())), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n this._removeItem(key, i);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n };\n /**\n * Return all the keys in the cache.\n */\n InMemoryCacheClass.prototype.getAllKeys = function () {\n var e_2, _a;\n var keys = [];\n for (var i = 0; i < this.maxPriority; i += 1) {\n try {\n for (var _b = (e_2 = void 0, __values(this.cacheList[i].getKeys())), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n keys.push(key.substring(this.config.keyPrefix.length));\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n return keys;\n };\n /**\n * return the current size of the cache\n *\n * @return the current size of the cache\n */\n InMemoryCacheClass.prototype.getCacheCurSize = function () {\n return this.curSizeInBytes;\n };\n /**\n * Return a new instance of cache with customized configuration.\n * @param config - the customized configuration\n */\n InMemoryCacheClass.prototype.createInstance = function (config) {\n return new InMemoryCacheClass(config);\n };\n return InMemoryCacheClass;\n}(StorageCache));\nexport { InMemoryCacheClass };\nexport var InMemoryCache = new InMemoryCacheClass();\n/**\n * @deprecated use named import\n */\nexport default InMemoryCache;\n//# sourceMappingURL=InMemoryCache.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { getCurrTime, getByteLength, defaultConfig, isInteger } from './Utils';\nimport { ConsoleLogger as Logger } from '@aws-amplify/core';\nvar logger = new Logger('StorageCache');\n/**\n * Initialization of the cache\n *\n */\nvar StorageCache = /** @class */ (function () {\n /**\n * Initialize the cache\n * @param config - the configuration of the cache\n */\n function StorageCache(config) {\n this.config = Object.assign({}, config);\n this.cacheCurSizeKey = this.config.keyPrefix + 'CurSize';\n this.checkConfig();\n }\n StorageCache.prototype.getModuleName = function () {\n return 'Cache';\n };\n StorageCache.prototype.checkConfig = function () {\n // check configuration\n if (!isInteger(this.config.capacityInBytes)) {\n logger.error('Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default.');\n this.config.capacityInBytes = defaultConfig.capacityInBytes;\n }\n if (!isInteger(this.config.itemMaxSize)) {\n logger.error('Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default.');\n this.config.itemMaxSize = defaultConfig.itemMaxSize;\n }\n if (!isInteger(this.config.defaultTTL)) {\n logger.error('Invalid parameter: defaultTTL. It should be an Integer. Setting back to default.');\n this.config.defaultTTL = defaultConfig.defaultTTL;\n }\n if (!isInteger(this.config.defaultPriority)) {\n logger.error('Invalid parameter: defaultPriority. It should be an Integer. Setting back to default.');\n this.config.defaultPriority = defaultConfig.defaultPriority;\n }\n if (this.config.itemMaxSize > this.config.capacityInBytes) {\n logger.error('Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default.');\n this.config.itemMaxSize = defaultConfig.itemMaxSize;\n }\n if (this.config.defaultPriority > 5 || this.config.defaultPriority < 1) {\n logger.error('Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default.');\n this.config.defaultPriority = defaultConfig.defaultPriority;\n }\n if (Number(this.config.warningThreshold) > 1 ||\n Number(this.config.warningThreshold) < 0) {\n logger.error('Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default.');\n this.config.warningThreshold = defaultConfig.warningThreshold;\n }\n // set 5MB limit\n var cacheLimit = 5 * 1024 * 1024;\n if (this.config.capacityInBytes > cacheLimit) {\n logger.error('Cache Capacity should be less than 5MB. Setting back to default. Setting back to default.');\n this.config.capacityInBytes = defaultConfig.capacityInBytes;\n }\n };\n /**\n * produce a JSON object with meta-data and data value\n * @param value - the value of the item\n * @param options - optional, the specified meta-data\n *\n * @return - the item which has the meta-data and the value\n */\n StorageCache.prototype.fillCacheItem = function (key, value, options) {\n var ret = {\n key: key,\n data: value,\n timestamp: getCurrTime(),\n visitedTime: getCurrTime(),\n priority: options.priority,\n expires: options.expires,\n type: typeof value,\n byteSize: 0,\n };\n ret.byteSize = getByteLength(JSON.stringify(ret));\n // for accurate size\n ret.byteSize = getByteLength(JSON.stringify(ret));\n return ret;\n };\n /**\n * set cache with customized configuration\n * @param config - customized configuration\n *\n * @return - the current configuration\n */\n StorageCache.prototype.configure = function (config) {\n if (!config) {\n return this.config;\n }\n if (config.keyPrefix) {\n logger.warn(\"Don't try to configure keyPrefix!\");\n }\n this.config = Object.assign({}, this.config, config, config.Cache);\n this.checkConfig();\n return this.config;\n };\n return StorageCache;\n}());\nexport { StorageCache };\n/**\n * @deprecated use named import\n */\nexport default StorageCache;\n//# sourceMappingURL=StorageCache.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar DoubleLinkedNode = /** @class */ (function () {\n function DoubleLinkedNode(keyVal) {\n this.key = keyVal ? keyVal : '';\n this.prevNode = null;\n this.nextNode = null;\n }\n return DoubleLinkedNode;\n}());\n/**\n * double linked list plus a hash table inside\n * each key in the cache stored as a node in the list\n * recently visited node will be rotated to the head\n * so the Last Recently Visited node will be at the tail\n *\n * @member head - dummy head of the linked list\n * @member tail - dummy tail of the linked list\n * @member hashtable - the hashtable which maps cache key to list node\n * @member length - length of the list\n */\nvar CacheList = /** @class */ (function () {\n /**\n * initialization\n */\n function CacheList() {\n this.head = new DoubleLinkedNode();\n this.tail = new DoubleLinkedNode();\n this.hashtable = {};\n this.length = 0;\n this.head.nextNode = this.tail;\n this.tail.prevNode = this.head;\n }\n /**\n * insert node to the head of the list\n *\n * @param node\n */\n CacheList.prototype.insertNodeToHead = function (node) {\n var tmp = this.head.nextNode;\n this.head.nextNode = node;\n node.nextNode = tmp;\n node.prevNode = this.head;\n tmp.prevNode = node;\n this.length = this.length + 1;\n };\n /**\n * remove node\n *\n * @param node\n */\n CacheList.prototype.removeNode = function (node) {\n node.prevNode.nextNode = node.nextNode;\n node.nextNode.prevNode = node.prevNode;\n node.prevNode = null;\n node.nextNode = null;\n this.length = this.length - 1;\n };\n /**\n * @return true if list is empty\n */\n CacheList.prototype.isEmpty = function () {\n return this.length === 0;\n };\n /**\n * refresh node so it is rotated to the head\n *\n * @param key - key of the node\n */\n CacheList.prototype.refresh = function (key) {\n var node = this.hashtable[key];\n this.removeNode(node);\n this.insertNodeToHead(node);\n };\n /**\n * insert new node to the head and add it in the hashtable\n *\n * @param key - the key of the node\n */\n CacheList.prototype.insertItem = function (key) {\n var node = new DoubleLinkedNode(key);\n this.hashtable[key] = node;\n this.insertNodeToHead(node);\n };\n /**\n * @return the LAST Recently Visited key\n */\n CacheList.prototype.getLastItem = function () {\n return this.tail.prevNode.key;\n };\n /**\n * remove the cache key from the list and hashtable\n * @param key - the key of the node\n */\n CacheList.prototype.removeItem = function (key) {\n var removedItem = this.hashtable[key];\n this.removeNode(removedItem);\n delete this.hashtable[key];\n };\n /**\n * @return length of the list\n */\n CacheList.prototype.getSize = function () {\n return this.length;\n };\n /**\n * @return true if the key is in the hashtable\n * @param key\n */\n CacheList.prototype.containsKey = function (key) {\n return key in this.hashtable;\n };\n /**\n * clean up the list and hashtable\n */\n CacheList.prototype.clearList = function () {\n var e_1, _a;\n try {\n for (var _b = __values(Object.keys(this.hashtable)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (this.hashtable.hasOwnProperty(key)) {\n delete this.hashtable[key];\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this.head.nextNode = this.tail;\n this.tail.prevNode = this.head;\n this.length = 0;\n };\n /**\n * @return all keys in the hashtable\n */\n CacheList.prototype.getKeys = function () {\n return Object.keys(this.hashtable);\n };\n /**\n * mainly for test\n *\n * @param key\n * @return true if key is the head node\n */\n CacheList.prototype.isHeadNode = function (key) {\n var node = this.hashtable[key];\n return node.prevNode === this.head;\n };\n /**\n * mainly for test\n *\n * @param key\n * @return true if key is the tail node\n */\n CacheList.prototype.isTailNode = function (key) {\n var node = this.hashtable[key];\n return node.nextNode === this.tail;\n };\n return CacheList;\n}());\nexport default CacheList;\n//# sourceMappingURL=CacheList.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { StorageHelper } from '@aws-amplify/core';\n/**\n * Default cache config\n */\nexport var defaultConfig = {\n keyPrefix: 'aws-amplify-cache',\n capacityInBytes: 1048576,\n itemMaxSize: 210000,\n defaultTTL: 259200000,\n defaultPriority: 5,\n warningThreshold: 0.8,\n // the storage helper will check if localStorage exists,\n // if not, will use a in-memory object instead\n storage: new StorageHelper().getStorage(),\n};\n/**\n * return the byte size of the string\n * @param str\n */\nexport function getByteLength(str) {\n var ret = 0;\n ret = str.length;\n for (var i = str.length; i >= 0; i -= 1) {\n var charCode = str.charCodeAt(i);\n if (charCode > 0x7f && charCode <= 0x7ff) {\n ret += 1;\n }\n else if (charCode > 0x7ff && charCode <= 0xffff) {\n ret += 2;\n }\n // trail surrogate\n if (charCode >= 0xdc00 && charCode <= 0xdfff) {\n i -= 1;\n }\n }\n return ret;\n}\n/**\n * get current time\n */\nexport function getCurrTime() {\n var currTime = new Date();\n return currTime.getTime();\n}\n/**\n * check if passed value is an integer\n */\nexport function isInteger(value) {\n if (Number.isInteger) {\n return Number.isInteger(value);\n }\n return _isInteger(value);\n}\nfunction _isInteger(value) {\n return (typeof value === 'number' && isFinite(value) && Math.floor(value) === value);\n}\n/**\n * provide an object as the in-memory cache\n */\nvar store = {};\nvar CacheObject = /** @class */ (function () {\n function CacheObject() {\n }\n CacheObject.clear = function () {\n store = {};\n };\n CacheObject.getItem = function (key) {\n return store[key] || null;\n };\n CacheObject.setItem = function (key, value) {\n store[key] = value;\n };\n CacheObject.removeItem = function (key) {\n delete store[key];\n };\n return CacheObject;\n}());\nexport { CacheObject };\n//# sourceMappingURL=CacheUtils.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nexport * from './CacheUtils';\nexport { default as CacheList } from './CacheList';\n//# sourceMappingURL=index.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { Amplify } from '@aws-amplify/core';\nimport { BrowserStorageCache } from './BrowserStorageCache';\nimport { InMemoryCache } from './InMemoryCache';\nexport { BrowserStorageCache, InMemoryCache };\n/**\n * @deprecated use named import\n */\nexport default BrowserStorageCache;\nAmplify.register(BrowserStorageCache);\n//# sourceMappingURL=index.js.map","module.exports = __WEBPACK_EXTERNAL_MODULE__aws_amplify_core__;"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///../src/BrowserStorageCache.ts","webpack:///../src/InMemoryCache.ts","webpack:///../src/StorageCache.ts","webpack:///../../src/Utils/CacheList.ts","webpack:///../../src/Utils/CacheUtils.ts","webpack:///../../src/Utils/index.ts","webpack:///../src/index.ts","webpack:///external \"aws_amplify_core\""],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;AAWG;AAEH;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;AAWG;AAEH;AACA;AACA;AAGA;AACA;;AAEG;;AACH;AAEA,yDAAO,CAAP,mF;;;;;;;;;;;ACxBA,+D","file":"aws-amplify-cache.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"aws_amplify_core\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"aws_amplify_cache\", [\"aws_amplify_core\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"aws_amplify_cache\"] = factory(require(\"aws_amplify_core\"));\n\telse\n\t\troot[\"aws_amplify_cache\"] = factory(root[\"aws_amplify_core\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE__aws_amplify_core__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./lib-esm/index.js\");\n","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { defaultConfig, getCurrTime } from './Utils';\nimport { StorageCache } from './StorageCache';\nimport { ConsoleLogger as Logger } from '@aws-amplify/core';\nvar logger = new Logger('Cache');\n/**\n * Customized storage based on the SessionStorage or LocalStorage with LRU implemented\n */\nvar BrowserStorageCacheClass = /** @class */ (function (_super) {\n __extends(BrowserStorageCacheClass, _super);\n /**\n * initialize the cache\n * @param config - the configuration of the cache\n */\n function BrowserStorageCacheClass(config) {\n var _this = this;\n var cacheConfig = config\n ? Object.assign({}, defaultConfig, config)\n : defaultConfig;\n _this = _super.call(this, cacheConfig) || this;\n _this.config.storage = cacheConfig.storage;\n _this.getItem = _this.getItem.bind(_this);\n _this.setItem = _this.setItem.bind(_this);\n _this.removeItem = _this.removeItem.bind(_this);\n return _this;\n }\n /**\n * decrease current size of the cache\n *\n * @private\n * @param amount - the amount of the cache size which needs to be decreased\n */\n BrowserStorageCacheClass.prototype._decreaseCurSizeInBytes = function (amount) {\n var curSize = this.getCacheCurSize();\n this.config.storage.setItem(this.cacheCurSizeKey, (curSize - amount).toString());\n };\n /**\n * increase current size of the cache\n *\n * @private\n * @param amount - the amount of the cache szie which need to be increased\n */\n BrowserStorageCacheClass.prototype._increaseCurSizeInBytes = function (amount) {\n var curSize = this.getCacheCurSize();\n this.config.storage.setItem(this.cacheCurSizeKey, (curSize + amount).toString());\n };\n /**\n * update the visited time if item has been visited\n *\n * @private\n * @param item - the item which need to be refreshed\n * @param prefixedKey - the key of the item\n *\n * @return the refreshed item\n */\n BrowserStorageCacheClass.prototype._refreshItem = function (item, prefixedKey) {\n item.visitedTime = getCurrTime();\n this.config.storage.setItem(prefixedKey, JSON.stringify(item));\n return item;\n };\n /**\n * check wether item is expired\n *\n * @private\n * @param key - the key of the item\n *\n * @return true if the item is expired.\n */\n BrowserStorageCacheClass.prototype._isExpired = function (key) {\n var text = this.config.storage.getItem(key);\n var item = JSON.parse(text);\n if (getCurrTime() >= item.expires) {\n return true;\n }\n return false;\n };\n /**\n * delete item from cache\n *\n * @private\n * @param prefixedKey - the key of the item\n * @param size - optional, the byte size of the item\n */\n BrowserStorageCacheClass.prototype._removeItem = function (prefixedKey, size) {\n var itemSize = size\n ? size\n : JSON.parse(this.config.storage.getItem(prefixedKey)).byteSize;\n this._decreaseCurSizeInBytes(itemSize);\n // remove the cache item\n this.config.storage.removeItem(prefixedKey);\n };\n /**\n * put item into cache\n *\n * @private\n * @param prefixedKey - the key of the item\n * @param itemData - the value of the item\n * @param itemSizeInBytes - the byte size of the item\n */\n BrowserStorageCacheClass.prototype._setItem = function (prefixedKey, item) {\n // update the cache size\n this._increaseCurSizeInBytes(item.byteSize);\n try {\n this.config.storage.setItem(prefixedKey, JSON.stringify(item));\n }\n catch (setItemErr) {\n // if failed, we need to rollback the cache size\n this._decreaseCurSizeInBytes(item.byteSize);\n logger.error(\"Failed to set item \" + setItemErr);\n }\n };\n /**\n * total space needed when poping out items\n *\n * @private\n * @param itemSize\n *\n * @return total space needed\n */\n BrowserStorageCacheClass.prototype._sizeToPop = function (itemSize) {\n var spaceItemNeed = this.getCacheCurSize() + itemSize - this.config.capacityInBytes;\n var cacheThresholdSpace = (1 - this.config.warningThreshold) * this.config.capacityInBytes;\n return spaceItemNeed > cacheThresholdSpace\n ? spaceItemNeed\n : cacheThresholdSpace;\n };\n /**\n * see whether cache is full\n *\n * @private\n * @param itemSize\n *\n * @return true if cache is full\n */\n BrowserStorageCacheClass.prototype._isCacheFull = function (itemSize) {\n return itemSize + this.getCacheCurSize() > this.config.capacityInBytes;\n };\n /**\n * scan the storage and find out all the keys owned by this cache\n * also clean the expired keys while scanning\n *\n * @private\n *\n * @return array of keys\n */\n BrowserStorageCacheClass.prototype._findValidKeys = function () {\n var keys = [];\n var keyInCache = [];\n // get all keys in Storage\n for (var i = 0; i < this.config.storage.length; i += 1) {\n keyInCache.push(this.config.storage.key(i));\n }\n // find those items which belong to our cache and also clean those expired items\n for (var i = 0; i < keyInCache.length; i += 1) {\n var key = keyInCache[i];\n if (key.indexOf(this.config.keyPrefix) === 0 &&\n key !== this.cacheCurSizeKey) {\n if (this._isExpired(key)) {\n this._removeItem(key);\n }\n else {\n keys.push(key);\n }\n }\n }\n return keys;\n };\n /**\n * get all the items we have, sort them by their priority,\n * if priority is same, sort them by their last visited time\n * pop out items from the low priority (5 is the lowest)\n *\n * @private\n * @param keys - all the keys in this cache\n * @param sizeToPop - the total size of the items which needed to be poped out\n */\n BrowserStorageCacheClass.prototype._popOutItems = function (keys, sizeToPop) {\n var items = [];\n var remainedSize = sizeToPop;\n // get the items from Storage\n for (var i = 0; i < keys.length; i += 1) {\n var val = this.config.storage.getItem(keys[i]);\n if (val != null) {\n var item = JSON.parse(val);\n items.push(item);\n }\n }\n // first compare priority\n // then compare visited time\n items.sort(function (a, b) {\n if (a.priority > b.priority) {\n return -1;\n }\n else if (a.priority < b.priority) {\n return 1;\n }\n else {\n if (a.visitedTime < b.visitedTime) {\n return -1;\n }\n else\n return 1;\n }\n });\n for (var i = 0; i < items.length; i += 1) {\n // pop out items until we have enough room for new item\n this._removeItem(items[i].key, items[i].byteSize);\n remainedSize -= items[i].byteSize;\n if (remainedSize <= 0) {\n return;\n }\n }\n };\n /**\n * Set item into cache. You can put number, string, boolean or object.\n * The cache will first check whether has the same key.\n * If it has, it will delete the old item and then put the new item in\n * The cache will pop out items if it is full\n * You can specify the cache item options. The cache will abort and output a warning:\n * If the key is invalid\n * If the size of the item exceeds itemMaxSize.\n * If the value is undefined\n * If incorrect cache item configuration\n * If error happened with browser storage\n *\n * @param key - the key of the item\n * @param value - the value of the item\n * @param {Object} [options] - optional, the specified meta-data\n */\n BrowserStorageCacheClass.prototype.setItem = function (key, value, options) {\n logger.log(\"Set item: key is \" + key + \", value is \" + value + \" with options: \" + options);\n var prefixedKey = this.config.keyPrefix + key;\n // invalid keys\n if (prefixedKey === this.config.keyPrefix ||\n prefixedKey === this.cacheCurSizeKey) {\n logger.warn(\"Invalid key: should not be empty or 'CurSize'\");\n return;\n }\n if (typeof value === 'undefined') {\n logger.warn(\"The value of item should not be undefined!\");\n return;\n }\n var cacheItemOptions = {\n priority: options && options.priority !== undefined\n ? options.priority\n : this.config.defaultPriority,\n expires: options && options.expires !== undefined\n ? options.expires\n : this.config.defaultTTL + getCurrTime(),\n };\n if (cacheItemOptions.priority < 1 || cacheItemOptions.priority > 5) {\n logger.warn(\"Invalid parameter: priority due to out or range. It should be within 1 and 5.\");\n return;\n }\n var item = this.fillCacheItem(prefixedKey, value, cacheItemOptions);\n // check wether this item is too big;\n if (item.byteSize > this.config.itemMaxSize) {\n logger.warn(\"Item with key: \" + key + \" you are trying to put into is too big!\");\n return;\n }\n try {\n // first look into the storage, if it exists, delete it.\n var val = this.config.storage.getItem(prefixedKey);\n if (val) {\n this._removeItem(prefixedKey, JSON.parse(val).byteSize);\n }\n // check whether the cache is full\n if (this._isCacheFull(item.byteSize)) {\n var validKeys = this._findValidKeys();\n // check again and then pop out items\n if (this._isCacheFull(item.byteSize)) {\n var sizeToPop = this._sizeToPop(item.byteSize);\n this._popOutItems(validKeys, sizeToPop);\n }\n }\n // put item in the cache\n // may failed due to storage full\n this._setItem(prefixedKey, item);\n }\n catch (e) {\n logger.warn(\"setItem failed! \" + e);\n }\n };\n /**\n * Get item from cache. It will return null if item doesn’t exist or it has been expired.\n * If you specified callback function in the options,\n * then the function will be executed if no such item in the cache\n * and finally put the return value into cache.\n * Please make sure the callback function will return the value you want to put into the cache.\n * The cache will abort output a warning:\n * If the key is invalid\n * If error happened with browser storage\n *\n * @param key - the key of the item\n * @param {Object} [options] - the options of callback function\n *\n * @return - return the value of the item\n */\n BrowserStorageCacheClass.prototype.getItem = function (key, options) {\n logger.log(\"Get item: key is \" + key + \" with options \" + options);\n var ret = null;\n var prefixedKey = this.config.keyPrefix + key;\n if (prefixedKey === this.config.keyPrefix ||\n prefixedKey === this.cacheCurSizeKey) {\n logger.warn(\"Invalid key: should not be empty or 'CurSize'\");\n return null;\n }\n try {\n ret = this.config.storage.getItem(prefixedKey);\n if (ret != null) {\n if (this._isExpired(prefixedKey)) {\n // if expired, remove that item and return null\n this._removeItem(prefixedKey, JSON.parse(ret).byteSize);\n ret = null;\n }\n else {\n // if not expired, great, return the value and refresh it\n var item = JSON.parse(ret);\n item = this._refreshItem(item, prefixedKey);\n return item.data;\n }\n }\n if (options && options.callback !== undefined) {\n var val = options.callback();\n if (val !== null) {\n this.setItem(key, val, options);\n }\n return val;\n }\n return null;\n }\n catch (e) {\n logger.warn(\"getItem failed! \" + e);\n return null;\n }\n };\n /**\n * remove item from the cache\n * The cache will abort output a warning:\n * If error happened with browser storage\n * @param key - the key of the item\n */\n BrowserStorageCacheClass.prototype.removeItem = function (key) {\n logger.log(\"Remove item: key is \" + key);\n var prefixedKey = this.config.keyPrefix + key;\n if (prefixedKey === this.config.keyPrefix ||\n prefixedKey === this.cacheCurSizeKey) {\n return;\n }\n try {\n var val = this.config.storage.getItem(prefixedKey);\n if (val) {\n this._removeItem(prefixedKey, JSON.parse(val).byteSize);\n }\n }\n catch (e) {\n logger.warn(\"removeItem failed! \" + e);\n }\n };\n /**\n * clear the entire cache\n * The cache will abort output a warning:\n * If error happened with browser storage\n */\n BrowserStorageCacheClass.prototype.clear = function () {\n logger.log(\"Clear Cache\");\n var keysToRemove = [];\n for (var i = 0; i < this.config.storage.length; i += 1) {\n var key = this.config.storage.key(i);\n if (key.indexOf(this.config.keyPrefix) === 0) {\n keysToRemove.push(key);\n }\n }\n try {\n for (var i = 0; i < keysToRemove.length; i += 1) {\n this.config.storage.removeItem(keysToRemove[i]);\n }\n }\n catch (e) {\n logger.warn(\"clear failed! \" + e);\n }\n };\n /**\n * Return all the keys in the cache.\n *\n * @return - all keys in the cache\n */\n BrowserStorageCacheClass.prototype.getAllKeys = function () {\n var keys = [];\n for (var i = 0; i < this.config.storage.length; i += 1) {\n var key = this.config.storage.key(i);\n if (key.indexOf(this.config.keyPrefix) === 0 &&\n key !== this.cacheCurSizeKey) {\n keys.push(key.substring(this.config.keyPrefix.length));\n }\n }\n return keys;\n };\n /**\n * return the current size of the cache\n *\n * @return - current size of the cache\n */\n BrowserStorageCacheClass.prototype.getCacheCurSize = function () {\n var ret = this.config.storage.getItem(this.cacheCurSizeKey);\n if (!ret) {\n this.config.storage.setItem(this.cacheCurSizeKey, '0');\n ret = '0';\n }\n return Number(ret);\n };\n /**\n * Return a new instance of cache with customized configuration.\n * @param config - the customized configuration\n *\n * @return - new instance of Cache\n */\n BrowserStorageCacheClass.prototype.createInstance = function (config) {\n if (!config.keyPrefix || config.keyPrefix === defaultConfig.keyPrefix) {\n logger.error('invalid keyPrefix, setting keyPrefix with timeStamp');\n config.keyPrefix = getCurrTime.toString();\n }\n return new BrowserStorageCacheClass(config);\n };\n return BrowserStorageCacheClass;\n}(StorageCache));\nexport { BrowserStorageCacheClass };\nexport var BrowserStorageCache = new BrowserStorageCacheClass();\n/**\n * @deprecated use named import\n */\nexport default BrowserStorageCache;\n//# sourceMappingURL=BrowserStorageCache.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { CacheList, defaultConfig, getCurrTime, CacheObject } from './Utils';\nimport { StorageCache } from './StorageCache';\nimport { ConsoleLogger as Logger } from '@aws-amplify/core';\nvar logger = new Logger('InMemoryCache');\n/**\n * Customized in-memory cache with LRU implemented\n * @member cacheObj - object which store items\n * @member cacheList - list of keys in the cache with LRU\n * @member curSizeInBytes - current size of the cache\n * @member maxPriority - max of the priority\n * @member cacheSizeLimit - the limit of cache size\n */\nvar InMemoryCacheClass = /** @class */ (function (_super) {\n __extends(InMemoryCacheClass, _super);\n /**\n * initialize the cache\n *\n * @param config - the configuration of the cache\n */\n function InMemoryCacheClass(config) {\n var _this = this;\n var cacheConfig = config\n ? Object.assign({}, defaultConfig, config)\n : defaultConfig;\n _this = _super.call(this, cacheConfig) || this;\n logger.debug('now we start!');\n _this.cacheList = [];\n _this.curSizeInBytes = 0;\n _this.maxPriority = 5;\n _this.getItem = _this.getItem.bind(_this);\n _this.setItem = _this.setItem.bind(_this);\n _this.removeItem = _this.removeItem.bind(_this);\n // initialize list for every priority\n for (var i = 0; i < _this.maxPriority; i += 1) {\n _this.cacheList[i] = new CacheList();\n }\n return _this;\n }\n /**\n * decrease current size of the cache\n *\n * @param amount - the amount of the cache size which needs to be decreased\n */\n InMemoryCacheClass.prototype._decreaseCurSizeInBytes = function (amount) {\n this.curSizeInBytes -= amount;\n };\n /**\n * increase current size of the cache\n *\n * @param amount - the amount of the cache szie which need to be increased\n */\n InMemoryCacheClass.prototype._increaseCurSizeInBytes = function (amount) {\n this.curSizeInBytes += amount;\n };\n /**\n * check whether item is expired\n *\n * @param key - the key of the item\n *\n * @return true if the item is expired.\n */\n InMemoryCacheClass.prototype._isExpired = function (key) {\n var text = CacheObject.getItem(key);\n var item = JSON.parse(text);\n if (getCurrTime() >= item.expires) {\n return true;\n }\n return false;\n };\n /**\n * delete item from cache\n *\n * @param prefixedKey - the key of the item\n * @param listIdx - indicates which cache list the key belongs to\n */\n InMemoryCacheClass.prototype._removeItem = function (prefixedKey, listIdx) {\n // delete the key from the list\n this.cacheList[listIdx].removeItem(prefixedKey);\n // decrease the current size of the cache\n this._decreaseCurSizeInBytes(JSON.parse(CacheObject.getItem(prefixedKey)).byteSize);\n // finally remove the item from memory\n CacheObject.removeItem(prefixedKey);\n };\n /**\n * put item into cache\n *\n * @param prefixedKey - the key of the item\n * @param itemData - the value of the item\n * @param itemSizeInBytes - the byte size of the item\n * @param listIdx - indicates which cache list the key belongs to\n */\n InMemoryCacheClass.prototype._setItem = function (prefixedKey, item, listIdx) {\n // insert the key into the list\n this.cacheList[listIdx].insertItem(prefixedKey);\n // increase the current size of the cache\n this._increaseCurSizeInBytes(item.byteSize);\n // finally add the item into memory\n CacheObject.setItem(prefixedKey, JSON.stringify(item));\n };\n /**\n * see whether cache is full\n *\n * @param itemSize\n *\n * @return true if cache is full\n */\n InMemoryCacheClass.prototype._isCacheFull = function (itemSize) {\n return this.curSizeInBytes + itemSize > this.config.capacityInBytes;\n };\n /**\n * check whether the cache contains the key\n *\n * @param key\n */\n InMemoryCacheClass.prototype.containsKey = function (key) {\n var prefixedKey = this.config.keyPrefix + key;\n for (var i = 0; i < this.maxPriority; i += 1) {\n if (this.cacheList[i].containsKey(prefixedKey)) {\n return i + 1;\n }\n }\n return -1;\n };\n /**\n * * Set item into cache. You can put number, string, boolean or object.\n * The cache will first check whether has the same key.\n * If it has, it will delete the old item and then put the new item in\n * The cache will pop out items if it is full\n * You can specify the cache item options. The cache will abort and output a warning:\n * If the key is invalid\n * If the size of the item exceeds itemMaxSize.\n * If the value is undefined\n * If incorrect cache item configuration\n * If error happened with browser storage\n *\n * @param key - the key of the item\n * @param value - the value of the item\n * @param options - optional, the specified meta-data\n *\n * @throws if the item is too big which exceeds the limit of single item size\n * @throws if the key is invalid\n */\n InMemoryCacheClass.prototype.setItem = function (key, value, options) {\n var prefixedKey = this.config.keyPrefix + key;\n // invalid keys\n if (prefixedKey === this.config.keyPrefix ||\n prefixedKey === this.cacheCurSizeKey) {\n logger.warn(\"Invalid key: should not be empty or 'CurSize'\");\n return;\n }\n if (typeof value === 'undefined') {\n logger.warn(\"The value of item should not be undefined!\");\n return;\n }\n var cacheItemOptions = {\n priority: options && options.priority !== undefined\n ? options.priority\n : this.config.defaultPriority,\n expires: options && options.expires !== undefined\n ? options.expires\n : this.config.defaultTTL + getCurrTime(),\n };\n if (cacheItemOptions.priority < 1 || cacheItemOptions.priority > 5) {\n logger.warn(\"Invalid parameter: priority due to out or range. It should be within 1 and 5.\");\n return;\n }\n var item = this.fillCacheItem(prefixedKey, value, cacheItemOptions);\n // check wether this item is too big;\n if (item.byteSize > this.config.itemMaxSize) {\n logger.warn(\"Item with key: \" + key + \" you are trying to put into is too big!\");\n return;\n }\n // if key already in the cache, then delete it.\n var presentKeyPrio = this.containsKey(key);\n if (presentKeyPrio !== -1) {\n this._removeItem(prefixedKey, presentKeyPrio - 1);\n }\n // pop out items in the cache when cache is full based on LRU\n // first start from lowest priority cache list\n var cacheListIdx = this.maxPriority - 1;\n while (this._isCacheFull(item.byteSize) && cacheListIdx >= 0) {\n if (!this.cacheList[cacheListIdx].isEmpty()) {\n var popedItemKey = this.cacheList[cacheListIdx].getLastItem();\n this._removeItem(popedItemKey, cacheListIdx);\n }\n else {\n cacheListIdx -= 1;\n }\n }\n this._setItem(prefixedKey, item, Number(item.priority) - 1);\n };\n /**\n * Get item from cache. It will return null if item doesn’t exist or it has been expired.\n * If you specified callback function in the options,\n * then the function will be executed if no such item in the cache\n * and finally put the return value into cache.\n * Please make sure the callback function will return the value you want to put into the cache.\n * The cache will abort output a warning:\n * If the key is invalid\n *\n * @param key - the key of the item\n * @param options - the options of callback function\n */\n InMemoryCacheClass.prototype.getItem = function (key, options) {\n var ret = null;\n var prefixedKey = this.config.keyPrefix + key;\n if (prefixedKey === this.config.keyPrefix ||\n prefixedKey === this.cacheCurSizeKey) {\n logger.warn(\"Invalid key: should not be empty or 'CurSize'\");\n return null;\n }\n // check whether it's in the cachelist\n var presentKeyPrio = this.containsKey(key);\n if (presentKeyPrio !== -1) {\n if (this._isExpired(prefixedKey)) {\n // if expired, remove that item and return null\n this._removeItem(prefixedKey, presentKeyPrio - 1);\n }\n else {\n // if not expired, great, return the value and refresh it\n ret = CacheObject.getItem(prefixedKey);\n var item = JSON.parse(ret);\n this.cacheList[item.priority - 1].refresh(prefixedKey);\n return item.data;\n }\n }\n if (options && options.callback !== undefined) {\n var val = options.callback();\n if (val !== null) {\n this.setItem(key, val, options);\n }\n return val;\n }\n return null;\n };\n /**\n * remove item from the cache\n *\n * @param key - the key of the item\n */\n InMemoryCacheClass.prototype.removeItem = function (key) {\n var prefixedKey = this.config.keyPrefix + key;\n // check if the key is in the cache\n var presentKeyPrio = this.containsKey(key);\n if (presentKeyPrio !== -1) {\n this._removeItem(prefixedKey, presentKeyPrio - 1);\n }\n };\n /**\n * clear the entire cache\n */\n InMemoryCacheClass.prototype.clear = function () {\n var e_1, _a;\n for (var i = 0; i < this.maxPriority; i += 1) {\n try {\n for (var _b = (e_1 = void 0, __values(this.cacheList[i].getKeys())), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n this._removeItem(key, i);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n };\n /**\n * Return all the keys in the cache.\n */\n InMemoryCacheClass.prototype.getAllKeys = function () {\n var e_2, _a;\n var keys = [];\n for (var i = 0; i < this.maxPriority; i += 1) {\n try {\n for (var _b = (e_2 = void 0, __values(this.cacheList[i].getKeys())), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n keys.push(key.substring(this.config.keyPrefix.length));\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n return keys;\n };\n /**\n * return the current size of the cache\n *\n * @return the current size of the cache\n */\n InMemoryCacheClass.prototype.getCacheCurSize = function () {\n return this.curSizeInBytes;\n };\n /**\n * Return a new instance of cache with customized configuration.\n * @param config - the customized configuration\n */\n InMemoryCacheClass.prototype.createInstance = function (config) {\n return new InMemoryCacheClass(config);\n };\n return InMemoryCacheClass;\n}(StorageCache));\nexport { InMemoryCacheClass };\nexport var InMemoryCache = new InMemoryCacheClass();\n/**\n * @deprecated use named import\n */\nexport default InMemoryCache;\n//# sourceMappingURL=InMemoryCache.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { getCurrTime, getByteLength, defaultConfig, isInteger } from './Utils';\nimport { ConsoleLogger as Logger } from '@aws-amplify/core';\nvar logger = new Logger('StorageCache');\n/**\n * Initialization of the cache\n *\n */\nvar StorageCache = /** @class */ (function () {\n /**\n * Initialize the cache\n * @param config - the configuration of the cache\n */\n function StorageCache(config) {\n this.config = Object.assign({}, config);\n this.cacheCurSizeKey = this.config.keyPrefix + 'CurSize';\n this.checkConfig();\n }\n StorageCache.prototype.getModuleName = function () {\n return 'Cache';\n };\n StorageCache.prototype.checkConfig = function () {\n // check configuration\n if (!isInteger(this.config.capacityInBytes)) {\n logger.error('Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default.');\n this.config.capacityInBytes = defaultConfig.capacityInBytes;\n }\n if (!isInteger(this.config.itemMaxSize)) {\n logger.error('Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default.');\n this.config.itemMaxSize = defaultConfig.itemMaxSize;\n }\n if (!isInteger(this.config.defaultTTL)) {\n logger.error('Invalid parameter: defaultTTL. It should be an Integer. Setting back to default.');\n this.config.defaultTTL = defaultConfig.defaultTTL;\n }\n if (!isInteger(this.config.defaultPriority)) {\n logger.error('Invalid parameter: defaultPriority. It should be an Integer. Setting back to default.');\n this.config.defaultPriority = defaultConfig.defaultPriority;\n }\n if (this.config.itemMaxSize > this.config.capacityInBytes) {\n logger.error('Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default.');\n this.config.itemMaxSize = defaultConfig.itemMaxSize;\n }\n if (this.config.defaultPriority > 5 || this.config.defaultPriority < 1) {\n logger.error('Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default.');\n this.config.defaultPriority = defaultConfig.defaultPriority;\n }\n if (Number(this.config.warningThreshold) > 1 ||\n Number(this.config.warningThreshold) < 0) {\n logger.error('Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default.');\n this.config.warningThreshold = defaultConfig.warningThreshold;\n }\n // set 5MB limit\n var cacheLimit = 5 * 1024 * 1024;\n if (this.config.capacityInBytes > cacheLimit) {\n logger.error('Cache Capacity should be less than 5MB. Setting back to default. Setting back to default.');\n this.config.capacityInBytes = defaultConfig.capacityInBytes;\n }\n };\n /**\n * produce a JSON object with meta-data and data value\n * @param value - the value of the item\n * @param options - optional, the specified meta-data\n *\n * @return - the item which has the meta-data and the value\n */\n StorageCache.prototype.fillCacheItem = function (key, value, options) {\n var ret = {\n key: key,\n data: value,\n timestamp: getCurrTime(),\n visitedTime: getCurrTime(),\n priority: options.priority,\n expires: options.expires,\n type: typeof value,\n byteSize: 0,\n };\n ret.byteSize = getByteLength(JSON.stringify(ret));\n // for accurate size\n ret.byteSize = getByteLength(JSON.stringify(ret));\n return ret;\n };\n /**\n * set cache with customized configuration\n * @param config - customized configuration\n *\n * @return - the current configuration\n */\n StorageCache.prototype.configure = function (config) {\n if (!config) {\n return this.config;\n }\n if (config.keyPrefix) {\n logger.warn(\"Don't try to configure keyPrefix!\");\n }\n this.config = Object.assign({}, this.config, config, config.Cache);\n this.checkConfig();\n return this.config;\n };\n return StorageCache;\n}());\nexport { StorageCache };\n/**\n * @deprecated use named import\n */\nexport default StorageCache;\n//# sourceMappingURL=StorageCache.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar DoubleLinkedNode = /** @class */ (function () {\n function DoubleLinkedNode(keyVal) {\n this.key = keyVal ? keyVal : '';\n this.prevNode = null;\n this.nextNode = null;\n }\n return DoubleLinkedNode;\n}());\n/**\n * double linked list plus a hash table inside\n * each key in the cache stored as a node in the list\n * recently visited node will be rotated to the head\n * so the Last Recently Visited node will be at the tail\n *\n * @member head - dummy head of the linked list\n * @member tail - dummy tail of the linked list\n * @member hashtable - the hashtable which maps cache key to list node\n * @member length - length of the list\n */\nvar CacheList = /** @class */ (function () {\n /**\n * initialization\n */\n function CacheList() {\n this.head = new DoubleLinkedNode();\n this.tail = new DoubleLinkedNode();\n this.hashtable = {};\n this.length = 0;\n this.head.nextNode = this.tail;\n this.tail.prevNode = this.head;\n }\n /**\n * insert node to the head of the list\n *\n * @param node\n */\n CacheList.prototype.insertNodeToHead = function (node) {\n var tmp = this.head.nextNode;\n this.head.nextNode = node;\n node.nextNode = tmp;\n node.prevNode = this.head;\n tmp.prevNode = node;\n this.length = this.length + 1;\n };\n /**\n * remove node\n *\n * @param node\n */\n CacheList.prototype.removeNode = function (node) {\n node.prevNode.nextNode = node.nextNode;\n node.nextNode.prevNode = node.prevNode;\n node.prevNode = null;\n node.nextNode = null;\n this.length = this.length - 1;\n };\n /**\n * @return true if list is empty\n */\n CacheList.prototype.isEmpty = function () {\n return this.length === 0;\n };\n /**\n * refresh node so it is rotated to the head\n *\n * @param key - key of the node\n */\n CacheList.prototype.refresh = function (key) {\n var node = this.hashtable[key];\n this.removeNode(node);\n this.insertNodeToHead(node);\n };\n /**\n * insert new node to the head and add it in the hashtable\n *\n * @param key - the key of the node\n */\n CacheList.prototype.insertItem = function (key) {\n var node = new DoubleLinkedNode(key);\n this.hashtable[key] = node;\n this.insertNodeToHead(node);\n };\n /**\n * @return the LAST Recently Visited key\n */\n CacheList.prototype.getLastItem = function () {\n return this.tail.prevNode.key;\n };\n /**\n * remove the cache key from the list and hashtable\n * @param key - the key of the node\n */\n CacheList.prototype.removeItem = function (key) {\n var removedItem = this.hashtable[key];\n this.removeNode(removedItem);\n delete this.hashtable[key];\n };\n /**\n * @return length of the list\n */\n CacheList.prototype.getSize = function () {\n return this.length;\n };\n /**\n * @return true if the key is in the hashtable\n * @param key\n */\n CacheList.prototype.containsKey = function (key) {\n return key in this.hashtable;\n };\n /**\n * clean up the list and hashtable\n */\n CacheList.prototype.clearList = function () {\n var e_1, _a;\n try {\n for (var _b = __values(Object.keys(this.hashtable)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (this.hashtable.hasOwnProperty(key)) {\n delete this.hashtable[key];\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this.head.nextNode = this.tail;\n this.tail.prevNode = this.head;\n this.length = 0;\n };\n /**\n * @return all keys in the hashtable\n */\n CacheList.prototype.getKeys = function () {\n return Object.keys(this.hashtable);\n };\n /**\n * mainly for test\n *\n * @param key\n * @return true if key is the head node\n */\n CacheList.prototype.isHeadNode = function (key) {\n var node = this.hashtable[key];\n return node.prevNode === this.head;\n };\n /**\n * mainly for test\n *\n * @param key\n * @return true if key is the tail node\n */\n CacheList.prototype.isTailNode = function (key) {\n var node = this.hashtable[key];\n return node.nextNode === this.tail;\n };\n return CacheList;\n}());\nexport default CacheList;\n//# sourceMappingURL=CacheList.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { StorageHelper } from '@aws-amplify/core';\n/**\n * Default cache config\n */\nexport var defaultConfig = {\n keyPrefix: 'aws-amplify-cache',\n capacityInBytes: 1048576,\n itemMaxSize: 210000,\n defaultTTL: 259200000,\n defaultPriority: 5,\n warningThreshold: 0.8,\n // the storage helper will check if localStorage exists,\n // if not, will use a in-memory object instead\n storage: new StorageHelper().getStorage(),\n};\n/**\n * return the byte size of the string\n * @param str\n */\nexport function getByteLength(str) {\n var ret = 0;\n ret = str.length;\n for (var i = str.length; i >= 0; i -= 1) {\n var charCode = str.charCodeAt(i);\n if (charCode > 0x7f && charCode <= 0x7ff) {\n ret += 1;\n }\n else if (charCode > 0x7ff && charCode <= 0xffff) {\n ret += 2;\n }\n // trail surrogate\n if (charCode >= 0xdc00 && charCode <= 0xdfff) {\n i -= 1;\n }\n }\n return ret;\n}\n/**\n * get current time\n */\nexport function getCurrTime() {\n var currTime = new Date();\n return currTime.getTime();\n}\n/**\n * check if passed value is an integer\n */\nexport function isInteger(value) {\n if (Number.isInteger) {\n return Number.isInteger(value);\n }\n return _isInteger(value);\n}\nfunction _isInteger(value) {\n return (typeof value === 'number' && isFinite(value) && Math.floor(value) === value);\n}\n/**\n * provide an object as the in-memory cache\n */\nvar store = {};\nvar CacheObject = /** @class */ (function () {\n function CacheObject() {\n }\n CacheObject.clear = function () {\n store = {};\n };\n CacheObject.getItem = function (key) {\n return store[key] || null;\n };\n CacheObject.setItem = function (key, value) {\n store[key] = value;\n };\n CacheObject.removeItem = function (key) {\n delete store[key];\n };\n return CacheObject;\n}());\nexport { CacheObject };\n//# sourceMappingURL=CacheUtils.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nexport * from './CacheUtils';\nexport { default as CacheList } from './CacheList';\n//# sourceMappingURL=index.js.map","/*\n * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with\n * the License. A copy of the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions\n * and limitations under the License.\n */\nimport { Amplify } from '@aws-amplify/core';\nimport { BrowserStorageCache } from './BrowserStorageCache';\nimport { InMemoryCache } from './InMemoryCache';\nexport { BrowserStorageCache, InMemoryCache };\n/**\n * @deprecated use named import\n */\nexport default BrowserStorageCache;\nAmplify.register(BrowserStorageCache);\n//# sourceMappingURL=index.js.map","module.exports = __WEBPACK_EXTERNAL_MODULE__aws_amplify_core__;"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/cache",
3
- "version": "4.0.22-unstable.4+3402060a0",
3
+ "version": "4.0.23-in-app-messaging.35+dcee89ab8",
4
4
  "description": "Cache category of aws-amplify",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "homepage": "https://aws-amplify.github.io/",
46
46
  "dependencies": {
47
- "@aws-amplify/core": "4.3.2-unstable.4+3402060a0"
47
+ "@aws-amplify/core": "4.3.3-in-app-messaging.35+dcee89ab8"
48
48
  },
49
49
  "jest": {
50
50
  "globals": {
@@ -94,5 +94,5 @@
94
94
  "lib-esm"
95
95
  ]
96
96
  },
97
- "gitHead": "3402060a040c89ef90199f61d1eae77b0a2830c1"
97
+ "gitHead": "dcee89ab81dbd6e6e90777abae16194a05e614b0"
98
98
  }
package/src/index.ts CHANGED
@@ -1,25 +1,25 @@
1
- /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
- * the License. A copy of the License is located at
6
- *
7
- * http://aws.amazon.com/apache2.0/
8
- *
9
- * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
10
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11
- * and limitations under the License.
12
- */
13
-
14
- import { Amplify } from '@aws-amplify/core';
15
- import { BrowserStorageCache } from './BrowserStorageCache';
16
- import { InMemoryCache } from './InMemoryCache';
17
- import { CacheConfig } from './types';
18
-
19
- export { BrowserStorageCache, InMemoryCache, CacheConfig };
20
- /**
21
- * @deprecated use named import
22
- */
23
- export default BrowserStorageCache;
24
-
25
- Amplify.register(BrowserStorageCache);
1
+ /*
2
+ * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
+ * the License. A copy of the License is located at
6
+ *
7
+ * http://aws.amazon.com/apache2.0/
8
+ *
9
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
10
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11
+ * and limitations under the License.
12
+ */
13
+
14
+ import { Amplify } from '@aws-amplify/core';
15
+ import { BrowserStorageCache } from './BrowserStorageCache';
16
+ import { InMemoryCache } from './InMemoryCache';
17
+ import { CacheConfig } from './types';
18
+
19
+ export { BrowserStorageCache, InMemoryCache, CacheConfig };
20
+ /**
21
+ * @deprecated use named import
22
+ */
23
+ export default BrowserStorageCache;
24
+
25
+ Amplify.register(BrowserStorageCache);