Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
chore: Bump collab (#5136)
Nathan.foood758e62c1a3a
diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lockindex d2cb2b6141..68a1295768 100644--- a/frontend/appflowy_tauri/src-tauri/Cargo.lock+++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock@@ -162,7 +162,7 @@ checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"[[package]]name = "app-error"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -740,7 +740,7 @@ dependencies = [[[package]]name = "client-api"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["again","anyhow",@@ -785,7 +785,7 @@ dependencies = [[[package]]name = "client-websocket"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["futures-channel","futures-util",@@ -859,7 +859,7 @@ dependencies = [[[package]]name = "collab"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","async-trait",@@ -883,7 +883,7 @@ dependencies = [[[package]]name = "collab-database"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","async-trait",@@ -913,7 +913,7 @@ dependencies = [[[package]]name = "collab-document"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","collab",@@ -932,7 +932,7 @@ dependencies = [[[package]]name = "collab-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","bytes",@@ -947,7 +947,7 @@ dependencies = [[[package]]name = "collab-folder"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","chrono",@@ -985,7 +985,7 @@ dependencies = [[[package]]name = "collab-plugins"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","async-stream",@@ -1024,7 +1024,7 @@ dependencies = [[[package]]name = "collab-rt-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -1049,7 +1049,7 @@ dependencies = [[[package]]name = "collab-rt-protocol"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -1063,7 +1063,7 @@ dependencies = [[[package]]name = "collab-user"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","collab",@@ -1403,7 +1403,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"[[package]]name = "database-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",@@ -2769,7 +2769,7 @@ dependencies = [[[package]]name = "gotrue"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","futures-util",@@ -2786,7 +2786,7 @@ dependencies = [[[package]]name = "gotrue-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",@@ -3218,12 +3218,13 @@ dependencies = [[[package]]name = "infra"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","reqwest","serde","serde_json",+ "tracing",][[package]]@@ -5705,7 +5706,7 @@ dependencies = [[[package]]name = "shared-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.tomlindex 60da1df45d..622339a056 100644--- a/frontend/appflowy_tauri/src-tauri/Cargo.toml+++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml@@ -88,7 +88,7 @@ yrs = { git = "https://github.com/appflowy/y-crdt", rev = "3f25bb510ca5274e7657d# Run the script:# scripts/tool/update_client_api_rev.sh new_rev_id# ⚠️⚠️⚠️️-client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e" }+client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3901356e8ac7c68d1e77128729bf7669b30278ec" }# Please use the following script to update collab.# Working directory: frontend#@@ -98,10 +98,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "dd9# To switch to the local path, run:# scripts/tool/update_collab_source.sh# ⚠️⚠️⚠️️-collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }+collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }diff --git a/frontend/appflowy_web/wasm-libs/Cargo.lock b/frontend/appflowy_web/wasm-libs/Cargo.lockindex a9692c6d37..1bd03bad8c 100644--- a/frontend/appflowy_web/wasm-libs/Cargo.lock+++ b/frontend/appflowy_web/wasm-libs/Cargo.lock@@ -215,7 +215,7 @@ checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"[[package]]name = "app-error"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -541,7 +541,7 @@ dependencies = [[[package]]name = "client-api"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["again","anyhow",@@ -586,7 +586,7 @@ dependencies = [[[package]]name = "client-websocket"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["futures-channel","futures-util",@@ -630,7 +630,7 @@ dependencies = [[[package]]name = "collab"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","async-trait",@@ -654,7 +654,7 @@ dependencies = [[[package]]name = "collab-document"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","collab",@@ -673,7 +673,7 @@ dependencies = [[[package]]name = "collab-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","bytes",@@ -688,7 +688,7 @@ dependencies = [[[package]]name = "collab-folder"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","chrono",@@ -726,7 +726,7 @@ dependencies = [[[package]]name = "collab-plugins"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","async-stream",@@ -764,7 +764,7 @@ dependencies = [[[package]]name = "collab-rt-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -789,7 +789,7 @@ dependencies = [[[package]]name = "collab-rt-protocol"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -803,7 +803,7 @@ dependencies = [[[package]]name = "collab-user"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","collab",@@ -955,7 +955,7 @@ dependencies = ["cssparser-macros","dtoa-short","itoa",- "phf 0.11.2",+ "phf 0.8.0","smallvec",]@@ -1000,7 +1000,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"[[package]]name = "database-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",@@ -1773,7 +1773,7 @@ dependencies = [[[package]]name = "gotrue"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","futures-util",@@ -1790,7 +1790,7 @@ dependencies = [[[package]]name = "gotrue-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",@@ -2091,12 +2091,13 @@ dependencies = [[[package]]name = "infra"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","reqwest","serde","serde_json",+ "tracing",][[package]]@@ -2774,7 +2775,7 @@ version = "0.8.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"dependencies = [- "phf_macros 0.8.0",+ "phf_macros","phf_shared 0.8.0","proc-macro-hack",]@@ -2794,7 +2795,6 @@ version = "0.11.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"dependencies = [- "phf_macros 0.11.2","phf_shared 0.11.2",]@@ -2862,19 +2862,6 @@ dependencies = ["syn 1.0.109",]-[[package]]-name = "phf_macros"-version = "0.11.2"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"-dependencies = [- "phf_generator 0.11.2",- "phf_shared 0.11.2",- "proc-macro2",- "quote",- "syn 2.0.48",-]-[[package]]name = "phf_shared"version = "0.8.0"@@ -3730,7 +3717,7 @@ dependencies = [[[package]]name = "shared-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",@@ -4992,4 +4979,4 @@ dependencies = [[[patch.unused]]name = "collab-database"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"diff --git a/frontend/appflowy_web/wasm-libs/Cargo.toml b/frontend/appflowy_web/wasm-libs/Cargo.tomlindex 0ca030489d..23cf2e9ec0 100644--- a/frontend/appflowy_web/wasm-libs/Cargo.toml+++ b/frontend/appflowy_web/wasm-libs/Cargo.toml@@ -55,7 +55,7 @@ codegen-units = 1# Run the script:# scripts/tool/update_client_api_rev.sh new_rev_id# ⚠️⚠️⚠️️-client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e" }+client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3901356e8ac7c68d1e77128729bf7669b30278ec" }# Please use the following script to update collab.# Working directory: frontend#@@ -65,10 +65,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "dd9# To switch to the local path, run:# scripts/tool/update_collab_source.sh# ⚠️⚠️⚠️️-collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }+collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }diff --git a/frontend/appflowy_web/wasm-libs/af-user/src/manager.rs b/frontend/appflowy_web/wasm-libs/af-user/src/manager.rsindex a4590ad34e..3832218ae8 100644--- a/frontend/appflowy_web/wasm-libs/af-user/src/manager.rs+++ b/frontend/appflowy_web/wasm-libs/af-user/src/manager.rs@@ -2,7 +2,7 @@ use crate::authenticate_user::AuthenticateUser;use crate::define::{user_profile_key, user_workspace_key, AF_USER_SESSION_KEY};use af_persistence::store::{AppFlowyWASMStore, IndexddbStore};use anyhow::Context;-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use collab_entity::CollabType;use collab_integrate::collab_builder::{AppFlowyCollabBuilder, CollabBuilderConfig};use collab_integrate::{CollabKVDB, MutexCollab};@@ -194,7 +194,7 @@ impl UserManager {uid,object_id,CollabType::UserAwareness,- DocStateSource::FromDocState(raw_data),+ DataSource::DocStateV1(raw_data),collab_db,CollabBuilderConfig::default().sync_enable(true),)diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.lock b/frontend/appflowy_web_app/src-tauri/Cargo.lockindex 239a1f7630..035d5e4c99 100644--- a/frontend/appflowy_web_app/src-tauri/Cargo.lock+++ b/frontend/appflowy_web_app/src-tauri/Cargo.lock@@ -123,6 +123,12 @@ dependencies = ["alloc-no-stdlib",]+[[package]]+name = "allocator-api2"+version = "0.2.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"+[[package]]name = "android-tzdata"version = "0.1.1"@@ -147,7 +153,7 @@ checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247"[[package]]name = "app-error"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -208,6 +214,12 @@ dependencies = ["x11rb",]+[[package]]+name = "arc-swap"+version = "1.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"+[[package]]name = "arrayvec"version = "0.7.4"@@ -373,6 +385,15 @@ version = "2.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"+[[package]]+name = "bitpacking"+version = "0.8.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a8c7d2ac73c167c06af4a5f37e6e59d84148d57ccbe4480b76f0273eefea82d7"+dependencies = [+ "crunchy",+]+[[package]]name = "bitvec"version = "1.0.1"@@ -569,6 +590,12 @@ dependencies = ["libc",]+[[package]]+name = "census"+version = "0.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4f4c707c6a209cbe82d10abd08e1ea8995e9ea937d2550646e02798948992be0"+[[package]]name = "cesu8"version = "1.1.0"@@ -687,7 +714,7 @@ dependencies = [[[package]]name = "client-api"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["again","anyhow",@@ -732,7 +759,7 @@ dependencies = [[[package]]name = "client-websocket"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["futures-channel","futures-util",@@ -815,7 +842,7 @@ dependencies = [[[package]]name = "collab"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","async-trait",@@ -839,7 +866,7 @@ dependencies = [[[package]]name = "collab-database"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","async-trait",@@ -869,7 +896,7 @@ dependencies = [[[package]]name = "collab-document"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","collab",@@ -888,7 +915,7 @@ dependencies = [[[package]]name = "collab-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","bytes",@@ -903,7 +930,7 @@ dependencies = [[[package]]name = "collab-folder"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","chrono",@@ -941,7 +968,7 @@ dependencies = [[[package]]name = "collab-plugins"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","async-stream",@@ -980,7 +1007,7 @@ dependencies = [[[package]]name = "collab-rt-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -1005,7 +1032,7 @@ dependencies = [[[package]]name = "collab-rt-protocol"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -1019,7 +1046,7 @@ dependencies = [[[package]]name = "collab-user"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","collab",@@ -1209,6 +1236,12 @@ version = "0.8.19"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"+[[package]]+name = "crunchy"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"+[[package]]name = "crypto-common"version = "0.1.6"@@ -1320,7 +1353,7 @@ dependencies = ["ident_case","proc-macro2","quote",- "strsim",+ "strsim 0.10.0","syn 2.0.55",]@@ -1357,7 +1390,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"[[package]]name = "database-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",@@ -1723,6 +1756,12 @@ dependencies = ["syn 2.0.55",]+[[package]]+name = "fastdivide"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "59668941c55e5c186b8b58c391629af56774ec768f73c08bbcd56f09348eb00b"+[[package]]name = "fastrand"version = "2.0.2"@@ -1793,7 +1832,7 @@ dependencies = ["console","fancy-regex 0.10.0","flowy-ast",- "itertools",+ "itertools 0.10.5","lazy_static","log","phf 0.8.0",@@ -1845,6 +1884,7 @@ dependencies = ["flowy-error","flowy-folder","flowy-folder-pub",+ "flowy-search","flowy-server","flowy-server-pub","flowy-sqlite",@@ -2040,6 +2080,7 @@ dependencies = ["serde","serde_json","serde_repr",+ "tantivy","thiserror","tokio","url",@@ -2054,6 +2095,7 @@ dependencies = ["bytes","chrono","collab",+ "collab-document","collab-entity","collab-folder","collab-integrate",@@ -2063,6 +2105,7 @@ dependencies = ["flowy-error","flowy-folder-pub","flowy-notification",+ "flowy-search-pub","lazy_static","lib-dispatch","lib-infra",@@ -2105,6 +2148,47 @@ dependencies = ["tracing",]+[[package]]+name = "flowy-search"+version = "0.1.0"+dependencies = [+ "async-stream",+ "bytes",+ "collab",+ "collab-folder",+ "diesel",+ "diesel_derives",+ "diesel_migrations",+ "flowy-codegen",+ "flowy-derive",+ "flowy-error",+ "flowy-notification",+ "flowy-search-pub",+ "flowy-sqlite",+ "flowy-user",+ "futures",+ "lib-dispatch",+ "protobuf",+ "serde",+ "serde_json",+ "strsim 0.11.1",+ "strum_macros 0.26.2",+ "tantivy",+ "tempfile",+ "tokio",+ "tracing",+ "validator",+]++[[package]]+name = "flowy-search-pub"+version = "0.1.0"+dependencies = [+ "collab",+ "collab-folder",+ "flowy-error",+]+[[package]]name = "flowy-server"version = "0.1.0"@@ -2323,6 +2407,16 @@ dependencies = ["percent-encoding",]+[[package]]+name = "fs4"+version = "0.6.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47"+dependencies = [+ "rustix",+ "windows-sys 0.48.0",+]+[[package]]name = "funty"version = "2.0.0"@@ -2749,7 +2843,7 @@ dependencies = [[[package]]name = "gotrue"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","futures-util",@@ -2766,7 +2860,7 @@ dependencies = [[[package]]name = "gotrue-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",@@ -2865,6 +2959,10 @@ name = "hashbrown"version = "0.14.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"+dependencies = [+ "ahash 0.8.11",+ "allocator-api2",+][[package]]name = "heck"@@ -2931,6 +3029,12 @@ dependencies = ["syn 1.0.109",]+[[package]]+name = "htmlescape"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e9025058dae765dee5070ec375f591e2ba14638c63feff74f13805a72e523163"+[[package]]name = "http"version = "0.2.12"@@ -3193,12 +3297,13 @@ dependencies = [[[package]]name = "infra"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","reqwest","serde","serde_json",+ "tracing",][[package]]@@ -3217,6 +3322,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"dependencies = ["cfg-if",+ "js-sys",+ "wasm-bindgen",+ "web-sys",][[package]]@@ -3258,6 +3366,15 @@ dependencies = ["either",]+[[package]]+name = "itertools"+version = "0.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"+dependencies = [+ "either",+]+[[package]]name = "itoa"version = "0.4.8"@@ -3388,6 +3505,12 @@ version = "1.3.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"+[[package]]+name = "levenshtein_automata"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0c2cdeb66e45e9f36bfad5bbdb4d2384e70936afbee843c6f6543f0c551ebb25"+[[package]]name = "lib-dispatch"version = "0.1.0"@@ -3558,6 +3681,7 @@ checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5"dependencies = ["cfg-if","generator",+ "pin-utils","scoped-tls","serde","serde_json",@@ -3565,6 +3689,21 @@ dependencies = ["tracing-subscriber",]+[[package]]+name = "lru"+version = "0.11.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21"+dependencies = [+ "hashbrown 0.14.3",+]++[[package]]+name = "lz4_flex"+version = "0.11.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5"+[[package]]name = "mac"version = "0.1.1"@@ -3662,12 +3801,31 @@ version = "0.7.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771"+[[package]]+name = "measure_time"+version = "0.8.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "56220900f1a0923789ecd6bf25fbae8af3b2f1ff3e9e297fc9b6b8674dd4d852"+dependencies = [+ "instant",+ "log",+]+[[package]]name = "memchr"version = "2.7.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"+[[package]]+name = "memmap2"+version = "0.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6"+dependencies = [+ "libc",+]+[[package]]name = "memoffset"version = "0.9.0"@@ -3747,6 +3905,12 @@ version = "0.8.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"+[[package]]+name = "murmurhash32"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2195bf6aa996a481483b29d62a7663eed3fe39600c460e323f8ff41e90bdd89b"+[[package]]name = "nanoid"version = "0.4.0"@@ -3997,6 +4161,15 @@ version = "1.19.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"+[[package]]+name = "oneshot"+version = "0.1.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6f6640c6bda7731b1fdbab747981a0f896dd1fedaf9f4a53fa237a04a84431f4"+dependencies = [+ "loom",+]+[[package]]name = "opaque-debug"version = "0.3.1"@@ -4089,6 +4262,15 @@ version = "0.1.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"+[[package]]+name = "ownedbytes"+version = "0.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6e8a72b918ae8198abb3a18c190288123e1d442b6b9a7d709305fd194688b4b7"+dependencies = [+ "stable_deref_trait",+]+[[package]]name = "pango"version = "0.15.10"@@ -4620,7 +4802,7 @@ checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2"dependencies = ["bytes","heck 0.4.1",- "itertools",+ "itertools 0.11.0","log","multimap","once_cell",@@ -4641,7 +4823,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e"dependencies = ["anyhow",- "itertools",+ "itertools 0.11.0","proc-macro2","quote","syn 2.0.55",@@ -5151,6 +5333,16 @@ dependencies = ["librocksdb-sys",]+[[package]]+name = "rust-stemmers"+version = "1.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54"+dependencies = [+ "serde",+ "serde_derive",+]+[[package]]name = "rust_decimal"version = "1.34.3"@@ -5609,7 +5801,7 @@ dependencies = [[[package]]name = "shared-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",@@ -5682,6 +5874,15 @@ version = "0.3.11"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"+[[package]]+name = "sketches-ddsketch"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c"+dependencies = [+ "serde",+]+[[package]]name = "slab"version = "0.4.9"@@ -5813,6 +6014,12 @@ version = "0.10.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"+[[package]]+name = "strsim"+version = "0.11.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"+[[package]]name = "strum"version = "0.25.0"@@ -5844,6 +6051,19 @@ dependencies = ["syn 2.0.55",]+[[package]]+name = "strum_macros"+version = "0.26.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946"+dependencies = [+ "heck 0.4.1",+ "proc-macro2",+ "quote",+ "rustversion",+ "syn 2.0.55",+]+[[package]]name = "subtle"version = "2.5.0"@@ -5952,6 +6172,146 @@ dependencies = ["version-compare 0.2.0",]+[[package]]+name = "tantivy"+version = "0.21.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d6083cd777fa94271b8ce0fe4533772cb8110c3044bab048d20f70108329a1f2"+dependencies = [+ "aho-corasick",+ "arc-swap",+ "async-trait",+ "base64 0.21.7",+ "bitpacking",+ "byteorder",+ "census",+ "crc32fast",+ "crossbeam-channel",+ "downcast-rs",+ "fastdivide",+ "fs4",+ "htmlescape",+ "itertools 0.11.0",+ "levenshtein_automata",+ "log",+ "lru",+ "lz4_flex",+ "measure_time",+ "memmap2",+ "murmurhash32",+ "num_cpus",+ "once_cell",+ "oneshot",+ "rayon",+ "regex",+ "rust-stemmers",+ "rustc-hash",+ "serde",+ "serde_json",+ "sketches-ddsketch",+ "smallvec",+ "tantivy-bitpacker",+ "tantivy-columnar",+ "tantivy-common",+ "tantivy-fst",+ "tantivy-query-grammar",+ "tantivy-stacker",+ "tantivy-tokenizer-api",+ "tempfile",+ "thiserror",+ "time",+ "uuid",+ "winapi",+]++[[package]]+name = "tantivy-bitpacker"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cecb164321482301f514dd582264fa67f70da2d7eb01872ccd71e35e0d96655a"+dependencies = [+ "bitpacking",+]++[[package]]+name = "tantivy-columnar"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8d85f8019af9a78b3118c11298b36ffd21c2314bd76bbcd9d12e00124cbb7e70"+dependencies = [+ "fastdivide",+ "fnv",+ "itertools 0.11.0",+ "serde",+ "tantivy-bitpacker",+ "tantivy-common",+ "tantivy-sstable",+ "tantivy-stacker",+]++[[package]]+name = "tantivy-common"+version = "0.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "af4a3a975e604a2aba6b1106a04505e1e7a025e6def477fab6e410b4126471e1"+dependencies = [+ "async-trait",+ "byteorder",+ "ownedbytes",+ "serde",+ "time",+]++[[package]]+name = "tantivy-fst"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc3c506b1a8443a3a65352df6382a1fb6a7afe1a02e871cee0d25e2c3d5f3944"+dependencies = [+ "byteorder",+ "regex-syntax 0.6.29",+ "utf8-ranges",+]++[[package]]+name = "tantivy-query-grammar"+version = "0.21.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1d39c5a03100ac10c96e0c8b07538e2ab8b17da56434ab348309b31f23fada77"+dependencies = [+ "nom",+]++[[package]]+name = "tantivy-sstable"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc0c1bb43e5e8b8e05eb8009610344dbf285f06066c844032fbb3e546b3c71df"+dependencies = [+ "tantivy-common",+ "tantivy-fst",+ "zstd 0.12.4",+]++[[package]]+name = "tantivy-stacker"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b2c078595413f13f218cf6f97b23dcfd48936838f1d3d13a1016e05acd64ed6c"+dependencies = [+ "murmurhash32",+ "tantivy-common",+]++[[package]]+name = "tantivy-tokenizer-api"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "347b6fb212b26d3505d224f438e3c4b827ab8bd847fe9953ad5ac6b8f9443b66"+dependencies = [+ "serde",+]+[[package]]name = "tao"version = "0.16.7"@@ -6429,6 +6789,7 @@ dependencies = ["signal-hook-registry","socket2","tokio-macros",+ "tracing","windows-sys 0.48.0",]@@ -6944,6 +7305,12 @@ version = "0.7.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"+[[package]]+name = "utf8-ranges"+version = "1.0.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7fcfc827f90e53a02eaef5e535ee14266c1d569214c6aa70133a624d8a3164ba"+[[package]]name = "uuid"version = "1.6.1"@@ -7946,7 +8313,7 @@ dependencies = ["pbkdf2 0.11.0","sha1","time",- "zstd",+ "zstd 0.11.2+zstd.1.5.2",][[package]]@@ -7955,7 +8322,16 @@ version = "0.11.2+zstd.1.5.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"dependencies = [- "zstd-safe",+ "zstd-safe 5.0.2+zstd.1.5.2",+]++[[package]]+name = "zstd"+version = "0.12.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c"+dependencies = [+ "zstd-safe 6.0.6",][[package]]@@ -7968,6 +8344,16 @@ dependencies = ["zstd-sys",]+[[package]]+name = "zstd-safe"+version = "6.0.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581"+dependencies = [+ "libc",+ "zstd-sys",+]+[[package]]name = "zstd-sys"version = "2.0.9+zstd.1.5.5"diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.toml b/frontend/appflowy_web_app/src-tauri/Cargo.tomlindex 22aedc94e3..8b0d5cf5e3 100644--- a/frontend/appflowy_web_app/src-tauri/Cargo.toml+++ b/frontend/appflowy_web_app/src-tauri/Cargo.toml@@ -87,7 +87,7 @@ yrs = { git = "https://github.com/appflowy/y-crdt", rev = "3f25bb510ca5274e7657d# Run the script:# scripts/tool/update_client_api_rev.sh new_rev_id# ⚠️⚠️⚠️️-client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e" }+client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3901356e8ac7c68d1e77128729bf7669b30278ec" }# Please use the following script to update collab.# Working directory: frontend#@@ -97,10 +97,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "dd9# To switch to the local path, run:# scripts/tool/update_collab_source.sh# ⚠️⚠️⚠️️-collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }+collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lockindex 026a119a16..bd2691ba22 100644--- a/frontend/rust-lib/Cargo.lock+++ b/frontend/rust-lib/Cargo.lock@@ -163,7 +163,7 @@ checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"[[package]]name = "app-error"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -696,7 +696,7 @@ dependencies = [[[package]]name = "client-api"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["again","anyhow",@@ -741,7 +741,7 @@ dependencies = [[[package]]name = "client-websocket"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["futures-channel","futures-util",@@ -784,7 +784,7 @@ dependencies = [[[package]]name = "collab"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","async-trait",@@ -808,7 +808,7 @@ dependencies = [[[package]]name = "collab-database"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","async-trait",@@ -838,7 +838,7 @@ dependencies = [[[package]]name = "collab-document"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","collab",@@ -857,7 +857,7 @@ dependencies = [[[package]]name = "collab-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","bytes",@@ -872,7 +872,7 @@ dependencies = [[[package]]name = "collab-folder"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","chrono",@@ -910,7 +910,7 @@ dependencies = [[[package]]name = "collab-plugins"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","async-stream",@@ -949,7 +949,7 @@ dependencies = [[[package]]name = "collab-rt-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -974,7 +974,7 @@ dependencies = [[[package]]name = "collab-rt-protocol"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","bincode",@@ -988,7 +988,7 @@ dependencies = [[[package]]name = "collab-user"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3f7bc378af0ee5ca4e25e4746acaa66fab6df79f#3f7bc378af0ee5ca4e25e4746acaa66fab6df79f"dependencies = ["anyhow","collab",@@ -1191,7 +1191,7 @@ dependencies = ["cssparser-macros","dtoa-short","itoa",- "phf 0.8.0",+ "phf 0.11.2","smallvec",]@@ -1325,7 +1325,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"[[package]]name = "database-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",@@ -2594,7 +2594,7 @@ dependencies = [[[package]]name = "gotrue"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","futures-util",@@ -2611,7 +2611,7 @@ dependencies = [[[package]]name = "gotrue-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",@@ -2982,12 +2982,13 @@ dependencies = [[[package]]name = "infra"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","reqwest","serde","serde_json",+ "tracing",][[package]]@@ -3856,7 +3857,7 @@ version = "0.8.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"dependencies = [- "phf_macros",+ "phf_macros 0.8.0","phf_shared 0.8.0","proc-macro-hack",]@@ -3876,6 +3877,7 @@ version = "0.11.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"dependencies = [+ "phf_macros 0.11.2","phf_shared 0.11.2",]@@ -3943,6 +3945,19 @@ dependencies = ["syn 1.0.109",]+[[package]]+name = "phf_macros"+version = "0.11.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"+dependencies = [+ "phf_generator 0.11.2",+ "phf_shared 0.11.2",+ "proc-macro2",+ "quote",+ "syn 2.0.47",+]+[[package]]name = "phf_shared"version = "0.8.0"@@ -4146,7 +4161,7 @@ checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2"dependencies = ["bytes","heck 0.4.1",- "itertools 0.11.0",+ "itertools 0.10.5","log","multimap","once_cell",@@ -4167,7 +4182,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e"dependencies = ["anyhow",- "itertools 0.11.0",+ "itertools 0.10.5","proc-macro2","quote","syn 2.0.47",@@ -5093,7 +5108,7 @@ dependencies = [[[package]]name = "shared-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e#dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3901356e8ac7c68d1e77128729bf7669b30278ec#3901356e8ac7c68d1e77128729bf7669b30278ec"dependencies = ["anyhow","app-error",diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.tomlindex 98caf81c88..05e52004f1 100644--- a/frontend/rust-lib/Cargo.toml+++ b/frontend/rust-lib/Cargo.toml@@ -115,7 +115,7 @@ rocksdb = { git = "https://github.com/LucasXu0/rust-rocksdb", rev = "21cf4a23ec1# Run the script.add_workspace_members:# scripts/tool/update_client_api_rev.sh new_rev_id# ⚠️⚠️⚠️️-client-api = { git = " https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "dd9cc8d4c78c6d9bfeb9bd7d413222f643c7969e" }+client-api = { git = " https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3901356e8ac7c68d1e77128729bf7669b30278ec" }# Please use the following script to update collab.# Working directory: frontend#@@ -125,10 +125,10 @@ client-api = { git = " https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "dd# To switch to the local path, run:# scripts/tool/update_collab_source.sh# ⚠️⚠️⚠️️-collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }-collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" }+collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }+collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3f7bc378af0ee5ca4e25e4746acaa66fab6df79f" }diff --git a/frontend/rust-lib/collab-integrate/src/collab_builder.rs b/frontend/rust-lib/collab-integrate/src/collab_builder.rsindex 9d36fd3a10..d46ff1640a 100644--- a/frontend/rust-lib/collab-integrate/src/collab_builder.rs+++ b/frontend/rust-lib/collab-integrate/src/collab_builder.rs@@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};use crate::CollabKVDB;use anyhow::Error;-use collab::core::collab::{DocStateSource, MutexCollab};+use collab::core::collab::{DataSource, MutexCollab};use collab::preclude::CollabBuilder;use collab_entity::{CollabObject, CollabType};use collab_plugins::connect_state::{CollabConnectReachability, CollabConnectState};@@ -167,7 +167,7 @@ impl AppFlowyCollabBuilder {uid: i64,object_id: &str,object_type: CollabType,- collab_doc_state: DocStateSource,+ collab_doc_state: DataSource,collab_db: Weak<CollabKVDB>,build_config: CollabBuilderConfig,) -> Result<Arc<MutexCollab>, Error> {@@ -208,7 +208,7 @@ impl AppFlowyCollabBuilder {object_id: &str,object_type: CollabType,collab_db: Weak<CollabKVDB>,- collab_doc_state: DocStateSource,+ collab_doc_state: DataSource,#[allow(unused_variables)] persistence_config: CollabPersistenceConfig,build_config: CollabBuilderConfig,) -> Result<Arc<MutexCollab>, Error> {diff --git a/frontend/rust-lib/event-integration/src/document_event.rs b/frontend/rust-lib/event-integration/src/document_event.rsindex 95103159fd..6f99998e50 100644--- a/frontend/rust-lib/event-integration/src/document_event.rs+++ b/frontend/rust-lib/event-integration/src/document_event.rs@@ -3,7 +3,7 @@ use std::sync::Arc;use collab::core::collab::MutexCollab;use collab::core::origin::CollabOrigin;use collab::preclude::updates::decoder::Decode;-use collab::preclude::Update;+use collab::preclude::{Collab, Update};use collab_document::blocks::DocumentData;use collab_document::document::Document;use collab_entity::CollabType;@@ -104,7 +104,12 @@ impl EventIntegrationTest {}pub fn assert_document_data_equal(doc_state: &[u8], doc_id: &str, expected: DocumentData) {- let collab = MutexCollab::new(CollabOrigin::Server, doc_id, vec![], false);+ let collab = MutexCollab::new(Collab::new_with_origin(+ CollabOrigin::Server,+ doc_id,+ vec![],+ false,+ ));collab.lock().with_origin_transact_mut(|txn| {let update = Update::decode_v1(doc_state).unwrap();txn.apply_update(update);diff --git a/frontend/rust-lib/event-integration/src/lib.rs b/frontend/rust-lib/event-integration/src/lib.rsindex 6b9a037588..180623d8d5 100644--- a/frontend/rust-lib/event-integration/src/lib.rs+++ b/frontend/rust-lib/event-integration/src/lib.rs@@ -1,4 +1,4 @@-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use collab::core::origin::CollabOrigin;use collab_document::blocks::DocumentData;use collab_document::document::Document;@@ -146,7 +146,7 @@ pub fn document_data_from_document_doc_state(doc_id: &str, doc_state: Vec<u8>) -pub fn document_from_document_doc_state(doc_id: &str, doc_state: Vec<u8>) -> Document {Document::from_doc_state(CollabOrigin::Empty,- DocStateSource::FromDocState(doc_state),+ DataSource::DocStateV1(doc_state),doc_id,vec![],)diff --git a/frontend/rust-lib/event-integration/tests/database/mod.rs b/frontend/rust-lib/event-integration/tests/database/mod.rsindex d4ad853e80..01d3a22023 100644--- a/frontend/rust-lib/event-integration/tests/database/mod.rs+++ b/frontend/rust-lib/event-integration/tests/database/mod.rs@@ -1,4 +1,4 @@mod local_test;-#[cfg(feature = "supabase_cloud_test")]-mod supabase_test;+// #[cfg(feature = "supabase_cloud_test")]+// mod supabase_test;diff --git a/frontend/rust-lib/event-integration/tests/database/supabase_test/helper.rs b/frontend/rust-lib/event-integration/tests/database/supabase_test/helper.rsindex f3bf6f9e48..ee9809de55 100644--- a/frontend/rust-lib/event-integration/tests/database/supabase_test/helper.rs+++ b/frontend/rust-lib/event-integration/tests/database/supabase_test/helper.rs@@ -4,7 +4,7 @@ use assert_json_diff::assert_json_eq;use collab::core::collab::MutexCollab;use collab::core::origin::CollabOrigin;use collab::preclude::updates::decoder::Decode;-use collab::preclude::{JsonValue, Update};+use collab::preclude::{Collab, JsonValue, Update};use collab_entity::CollabType;use event_integration::event_builder::EventBuilder;@@ -82,7 +82,12 @@ pub fn assert_database_collab_content(collab_update: &[u8],expected: JsonValue,) {- let collab = MutexCollab::new(CollabOrigin::Server, database_id, vec![], false);+ let collab = MutexCollab::new(Collab::new_with_origin(+ CollabOrigin::Server,+ database_id,+ vec![],+ false,+ ));collab.lock().with_origin_transact_mut(|txn| {let update = Update::decode_v1(collab_update).unwrap();txn.apply_update(update);diff --git a/frontend/rust-lib/event-integration/tests/document/mod.rs b/frontend/rust-lib/event-integration/tests/document/mod.rsindex 8899dc3534..ba2833ee49 100644--- a/frontend/rust-lib/event-integration/tests/document/mod.rs+++ b/frontend/rust-lib/event-integration/tests/document/mod.rs@@ -1,8 +1,8 @@mod local_test;mod af_cloud_test;-#[cfg(feature = "supabase_cloud_test")]-mod supabase_test;+// #[cfg(feature = "supabase_cloud_test")]+// mod supabase_test;use rand::{distributions::Alphanumeric, Rng};diff --git a/frontend/rust-lib/event-integration/tests/folder/mod.rs b/frontend/rust-lib/event-integration/tests/folder/mod.rsindex d4ad853e80..01d3a22023 100644--- a/frontend/rust-lib/event-integration/tests/folder/mod.rs+++ b/frontend/rust-lib/event-integration/tests/folder/mod.rs@@ -1,4 +1,4 @@mod local_test;-#[cfg(feature = "supabase_cloud_test")]-mod supabase_test;+// #[cfg(feature = "supabase_cloud_test")]+// mod supabase_test;diff --git a/frontend/rust-lib/event-integration/tests/folder/supabase_test/helper.rs b/frontend/rust-lib/event-integration/tests/folder/supabase_test/helper.rsindex 17497f14dd..aa1cf36d29 100644--- a/frontend/rust-lib/event-integration/tests/folder/supabase_test/helper.rs+++ b/frontend/rust-lib/event-integration/tests/folder/supabase_test/helper.rs@@ -4,7 +4,7 @@ use assert_json_diff::assert_json_eq;use collab::core::collab::MutexCollab;use collab::core::origin::CollabOrigin;use collab::preclude::updates::decoder::Decode;-use collab::preclude::{JsonValue, Update};+use collab::preclude::{Collab, JsonValue, Update};use collab_entity::CollabType;use collab_folder::FolderData;@@ -67,7 +67,12 @@ pub fn assert_folder_collab_content(workspace_id: &str, collab_update: &[u8], expanic!("collab update is empty");}- let collab = MutexCollab::new(CollabOrigin::Server, workspace_id, vec![], false);+ let collab = MutexCollab::new(Collab::new_with_origin(+ CollabOrigin::Server,+ workspace_id,+ vec![],+ false,+ ));collab.lock().with_origin_transact_mut(|txn| {let update = Update::decode_v1(collab_update).unwrap();txn.apply_update(update);diff --git a/frontend/rust-lib/event-integration/tests/main.rs b/frontend/rust-lib/event-integration/tests/main.rsindex 1edfc1548c..ceebc18092 100644--- a/frontend/rust-lib/event-integration/tests/main.rs+++ b/frontend/rust-lib/event-integration/tests/main.rs@@ -1,7 +1,6 @@mod database;mod document;mod folder;+mod search;mod user;pub mod util;--mod search;diff --git a/frontend/rust-lib/event-integration/tests/user/mod.rs b/frontend/rust-lib/event-integration/tests/user/mod.rsindex 1e3198d51d..ab778a29c1 100644--- a/frontend/rust-lib/event-integration/tests/user/mod.rs+++ b/frontend/rust-lib/event-integration/tests/user/mod.rs@@ -2,5 +2,5 @@ mod local_test;mod migration_test;mod af_cloud_test;-#[cfg(feature = "supabase_cloud_test")]-mod supabase_test;+// #[cfg(feature = "supabase_cloud_test")]+// mod supabase_test;diff --git a/frontend/rust-lib/flowy-database-pub/src/cloud.rs b/frontend/rust-lib/flowy-database-pub/src/cloud.rsindex 30b8d034b1..4b392fd9dc 100644--- a/frontend/rust-lib/flowy-database-pub/src/cloud.rs+++ b/frontend/rust-lib/flowy-database-pub/src/cloud.rs@@ -1,10 +1,10 @@use anyhow::Error;-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use collab_entity::CollabType;use lib_infra::future::FutureResult;use std::collections::HashMap;-pub type CollabDocStateByOid = HashMap<String, DocStateSource>;+pub type CollabDocStateByOid = HashMap<String, DataSource>;/// A trait for database cloud service./// Each kind of server should implement this trait. Check out the [AppFlowyServerProvider] ofdiff --git a/frontend/rust-lib/flowy-database2/src/manager.rs b/frontend/rust-lib/flowy-database2/src/manager.rsindex e1557d5511..4bbc6e5848 100644--- a/frontend/rust-lib/flowy-database2/src/manager.rs+++ b/frontend/rust-lib/flowy-database2/src/manager.rs@@ -2,7 +2,7 @@ use anyhow::anyhow;use std::collections::HashMap;use std::sync::{Arc, Weak};-use collab::core::collab::{DocStateSource, MutexCollab};+use collab::core::collab::{DataSource, MutexCollab};use collab_database::blocks::BlockEvent;use collab_database::database::{DatabaseData, MutexDatabase};use collab_database::error::DatabaseError;@@ -95,7 +95,7 @@ impl DatabaseManager {};let config = CollabPersistenceConfig::new().snapshot_per_update(100);- let mut workspace_database_doc_state = DocStateSource::FromDisk;+ let mut workspace_database_doc_state = DataSource::Disk;// If the workspace database not exist in disk, try to fetch from remote.if !self.is_collab_exist(uid, &collab_db, &workspace_database_object_id) {trace!("workspace database not exist, try to fetch from remote");@@ -110,10 +110,10 @@ impl DatabaseManager {{Ok(doc_state) => match doc_state {Some(doc_state) => {- workspace_database_doc_state = DocStateSource::FromDocState(doc_state);+ workspace_database_doc_state = DataSource::DocStateV1(doc_state);},None => {- workspace_database_doc_state = DocStateSource::FromDisk;+ workspace_database_doc_state = DataSource::Disk;},},Err(err) => {@@ -444,7 +444,7 @@ impl DatabaseCollabService for UserDatabaseCollabServiceImpl {&self,object_id: &str,object_ty: CollabType,- ) -> CollabFuture<Result<DocStateSource, DatabaseError>> {+ ) -> CollabFuture<Result<DataSource, DatabaseError>> {let workspace_id = self.workspace_id.clone();let object_id = object_id.to_string();let weak_cloud_service = Arc::downgrade(&self.cloud_service);@@ -456,8 +456,8 @@ impl DatabaseCollabService for UserDatabaseCollabServiceImpl {.get_database_object_doc_state(&object_id, object_ty, &workspace_id).await?;match doc_state {- None => Ok(DocStateSource::FromDisk),- Some(doc_state) => Ok(DocStateSource::FromDocState(doc_state)),+ None => Ok(DataSource::Disk),+ Some(doc_state) => Ok(DataSource::DocStateV1(doc_state)),}},}@@ -493,7 +493,7 @@ impl DatabaseCollabService for UserDatabaseCollabServiceImpl {object_id: &str,object_type: CollabType,collab_db: Weak<CollabKVDB>,- collab_raw_data: DocStateSource,+ collab_raw_data: DataSource,persistence_config: CollabPersistenceConfig,) -> Result<Arc<MutexCollab>, DatabaseError> {let collab = self.collab_builder.build_with_config(diff --git a/frontend/rust-lib/flowy-document/src/manager.rs b/frontend/rust-lib/flowy-document/src/manager.rsindex 17ef553da5..f2ec06bd53 100644--- a/frontend/rust-lib/flowy-document/src/manager.rs+++ b/frontend/rust-lib/flowy-document/src/manager.rs@@ -1,7 +1,7 @@use std::sync::Arc;use std::sync::Weak;-use collab::core::collab::{DocStateSource, MutexCollab};+use collab::core::collab::{DataSource, MutexCollab};use collab::core::collab_plugin::EncodedCollab;use collab::core::origin::CollabOrigin;use collab::preclude::Collab;@@ -124,7 +124,7 @@ impl DocumentManager {.doc_state.to_vec();let collab = self- .collab_for_document(uid, doc_id, DocStateSource::FromDocState(doc_state), false)+ .collab_for_document(uid, doc_id, DataSource::DocStateV1(doc_state), false).await?;collab.lock().flush();Ok(())@@ -144,11 +144,11 @@ impl DocumentManager {return Ok(doc);}- let mut doc_state = DocStateSource::FromDisk;+ let mut doc_state = DataSource::Disk;// If the document does not exist in local disk, try get the doc state from the cloud. This happens// When user_device_a create a document and user_device_b open the document.if !self.is_doc_exist(doc_id).await? {- doc_state = DocStateSource::FromDocState(+ doc_state = DataSource::DocStateV1(self.cloud_service.get_document_doc_state(doc_id, &self.user_service.workspace_id()?)@@ -188,9 +188,9 @@ impl DocumentManager {}pub async fn get_document_data(&self, doc_id: &str) -> FlowyResult<DocumentData> {- let mut doc_state = DocStateSource::FromDisk;+ let mut doc_state = DataSource::Disk;if !self.is_doc_exist(doc_id).await? {- doc_state = DocStateSource::FromDocState(+ doc_state = DataSource::DocStateV1(self.cloud_service.get_document_doc_state(doc_id, &self.user_service.workspace_id()?)@@ -377,7 +377,7 @@ impl DocumentManager {&self,uid: i64,doc_id: &str,- doc_state: DocStateSource,+ doc_state: DataSource,sync_enable: bool,) -> FlowyResult<Arc<MutexCollab>> {let db = self.user_service.collab_db(uid)?;@@ -439,7 +439,7 @@ async fn doc_state_from_document_data(let doc_id = doc_id.to_string();// spawn_blocking is used to avoid blocking the tokio thread pool if the document is large.let encoded_collab = tokio::task::spawn_blocking(move || {- let collab = Arc::new(MutexCollab::from_collab(Collab::new_with_origin(+ let collab = Arc::new(MutexCollab::new(Collab::new_with_origin(CollabOrigin::Empty,doc_id,vec![],diff --git a/frontend/rust-lib/flowy-folder/src/manager.rs b/frontend/rust-lib/flowy-folder/src/manager.rsindex 4e2b36f225..bd6e8a338a 100644--- a/frontend/rust-lib/flowy-folder/src/manager.rs+++ b/frontend/rust-lib/flowy-folder/src/manager.rs@@ -16,7 +16,7 @@ use crate::util::{folder_not_init_error, insert_parent_child_views, workspace_data_not_sync_error,};use crate::view_operation::{create_view, FolderOperationHandler, FolderOperationHandlers};-use collab::core::collab::{DocStateSource, MutexCollab};+use collab::core::collab::{DataSource, MutexCollab};use collab_entity::CollabType;use collab_folder::error::FolderError;use collab_folder::{@@ -167,7 +167,7 @@ impl FolderManager {uid: i64,workspace_id: &str,collab_db: Weak<CollabKVDB>,- doc_state: DocStateSource,+ doc_state: DataSource,folder_notifier: T,) -> Result<Folder, FlowyError> {let folder_notifier = folder_notifier.into();@@ -212,7 +212,7 @@ impl FolderManager {workspace_id,CollabType::Folder,collab_db,- DocStateSource::FromDisk,+ DataSource::Disk,CollabPersistenceConfig::new().enable_snapshot(true).snapshot_per_update(50),diff --git a/frontend/rust-lib/flowy-folder/src/manager_init.rs b/frontend/rust-lib/flowy-folder/src/manager_init.rsindex 5c5fb170aa..7607ac250b 100644--- a/frontend/rust-lib/flowy-folder/src/manager_init.rs+++ b/frontend/rust-lib/flowy-folder/src/manager_init.rs@@ -8,7 +8,7 @@ use collab_integrate::CollabKVDB;use flowy_error::{FlowyError, FlowyResult};-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use std::sync::{Arc, Weak};use crate::manager::{FolderInitDataSource, FolderManager};@@ -60,7 +60,7 @@ impl FolderManager {uid,&workspace_id,collab_db,- DocStateSource::FromDisk,+ DataSource::Disk,folder_notifier,).await?@@ -84,7 +84,7 @@ impl FolderManager {uid,&workspace_id,collab_db.clone(),- DocStateSource::FromDocState(doc_state),+ DataSource::DocStateV1(doc_state),folder_notifier.clone(),).await?@@ -98,7 +98,7 @@ impl FolderManager {uid,&workspace_id,collab_db,- DocStateSource::FromDisk,+ DataSource::Disk,folder_notifier,).await?@@ -109,7 +109,7 @@ impl FolderManager {uid,&workspace_id,collab_db.clone(),- DocStateSource::FromDocState(doc_state),+ DataSource::DocStateV1(doc_state),folder_notifier.clone(),).await?diff --git a/frontend/rust-lib/flowy-server/src/af_cloud/impls/database.rs b/frontend/rust-lib/flowy-server/src/af_cloud/impls/database.rsindex 1342bb97aa..3749f56333 100644--- a/frontend/rust-lib/flowy-server/src/af_cloud/impls/database.rs+++ b/frontend/rust-lib/flowy-server/src/af_cloud/impls/database.rs@@ -2,7 +2,7 @@ use anyhow::Error;use client_api::entity::QueryCollabResult::{Failed, Success};use client_api::entity::{QueryCollab, QueryCollabParams};use client_api::error::ErrorCode::RecordNotFound;-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use collab::core::collab_plugin::EncodedCollab;use collab_entity::CollabType;use tracing::error;@@ -73,10 +73,7 @@ where.flat_map(|(object_id, result)| match result {Success { encode_collab_v1 } => {match EncodedCollab::decode_from_bytes(&encode_collab_v1) {- Ok(encode) => Some((- object_id,- DocStateSource::FromDocState(encode.doc_state.to_vec()),- )),+ Ok(encode) => Some((object_id, DataSource::DocStateV1(encode.doc_state.to_vec()))),Err(err) => {error!("Failed to decode collab: {}", err);Nonediff --git a/frontend/rust-lib/flowy-server/src/af_cloud/impls/document.rs b/frontend/rust-lib/flowy-server/src/af_cloud/impls/document.rsindex 7c5904ab1d..f7d436f0e1 100644--- a/frontend/rust-lib/flowy-server/src/af_cloud/impls/document.rs+++ b/frontend/rust-lib/flowy-server/src/af_cloud/impls/document.rs@@ -1,6 +1,6 @@use anyhow::Error;use client_api::entity::{QueryCollab, QueryCollabParams};-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use collab::core::origin::CollabOrigin;use collab_document::document::Document;use collab_entity::CollabType;@@ -76,7 +76,7 @@ where.to_vec();let document = Document::from_doc_state(CollabOrigin::Empty,- DocStateSource::FromDocState(doc_state),+ DataSource::DocStateV1(doc_state),&document_id,vec![],)?;diff --git a/frontend/rust-lib/flowy-server/src/af_cloud/impls/folder.rs b/frontend/rust-lib/flowy-server/src/af_cloud/impls/folder.rsindex 5503d96292..d790160bcb 100644--- a/frontend/rust-lib/flowy-server/src/af_cloud/impls/folder.rs+++ b/frontend/rust-lib/flowy-server/src/af_cloud/impls/folder.rs@@ -2,7 +2,7 @@ use anyhow::Error;use client_api::entity::{workspace_dto::CreateWorkspaceParam, CollabParams, QueryCollab, QueryCollabParams,};-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use collab::core::origin::CollabOrigin;use collab_entity::CollabType;use collab_folder::RepeatedViewIdentifier;@@ -99,7 +99,7 @@ wherelet folder = Folder::from_collab_doc_state(uid,CollabOrigin::Empty,- DocStateSource::FromDocState(doc_state),+ DataSource::DocStateV1(doc_state),&workspace_id,vec![],)?;diff --git a/frontend/rust-lib/flowy-server/src/supabase/api/collab_storage.rs b/frontend/rust-lib/flowy-server/src/supabase/api/collab_storage.rsindex 9bf80d8ad1..388ff184da 100644--- a/frontend/rust-lib/flowy-server/src/supabase/api/collab_storage.rs+++ b/frontend/rust-lib/flowy-server/src/supabase/api/collab_storage.rs@@ -4,7 +4,7 @@ use std::sync::{Arc, Weak};use anyhow::Error;use chrono::{DateTime, Utc};use client_api::collab_sync::MsgId;-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use collab::preclude::merge_updates_v1;use collab_entity::CollabObject;use collab_plugins::cloud_storage::{@@ -62,7 +62,7 @@ wheretrue}- async fn get_doc_state(&self, object: &CollabObject) -> Result<DocStateSource, Error> {+ async fn get_doc_state(&self, object: &CollabObject) -> Result<DataSource, Error> {let postgrest = self.server.try_get_weak_postgrest()?;let action = FetchObjectUpdateAction::new(object.object_id.clone(),@@ -70,7 +70,7 @@ wherepostgrest,);let doc_state = action.run().await?;- Ok(DocStateSource::FromDocState(doc_state))+ Ok(DataSource::DocStateV1(doc_state))}async fn get_snapshots(&self, object_id: &str, limit: usize) -> Vec<RemoteCollabSnapshot> {diff --git a/frontend/rust-lib/flowy-server/src/supabase/api/document.rs b/frontend/rust-lib/flowy-server/src/supabase/api/document.rsindex 2d2738f391..a0e5087938 100644--- a/frontend/rust-lib/flowy-server/src/supabase/api/document.rs+++ b/frontend/rust-lib/flowy-server/src/supabase/api/document.rs@@ -1,5 +1,5 @@use anyhow::Error;-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use collab::core::origin::CollabOrigin;use collab_document::blocks::DocumentData;use collab_document::document::Document;@@ -96,7 +96,7 @@ wherelet doc_state = action.run_with_fix_interval(5, 10).await?;let document = Document::from_doc_state(CollabOrigin::Empty,- DocStateSource::FromDocState(doc_state),+ DataSource::DocStateV1(doc_state),&document_id,vec![],)?;diff --git a/frontend/rust-lib/flowy-server/src/supabase/api/folder.rs b/frontend/rust-lib/flowy-server/src/supabase/api/folder.rsindex 04b20fc7ed..f8e487de5a 100644--- a/frontend/rust-lib/flowy-server/src/supabase/api/folder.rs+++ b/frontend/rust-lib/flowy-server/src/supabase/api/folder.rs@@ -2,7 +2,7 @@ use std::str::FromStr;use anyhow::{anyhow, Error};use chrono::{DateTime, Utc};-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use collab::core::origin::CollabOrigin;use collab_entity::CollabType;use serde_json::Value;@@ -105,7 +105,7 @@ wherelet folder = Folder::from_collab_doc_state(uid,CollabOrigin::Empty,- DocStateSource::FromDocState(doc_state),+ DataSource::DocStateV1(doc_state),&workspace_id,vec![],)?;diff --git a/frontend/rust-lib/flowy-server/src/supabase/api/request.rs b/frontend/rust-lib/flowy-server/src/supabase/api/request.rsindex 7964426325..326529e06e 100644--- a/frontend/rust-lib/flowy-server/src/supabase/api/request.rs+++ b/frontend/rust-lib/flowy-server/src/supabase/api/request.rs@@ -7,7 +7,7 @@ use std::time::Duration;use anyhow::Error;use chrono::{DateTime, Utc};-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use collab_entity::{CollabObject, CollabType};use collab_plugins::cloud_storage::RemoteCollabSnapshot;use serde_json::Value;@@ -284,7 +284,7 @@ pub async fn batch_get_updates_from_server(match parser_updates_form_json(record.clone(), &postgrest.secret()) {Ok(items) => {if items.is_empty() {- updates_by_oid.insert(oid.to_string(), DocStateSource::FromDisk);+ updates_by_oid.insert(oid.to_string(), DataSource::Disk);} else {let updates = items.iter()@@ -293,7 +293,7 @@ pub async fn batch_get_updates_from_server(let doc_state = merge_updates_v1(&updates).map_err(|err| anyhow::anyhow!("merge updates failed: {:?}", err))?;- updates_by_oid.insert(oid.to_string(), DocStateSource::FromDocState(doc_state));+ updates_by_oid.insert(oid.to_string(), DataSource::DocStateV1(doc_state));}},Err(e) => {diff --git a/frontend/rust-lib/flowy-server/src/supabase/api/user.rs b/frontend/rust-lib/flowy-server/src/supabase/api/user.rsindex 70815b6dd4..a691ab36a9 100644--- a/frontend/rust-lib/flowy-server/src/supabase/api/user.rs+++ b/frontend/rust-lib/flowy-server/src/supabase/api/user.rs@@ -8,6 +8,7 @@ use std::time::Duration;use anyhow::Error;use collab::core::collab::MutexCollab;use collab::core::origin::CollabOrigin;+use collab::preclude::Collab;use collab_entity::{CollabObject, CollabType};use parking_lot::RwLock;use serde_json::Value;@@ -686,12 +687,12 @@ impl RealtimeEventHandler for RealtimeCollabUpdateHandler {fn default_workspace_doc_state(collab_object: &CollabObject) -> Vec<u8> {let workspace_id = collab_object.object_id.clone();- let collab = Arc::new(MutexCollab::new(+ let collab = Arc::new(MutexCollab::new(Collab::new_with_origin(CollabOrigin::Empty,&collab_object.object_id,vec![],false,- ));+ )));let workspace = Workspace::new(workspace_id, "My workspace".to_string(), collab_object.uid);let folder = Folder::create(collab_object.uid, collab, None, FolderData::new(workspace));folder.encode_collab_v1().unwrap().doc_state.to_vec()diff --git a/frontend/rust-lib/flowy-server/src/supabase/define.rs b/frontend/rust-lib/flowy-server/src/supabase/define.rsindex ea49becc1e..1067c999d8 100644--- a/frontend/rust-lib/flowy-server/src/supabase/define.rs+++ b/frontend/rust-lib/flowy-server/src/supabase/define.rs@@ -28,7 +28,7 @@ pub(crate) const CREATED_AT: &str = "created_at";pub fn table_name(ty: &CollabType) -> String {match ty {CollabType::DatabaseRow => format!("{}_database_row", AF_COLLAB_UPDATE_TABLE),- CollabType::Document | CollabType::Empty => format!("{}_document", AF_COLLAB_UPDATE_TABLE),+ CollabType::Document | CollabType::Unknown => format!("{}_document", AF_COLLAB_UPDATE_TABLE),CollabType::Database => format!("{}_database", AF_COLLAB_UPDATE_TABLE),CollabType::WorkspaceDatabase => format!("{}_w_database", AF_COLLAB_UPDATE_TABLE),CollabType::Folder => format!("{}_folder", AF_COLLAB_UPDATE_TABLE),@@ -44,6 +44,6 @@ pub fn partition_key(collab_type: &CollabType) -> i32 {CollabType::Folder => 3,CollabType::DatabaseRow => 4,CollabType::UserAwareness => 5,- CollabType::Empty => 0,+ CollabType::Unknown => 0,}}diff --git a/frontend/rust-lib/flowy-server/tests/supabase_test/database_test.rs b/frontend/rust-lib/flowy-server/tests/supabase_test/database_test.rsindex 4eabe8c5c0..841c76b443 100644--- a/frontend/rust-lib/flowy-server/tests/supabase_test/database_test.rs+++ b/frontend/rust-lib/flowy-server/tests/supabase_test/database_test.rs@@ -1,4 +1,4 @@-use collab::core::collab::DocStateSource;+use collab::core::collab::DataSource;use collab_entity::{CollabObject, CollabType};use uuid::Uuid;@@ -53,10 +53,11 @@ async fn supabase_create_database_test() {assert_eq!(updates_by_oid.len(), 3);for (_, source) in updates_by_oid {match source {- DocStateSource::FromDisk => panic!("should not be from disk"),- DocStateSource::FromDocState(doc_state) => {+ DataSource::Disk => panic!("should not be from disk"),+ DataSource::DocStateV1(doc_state) => {assert_eq!(doc_state.len(), 2);},+ DataSource::DocStateV2(_) => {},}}}diff --git a/frontend/rust-lib/flowy-server/tests/supabase_test/util.rs b/frontend/rust-lib/flowy-server/tests/supabase_test/util.rsindex 466b728359..b892b9a00a 100644--- a/frontend/rust-lib/flowy-server/tests/supabase_test/util.rs+++ b/frontend/rust-lib/flowy-server/tests/supabase_test/util.rs@@ -2,8 +2,9 @@ use flowy_storage::ObjectStorageService;use std::collections::HashMap;use std::sync::Arc;-use collab::core::collab::{DocStateSource, MutexCollab};+use collab::core::collab::{DataSource, MutexCollab};use collab::core::origin::CollabOrigin;+use collab::preclude::Collab;use collab_plugins::cloud_storage::RemoteCollabStorage;use uuid::Uuid;@@ -121,16 +122,16 @@ pub async fn print_encryption_folder_snapshot(.await.pop().unwrap();- let collab = Arc::new(- MutexCollab::new_with_doc_state(+ let collab = Arc::new(MutexCollab::new(+ Collab::new_with_source(CollabOrigin::Empty,folder_id,- DocStateSource::FromDocState(snapshot.blob),+ DataSource::DocStateV1(snapshot.blob),vec![],false,).unwrap(),- );+ ));let folder_data = Folder::open(uid, collab, None).unwrap().get_folder_data()diff --git a/frontend/rust-lib/flowy-user/src/anon_user/migrate_anon_user_collab.rs b/frontend/rust-lib/flowy-user/src/anon_user/migrate_anon_user_collab.rsindex c9a705ab65..7c5aa44a96 100644--- a/frontend/rust-lib/flowy-user/src/anon_user/migrate_anon_user_collab.rs+++ b/frontend/rust-lib/flowy-user/src/anon_user/migrate_anon_user_collab.rs@@ -3,7 +3,7 @@ use std::ops::{Deref, DerefMut};use std::sync::Arc;use anyhow::anyhow;-use collab::core::collab::{DocStateSource, MutexCollab};+use collab::core::collab::{DataSource, MutexCollab};use collab::core::origin::{CollabClient, CollabOrigin};use collab::preclude::Collab;use collab_database::database::{@@ -222,7 +222,7 @@ wherelet old_user_id = UserId::from(old_uid);let old_folder = Folder::open(old_user_id.clone(),- Arc::new(MutexCollab::from_collab(old_folder_collab)),+ Arc::new(MutexCollab::new(old_folder_collab)),None,).map_err(|err| PersistenceError::InvalidData(err.to_string()))?;@@ -305,15 +305,10 @@ where}let origin = CollabOrigin::Client(CollabClient::new(new_uid, "phantom"));- let new_folder_collab = Collab::new_with_doc_state(- origin,- new_workspace_id,- DocStateSource::FromDisk,- vec![],- false,- )- .map_err(|err| PersistenceError::Internal(err.into()))?;- let mutex_collab = Arc::new(MutexCollab::from_collab(new_folder_collab));+ let new_folder_collab =+ Collab::new_with_source(origin, new_workspace_id, DataSource::Disk, vec![], false)+ .map_err(|err| PersistenceError::Internal(err.into()))?;+ let mutex_collab = Arc::new(MutexCollab::new(new_folder_collab));let new_user_id = UserId::from(new_uid);info!("migrated folder: {:?}", folder_data);let _ = Folder::create(new_user_id, mutex_collab.clone(), None, folder_data);diff --git a/frontend/rust-lib/flowy-user/src/anon_user/sync_supabase_user_collab.rs b/frontend/rust-lib/flowy-user/src/anon_user/sync_supabase_user_collab.rsindex b4816cd4cc..c86e39175d 100644--- a/frontend/rust-lib/flowy-user/src/anon_user/sync_supabase_user_collab.rs+++ b/frontend/rust-lib/flowy-user/src/anon_user/sync_supabase_user_collab.rs@@ -265,11 +265,7 @@ async fn sync_folder(.encode_collab_v1(|_| Ok::<(), PersistenceError>(()))?.doc_state;(- MutexFolder::new(Folder::open(- uid,- Arc::new(MutexCollab::from_collab(collab)),- None,- )?),+ MutexFolder::new(Folder::open(uid, Arc::new(MutexCollab::new(collab)), None)?),doc_state,)};diff --git a/frontend/rust-lib/flowy-user/src/migrations/document_empty_content.rs b/frontend/rust-lib/flowy-user/src/migrations/document_empty_content.rsindex 172f5c1e7a..b452096b2a 100644--- a/frontend/rust-lib/flowy-user/src/migrations/document_empty_content.rs+++ b/frontend/rust-lib/flowy-user/src/migrations/document_empty_content.rs@@ -2,6 +2,7 @@ use std::sync::Arc;use collab::core::collab::MutexCollab;use collab::core::origin::{CollabClient, CollabOrigin};+use collab::preclude::Collab;use collab_document::document::Document;use collab_document::document_data::default_document_data;use collab_folder::{Folder, View};@@ -85,10 +86,16 @@ where{// If the document is not exist, we don't need to migrate it.if load_collab(user_id, write_txn, &view.id).is_err() {- let collab = Arc::new(MutexCollab::new(origin.clone(), &view.id, vec![], false));+ let collab = Arc::new(MutexCollab::new(Collab::new_with_origin(+ origin.clone(),+ &view.id,+ vec![],+ false,+ )));let document = Document::create_with_data(collab, default_document_data())?;let encode = document.get_collab()+ .lock().encode_collab_v1(|_| Ok::<(), PersistenceError>(()))?;write_txn.flush_doc_with(user_id, &view.id, &encode.doc_state, &encode.state_vector)?;event!(diff --git a/frontend/rust-lib/flowy-user/src/migrations/util.rs b/frontend/rust-lib/flowy-user/src/migrations/util.rsindex 8249ac341d..f0c4c3f7f7 100644--- a/frontend/rust-lib/flowy-user/src/migrations/util.rs+++ b/frontend/rust-lib/flowy-user/src/migrations/util.rs@@ -17,5 +17,5 @@ where{let collab = Collab::new(uid, object_id, "phantom", vec![], false);collab.with_origin_transact_mut(|txn| collab_r_txn.load_doc_with_txn(uid, &object_id, txn))?;- Ok(Arc::new(MutexCollab::from_collab(collab)))+ Ok(Arc::new(MutexCollab::new(collab)))}diff --git a/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rs b/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rsindex e2f0ce57c5..c9c1ae6c69 100644--- a/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rs+++ b/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rs@@ -5,7 +5,7 @@ use crate::services::entities::UserPaths;use crate::services::sqlite_sql::user_sql::select_user_profile;use crate::user_manager::run_collab_data_migration;use anyhow::anyhow;-use collab::core::collab::{DocStateSource, MutexCollab};+use collab::core::collab::{DataSource, MutexCollab};use collab::core::origin::CollabOrigin;use collab::core::transaction::DocTransactionExtension;use collab::preclude::updates::decoder::Decode;@@ -465,10 +465,10 @@ whereW: CollabKVAction<'a>,PersistenceError: From<W::Error>,{- let collab = Collab::new_with_doc_state(+ let collab = Collab::new_with_source(CollabOrigin::Empty,new_object_id,- DocStateSource::FromDocState(doc_state),+ DataSource::DocStateV1(doc_state),vec![],false,)?;@@ -503,7 +503,7 @@ wherelet other_user_id = UserId::from(other_session.user_id);let other_folder = Folder::open(other_user_id,- Arc::new(MutexCollab::from_collab(other_folder_collab)),+ Arc::new(MutexCollab::new(other_folder_collab)),None,).map_err(|err| PersistenceError::InvalidData(err.to_string()))?;diff --git a/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rs b/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rsindex eeab22f7b7..4f7b816b82 100644--- a/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rs+++ b/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rs@@ -2,7 +2,7 @@ use std::sync::atomic::Ordering;use std::sync::{Arc, Weak};use anyhow::Context;-use collab::core::collab::{DocStateSource, MutexCollab};+use collab::core::collab::{DataSource, MutexCollab};use collab_entity::reminder::Reminder;use collab_entity::CollabType;use collab_integrate::collab_builder::{AppFlowyCollabBuilder, CollabBuilderConfig};@@ -164,7 +164,7 @@ impl UserManager {session.user_id,&object_id,collab_db,- DocStateSource::FromDocState(data),+ DataSource::DocStateV1(data),).await?;MutexUserAwareness::new(UserAwareness::create(collab, None))@@ -177,7 +177,7 @@ impl UserManager {session.user_id,&object_id,collab_db,- DocStateSource::FromDisk,+ DataSource::Disk,).await?;MutexUserAwareness::new(UserAwareness::create(collab, None))@@ -210,7 +210,7 @@ impl UserManager {uid: i64,object_id: &str,collab_db: Weak<CollabKVDB>,- doc_state: DocStateSource,+ doc_state: DataSource,) -> Result<Arc<MutexCollab>, FlowyError> {let collab_builder = collab_builder.upgrade().ok_or(FlowyError::new(ErrorCode::Internal,