@aws-amplify/cache 4.0.63-unstable.4 → 4.0.64-unstable.2
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/lib/.tsbuildinfo +3 -0
- package/lib/AsyncStorageCache.d.ts +154 -0
- package/lib/AsyncStorageCache.js +40 -101
- package/lib/AsyncStorageCache.js.map +1 -1
- package/lib/BrowserStorageCache.d.ts +165 -0
- package/lib/BrowserStorageCache.js +6 -31
- package/lib/BrowserStorageCache.js.map +1 -1
- package/lib/InMemoryCache.d.ts +131 -0
- package/lib/InMemoryCache.js +6 -43
- package/lib/InMemoryCache.js.map +1 -1
- package/lib/StorageCache.d.ts +31 -0
- package/lib/StorageCache.js +2 -16
- package/lib/StorageCache.js.map +1 -1
- package/lib/Utils/CacheList.d.ts +89 -0
- package/lib/Utils/CacheList.js +4 -24
- package/lib/Utils/CacheList.js.map +1 -1
- package/lib/Utils/CacheUtils.d.ts +24 -0
- package/lib/Utils/CacheUtils.js +2 -12
- package/lib/Utils/CacheUtils.js.map +1 -1
- package/lib/Utils/index.d.ts +2 -0
- package/lib/Utils/index.js +8 -16
- package/lib/Utils/index.js.map +1 -1
- package/lib/index.d.ts +5 -0
- package/lib/index.js +2 -18
- package/lib/index.js.map +1 -1
- package/lib/reactnative.d.ts +3 -0
- package/lib/reactnative.js +2 -18
- package/lib/reactnative.js.map +1 -1
- package/lib/types/Cache.d.ts +55 -0
- package/lib/types/Cache.js +2 -12
- package/lib/types/Cache.js.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +2 -12
- package/lib/types/index.js.map +1 -1
- package/lib-esm/.tsbuildinfo +3 -0
- package/lib-esm/AsyncStorageCache.d.ts +1 -2
- package/lib-esm/AsyncStorageCache.js +6 -64
- package/lib-esm/AsyncStorageCache.js.map +1 -1
- package/lib-esm/BrowserStorageCache.d.ts +0 -4
- package/lib-esm/BrowserStorageCache.js +5 -30
- package/lib-esm/BrowserStorageCache.js.map +1 -1
- package/lib-esm/InMemoryCache.d.ts +0 -4
- package/lib-esm/InMemoryCache.js +3 -40
- package/lib-esm/InMemoryCache.js.map +1 -1
- package/lib-esm/StorageCache.d.ts +0 -4
- package/lib-esm/StorageCache.js +2 -16
- package/lib-esm/StorageCache.js.map +1 -1
- package/lib-esm/Utils/CacheList.js +3 -23
- package/lib-esm/Utils/CacheList.js.map +1 -1
- package/lib-esm/Utils/CacheUtils.js +2 -12
- package/lib-esm/Utils/CacheUtils.js.map +1 -1
- package/lib-esm/Utils/index.d.ts +1 -1
- package/lib-esm/Utils/index.js +3 -13
- package/lib-esm/Utils/index.js.map +1 -1
- package/lib-esm/index.d.ts +0 -4
- package/lib-esm/index.js +3 -18
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/reactnative.d.ts +2 -5
- package/lib-esm/reactnative.js +5 -19
- package/lib-esm/reactnative.js.map +1 -1
- package/lib-esm/types/Cache.js +2 -12
- package/lib-esm/types/Cache.js.map +1 -1
- package/lib-esm/types/index.js +2 -12
- package/lib-esm/types/index.js.map +1 -1
- package/package.json +15 -12
- package/src/AsyncStorageCache.ts +6 -15
- package/src/BrowserStorageCache.ts +4 -18
- package/src/InMemoryCache.ts +2 -16
- package/src/StorageCache.ts +2 -17
- package/src/Utils/CacheList.ts +2 -12
- package/src/Utils/CacheUtils.ts +2 -12
- package/src/Utils/index.ts +11 -15
- package/src/index.ts +4 -20
- package/src/reactnative.ts +5 -19
- package/src/types/Cache.ts +2 -12
- package/src/types/index.ts +2 -12
- package/build.js +0 -5
- package/dist/aws-amplify-cache.js +0 -1484
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageCache.js","sourceRoot":"","sources":["../src/StorageCache.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"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EACzC,OAAyB;QAEzB,IAAM,GAAG,GAAc;YACtB,GAAG,KAAA;YACH,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,WAAW,EAAE;YACxB,WAAW,EAAE,WAAW,EAAE;YAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,OAAO,KAAK;YAClB,QAAQ,EAAE,CAAC;SACX,CAAC;QAEF,GAAG,CAAC,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QAElD,oBAAoB;QACpB,GAAG,CAAC,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QAClD,OAAO,GAAG,CAAC;IACZ,CAAC;IAED;;;;;OAKG;IACI,gCAAS,GAAhB,UAAiB,MAAoB;QACpC,IAAI,CAAC,MAAM,EAAE;YACZ,OAAO,IAAI,CAAC,MAAM,CAAC;SACnB;QACD,IAAI,MAAM,CAAC,SAAS,EAAE;YACrB,MAAM,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;SACjD;QAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;QACnE,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IACF,mBAAC;AAAD,CAAC,AAjID,IAiIC"}
|
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
var __values = (this && this.__values) || function(o) {
|
|
14
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
15
|
-
if (m) return m.call(o);
|
|
16
|
-
if (o && typeof o.length === "number") return {
|
|
17
|
-
next: function () {
|
|
18
|
-
if (o && i >= o.length) o = void 0;
|
|
19
|
-
return { value: o && o[i++], done: !o };
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
23
|
-
};
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { __values } from "tslib";
|
|
24
4
|
var DoubleLinkedNode = /** @class */ (function () {
|
|
25
5
|
function DoubleLinkedNode(keyVal) {
|
|
26
6
|
this.key = keyVal ? keyVal : '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CacheList.js","sourceRoot":"","sources":["../../src/Utils/CacheList.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"CacheList.js","sourceRoot":"","sources":["../../src/Utils/CacheList.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC;IAKC,0BAAY,MAAe;QAC1B,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACtB,CAAC;IACF,uBAAC;AAAD,CAAC,AAVD,IAUC;AAED;;;;;;;;;;GAUG;AACH;IAMC;;OAEG;IACH;QACC,IAAI,CAAC,IAA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C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACjB,CAAC;IAED;;OAEG;IACI,2BAAO,GAAd;QACC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACI,8BAAU,GAAjB,UAAkB,GAAW;QAC5B,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,IAAI,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACI,8BAAU,GAAjB,UAAkB,GAAW;QAC5B,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,IAAI,CAAC;IACpC,CAAC;IACF,gBAAC;AAAD,CAAC,AAxJD,IAwJC"}
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
import { StorageHelper } from '@aws-amplify/core';
|
|
14
4
|
/**
|
|
15
5
|
* Default cache config
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CacheUtils.js","sourceRoot":"","sources":["../../src/Utils/CacheUtils.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"CacheUtils.js","sourceRoot":"","sources":["../../src/Utils/CacheUtils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD;;GAEG;AACH,MAAM,CAAC,IAAM,aAAa,GAAgB;IACzC,SAAS,EAAE,mBAAmB;IAC9B,eAAe,EAAE,OAAO;IACxB,WAAW,EAAE,MAAM;IACnB,UAAU,EAAE,SAAS;IACrB,eAAe,EAAE,CAAC;IAClB,gBAAgB,EAAE,GAAG;IACrB,wDAAwD;IACxD,8CAA8C;IAC9C,OAAO,EAAE,IAAI,aAAa,EAAE,CAAC,UAAU,EAAE;CACzC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACxC,IAAI,GAAG,GAAW,CAAC,CAAC;IACpB,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC;IAEjB,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;QACxC,IAAM,QAAQ,GAAW,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC3C,IAAI,QAAQ,GAAG,IAAI,IAAI,QAAQ,IAAI,KAAK,EAAE;YACzC,GAAG,IAAI,CAAC,CAAC;SACT;aAAM,IAAI,QAAQ,GAAG,KAAK,IAAI,QAAQ,IAAI,MAAM,EAAE;YAClD,GAAG,IAAI,CAAC,CAAC;SACT;QACD,kBAAkB;QAClB,IAAI,QAAQ,IAAI,MAAM,IAAI,QAAQ,IAAI,MAAM,EAAE;YAC7C,CAAC,IAAI,CAAC,CAAC;SACP;KACD;IAED,OAAO,GAAG,CAAC;AACZ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IAC1B,IAAM,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC;IAC5B,OAAO,QAAQ,CAAC,OAAO,EAAE,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAK;IAC9B,IAAI,MAAM,CAAC,SAAS,EAAE;QACrB,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;KAC/B;IAED,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,UAAU,CAAC,KAAK;IACxB,OAAO,CACN,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,CAC3E,CAAC;AACH,CAAC;AAED;;GAEG;AACH,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAgBA,CAAC;IAfO,iBAAK,GAAZ;QACC,KAAK,GAAG,EAAE,CAAC;IACZ,CAAC;IAEM,mBAAO,GAAd,UAAe,GAAW;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;IAC3B,CAAC;IAEM,mBAAO,GAAd,UAAe,GAAW,EAAE,KAAa;QACxC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACpB,CAAC;IAEM,sBAAU,GAAjB,UAAkB,GAAW;QAC5B,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;IACF,kBAAC;AAAD,CAAC,AAhBD,IAgBC"}
|
package/lib-esm/Utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { CacheObject, defaultConfig, getByteLength, getCurrTime, isInteger, } from './CacheUtils';
|
|
2
2
|
export { default as CacheList } from './CacheList';
|
package/lib-esm/Utils/index.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
export * from './CacheUtils';
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
export { CacheObject, defaultConfig, getByteLength, getCurrTime, isInteger, } from './CacheUtils';
|
|
14
4
|
export { default as CacheList } from './CacheList';
|
|
15
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Utils/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Utils/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EACN,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,SAAS,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
package/lib-esm/index.d.ts
CHANGED
|
@@ -3,7 +3,3 @@ import { InMemoryCache } from './InMemoryCache';
|
|
|
3
3
|
import { CacheConfig } from './types';
|
|
4
4
|
export { BrowserStorageCache, InMemoryCache, CacheConfig };
|
|
5
5
|
export { BrowserStorageCache as Cache };
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated use named import
|
|
8
|
-
*/
|
|
9
|
-
export default BrowserStorageCache;
|
package/lib-esm/index.js
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
import { Amplify } from '@aws-amplify/core';
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
14
3
|
import { BrowserStorageCache } from './BrowserStorageCache';
|
|
15
4
|
import { InMemoryCache } from './InMemoryCache';
|
|
16
5
|
export { BrowserStorageCache, InMemoryCache };
|
|
6
|
+
// Standard `Cache` export to maintain interoperability with React Native
|
|
17
7
|
export { BrowserStorageCache as Cache };
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated use named import
|
|
20
|
-
*/
|
|
21
|
-
export default BrowserStorageCache;
|
|
22
|
-
Amplify.register(BrowserStorageCache);
|
|
23
8
|
//# 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
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,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"}
|
package/lib-esm/reactnative.d.ts
CHANGED
package/lib-esm/reactnative.js
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
import { Amplify } from '@aws-amplify/core';
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
14
3
|
import { Cache, AsyncStorageCache } from './AsyncStorageCache';
|
|
15
|
-
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
export default Cache;
|
|
20
|
-
Amplify.register(Cache);
|
|
4
|
+
export { AsyncStorageCache };
|
|
5
|
+
// Standard `Cache` export to maintain interoperability with React Native
|
|
6
|
+
export { Cache };
|
|
21
7
|
//# sourceMappingURL=reactnative.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactnative.js","sourceRoot":"","sources":["../src/reactnative.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"reactnative.js","sourceRoot":"","sources":["../src/reactnative.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,yEAAyE;AACzE,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/lib-esm/types/Cache.js
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
//# sourceMappingURL=Cache.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../src/types/Cache.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../src/types/Cache.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC"}
|
package/lib-esm/types/index.js
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/cache",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.64-unstable.2+55e13f5a7",
|
|
4
4
|
"description": "Cache category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -9,14 +9,10 @@
|
|
|
9
9
|
"./lib/index": "./lib-esm/reactnative.js"
|
|
10
10
|
},
|
|
11
11
|
"sideEffects": [
|
|
12
|
-
"./
|
|
13
|
-
"./
|
|
14
|
-
"./lib/
|
|
15
|
-
"./lib/
|
|
16
|
-
"./lib-esm/index.js",
|
|
17
|
-
"./lib-esm/reactnative.js",
|
|
18
|
-
"./dist/aws-amplify-cache.js",
|
|
19
|
-
"./dist/aws-amplify-cache.min.js"
|
|
12
|
+
"./lib/BrowserStorageCache.js",
|
|
13
|
+
"./lib/AsyncStorageCache.js",
|
|
14
|
+
"./lib-esm/BrowserStorageCache.js",
|
|
15
|
+
"./lib-esm/AsyncStorageCache.js"
|
|
20
16
|
],
|
|
21
17
|
"publishConfig": {
|
|
22
18
|
"access": "public"
|
|
@@ -31,7 +27,8 @@
|
|
|
31
27
|
"build": "npm run clean && npm run build:esm && npm run build:cjs",
|
|
32
28
|
"clean": "rimraf lib-esm lib dist",
|
|
33
29
|
"format": "echo \"Not implemented\"",
|
|
34
|
-
"lint": "tslint 'src/**/*.ts'"
|
|
30
|
+
"lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
|
|
31
|
+
"ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 87.74"
|
|
35
32
|
},
|
|
36
33
|
"repository": {
|
|
37
34
|
"type": "git",
|
|
@@ -43,8 +40,14 @@
|
|
|
43
40
|
"url": "https://github.com/aws/aws-amplify/issues"
|
|
44
41
|
},
|
|
45
42
|
"homepage": "https://aws-amplify.github.io/",
|
|
43
|
+
"files": [
|
|
44
|
+
"lib",
|
|
45
|
+
"lib-esm",
|
|
46
|
+
"src"
|
|
47
|
+
],
|
|
46
48
|
"dependencies": {
|
|
47
|
-
"@aws-amplify/core": "4.7.
|
|
49
|
+
"@aws-amplify/core": "4.7.13-unstable.2+55e13f5a7",
|
|
50
|
+
"tslib": "^1.8.0"
|
|
48
51
|
},
|
|
49
52
|
"jest": {
|
|
50
53
|
"globals": {
|
|
@@ -94,5 +97,5 @@
|
|
|
94
97
|
"lib-esm"
|
|
95
98
|
]
|
|
96
99
|
},
|
|
97
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "55e13f5a77488793f97b9c7ffe963aaa0c687884"
|
|
98
101
|
}
|
package/src/AsyncStorageCache.ts
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
|
|
4
|
+
import { Amplify, ConsoleLogger as Logger } from '@aws-amplify/core';
|
|
5
|
+
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
14
6
|
import { StorageCache } from './StorageCache';
|
|
15
7
|
import { defaultConfig, getCurrTime } from './Utils';
|
|
16
|
-
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
17
8
|
import { ICache } from './types';
|
|
18
|
-
import { ConsoleLogger as Logger } from '@aws-amplify/core';
|
|
19
9
|
|
|
20
10
|
const logger = new Logger('AsyncStorageCache');
|
|
21
11
|
|
|
@@ -491,4 +481,5 @@ export class AsyncStorageCache extends StorageCache implements ICache {
|
|
|
491
481
|
|
|
492
482
|
const instance: ICache = new AsyncStorageCache();
|
|
493
483
|
export { AsyncStorage, instance as Cache };
|
|
494
|
-
|
|
484
|
+
|
|
485
|
+
Amplify.register(instance);
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
|
|
4
|
+
import { Amplify, ConsoleLogger as Logger } from '@aws-amplify/core';
|
|
14
5
|
import { defaultConfig, getCurrTime } from './Utils';
|
|
15
|
-
|
|
16
6
|
import { StorageCache } from './StorageCache';
|
|
17
7
|
import { ICache, CacheConfig, CacheItem, CacheItemOptions } from './types';
|
|
18
|
-
import { ConsoleLogger as Logger } from '@aws-amplify/core';
|
|
19
8
|
|
|
20
9
|
const logger = new Logger('Cache');
|
|
21
10
|
|
|
@@ -499,7 +488,4 @@ export class BrowserStorageCacheClass extends StorageCache implements ICache {
|
|
|
499
488
|
|
|
500
489
|
export const BrowserStorageCache: ICache = new BrowserStorageCacheClass();
|
|
501
490
|
|
|
502
|
-
|
|
503
|
-
* @deprecated use named import
|
|
504
|
-
*/
|
|
505
|
-
export default BrowserStorageCache;
|
|
491
|
+
Amplify.register(BrowserStorageCache);
|
package/src/InMemoryCache.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
|
|
14
4
|
import { CacheList, defaultConfig, getCurrTime, CacheObject } from './Utils';
|
|
15
5
|
|
|
@@ -356,7 +346,3 @@ export class InMemoryCacheClass extends StorageCache implements ICache {
|
|
|
356
346
|
}
|
|
357
347
|
|
|
358
348
|
export const InMemoryCache: ICache = new InMemoryCacheClass();
|
|
359
|
-
/**
|
|
360
|
-
* @deprecated use named import
|
|
361
|
-
*/
|
|
362
|
-
export default InMemoryCache;
|
package/src/StorageCache.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
|
|
14
4
|
import { getCurrTime, getByteLength, defaultConfig, isInteger } from './Utils';
|
|
15
5
|
|
|
@@ -152,8 +142,3 @@ export class StorageCache {
|
|
|
152
142
|
return this.config;
|
|
153
143
|
}
|
|
154
144
|
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* @deprecated use named import
|
|
158
|
-
*/
|
|
159
|
-
export default StorageCache;
|
package/src/Utils/CacheList.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
|
|
14
4
|
class DoubleLinkedNode {
|
|
15
5
|
key: string;
|
package/src/Utils/CacheUtils.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
|
|
14
4
|
import { CacheConfig, CacheItem, CacheItemOptions } from '../types';
|
|
15
5
|
import { StorageHelper } from '@aws-amplify/core';
|
package/src/Utils/index.ts
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
export * from './CacheUtils';
|
|
15
|
-
export { default as CacheList } from './CacheList';
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
export {
|
|
5
|
+
CacheObject,
|
|
6
|
+
defaultConfig,
|
|
7
|
+
getByteLength,
|
|
8
|
+
getCurrTime,
|
|
9
|
+
isInteger,
|
|
10
|
+
} from './CacheUtils';
|
|
11
|
+
export { default as CacheList } from './CacheList';
|
package/src/index.ts
CHANGED
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
|
|
14
|
-
import { Amplify } from '@aws-amplify/core';
|
|
15
4
|
import { BrowserStorageCache } from './BrowserStorageCache';
|
|
16
5
|
import { InMemoryCache } from './InMemoryCache';
|
|
17
6
|
import { CacheConfig } from './types';
|
|
18
7
|
|
|
19
8
|
export { BrowserStorageCache, InMemoryCache, CacheConfig };
|
|
20
|
-
export { BrowserStorageCache as Cache };
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated use named import
|
|
24
|
-
*/
|
|
25
|
-
export default BrowserStorageCache;
|
|
26
9
|
|
|
27
|
-
|
|
10
|
+
// Standard `Cache` export to maintain interoperability with React Native
|
|
11
|
+
export { BrowserStorageCache as Cache };
|
package/src/reactnative.ts
CHANGED
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
|
|
14
|
-
import { Amplify } from '@aws-amplify/core';
|
|
15
4
|
import { Cache, AsyncStorageCache } from './AsyncStorageCache';
|
|
16
5
|
|
|
17
|
-
export {
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated use named import
|
|
20
|
-
*/
|
|
21
|
-
export default Cache;
|
|
6
|
+
export { AsyncStorageCache };
|
|
22
7
|
|
|
23
|
-
|
|
8
|
+
// Standard `Cache` export to maintain interoperability with React Native
|
|
9
|
+
export { Cache };
|
package/src/types/Cache.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
|
|
14
4
|
/**
|
|
15
5
|
* Cache Interface
|
package/src/types/index.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
*/
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
13
3
|
|
|
14
4
|
export * from './Cache';
|