chore: bump client api that deduplicate sync message (#4972)

* chore: bump client api

* chore: update log

* chore: bump client api
This commit is contained in:
Nathan.fooo 2024-03-24 07:31:41 +08:00 committed by GitHub
parent b307312a71
commit 3f0b3478c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 195 additions and 179 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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"again", "again",
"anyhow", "anyhow",
@ -729,6 +729,8 @@ dependencies = [
"client-websocket", "client-websocket",
"collab", "collab",
"collab-entity", "collab-entity",
"collab-rt-entity",
"collab-rt-protocol",
"database-entity", "database-entity",
"futures-core", "futures-core",
"futures-util", "futures-util",
@ -740,8 +742,6 @@ dependencies = [
"mime_guess", "mime_guess",
"parking_lot 0.12.1", "parking_lot 0.12.1",
"prost", "prost",
"realtime-entity",
"realtime-protocol",
"reqwest", "reqwest",
"scraper 0.17.1", "scraper 0.17.1",
"semver", "semver",
@ -764,7 +764,7 @@ dependencies = [
[[package]] [[package]]
name = "client-websocket" name = "client-websocket"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-util", "futures-util",
@ -1000,6 +1000,44 @@ dependencies = [
"yrs", "yrs",
] ]
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [
"anyhow",
"bincode",
"bytes",
"chrono",
"client-websocket",
"collab",
"collab-entity",
"collab-rt-protocol",
"database-entity",
"prost",
"prost-build",
"protoc-bin-vendored",
"serde",
"serde_json",
"serde_repr",
"thiserror",
"tokio-tungstenite",
"yrs",
]
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [
"anyhow",
"bincode",
"collab",
"serde",
"thiserror",
"yrs",
]
[[package]] [[package]]
name = "collab-user" name = "collab-user"
version = "0.1.0" version = "0.1.0"
@ -1226,7 +1264,7 @@ dependencies = [
"cssparser-macros", "cssparser-macros",
"dtoa-short", "dtoa-short",
"itoa 1.0.6", "itoa 1.0.6",
"phf 0.11.2", "phf 0.8.0",
"smallvec", "smallvec",
] ]
@ -1337,7 +1375,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -2639,7 +2677,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures-util", "futures-util",
@ -2656,7 +2694,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -3111,7 +3149,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"reqwest", "reqwest",
@ -4891,43 +4929,6 @@ dependencies = [
"crossbeam-utils", "crossbeam-utils",
] ]
[[package]]
name = "realtime-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325"
dependencies = [
"anyhow",
"bincode",
"bytes",
"client-websocket",
"collab",
"collab-entity",
"database-entity",
"prost",
"prost-build",
"protoc-bin-vendored",
"realtime-protocol",
"serde",
"serde_json",
"serde_repr",
"thiserror",
"tokio-tungstenite",
"yrs",
]
[[package]]
name = "realtime-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325"
dependencies = [
"anyhow",
"bincode",
"collab",
"serde",
"thiserror",
"yrs",
]
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.1.57" version = "0.1.57"
@ -5590,7 +5591,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -7553,7 +7554,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
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 = "ab9496c248b7c733d1aa160062abeb66c4e41325" } client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "4878d51c1ba5137a94d986383d65fd2dfa103a1e" }
# Please use the following script to update collab. # Please use the following script to update collab.
# Working directory: frontend # Working directory: frontend
# #

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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"again", "again",
"anyhow", "anyhow",
@ -558,6 +558,8 @@ dependencies = [
"client-websocket", "client-websocket",
"collab", "collab",
"collab-entity", "collab-entity",
"collab-rt-entity",
"collab-rt-protocol",
"database-entity", "database-entity",
"futures-core", "futures-core",
"futures-util", "futures-util",
@ -569,8 +571,6 @@ dependencies = [
"mime_guess", "mime_guess",
"parking_lot 0.12.1", "parking_lot 0.12.1",
"prost", "prost",
"realtime-entity",
"realtime-protocol",
"reqwest", "reqwest",
"scraper 0.17.1", "scraper 0.17.1",
"semver", "semver",
@ -592,7 +592,7 @@ dependencies = [
[[package]] [[package]]
name = "client-websocket" name = "client-websocket"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-util", "futures-util",
@ -767,6 +767,44 @@ dependencies = [
"yrs", "yrs",
] ]
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [
"anyhow",
"bincode",
"bytes",
"chrono",
"client-websocket",
"collab",
"collab-entity",
"collab-rt-protocol",
"database-entity",
"prost",
"prost-build",
"protoc-bin-vendored",
"serde",
"serde_json",
"serde_repr",
"thiserror",
"tokio-tungstenite",
"yrs",
]
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [
"anyhow",
"bincode",
"collab",
"serde",
"thiserror",
"yrs",
]
[[package]] [[package]]
name = "collab-user" name = "collab-user"
version = "0.1.0" version = "0.1.0"
@ -922,7 +960,7 @@ dependencies = [
"cssparser-macros", "cssparser-macros",
"dtoa-short", "dtoa-short",
"itoa", "itoa",
"phf 0.8.0", "phf 0.11.2",
"smallvec", "smallvec",
] ]
@ -967,7 +1005,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -1722,7 +1760,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures-util", "futures-util",
@ -1739,7 +1777,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -2073,7 +2111,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"reqwest", "reqwest",
@ -2802,7 +2840,7 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
dependencies = [ dependencies = [
"phf_macros", "phf_macros 0.8.0",
"phf_shared 0.8.0", "phf_shared 0.8.0",
"proc-macro-hack", "proc-macro-hack",
] ]
@ -2822,6 +2860,7 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
dependencies = [ dependencies = [
"phf_macros 0.11.2",
"phf_shared 0.11.2", "phf_shared 0.11.2",
] ]
@ -2889,6 +2928,19 @@ dependencies = [
"syn 1.0.109", "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]] [[package]]
name = "phf_shared" name = "phf_shared"
version = "0.8.0" version = "0.8.0"
@ -3314,43 +3366,6 @@ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
] ]
[[package]]
name = "realtime-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325"
dependencies = [
"anyhow",
"bincode",
"bytes",
"client-websocket",
"collab",
"collab-entity",
"database-entity",
"prost",
"prost-build",
"protoc-bin-vendored",
"realtime-protocol",
"serde",
"serde_json",
"serde_repr",
"thiserror",
"tokio-tungstenite",
"yrs",
]
[[package]]
name = "realtime-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325"
dependencies = [
"anyhow",
"bincode",
"collab",
"serde",
"thiserror",
"yrs",
]
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.1.57" version = "0.1.57"
@ -3794,7 +3809,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",

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 = "ab9496c248b7c733d1aa160062abeb66c4e41325" } client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "4878d51c1ba5137a94d986383d65fd2dfa103a1e" }
# Please use the following script to update collab. # Please use the following script to update collab.
# Working directory: frontend # Working directory: frontend
# #

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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"again", "again",
"anyhow", "anyhow",
@ -686,6 +686,8 @@ dependencies = [
"client-websocket", "client-websocket",
"collab", "collab",
"collab-entity", "collab-entity",
"collab-rt-entity",
"collab-rt-protocol",
"database-entity", "database-entity",
"futures-core", "futures-core",
"futures-util", "futures-util",
@ -697,8 +699,6 @@ dependencies = [
"mime_guess", "mime_guess",
"parking_lot 0.12.1", "parking_lot 0.12.1",
"prost", "prost",
"realtime-entity",
"realtime-protocol",
"reqwest", "reqwest",
"scraper 0.17.1", "scraper 0.17.1",
"semver", "semver",
@ -721,7 +721,7 @@ dependencies = [
[[package]] [[package]]
name = "client-websocket" name = "client-websocket"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-util", "futures-util",
@ -926,6 +926,44 @@ dependencies = [
"yrs", "yrs",
] ]
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [
"anyhow",
"bincode",
"bytes",
"chrono",
"client-websocket",
"collab",
"collab-entity",
"collab-rt-protocol",
"database-entity",
"prost",
"prost-build",
"protoc-bin-vendored",
"serde",
"serde_json",
"serde_repr",
"thiserror",
"tokio-tungstenite",
"yrs",
]
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [
"anyhow",
"bincode",
"collab",
"serde",
"thiserror",
"yrs",
]
[[package]] [[package]]
name = "collab-user" name = "collab-user"
version = "0.1.0" version = "0.1.0"
@ -1126,7 +1164,7 @@ dependencies = [
"cssparser-macros", "cssparser-macros",
"dtoa-short", "dtoa-short",
"itoa", "itoa",
"phf 0.11.2", "phf 0.8.0",
"smallvec", "smallvec",
] ]
@ -1259,7 +1297,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -2434,7 +2472,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures-util", "futures-util",
@ -2451,7 +2489,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -2845,7 +2883,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"reqwest", "reqwest",
@ -3664,7 +3702,7 @@ version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
dependencies = [ dependencies = [
"phf_macros 0.8.0", "phf_macros",
"phf_shared 0.8.0", "phf_shared 0.8.0",
"proc-macro-hack", "proc-macro-hack",
] ]
@ -3684,7 +3722,6 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
dependencies = [ dependencies = [
"phf_macros 0.11.2",
"phf_shared 0.11.2", "phf_shared 0.11.2",
] ]
@ -3752,19 +3789,6 @@ dependencies = [
"syn 1.0.109", "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]] [[package]]
name = "phf_shared" name = "phf_shared"
version = "0.8.0" version = "0.8.0"
@ -4338,43 +4362,6 @@ dependencies = [
"rand_core 0.3.1", "rand_core 0.3.1",
] ]
[[package]]
name = "realtime-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325"
dependencies = [
"anyhow",
"bincode",
"bytes",
"client-websocket",
"collab",
"collab-entity",
"database-entity",
"prost",
"prost-build",
"protoc-bin-vendored",
"realtime-protocol",
"serde",
"serde_json",
"serde_repr",
"thiserror",
"tokio-tungstenite",
"yrs",
]
[[package]]
name = "realtime-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325"
dependencies = [
"anyhow",
"bincode",
"collab",
"serde",
"thiserror",
"yrs",
]
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.1.57" version = "0.1.57"
@ -4958,7 +4945,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -6371,7 +6358,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=ab9496c248b7c733d1aa160062abeb66c4e41325#ab9496c248b7c733d1aa160062abeb66c4e41325" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=4878d51c1ba5137a94d986383d65fd2dfa103a1e#4878d51c1ba5137a94d986383d65fd2dfa103a1e"
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 = "ab9496c248b7c733d1aa160062abeb66c4e41325" } client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "4878d51c1ba5137a94d986383d65fd2dfa103a1e" }
# Please use the following script to update collab. # Please use the following script to update collab.
# Working directory: frontend # Working directory: frontend
# #

View File

@ -32,10 +32,14 @@ pub(crate) fn create_log_filter(level: String, with_crates: Vec<String>) -> Stri
filters.push(format!("flowy_server={}", level)); filters.push(format!("flowy_server={}", level));
filters.push(format!("flowy_notification={}", "info")); filters.push(format!("flowy_notification={}", "info"));
filters.push(format!("lib_infra={}", level)); filters.push(format!("lib_infra={}", level));
// filters.push(format!("lib_dispatch={}", level));
filters.push(format!("dart_ffi={}", "info")); // ⚠Enable debug log for dart_ffi, flowy_sqlite and lib_dispatch as needed. Don't enable them by default.
filters.push(format!("flowy_sqlite={}", "info")); {
// filters.push(format!("flowy_sqlite={}", "info"));
// filters.push(format!("dart_ffi={}", "info"));
// filters.push(format!("lib_dispatch={}", level));
}
filters.push(format!("client_api={}", level)); filters.push(format!("client_api={}", level));
#[cfg(feature = "profiling")] #[cfg(feature = "profiling")]
filters.push(format!("tokio={}", level)); filters.push(format!("tokio={}", level));

View File

@ -238,7 +238,6 @@ impl DatabaseManager {
Ok(editor) Ok(editor)
} }
#[tracing::instrument(level = "debug", skip_all)]
pub async fn close_database_view<T: AsRef<str>>(&self, view_id: T) -> FlowyResult<()> { pub async fn close_database_view<T: AsRef<str>>(&self, view_id: T) -> FlowyResult<()> {
let view_id = view_id.as_ref(); let view_id = view_id.as_ref();
let wdb = self.get_workspace_database().await?; let wdb = self.get_workspace_database().await?;

View File

@ -117,7 +117,6 @@ impl DatabaseEditor {
/// Returns bool value indicating whether the database is empty. /// Returns bool value indicating whether the database is empty.
/// ///
#[tracing::instrument(level = "debug", skip_all)]
pub async fn close_view(&self, view_id: &str) -> bool { pub async fn close_view(&self, view_id: &str) -> bool {
// If the database is empty, flush the database to the disk. // If the database is empty, flush the database to the disk.
if self.database_views.editors().await.len() == 1 { if self.database_views.editors().await.len() == 1 {

View File

@ -15,7 +15,7 @@ use flowy_storage::object_from_disk;
use lru::LruCache; use lru::LruCache;
use parking_lot::Mutex; use parking_lot::Mutex;
use tokio::io::AsyncWriteExt; use tokio::io::AsyncWriteExt;
use tracing::error; use tracing::{error, trace};
use tracing::{event, instrument}; use tracing::{event, instrument};
use collab_integrate::collab_builder::{AppFlowyCollabBuilder, CollabBuilderConfig}; use collab_integrate::collab_builder::{AppFlowyCollabBuilder, CollabBuilderConfig};
@ -199,10 +199,10 @@ impl DocumentManager {
.map_err(internal_error) .map_err(internal_error)
} }
#[instrument(level = "debug", skip(self), err)]
pub async fn close_document(&self, doc_id: &str) -> FlowyResult<()> { pub async fn close_document(&self, doc_id: &str) -> FlowyResult<()> {
// The lru will pop the least recently used document when the cache is full. // The lru will pop the least recently used document when the cache is full.
if let Ok(doc) = self.get_document(doc_id).await { if let Ok(doc) = self.get_document(doc_id).await {
trace!("close document: {}", doc_id);
if let Some(doc) = doc.try_lock() { if let Some(doc) = doc.try_lock() {
let _ = doc.flush(); let _ = doc.flush();
} }

View File

@ -1,4 +1,5 @@
use std::sync::{Arc, Weak}; use std::sync::{Arc, Weak};
use tracing::instrument;
use flowy_error::{FlowyError, FlowyResult}; use flowy_error::{FlowyError, FlowyResult};
use lib_dispatch::prelude::{data_result_ok, AFPluginData, AFPluginState, DataResult}; use lib_dispatch::prelude::{data_result_ok, AFPluginData, AFPluginState, DataResult};
@ -207,6 +208,7 @@ pub(crate) async fn set_latest_view_handler(
Ok(()) Ok(())
} }
#[instrument(level = "debug", skip(data, folder), err)]
pub(crate) async fn close_view_handler( pub(crate) async fn close_view_handler(
data: AFPluginData<ViewIdPB>, data: AFPluginData<ViewIdPB>,
folder: AFPluginState<Weak<FolderManager>>, folder: AFPluginState<Weak<FolderManager>>,

View File

@ -164,7 +164,7 @@ impl AFPluginDispatcher {
let request: AFPluginRequest = request.into(); let request: AFPluginRequest = request.into();
let plugins = dispatch.plugins.clone(); let plugins = dispatch.plugins.clone();
let service = Box::new(DispatchService { plugins }); let service = Box::new(DispatchService { plugins });
tracing::trace!("Async event: {:?}", &request.event); tracing::trace!("[dispatch]: Async event: {:?}", &request.event);
let service_ctx = DispatchContext { let service_ctx = DispatchContext {
request, request,
callback: Some(Box::new(callback)), callback: Some(Box::new(callback)),
@ -172,7 +172,7 @@ impl AFPluginDispatcher {
let handle = dispatch.runtime.spawn(async move { let handle = dispatch.runtime.spawn(async move {
service.call(service_ctx).await.unwrap_or_else(|e| { service.call(service_ctx).await.unwrap_or_else(|e| {
tracing::error!("Dispatch runtime error: {:?}", e); tracing::error!("[dispatch]: runtime error: {:?}", e);
InternalError::Other(format!("{:?}", e)).as_response() InternalError::Other(format!("{:?}", e)).as_response()
}) })
}); });
@ -292,18 +292,27 @@ impl Service<DispatchContext> for DispatchService {
let result = { let result = {
match module_map.get(&request.event) { match module_map.get(&request.event) {
Some(module) => { Some(module) => {
let event = format!("{:?}", request.event);
event!( event!(
tracing::Level::TRACE, tracing::Level::TRACE,
"Handle event: {:?} by {:?}", "[dispatch]: {:?} exec event:{}",
&request.event, &module.name,
module.name &event,
); );
let fut = module.new_service(()); let fut = module.new_service(());
let service_fut = fut.await?.call(request); let service_fut = fut.await?.call(request);
service_fut.await let result = service_fut.await;
event!(
tracing::Level::TRACE,
"[dispatch]: {:?} exec event:{} with result: {}",
&module.name,
&event,
result.is_ok()
);
result
}, },
None => { None => {
let msg = format!("Can not find the event handler. {:?}", request); let msg = format!("[dispatch]: can not find the event handler. {:?}", request);
event!(tracing::Level::ERROR, "{}", msg); event!(tracing::Level::ERROR, "{}", msg);
Err(InternalError::HandleNotFound(msg).into()) Err(InternalError::HandleNotFound(msg).into())
}, },