mirror of
https://github.com/floccusaddon/floccus.git
synced 2026-04-26 06:35:59 +03:00
[PR #125] [MERGED] Refactor Adapters #1472
Labels
No labels
browser-specific
bug
correctness issues
enhancement
feature: Google Drive
feature: Linkwarden
feature: git
feature: nextcloud-bookmarks
feature: tabs
feature: webdav
help wanted
native-app
priority: high
priority: low
priority: medium
pull-request
question
question
stale
upstream
waiting for more information
wontfix
🙁 Not following issue template
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/floccus#1472
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/floccusaddon/floccus/pull/125
Author: @marcelklehr
Created: 6/8/2018
Status: ✅ Merged
Merged: 6/22/2018
Merged by: @marcelklehr
Base:
develop← Head:refactor/adapters📝 Commits (10+)
09315e2Refactor: First draft of new APIseabadd3Revamp sync process to sync real treesffe6eaaHash parentId for folders, too396ada6Finish up SyncProcess2964ce8Fix Mappings syntaxbf77eb5Fix Mappings class441902bAdjust Nextcloud adapter to new architecture494ee20Implement cache022704bMake it pass gulp6c73d85Make it start📊 Changes
21 files changed (+1820 additions, -939 deletions)
View changed files
📝
gulpfile.js(+62 -42)📝
package.json(+1 -0)📝
src/lib/Account.js(+53 -194)📝
src/lib/AccountStorage.js(+40 -53)📝
src/lib/Adapter.js(+47 -35)➖
src/lib/Bookmark.js(+0 -32)📝
src/lib/Controller.js(+1 -0)📝
src/lib/Crypto.js(+6 -0)➕
src/lib/LocalTree.js(+134 -0)➕
src/lib/Mappings.js(+75 -0)➕
src/lib/PathHelper.js(+19 -0)➖
src/lib/PathParse.js(+0 -15)➕
src/lib/Resource.js(+68 -0)➕
src/lib/SyncProcess.js(+514 -0)📝
src/lib/Tree.js(+102 -241)➕
src/lib/adapters/Caching.js(+140 -0)📝
src/lib/adapters/Fake.js(+23 -63)📝
src/lib/adapters/Nextcloud.js(+237 -110)📝
src/lib/adapters/WebDav.js(+1 -2)📝
src/lib/components/Accounts.js(+4 -2)...and 1 more files
📄 Description
@jlbprof I've decided to not implement a change list after all, as I need to keep track of the ids of the created items. For that it'd be better to have return values for each operations, ergo I used methods again for every operation. However, I realize that the caching you did in the WebDAV adapter could potentially be useful to other adapters, so I created an abstract CachingAdapter that already implements all the operations that work with the cache and only leaves the population and persistence of the cache to you.
I've also generalized the adapter operations into a Resource interface which the interface for the local tree inherits from as well, just for consistency. So, the sync step could potentially sync any two implementations of Resource.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.