@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.
- package/CHANGELOG.md +32 -0
- package/lib/.tsbuildinfo +3 -0
- package/lib/AsyncStorageCache.js +1 -1
- package/lib/BrowserStorageCache.d.ts +0 -4
- package/lib/BrowserStorageCache.js +1 -5
- package/lib/BrowserStorageCache.js.map +1 -1
- package/lib/InMemoryCache.d.ts +0 -4
- package/lib/InMemoryCache.js +1 -5
- package/lib/InMemoryCache.js.map +1 -1
- package/lib/StorageCache.d.ts +0 -4
- package/lib/StorageCache.js +1 -5
- package/lib/StorageCache.js.map +1 -1
- package/lib/Utils/CacheList.js +1 -1
- package/lib/Utils/CacheUtils.js +1 -1
- package/lib/Utils/index.d.ts +1 -1
- package/lib/Utils/index.js +7 -3
- package/lib/Utils/index.js.map +1 -1
- package/lib/index.d.ts +1 -4
- package/lib/index.js +2 -5
- package/lib/index.js.map +1 -1
- package/lib/reactnative.d.ts +2 -5
- package/lib/reactnative.js +1 -5
- package/lib/reactnative.js.map +1 -1
- package/lib/types/Cache.js +1 -1
- package/lib/types/index.js +1 -1
- package/lib-esm/.tsbuildinfo +3 -0
- package/lib-esm/AsyncStorageCache.js +1 -1
- package/lib-esm/BrowserStorageCache.d.ts +0 -4
- package/lib-esm/BrowserStorageCache.js +1 -5
- package/lib-esm/BrowserStorageCache.js.map +1 -1
- package/lib-esm/InMemoryCache.d.ts +0 -4
- package/lib-esm/InMemoryCache.js +1 -5
- package/lib-esm/InMemoryCache.js.map +1 -1
- package/lib-esm/StorageCache.d.ts +0 -4
- package/lib-esm/StorageCache.js +1 -5
- package/lib-esm/StorageCache.js.map +1 -1
- package/lib-esm/Utils/CacheList.js +1 -1
- package/lib-esm/Utils/CacheUtils.js +1 -1
- package/lib-esm/Utils/index.d.ts +1 -1
- package/lib-esm/Utils/index.js +2 -2
- package/lib-esm/Utils/index.js.map +1 -1
- package/lib-esm/index.d.ts +1 -4
- package/lib-esm/index.js +3 -5
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/reactnative.d.ts +2 -5
- package/lib-esm/reactnative.js +4 -6
- package/lib-esm/reactnative.js.map +1 -1
- package/lib-esm/types/Cache.js +1 -1
- package/lib-esm/types/index.js +1 -1
- package/package.json +10 -4
- package/src/AsyncStorageCache.ts +1 -1
- package/src/BrowserStorageCache.ts +1 -6
- package/src/InMemoryCache.ts +1 -5
- package/src/StorageCache.ts +1 -6
- package/src/Utils/CacheList.ts +1 -1
- package/src/Utils/CacheUtils.ts +1 -1
- package/src/Utils/index.ts +21 -15
- package/src/index.ts +4 -5
- package/src/reactnative.ts +5 -6
- package/src/types/Cache.ts +1 -1
- package/src/types/index.ts +1 -1
- package/build.js +0 -5
- package/dist/aws-amplify-cache.js +0 -1699
- package/dist/aws-amplify-cache.js.map +0 -1
- package/dist/aws-amplify-cache.min.js +0 -2
- package/dist/aws-amplify-cache.min.js.map +0 -1
- package/index.js +0 -7
- package/webpack.config.dev.js +0 -6
package/lib-esm/index.d.ts
CHANGED
|
@@ -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-
|
|
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
|
-
|
|
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
|
package/lib-esm/index.js.map
CHANGED
|
@@ -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;
|
|
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"}
|
package/lib-esm/reactnative.d.ts
CHANGED
package/lib-esm/reactnative.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
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 {
|
|
16
|
-
|
|
17
|
-
|
|
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,
|
|
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"}
|
package/lib-esm/types/Cache.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
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/lib-esm/types/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
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.
|
|
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.
|
|
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": "
|
|
104
|
+
"gitHead": "580cda186f10ead3bb99acb7a4825c435c657d33"
|
|
99
105
|
}
|
package/src/AsyncStorageCache.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
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-
|
|
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;
|
package/src/InMemoryCache.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
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;
|
package/src/StorageCache.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
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;
|
package/src/Utils/CacheList.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
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/src/Utils/CacheUtils.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
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/src/Utils/index.ts
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2017-
|
|
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
|
-
|
|
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-
|
|
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
|
-
|
|
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);
|
package/src/reactnative.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
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 {
|
|
18
|
-
|
|
19
|
-
|
|
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);
|
package/src/types/Cache.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
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/src/types/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
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
|