chore: support skip gc (#4926)

* chore: support skip gc

* chore: fix test
This commit is contained in:
Nathan.fooo 2024-03-20 14:34:50 +08:00 committed by GitHub
parent 822d62b562
commit d19fa5a34a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 164 additions and 150 deletions

View File

@ -162,7 +162,7 @@ checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
[[package]] [[package]]
name = "app-error" name = "app-error"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -716,7 +716,7 @@ dependencies = [
[[package]] [[package]]
name = "client-api" name = "client-api"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"again", "again",
"anyhow", "anyhow",
@ -726,6 +726,7 @@ dependencies = [
"brotli", "brotli",
"bytes", "bytes",
"chrono", "chrono",
"client-websocket",
"collab", "collab",
"collab-entity", "collab-entity",
"database-entity", "database-entity",
@ -756,11 +757,28 @@ dependencies = [
"url", "url",
"uuid", "uuid",
"wasm-bindgen-futures", "wasm-bindgen-futures",
"websocket",
"workspace-template", "workspace-template",
"yrs", "yrs",
] ]
[[package]]
name = "client-websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [
"futures-channel",
"futures-util",
"http",
"httparse",
"js-sys",
"percent-encoding",
"thiserror",
"tokio",
"tokio-tungstenite",
"wasm-bindgen",
"web-sys",
]
[[package]] [[package]]
name = "cmd_lib" name = "cmd_lib"
version = "1.3.0" version = "1.3.0"
@ -820,7 +838,7 @@ dependencies = [
[[package]] [[package]]
name = "collab" name = "collab"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -843,7 +861,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-database" name = "collab-database"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -873,7 +891,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-document" name = "collab-document"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"collab", "collab",
@ -892,7 +910,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-entity" name = "collab-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -907,7 +925,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-folder" name = "collab-folder"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@ -944,7 +962,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-plugins" name = "collab-plugins"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-stream", "async-stream",
@ -983,7 +1001,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-user" name = "collab-user"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"collab", "collab",
@ -1317,7 +1335,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]] [[package]]
name = "database-entity" name = "database-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -2619,7 +2637,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue" name = "gotrue"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures-util", "futures-util",
@ -2636,7 +2654,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue-entity" name = "gotrue-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -3091,7 +3109,7 @@ dependencies = [
[[package]] [[package]]
name = "infra" name = "infra"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"reqwest", "reqwest",
@ -4874,11 +4892,12 @@ dependencies = [
[[package]] [[package]]
name = "realtime-entity" name = "realtime-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
"bytes", "bytes",
"client-websocket",
"collab", "collab",
"collab-entity", "collab-entity",
"database-entity", "database-entity",
@ -4891,14 +4910,13 @@ dependencies = [
"serde_repr", "serde_repr",
"thiserror", "thiserror",
"tokio-tungstenite", "tokio-tungstenite",
"websocket",
"yrs", "yrs",
] ]
[[package]] [[package]]
name = "realtime-protocol" name = "realtime-protocol"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -5570,7 +5588,7 @@ dependencies = [
[[package]] [[package]]
name = "shared-entity" name = "shared-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -7085,24 +7103,6 @@ version = "0.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc"
[[package]]
name = "websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6"
dependencies = [
"futures-channel",
"futures-util",
"http",
"httparse",
"js-sys",
"percent-encoding",
"thiserror",
"tokio",
"tokio-tungstenite",
"wasm-bindgen",
"web-sys",
]
[[package]] [[package]]
name = "webview2-com" name = "webview2-com"
version = "0.19.1" version = "0.19.1"
@ -7551,7 +7551,7 @@ dependencies = [
[[package]] [[package]]
name = "workspace-template" name = "workspace-template"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",

View File

@ -86,7 +86,7 @@ custom-protocol = ["tauri/custom-protocol"]
# Run the script: # Run the script:
# scripts/tool/update_client_api_rev.sh new_rev_id # scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️ # ⚠️⚠️⚠️️
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "e408073448ee08816f6e62f86a7bedb04539aec6" } client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "c5112cc761736ac91f0a518552e7bbe522bceae6" }
# Please use the following script to update collab. # Please use the following script to update collab.
# Working directory: frontend # Working directory: frontend
# #
@ -96,10 +96,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "e40
# To switch to the local path, run: # To switch to the local path, run:
# scripts/tool/update_collab_source.sh # scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️ # ⚠️⚠️⚠️️
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }

View File

@ -221,7 +221,7 @@ checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
[[package]] [[package]]
name = "app-error" name = "app-error"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -545,7 +545,7 @@ dependencies = [
[[package]] [[package]]
name = "client-api" name = "client-api"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"again", "again",
"anyhow", "anyhow",
@ -555,6 +555,7 @@ dependencies = [
"brotli", "brotli",
"bytes", "bytes",
"chrono", "chrono",
"client-websocket",
"collab", "collab",
"collab-entity", "collab-entity",
"database-entity", "database-entity",
@ -585,10 +586,27 @@ dependencies = [
"url", "url",
"uuid", "uuid",
"wasm-bindgen-futures", "wasm-bindgen-futures",
"websocket",
"yrs", "yrs",
] ]
[[package]]
name = "client-websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [
"futures-channel",
"futures-util",
"http",
"httparse",
"js-sys",
"percent-encoding",
"thiserror",
"tokio",
"tokio-tungstenite",
"wasm-bindgen",
"web-sys",
]
[[package]] [[package]]
name = "cmd_lib" name = "cmd_lib"
version = "1.9.3" version = "1.9.3"
@ -618,7 +636,7 @@ dependencies = [
[[package]] [[package]]
name = "collab" name = "collab"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=551eb25bb1f24c18fa1840764cb75669489846b9#551eb25bb1f24c18fa1840764cb75669489846b9" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -641,7 +659,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-document" name = "collab-document"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=551eb25bb1f24c18fa1840764cb75669489846b9#551eb25bb1f24c18fa1840764cb75669489846b9" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"collab", "collab",
@ -660,7 +678,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-entity" name = "collab-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=551eb25bb1f24c18fa1840764cb75669489846b9#551eb25bb1f24c18fa1840764cb75669489846b9" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -675,7 +693,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-folder" name = "collab-folder"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=551eb25bb1f24c18fa1840764cb75669489846b9#551eb25bb1f24c18fa1840764cb75669489846b9" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@ -712,7 +730,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-plugins" name = "collab-plugins"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=551eb25bb1f24c18fa1840764cb75669489846b9#551eb25bb1f24c18fa1840764cb75669489846b9" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-stream", "async-stream",
@ -750,7 +768,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-user" name = "collab-user"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=551eb25bb1f24c18fa1840764cb75669489846b9#551eb25bb1f24c18fa1840764cb75669489846b9" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"collab", "collab",
@ -947,7 +965,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
[[package]] [[package]]
name = "database-entity" name = "database-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -1702,7 +1720,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue" name = "gotrue"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures-util", "futures-util",
@ -1719,7 +1737,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue-entity" name = "gotrue-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -2053,7 +2071,7 @@ dependencies = [
[[package]] [[package]]
name = "infra" name = "infra"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"reqwest", "reqwest",
@ -3297,11 +3315,12 @@ dependencies = [
[[package]] [[package]]
name = "realtime-entity" name = "realtime-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
"bytes", "bytes",
"client-websocket",
"collab", "collab",
"collab-entity", "collab-entity",
"database-entity", "database-entity",
@ -3314,14 +3333,13 @@ dependencies = [
"serde_repr", "serde_repr",
"thiserror", "thiserror",
"tokio-tungstenite", "tokio-tungstenite",
"websocket",
"yrs", "yrs",
] ]
[[package]] [[package]]
name = "realtime-protocol" name = "realtime-protocol"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -3774,7 +3792,7 @@ dependencies = [
[[package]] [[package]]
name = "shared-entity" name = "shared-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -4713,24 +4731,6 @@ version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10"
[[package]]
name = "websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6"
dependencies = [
"futures-channel",
"futures-util",
"http",
"httparse",
"js-sys",
"percent-encoding",
"thiserror",
"tokio",
"tokio-tungstenite",
"wasm-bindgen",
"web-sys",
]
[[package]] [[package]]
name = "wee_alloc" name = "wee_alloc"
version = "0.4.5" version = "0.4.5"
@ -5024,4 +5024,4 @@ dependencies = [
[[patch.unused]] [[patch.unused]]
name = "collab-database" name = "collab-database"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=551eb25bb1f24c18fa1840764cb75669489846b9#551eb25bb1f24c18fa1840764cb75669489846b9" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"

View File

@ -55,7 +55,7 @@ codegen-units = 1
# Run the script: # Run the script:
# scripts/tool/update_client_api_rev.sh new_rev_id # scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️ # ⚠️⚠️⚠️️
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "e408073448ee08816f6e62f86a7bedb04539aec6" } client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "c5112cc761736ac91f0a518552e7bbe522bceae6" }
# Please use the following script to update collab. # Please use the following script to update collab.
# Working directory: frontend # Working directory: frontend
# #
@ -65,10 +65,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "e40
# To switch to the local path, run: # To switch to the local path, run:
# scripts/tool/update_collab_source.sh # scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️ # ⚠️⚠️⚠️️
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }

View File

@ -163,7 +163,7 @@ checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
[[package]] [[package]]
name = "app-error" name = "app-error"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -673,7 +673,7 @@ dependencies = [
[[package]] [[package]]
name = "client-api" name = "client-api"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"again", "again",
"anyhow", "anyhow",
@ -683,6 +683,7 @@ dependencies = [
"brotli", "brotli",
"bytes", "bytes",
"chrono", "chrono",
"client-websocket",
"collab", "collab",
"collab-entity", "collab-entity",
"database-entity", "database-entity",
@ -713,11 +714,28 @@ dependencies = [
"url", "url",
"uuid", "uuid",
"wasm-bindgen-futures", "wasm-bindgen-futures",
"websocket",
"workspace-template", "workspace-template",
"yrs", "yrs",
] ]
[[package]]
name = "client-websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [
"futures-channel",
"futures-util",
"http",
"httparse",
"js-sys",
"percent-encoding",
"thiserror",
"tokio",
"tokio-tungstenite",
"wasm-bindgen",
"web-sys",
]
[[package]] [[package]]
name = "cmd_lib" name = "cmd_lib"
version = "1.3.0" version = "1.3.0"
@ -746,7 +764,7 @@ dependencies = [
[[package]] [[package]]
name = "collab" name = "collab"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -769,7 +787,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-database" name = "collab-database"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -799,7 +817,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-document" name = "collab-document"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"collab", "collab",
@ -818,7 +836,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-entity" name = "collab-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -833,7 +851,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-folder" name = "collab-folder"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"chrono", "chrono",
@ -870,7 +888,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-plugins" name = "collab-plugins"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-stream", "async-stream",
@ -909,7 +927,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-user" name = "collab-user"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8d017eb521d5783f44adbd392dac0efd9058bd3f#8d017eb521d5783f44adbd392dac0efd9058bd3f" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=2d7b1838e463ce0348cf700ff43f33f5718203be#2d7b1838e463ce0348cf700ff43f33f5718203be"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"collab", "collab",
@ -1239,7 +1257,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]] [[package]]
name = "database-entity" name = "database-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -2414,7 +2432,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue" name = "gotrue"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures-util", "futures-util",
@ -2431,7 +2449,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue-entity" name = "gotrue-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -2825,7 +2843,7 @@ dependencies = [
[[package]] [[package]]
name = "infra" name = "infra"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"reqwest", "reqwest",
@ -4307,11 +4325,12 @@ dependencies = [
[[package]] [[package]]
name = "realtime-entity" name = "realtime-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
"bytes", "bytes",
"client-websocket",
"collab", "collab",
"collab-entity", "collab-entity",
"database-entity", "database-entity",
@ -4324,14 +4343,13 @@ dependencies = [
"serde_repr", "serde_repr",
"thiserror", "thiserror",
"tokio-tungstenite", "tokio-tungstenite",
"websocket",
"yrs", "yrs",
] ]
[[package]] [[package]]
name = "realtime-protocol" name = "realtime-protocol"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -4924,7 +4942,7 @@ dependencies = [
[[package]] [[package]]
name = "shared-entity" name = "shared-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -6111,24 +6129,6 @@ version = "0.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc"
[[package]]
name = "websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6"
dependencies = [
"futures-channel",
"futures-util",
"http",
"httparse",
"js-sys",
"percent-encoding",
"thiserror",
"tokio",
"tokio-tungstenite",
"wasm-bindgen",
"web-sys",
]
[[package]] [[package]]
name = "which" name = "which"
version = "4.4.2" version = "4.4.2"
@ -6355,7 +6355,7 @@ dependencies = [
[[package]] [[package]]
name = "workspace-template" name = "workspace-template"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=e408073448ee08816f6e62f86a7bedb04539aec6#e408073448ee08816f6e62f86a7bedb04539aec6" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c5112cc761736ac91f0a518552e7bbe522bceae6#c5112cc761736ac91f0a518552e7bbe522bceae6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",

View File

@ -110,7 +110,7 @@ rocksdb = { git = "https://github.com/LucasXu0/rust-rocksdb", rev = "21cf4a23ec1
# Run the script: # Run the script:
# scripts/tool/update_client_api_rev.sh new_rev_id # scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️ # ⚠️⚠️⚠️️
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "e408073448ee08816f6e62f86a7bedb04539aec6" } client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "c5112cc761736ac91f0a518552e7bbe522bceae6" }
# Please use the following script to update collab. # Please use the following script to update collab.
# Working directory: frontend # Working directory: frontend
# #
@ -120,10 +120,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "e40
# To switch to the local path, run: # To switch to the local path, run:
# scripts/tool/update_collab_source.sh # scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️ # ⚠️⚠️⚠️️
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8d017eb521d5783f44adbd392dac0efd9058bd3f" } collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "2d7b1838e463ce0348cf700ff43f33f5718203be" }

View File

@ -103,7 +103,7 @@ impl EventIntegrationTest {
} }
pub fn assert_document_data_equal(doc_state: &[u8], doc_id: &str, expected: DocumentData) { pub fn assert_document_data_equal(doc_state: &[u8], doc_id: &str, expected: DocumentData) {
let collab = MutexCollab::new(CollabOrigin::Server, doc_id, vec![]); let collab = MutexCollab::new(CollabOrigin::Server, doc_id, vec![], false);
collab.lock().with_origin_transact_mut(|txn| { collab.lock().with_origin_transact_mut(|txn| {
let update = Update::decode_v1(doc_state).unwrap(); let update = Update::decode_v1(doc_state).unwrap();
txn.apply_update(update); txn.apply_update(update);

View File

@ -81,7 +81,7 @@ pub fn assert_database_collab_content(
collab_update: &[u8], collab_update: &[u8],
expected: JsonValue, expected: JsonValue,
) { ) {
let collab = MutexCollab::new(CollabOrigin::Server, database_id, vec![]); let collab = MutexCollab::new(CollabOrigin::Server, database_id, vec![], false);
collab.lock().with_origin_transact_mut(|txn| { collab.lock().with_origin_transact_mut(|txn| {
let update = Update::decode_v1(collab_update).unwrap(); let update = Update::decode_v1(collab_update).unwrap();
txn.apply_update(update); txn.apply_update(update);

View File

@ -67,7 +67,7 @@ pub fn assert_folder_collab_content(workspace_id: &str, collab_update: &[u8], ex
panic!("collab update is empty"); panic!("collab update is empty");
} }
let collab = MutexCollab::new(CollabOrigin::Server, workspace_id, vec![]); let collab = MutexCollab::new(CollabOrigin::Server, workspace_id, vec![], false);
collab.lock().with_origin_transact_mut(|txn| { collab.lock().with_origin_transact_mut(|txn| {
let update = Update::decode_v1(collab_update).unwrap(); let update = Update::decode_v1(collab_update).unwrap();
txn.apply_update(update); txn.apply_update(update);

View File

@ -385,6 +385,7 @@ async fn doc_state_from_document_data(
CollabOrigin::Empty, CollabOrigin::Empty,
doc_id, doc_id,
vec![], vec![],
false,
))); )));
let _ = Document::create_with_data(collab.clone(), data).map_err(internal_error)?; let _ = Document::create_with_data(collab.clone(), data).map_err(internal_error)?;
Ok::<_, FlowyError>(collab.encode_collab_v1()) Ok::<_, FlowyError>(collab.encode_collab_v1())

View File

@ -669,6 +669,7 @@ fn default_workspace_doc_state(collab_object: &CollabObject) -> Vec<u8> {
CollabOrigin::Empty, CollabOrigin::Empty,
&collab_object.object_id, &collab_object.object_id,
vec![], vec![],
false,
)); ));
let workspace = Workspace::new(workspace_id, "My workspace".to_string(), collab_object.uid); 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)); let folder = Folder::create(collab_object.uid, collab, None, FolderData::new(workspace));

View File

@ -122,7 +122,8 @@ pub async fn print_encryption_folder_snapshot(
.pop() .pop()
.unwrap(); .unwrap();
let collab = Arc::new( let collab = Arc::new(
MutexCollab::new_with_doc_state(CollabOrigin::Empty, folder_id, snapshot.blob, vec![]).unwrap(), MutexCollab::new_with_doc_state(CollabOrigin::Empty, folder_id, snapshot.blob, vec![], false)
.unwrap(),
); );
let folder_data = Folder::open(uid, collab, None) let folder_data = Folder::open(uid, collab, None)
.unwrap() .unwrap()

View File

@ -151,6 +151,7 @@ where
&old_user.session.user_workspace.workspace_database_object_id, &old_user.session.user_workspace.workspace_database_object_id,
"phantom", "phantom",
vec![], vec![],
false,
); );
database_with_views_collab.with_origin_transact_mut(|txn| { database_with_views_collab.with_origin_transact_mut(|txn| {
old_collab_r_txn.load_doc_with_txn( old_collab_r_txn.load_doc_with_txn(
@ -214,7 +215,7 @@ where
let new_uid = new_user_session.user_id; let new_uid = new_user_session.user_id;
let new_workspace_id = &new_user_session.user_workspace.id; let new_workspace_id = &new_user_session.user_workspace.id;
let old_folder_collab = Collab::new(old_uid, old_workspace_id, "phantom", vec![]); let old_folder_collab = Collab::new(old_uid, old_workspace_id, "phantom", vec![], false);
old_folder_collab.with_origin_transact_mut(|txn| { old_folder_collab.with_origin_transact_mut(|txn| {
old_collab_r_txn.load_doc_with_txn(old_uid, old_workspace_id, txn) old_collab_r_txn.load_doc_with_txn(old_uid, old_workspace_id, txn)
})?; })?;
@ -304,8 +305,9 @@ where
} }
let origin = CollabOrigin::Client(CollabClient::new(new_uid, "phantom")); let origin = CollabOrigin::Client(CollabClient::new(new_uid, "phantom"));
let new_folder_collab = Collab::new_with_doc_state(origin, new_workspace_id, vec![], vec![]) let new_folder_collab =
.map_err(|err| PersistenceError::Internal(err.into()))?; Collab::new_with_doc_state(origin, new_workspace_id, vec![], vec![], false)
.map_err(|err| PersistenceError::Internal(err.into()))?;
let mutex_collab = Arc::new(MutexCollab::from_collab(new_folder_collab)); let mutex_collab = Arc::new(MutexCollab::from_collab(new_folder_collab));
let new_user_id = UserId::from(new_uid); let new_user_id = UserId::from(new_uid);
info!("migrated folder: {:?}", folder_data); info!("migrated folder: {:?}", folder_data);
@ -450,7 +452,13 @@ where
{ {
let mut collab_by_oid = HashMap::new(); let mut collab_by_oid = HashMap::new();
for object_id in object_ids { for object_id in object_ids {
let collab = Collab::new(old_user.session.user_id, object_id, "phantom", vec![]); let collab = Collab::new(
old_user.session.user_id,
object_id,
"phantom",
vec![],
false,
);
match collab.with_origin_transact_mut(|txn| { match collab.with_origin_transact_mut(|txn| {
old_collab_r_txn.load_doc_with_txn(old_user.session.user_id, &object_id, txn) old_collab_r_txn.load_doc_with_txn(old_user.session.user_id, &object_id, txn)
}) { }) {

View File

@ -207,7 +207,7 @@ fn get_collab_doc_state(
collab_object: &CollabObject, collab_object: &CollabObject,
collab_db: &Arc<CollabKVDB>, collab_db: &Arc<CollabKVDB>,
) -> Result<Vec<u8>, PersistenceError> { ) -> Result<Vec<u8>, PersistenceError> {
let collab = Collab::new(uid, &collab_object.object_id, "phantom", vec![]); let collab = Collab::new(uid, &collab_object.object_id, "phantom", vec![], false);
let _ = collab.with_origin_transact_mut(|txn| { let _ = collab.with_origin_transact_mut(|txn| {
collab_db collab_db
.read_txn() .read_txn()
@ -226,7 +226,7 @@ fn get_database_doc_state(
collab_object: &CollabObject, collab_object: &CollabObject,
collab_db: &Arc<CollabKVDB>, collab_db: &Arc<CollabKVDB>,
) -> Result<(Vec<u8>, Vec<String>), PersistenceError> { ) -> Result<(Vec<u8>, Vec<String>), PersistenceError> {
let collab = Collab::new(uid, &collab_object.object_id, "phantom", vec![]); let collab = Collab::new(uid, &collab_object.object_id, "phantom", vec![], false);
let _ = collab.with_origin_transact_mut(|txn| { let _ = collab.with_origin_transact_mut(|txn| {
collab_db collab_db
.read_txn() .read_txn()
@ -250,7 +250,7 @@ async fn sync_folder(
user_service: Arc<dyn UserCloudService>, user_service: Arc<dyn UserCloudService>,
) -> Result<MutexFolder, Error> { ) -> Result<MutexFolder, Error> {
let (folder, update) = { let (folder, update) = {
let collab = Collab::new(uid, workspace_id, "phantom", vec![]); let collab = Collab::new(uid, workspace_id, "phantom", vec![], false);
// Use the temporary result to short the lifetime of the TransactionMut // Use the temporary result to short the lifetime of the TransactionMut
collab.with_origin_transact_mut(|txn| { collab.with_origin_transact_mut(|txn| {
collab_db collab_db
@ -308,7 +308,7 @@ async fn sync_database_views(
// Use the temporary result to short the lifetime of the TransactionMut // Use the temporary result to short the lifetime of the TransactionMut
let result = { let result = {
let collab = Collab::new(uid, database_views_aggregate_id, "phantom", vec![]); let collab = Collab::new(uid, database_views_aggregate_id, "phantom", vec![], false);
collab collab
.with_origin_transact_mut(|txn| { .with_origin_transact_mut(|txn| {
collab_db collab_db

View File

@ -80,7 +80,7 @@ where
{ {
// If the document is not exist, we don't need to migrate it. // If the document is not exist, we don't need to migrate it.
if load_collab(user_id, write_txn, &view.id).is_err() { if load_collab(user_id, write_txn, &view.id).is_err() {
let collab = Arc::new(MutexCollab::new(origin.clone(), &view.id, vec![])); let collab = Arc::new(MutexCollab::new(origin.clone(), &view.id, vec![], false));
let document = Document::create_with_data(collab, default_document_data())?; let document = Document::create_with_data(collab, default_document_data())?;
let encode = document.get_collab().encode_collab_v1(); let encode = document.get_collab().encode_collab_v1();
write_txn.flush_doc_with(user_id, &view.id, &encode.doc_state, &encode.state_vector)?; write_txn.flush_doc_with(user_id, &view.id, &encode.doc_state, &encode.state_vector)?;

View File

@ -15,7 +15,7 @@ where
R: CollabKVAction<'a>, R: CollabKVAction<'a>,
PersistenceError: From<R::Error>, PersistenceError: From<R::Error>,
{ {
let collab = Collab::new(uid, object_id, "phantom", vec![]); 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))?; 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::from_collab(collab)))
} }

View File

@ -271,6 +271,7 @@ where
&other_session.user_workspace.workspace_database_object_id, &other_session.user_workspace.workspace_database_object_id,
"phantom", "phantom",
vec![], vec![],
false,
); );
database_view_tracker_collab.with_origin_transact_mut(|txn| { database_view_tracker_collab.with_origin_transact_mut(|txn| {
other_collab_read_txn.load_doc_with_txn( other_collab_read_txn.load_doc_with_txn(
@ -455,7 +456,8 @@ where
W: CollabKVAction<'a>, W: CollabKVAction<'a>,
PersistenceError: From<W::Error>, PersistenceError: From<W::Error>,
{ {
let collab = Collab::new_with_doc_state(CollabOrigin::Empty, new_object_id, doc_state, vec![])?; let collab =
Collab::new_with_doc_state(CollabOrigin::Empty, new_object_id, doc_state, vec![], false)?;
write_collab_object(&collab, new_uid, new_object_id, w_txn); write_collab_object(&collab, new_uid, new_object_id, w_txn);
Ok(()) Ok(())
} }
@ -475,6 +477,7 @@ where
&other_session.user_workspace.id, &other_session.user_workspace.id,
"phantom", "phantom",
vec![], vec![],
false,
); );
other_folder_collab.with_origin_transact_mut(|txn| { other_folder_collab.with_origin_transact_mut(|txn| {
other_collab_read_txn.load_doc_with_txn( other_collab_read_txn.load_doc_with_txn(

View File

@ -32,7 +32,7 @@ where
{ {
let mut collab_by_oid = HashMap::new(); let mut collab_by_oid = HashMap::new();
for object_id in object_ids { for object_id in object_ids {
let collab = Collab::new(uid, object_id, "phantom", vec![]); let collab = Collab::new(uid, object_id, "phantom", vec![], false);
match collab match collab
.with_origin_transact_mut(|txn| collab_read_txn.load_doc_with_txn(uid, &object_id, txn)) .with_origin_transact_mut(|txn| collab_read_txn.load_doc_with_txn(uid, &object_id, txn))
{ {