@aws-amplify/cache 4.0.51-next.20 → 4.0.51-next.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/lib/.tsbuildinfo +3 -0
  3. package/lib/AsyncStorageCache.js +1 -1
  4. package/lib/BrowserStorageCache.d.ts +0 -4
  5. package/lib/BrowserStorageCache.js +1 -5
  6. package/lib/BrowserStorageCache.js.map +1 -1
  7. package/lib/InMemoryCache.d.ts +0 -4
  8. package/lib/InMemoryCache.js +1 -5
  9. package/lib/InMemoryCache.js.map +1 -1
  10. package/lib/StorageCache.d.ts +0 -4
  11. package/lib/StorageCache.js +1 -5
  12. package/lib/StorageCache.js.map +1 -1
  13. package/lib/Utils/CacheList.js +1 -1
  14. package/lib/Utils/CacheUtils.js +1 -1
  15. package/lib/Utils/index.d.ts +1 -1
  16. package/lib/Utils/index.js +7 -3
  17. package/lib/Utils/index.js.map +1 -1
  18. package/lib/index.d.ts +1 -4
  19. package/lib/index.js +2 -5
  20. package/lib/index.js.map +1 -1
  21. package/lib/reactnative.d.ts +2 -5
  22. package/lib/reactnative.js +1 -5
  23. package/lib/reactnative.js.map +1 -1
  24. package/lib/types/Cache.js +1 -1
  25. package/lib/types/index.js +1 -1
  26. package/lib-esm/.tsbuildinfo +3 -0
  27. package/lib-esm/AsyncStorageCache.js +1 -1
  28. package/lib-esm/BrowserStorageCache.d.ts +0 -4
  29. package/lib-esm/BrowserStorageCache.js +1 -5
  30. package/lib-esm/BrowserStorageCache.js.map +1 -1
  31. package/lib-esm/InMemoryCache.d.ts +0 -4
  32. package/lib-esm/InMemoryCache.js +1 -5
  33. package/lib-esm/InMemoryCache.js.map +1 -1
  34. package/lib-esm/StorageCache.d.ts +0 -4
  35. package/lib-esm/StorageCache.js +1 -5
  36. package/lib-esm/StorageCache.js.map +1 -1
  37. package/lib-esm/Utils/CacheList.js +1 -1
  38. package/lib-esm/Utils/CacheUtils.js +1 -1
  39. package/lib-esm/Utils/index.d.ts +1 -1
  40. package/lib-esm/Utils/index.js +2 -2
  41. package/lib-esm/Utils/index.js.map +1 -1
  42. package/lib-esm/index.d.ts +1 -4
  43. package/lib-esm/index.js +3 -5
  44. package/lib-esm/index.js.map +1 -1
  45. package/lib-esm/reactnative.d.ts +2 -5
  46. package/lib-esm/reactnative.js +4 -6
  47. package/lib-esm/reactnative.js.map +1 -1
  48. package/lib-esm/types/Cache.js +1 -1
  49. package/lib-esm/types/index.js +1 -1
  50. package/package.json +10 -4
  51. package/src/AsyncStorageCache.ts +1 -1
  52. package/src/BrowserStorageCache.ts +1 -6
  53. package/src/InMemoryCache.ts +1 -5
  54. package/src/StorageCache.ts +1 -6
  55. package/src/Utils/CacheList.ts +1 -1
  56. package/src/Utils/CacheUtils.ts +1 -1
  57. package/src/Utils/index.ts +21 -15
  58. package/src/index.ts +4 -5
  59. package/src/reactnative.ts +5 -6
  60. package/src/types/Cache.ts +1 -1
  61. package/src/types/index.ts +1 -1
  62. package/build.js +0 -5
  63. package/dist/aws-amplify-cache.js +0 -1699
  64. package/dist/aws-amplify-cache.js.map +0 -1
  65. package/dist/aws-amplify-cache.min.js +0 -2
  66. package/dist/aws-amplify-cache.min.js.map +0 -1
  67. package/index.js +0 -7
  68. package/webpack.config.dev.js +0 -6
@@ -2,7 +2,4 @@ import { BrowserStorageCache } from './BrowserStorageCache';
2
2
  import { InMemoryCache } from './InMemoryCache';
3
3
  import { CacheConfig } from './types';
4
4
  export { BrowserStorageCache, InMemoryCache, CacheConfig };
5
- /**
6
- * @deprecated use named import
7
- */
8
- export default BrowserStorageCache;
5
+ export { BrowserStorageCache as Cache };
package/lib-esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -14,9 +14,7 @@ import { Amplify } from '@aws-amplify/core';
14
14
  import { BrowserStorageCache } from './BrowserStorageCache';
15
15
  import { InMemoryCache } from './InMemoryCache';
16
16
  export { BrowserStorageCache, InMemoryCache };
17
- /**
18
- * @deprecated use named import
19
- */
20
- export default BrowserStorageCache;
17
+ // Standard `Cache` export to maintain interoperability with React Native
18
+ export { BrowserStorageCache as Cache };
21
19
  Amplify.register(BrowserStorageCache);
22
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAe,CAAC;AAC3D;;GAEG;AACH,eAAe,mBAAmB,CAAC;AAEnC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAe,CAAC;AAE3D,yEAAyE;AACzE,OAAO,EAAE,mBAAmB,IAAI,KAAK,EAAE,CAAC;AAExC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC"}
@@ -1,6 +1,3 @@
1
1
  import { Cache, AsyncStorageCache } from './AsyncStorageCache';
2
- export { Cache, AsyncStorageCache };
3
- /**
4
- * @deprecated use named import
5
- */
6
- export default Cache;
2
+ export { AsyncStorageCache };
3
+ export { Cache };
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -12,10 +12,8 @@
12
12
  */
13
13
  import { Amplify } from '@aws-amplify/core';
14
14
  import { Cache, AsyncStorageCache } from './AsyncStorageCache';
15
- export { Cache, AsyncStorageCache };
16
- /**
17
- * @deprecated use named import
18
- */
19
- export default Cache;
15
+ export { AsyncStorageCache };
16
+ // Standard `Cache` export to maintain interoperability with React Native
17
+ export { Cache };
20
18
  Amplify.register(Cache);
21
19
  //# sourceMappingURL=reactnative.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reactnative.js","sourceRoot":"","sources":["../src/reactnative.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC;AACpC;;GAEG;AACH,eAAe,KAAK,CAAC;AAErB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"reactnative.js","sourceRoot":"","sources":["../src/reactnative.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,yEAAyE;AACzE,OAAO,EAAE,KAAK,EAAE,CAAC;AAEjB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/cache",
3
- "version": "4.0.51-next.20+072846a9f",
3
+ "version": "4.0.51-next.36+580cda186",
4
4
  "description": "Cache category of aws-amplify",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",
@@ -31,7 +31,8 @@
31
31
  "build": "npm run clean && npm run build:esm && npm run build:cjs",
32
32
  "clean": "rimraf lib-esm lib dist",
33
33
  "format": "echo \"Not implemented\"",
34
- "lint": "tslint 'src/**/*.ts'"
34
+ "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
35
+ "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 87.74"
35
36
  },
36
37
  "repository": {
37
38
  "type": "git",
@@ -43,8 +44,13 @@
43
44
  "url": "https://github.com/aws/aws-amplify/issues"
44
45
  },
45
46
  "homepage": "https://aws-amplify.github.io/",
47
+ "files": [
48
+ "lib",
49
+ "lib-esm",
50
+ "src"
51
+ ],
46
52
  "dependencies": {
47
- "@aws-amplify/core": "4.6.2-next.20+072846a9f",
53
+ "@aws-amplify/core": "4.6.2-next.36+580cda186",
48
54
  "tslib": "^2.0.0"
49
55
  },
50
56
  "jest": {
@@ -95,5 +101,5 @@
95
101
  "lib-esm"
96
102
  ]
97
103
  },
98
- "gitHead": "072846a9f0bd91f145e58aca2fca91a6478286b0"
104
+ "gitHead": "580cda186f10ead3bb99acb7a4825c435c657d33"
99
105
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -498,8 +498,3 @@ export class BrowserStorageCacheClass extends StorageCache implements ICache {
498
498
  }
499
499
 
500
500
  export const BrowserStorageCache: ICache = new BrowserStorageCacheClass();
501
-
502
- /**
503
- * @deprecated use named import
504
- */
505
- export default BrowserStorageCache;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -356,7 +356,3 @@ export class InMemoryCacheClass extends StorageCache implements ICache {
356
356
  }
357
357
 
358
358
  export const InMemoryCache: ICache = new InMemoryCacheClass();
359
- /**
360
- * @deprecated use named import
361
- */
362
- export default InMemoryCache;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -152,8 +152,3 @@ export class StorageCache {
152
152
  return this.config;
153
153
  }
154
154
  }
155
-
156
- /**
157
- * @deprecated use named import
158
- */
159
- export default StorageCache;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -1,15 +1,21 @@
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
- export * from './CacheUtils';
15
- export { default as CacheList } from './CacheList';
1
+ /*
2
+ * Copyright 2017-2022 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
+ export {
15
+ CacheObject,
16
+ defaultConfig,
17
+ getByteLength,
18
+ getCurrTime,
19
+ isInteger,
20
+ } from './CacheUtils';
21
+ export { default as CacheList } from './CacheList';
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -17,9 +17,8 @@ import { InMemoryCache } from './InMemoryCache';
17
17
  import { CacheConfig } from './types';
18
18
 
19
19
  export { BrowserStorageCache, InMemoryCache, CacheConfig };
20
- /**
21
- * @deprecated use named import
22
- */
23
- export default BrowserStorageCache;
20
+
21
+ // Standard `Cache` export to maintain interoperability with React Native
22
+ export { BrowserStorageCache as Cache };
24
23
 
25
24
  Amplify.register(BrowserStorageCache);
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -14,10 +14,9 @@
14
14
  import { Amplify } from '@aws-amplify/core';
15
15
  import { Cache, AsyncStorageCache } from './AsyncStorageCache';
16
16
 
17
- export { Cache, AsyncStorageCache };
18
- /**
19
- * @deprecated use named import
20
- */
21
- export default Cache;
17
+ export { AsyncStorageCache };
18
+
19
+ // Standard `Cache` export to maintain interoperability with React Native
20
+ export { Cache };
22
21
 
23
22
  Amplify.register(Cache);
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
package/build.js DELETED
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- const build = require('../../scripts/build');
4
-
5
- build(process.argv[2], process.argv[3]);