Update etebase and adjust usage accordingly.

master
Tom Hacohen 4 years ago
parent c7e07150dd
commit b4f4de7798

@ -9,7 +9,7 @@
"@material-ui/lab": "^4.0.0-alpha.56",
"@material-ui/pickers": "^3.2.10",
"@material-ui/styles": "^4.10.0",
"etebase": "^0.11.0",
"etebase": "^0.12.0",
"fuse.js": "^5.0.9-beta",
"ical.js": "^1.4.0",
"immutable": "^4.0.0-rc.12",

@ -60,7 +60,7 @@ export default function Debug() {
}
const colMgr = getCollectionManager(etebase);
const col = await colMgr.cacheLoad(cachedCollection);
const col = colMgr.cacheLoad(cachedCollection);
const itemMgr = colMgr.getItemManager(col);
const wantedEntries = {};
@ -70,7 +70,7 @@ export default function Debug() {
const retEntries = [];
console.log(wantAll, colItems.size);
for (const cached of colItems.values()) {
const item = await itemMgr.cacheLoad(cached);
const item = itemMgr.cacheLoad(cached);
const meta = await item.getMeta();
const content = await item.getContent(Etebase.OutputFormat.String);
if (wantAll || wantedEntries[item.uid]) {

@ -11,7 +11,7 @@ export const getCollections = memoize(async function (cachedCollections: CacheCo
const colMgr = getCollectionManager(etebase);
const ret: Etebase.Collection[] = [];
for (const cached of cachedCollections.values()) {
ret.push(await colMgr.cacheLoad(cached));
ret.push(colMgr.cacheLoad(cached));
}
return ret;
}, { length: 1 });
@ -31,7 +31,7 @@ export const getCollectionsByType = memoize(async function (cachedCollections: C
export const getItems = memoize(async function (cachedItems: CacheItems, itemMgr: Etebase.ItemManager) {
const ret = new Map<string, Etebase.Item>();
for (const cached of cachedItems.values()) {
const item = await itemMgr.cacheLoad(cached);
const item = itemMgr.cacheLoad(cached);
ret.set(item.uid, item);
}
return ret;

@ -42,7 +42,7 @@ export const login = createAction(
export const setCacheCollection = createAction(
"SET_CACHE_COLLECTION",
async (colMgr: Etebase.CollectionManager, col: Etebase.Collection) => {
return await colMgr.cacheSave(col);
return colMgr.cacheSave(col);
},
(_colMgr: Etebase.CollectionManager, col: Etebase.Collection) => {
return {
@ -69,7 +69,7 @@ export const collectionUpload = createAction(
"COLLECTION_UPLOAD",
async (colMgr: Etebase.CollectionManager, col: Etebase.Collection) => {
await colMgr.upload(col);
return await colMgr.cacheSave(col);
return colMgr.cacheSave(col);
},
(_colMgr: Etebase.CollectionManager, col: Etebase.Collection) => {
return {
@ -82,7 +82,7 @@ export const collectionUpload = createAction(
export const setCacheItem = createAction(
"SET_CACHE_ITEM",
async (_col: Etebase.Collection, itemMgr: Etebase.ItemManager, item: Etebase.Item) => {
return await itemMgr.cacheSave(item);
return itemMgr.cacheSave(item);
},
(col: Etebase.Collection, _itemMgr: Etebase.ItemManager, item: Etebase.Item) => {
return {
@ -98,7 +98,7 @@ export const setCacheItemMulti = createAction(
async (_colUid: string, itemMgr: Etebase.ItemManager, items: Etebase.Item[]) => {
const ret = [];
for (const item of items) {
ret.push(await itemMgr.cacheSave(item));
ret.push(itemMgr.cacheSave(item));
}
return ret;
},
@ -116,7 +116,7 @@ export const itemBatch = createAction(
await itemMgr.batch(items, deps);
const ret = [];
for (const item of items) {
ret.push(await itemMgr.cacheSave(item));
ret.push(itemMgr.cacheSave(item));
}
return ret;
},

@ -4644,10 +4644,10 @@ etag@~1.8.1:
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
etebase@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/etebase/-/etebase-0.11.0.tgz#082e6785167957723419c8eac59372b70953a921"
integrity sha512-VZwYf/i9yy89TEm2vR2dREukVcfrLmnRPS6xo5WmOTZHqBXxxMfjXtIKbH9B4xpqT5khzHmKQW6y9qFCxmWzgg==
etebase@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/etebase/-/etebase-0.12.0.tgz#91cba73d059f7828c9d1ab7c76fb250fdcbf26a3"
integrity sha512-z/UUdNyPmml5W0MQ+RS9r8tZE727t0UcQsCb9UhReTDDZLvTXh8uMJS6hjL9Tfqgj1iDCZ0jPo7KzAYXxOVVYw==
dependencies:
"@msgpack/msgpack" "^1.12.2"
libsodium-wrappers "0.7.6"

Loading…
Cancel
Save