chore: bump client api (#6113)

* chore: bump client api and collab
This commit is contained in:
Nathan.fooo 2024-08-30 14:31:05 +08:00 committed by GitHub
parent d89804f3e4
commit c3114e5a39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 139 additions and 134 deletions

View File

@ -172,7 +172,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "app-error"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bincode",
@ -192,7 +192,7 @@ dependencies = [
[[package]]
name = "appflowy-ai-client"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bytes",
@ -837,7 +837,7 @@ dependencies = [
[[package]]
name = "client-api"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"again",
"anyhow",
@ -888,7 +888,7 @@ dependencies = [
[[package]]
name = "client-api-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"collab-entity",
"collab-rt-entity",
@ -901,7 +901,7 @@ dependencies = [
[[package]]
name = "client-websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"futures-channel",
"futures-util",
@ -975,7 +975,7 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"arc-swap",
@ -1000,7 +1000,7 @@ dependencies = [
[[package]]
name = "collab-database"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"async-trait",
@ -1029,7 +1029,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"arc-swap",
@ -1049,7 +1049,7 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"bytes",
@ -1068,7 +1068,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"arc-swap",
@ -1111,7 +1111,7 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"async-stream",
@ -1149,7 +1149,7 @@ dependencies = [
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bincode",
@ -1174,7 +1174,7 @@ dependencies = [
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"async-trait",
@ -1191,7 +1191,7 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"collab",
@ -1446,7 +1446,7 @@ dependencies = [
"cssparser-macros",
"dtoa-short",
"itoa 1.0.6",
"phf 0.8.0",
"phf 0.11.2",
"smallvec",
]
@ -1571,7 +1571,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]]
name = "database-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"app-error",
@ -3117,7 +3117,7 @@ dependencies = [
[[package]]
name = "gotrue"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"futures-util",
@ -3134,7 +3134,7 @@ dependencies = [
[[package]]
name = "gotrue-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"app-error",
@ -3566,7 +3566,7 @@ dependencies = [
[[package]]
name = "infra"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bytes",
@ -6169,7 +6169,7 @@ dependencies = [
[[package]]
name = "shared-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"app-error",

View File

@ -53,7 +53,7 @@ collab-user = { version = "0.2" }
# Run the script:
# scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "c9504d4081a8d9893830dc6598429353b078271b" }
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "52782033948b7d243693ca159ea519d53458c8a6" }
[dependencies]
serde_json.workspace = true
@ -116,13 +116,13 @@ custom-protocol = ["tauri/custom-protocol"]
# To switch to the local path, run:
# scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
# Working directory: frontend
# To update the commit ID, run:

View File

@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "app-error"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bincode",
@ -183,7 +183,7 @@ dependencies = [
[[package]]
name = "appflowy-ai-client"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bytes",
@ -811,7 +811,7 @@ dependencies = [
[[package]]
name = "client-api"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"again",
"anyhow",
@ -862,7 +862,7 @@ dependencies = [
[[package]]
name = "client-api-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"collab-entity",
"collab-rt-entity",
@ -875,7 +875,7 @@ dependencies = [
[[package]]
name = "client-websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"futures-channel",
"futures-util",
@ -958,7 +958,7 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"arc-swap",
@ -983,7 +983,7 @@ dependencies = [
[[package]]
name = "collab-database"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"async-trait",
@ -1012,7 +1012,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"arc-swap",
@ -1032,7 +1032,7 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"bytes",
@ -1051,7 +1051,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"arc-swap",
@ -1094,7 +1094,7 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"async-stream",
@ -1132,7 +1132,7 @@ dependencies = [
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bincode",
@ -1157,7 +1157,7 @@ dependencies = [
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"async-trait",
@ -1174,7 +1174,7 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"collab",
@ -1436,7 +1436,7 @@ dependencies = [
"cssparser-macros",
"dtoa-short",
"itoa 1.0.10",
"phf 0.8.0",
"phf 0.11.2",
"smallvec",
]
@ -1561,7 +1561,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
[[package]]
name = "database-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"app-error",
@ -3184,7 +3184,7 @@ dependencies = [
[[package]]
name = "gotrue"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"futures-util",
@ -3201,7 +3201,7 @@ dependencies = [
[[package]]
name = "gotrue-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"app-error",
@ -3638,7 +3638,7 @@ dependencies = [
[[package]]
name = "infra"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bytes",
@ -6233,7 +6233,7 @@ dependencies = [
[[package]]
name = "shared-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"app-error",

View File

@ -52,7 +52,7 @@ collab-user = { version = "0.2" }
# Run the script:
# scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "c9504d4081a8d9893830dc6598429353b078271b" }
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "52782033948b7d243693ca159ea519d53458c8a6" }
[dependencies]
serde_json.workspace = true
@ -116,13 +116,13 @@ custom-protocol = ["tauri/custom-protocol"]
# To switch to the local path, run:
# scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
# Working directory: frontend
# To update the commit ID, run:

View File

@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "app-error"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bincode",
@ -183,7 +183,7 @@ dependencies = [
[[package]]
name = "appflowy-ai-client"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bytes",
@ -729,7 +729,7 @@ dependencies = [
[[package]]
name = "client-api"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"again",
"anyhow",
@ -780,7 +780,7 @@ dependencies = [
[[package]]
name = "client-api-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"collab-entity",
"collab-rt-entity",
@ -793,7 +793,7 @@ dependencies = [
[[package]]
name = "client-websocket"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"futures-channel",
"futures-util",
@ -836,7 +836,7 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"arc-swap",
@ -861,7 +861,7 @@ dependencies = [
[[package]]
name = "collab-database"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"async-trait",
@ -890,7 +890,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"arc-swap",
@ -910,7 +910,7 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"bytes",
@ -929,7 +929,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"arc-swap",
@ -972,7 +972,7 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"async-stream",
@ -1010,7 +1010,7 @@ dependencies = [
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bincode",
@ -1035,7 +1035,7 @@ dependencies = [
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"async-trait",
@ -1052,7 +1052,7 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=49cf2206d7494bb3006402b807e7f171905213e3#49cf2206d7494bb3006402b807e7f171905213e3"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac#47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac"
dependencies = [
"anyhow",
"collab",
@ -1395,7 +1395,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]]
name = "database-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"app-error",
@ -2795,7 +2795,7 @@ dependencies = [
[[package]]
name = "gotrue"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"futures-util",
@ -2812,7 +2812,7 @@ dependencies = [
[[package]]
name = "gotrue-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"app-error",
@ -3177,7 +3177,7 @@ dependencies = [
[[package]]
name = "infra"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"bytes",
@ -5377,7 +5377,7 @@ dependencies = [
[[package]]
name = "shared-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=c9504d4081a8d9893830dc6598429353b078271b#c9504d4081a8d9893830dc6598429353b078271b"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=52782033948b7d243693ca159ea519d53458c8a6#52782033948b7d243693ca159ea519d53458c8a6"
dependencies = [
"anyhow",
"app-error",

View File

@ -100,8 +100,8 @@ dashmap = "6.0.1"
# 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 = "c9504d4081a8d9893830dc6598429353b078271b" }
client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "c9504d4081a8d9893830dc6598429353b078271b" }
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "52782033948b7d243693ca159ea519d53458c8a6" }
client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "52782033948b7d243693ca159ea519d53458c8a6" }
[profile.dev]
opt-level = 0
@ -136,13 +136,13 @@ rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb", rev = "1710120
# To switch to the local path, run:
# scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "49cf2206d7494bb3006402b807e7f171905213e3" }
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "47dbd6c8033f8fd2999cb8d11f2d60ede121a0ac" }
# Working directory: frontend
# To update the commit ID, run:

View File

@ -25,11 +25,11 @@ use collab_plugins::local_storage::indexeddb::IndexeddbDiskPlugin;
}
pub use crate::plugin_provider::CollabCloudPluginProvider;
use collab::lock::RwLock;
use collab_plugins::local_storage::kv::doc::CollabKVAction;
use collab_plugins::local_storage::kv::KVTransactionDB;
use collab_plugins::local_storage::CollabPersistenceConfig;
use collab_user::core::{UserAwareness, UserAwarenessNotifier};
use tokio::sync::RwLock;
use lib_infra::{if_native, if_wasm};
use tracing::{error, instrument, trace, warn};

View File

@ -6,6 +6,7 @@ use std::collections::HashMap;
use std::sync::{Arc, Weak};
use collab::core::collab::DataSource;
use collab::lock::RwLock;
use collab::preclude::Collab;
use collab_database::database::{Database, DatabaseData};
use collab_database::entity::{CreateDatabaseParams, CreateViewParams};
@ -20,7 +21,7 @@ use collab_entity::{CollabObject, CollabType, EncodedCollab};
use collab_plugins::local_storage::kv::KVTransactionDB;
use dashmap::DashMap;
use tokio::select;
use tokio::sync::{Mutex, RwLock};
use tokio::sync::Mutex;
use tokio_util::sync::CancellationToken;
use tracing::{error, info, instrument, trace};
@ -39,6 +40,7 @@ use crate::services::cell::stringify_cell;
use crate::services::database::DatabaseEditor;
use crate::services::database_view::DatabaseLayoutDepsResolver;
use crate::services::field::translate_type_option::translate::TranslateTypeOption;
use tokio::sync::RwLock as TokioRwLock;
use crate::services::field_settings::default_field_settings_by_layout_map;
use crate::services::share::csv::{CSVFormat, CSVImporter, ImportResult};
@ -53,7 +55,7 @@ pub trait DatabaseUser: Send + Sync {
pub struct DatabaseManager {
user: Arc<dyn DatabaseUser>,
workspace_database: ArcSwapOption<RwLock<WorkspaceDatabase>>,
task_scheduler: Arc<RwLock<TaskDispatcher>>,
task_scheduler: Arc<TokioRwLock<TaskDispatcher>>,
editors: Mutex<HashMap<String, Arc<DatabaseEditor>>>,
removing_editor: Arc<Mutex<HashMap<String, Arc<DatabaseEditor>>>>,
collab_builder: Arc<AppFlowyCollabBuilder>,
@ -64,7 +66,7 @@ pub struct DatabaseManager {
impl DatabaseManager {
pub fn new(
database_user: Arc<dyn DatabaseUser>,
task_scheduler: Arc<RwLock<TaskDispatcher>>,
task_scheduler: Arc<TokioRwLock<TaskDispatcher>>,
collab_builder: Arc<AppFlowyCollabBuilder>,
cloud_service: Arc<dyn DatabaseCloudService>,
ai_service: Arc<dyn DatabaseAIService>,
@ -370,7 +372,7 @@ impl DatabaseManager {
) -> FlowyResult<EncodedCollab> {
let database_data = DatabaseData::from_json_bytes(data)?;
let mut create_database_params = CreateDatabaseParams::from_database_data(database_data);
let mut create_database_params = CreateDatabaseParams::from_database_data(database_data, None);
let old_view_id = create_database_params.inline_view_id.clone();
create_database_params.inline_view_id = view_id.to_string();
@ -906,27 +908,26 @@ impl DatabaseCollabPersistenceService for DatabasePersistenceImpl {
}
}
fn flush_collab(
fn flush_collabs(
&self,
object_id: &str,
encode_collab: EncodedCollab,
encoded_collabs: Vec<(String, EncodedCollab)>,
) -> Result<(), DatabaseError> {
let uid = self
.user
.user_id()
.map_err(|err| DatabaseError::Internal(err.into()))?;
if let Ok(Some(collab_db)) = self.user.collab_db(uid).map(|weak| weak.upgrade()) {
trace!("[Database]: flush collab:{}", object_id);
let write_txn = collab_db.write_txn();
write_txn
.flush_doc(
uid,
object_id,
encode_collab.state_vector.to_vec(),
encode_collab.doc_state.to_vec(),
)
.map_err(|err| DatabaseError::Internal(anyhow!("failed to flush doc: {}", err)))?;
for (object_id, encode_collab) in encoded_collabs {
write_txn
.flush_doc(
uid,
&object_id,
encode_collab.state_vector.to_vec(),
encode_collab.doc_state.to_vec(),
)
.map_err(|err| DatabaseError::Internal(anyhow!("failed to flush doc: {}", err)))?;
}
write_txn
.commit_transaction()
.map_err(|err| DatabaseError::Internal(anyhow!("failed to commit transaction: {}", err)))?;

View File

@ -6,7 +6,7 @@ use collab_database::fields::Field;
use collab_database::rows::{Row, RowCell};
use flowy_error::FlowyResult;
use serde::{Deserialize, Serialize};
use tokio::sync::RwLock;
use tokio::sync::RwLock as TokioRwLock;
use lib_infra::priority_task::{QualityOfService, Task, TaskContent, TaskDispatcher};
@ -34,7 +34,7 @@ pub struct CalculationsController {
handler_id: String,
delegate: Box<dyn CalculationsDelegate>,
calculations_by_field_cache: CalculationsByFieldIdCache,
task_scheduler: Arc<RwLock<TaskDispatcher>>,
task_scheduler: Arc<TokioRwLock<TaskDispatcher>>,
calculations_service: CalculationsService,
notifier: DatabaseViewChangedNotifier,
}
@ -51,7 +51,7 @@ impl CalculationsController {
handler_id: &str,
delegate: T,
calculations: Vec<Arc<Calculation>>,
task_scheduler: Arc<RwLock<TaskDispatcher>>,
task_scheduler: Arc<TokioRwLock<TaskDispatcher>>,
notifier: DatabaseViewChangedNotifier,
) -> Self
where

View File

@ -22,6 +22,7 @@ use crate::utils::cache::AnyTypeCache;
use crate::DatabaseUser;
use arc_swap::ArcSwap;
use async_trait::async_trait;
use collab::lock::RwLock;
use collab_database::database::Database;
use collab_database::entity::DatabaseView;
use collab_database::fields::{Field, TypeOptionData};
@ -40,7 +41,8 @@ use lib_infra::util::timestamp;
use std::collections::HashMap;
use std::sync::Arc;
use std::time::Duration;
use tokio::sync::{broadcast, oneshot, RwLock};
use tokio::sync::RwLock as TokioRwLock;
use tokio::sync::{broadcast, oneshot};
use tokio_util::sync::CancellationToken;
use tracing::{debug, error, event, info, instrument, trace, warn};
@ -66,7 +68,7 @@ impl DatabaseEditor {
pub async fn new(
user: Arc<dyn DatabaseUser>,
database: Arc<RwLock<Database>>,
task_scheduler: Arc<RwLock<TaskDispatcher>>,
task_scheduler: Arc<TokioRwLock<TaskDispatcher>>,
collab_builder: Arc<AppFlowyCollabBuilder>,
) -> FlowyResult<Arc<Self>> {
let notification_sender = Arc::new(DebounceNotificationSender::new(200));
@ -1576,7 +1578,7 @@ impl DatabaseEditor {
struct DatabaseViewOperationImpl {
database: Arc<RwLock<Database>>,
task_scheduler: Arc<RwLock<TaskDispatcher>>,
task_scheduler: Arc<TokioRwLock<TaskDispatcher>>,
cell_cache: CellCache,
editor_by_view_id: Arc<RwLock<EditorByViewId>>,
database_cancellation: Arc<RwLock<Option<CancellationToken>>>,
@ -1860,7 +1862,7 @@ impl DatabaseViewOperation for DatabaseViewOperationImpl {
.update_layout_type(view_id, layout_type);
}
fn get_task_scheduler(&self) -> Arc<RwLock<TaskDispatcher>> {
fn get_task_scheduler(&self) -> Arc<TokioRwLock<TaskDispatcher>> {
self.task_scheduler.clone()
}

View File

@ -1,6 +1,7 @@
use crate::entities::{DatabaseSyncStatePB, DidFetchRowPB, RowsChangePB};
use crate::notification::{send_notification, DatabaseNotification, DATABASE_OBSERVABLE_SOURCE};
use crate::services::database::{DatabaseEditor, UpdatedRow};
use collab::lock::RwLock;
use collab_database::blocks::BlockEvent;
use collab_database::database::Database;
use collab_database::fields::FieldChange;
@ -10,7 +11,6 @@ use flowy_notification::{DebounceNotificationSender, NotificationBuilder};
use futures::StreamExt;
use lib_dispatch::prelude::af_spawn;
use std::sync::Arc;
use tokio::sync::RwLock;
use tracing::{trace, warn};
pub(crate) async fn observe_sync_state(database_id: &str, database: &Arc<RwLock<Database>>) {

View File

@ -1,10 +1,10 @@
use collab::lock::RwLock;
use collab_database::database::{gen_field_id, Database};
use collab_database::fields::Field;
use collab_database::views::{
DatabaseLayout, FieldSettingsByFieldIdMap, LayoutSetting, OrderObjectPosition,
};
use std::sync::Arc;
use tokio::sync::RwLock;
use crate::entities::FieldType;
use crate::services::field::{DateTypeOption, SingleSelectTypeOption};

View File

@ -1,4 +1,5 @@
use async_trait::async_trait;
use collab::lock::RwLock;
use collab_database::database::Database;
use collab_database::entity::DatabaseView;
use collab_database::fields::{Field, TypeOptionData};
@ -6,7 +7,7 @@ use collab_database::rows::{Row, RowCell, RowDetail, RowId};
use collab_database::views::{DatabaseLayout, LayoutSetting};
use std::collections::HashMap;
use std::sync::Arc;
use tokio::sync::RwLock;
use tokio::sync::RwLock as TokioRwLock;
use flowy_error::FlowyError;
use lib_infra::priority_task::TaskDispatcher;
@ -118,7 +119,7 @@ pub trait DatabaseViewOperation: Send + Sync + 'static {
async fn update_layout_type(&self, view_id: &str, layout_type: &DatabaseLayout);
/// Returns a `TaskDispatcher` used to poll a `Task`
fn get_task_scheduler(&self) -> Arc<RwLock<TaskDispatcher>>;
fn get_task_scheduler(&self) -> Arc<TokioRwLock<TaskDispatcher>>;
fn get_type_option_cell_handler(
&self,

View File

@ -2,14 +2,13 @@ use collab_database::database::Database;
use std::collections::HashMap;
use std::sync::Arc;
use nanoid::nanoid;
use tokio::sync::{broadcast, RwLock};
use flowy_error::FlowyResult;
use crate::services::cell::CellCache;
use crate::services::database::DatabaseRowEvent;
use crate::services::database_view::{DatabaseViewEditor, DatabaseViewOperation};
use collab::lock::RwLock;
use flowy_error::FlowyResult;
use nanoid::nanoid;
use tokio::sync::broadcast;
pub type RowEventSender = broadcast::Sender<DatabaseRowEvent>;
pub type RowEventReceiver = broadcast::Receiver<DatabaseRowEvent>;

View File

@ -3,6 +3,7 @@ use std::collections::HashMap;
use std::str::FromStr;
use std::sync::Arc;
use collab::lock::RwLock;
use collab_database::database::gen_database_filter_id;
use collab_database::fields::Field;
use collab_database::rows::{Cell, Cells, Row, RowDetail, RowId};
@ -10,7 +11,7 @@ use dashmap::DashMap;
use flowy_error::FlowyResult;
use lib_infra::priority_task::{QualityOfService, Task, TaskContent, TaskDispatcher};
use serde::{Deserialize, Serialize};
use tokio::sync::RwLock;
use tokio::sync::RwLock as TokioRwLock;
use tracing::{error, trace};
use crate::entities::filter_entities::*;
@ -41,7 +42,7 @@ pub struct FilterController {
result_by_row_id: DashMap<RowId, bool>,
cell_cache: CellCache,
filters: RwLock<Vec<Filter>>,
task_scheduler: Arc<RwLock<TaskDispatcher>>,
task_scheduler: Arc<TokioRwLock<TaskDispatcher>>,
notifier: DatabaseViewChangedNotifier,
}
@ -56,7 +57,7 @@ impl FilterController {
view_id: &str,
handler_id: &str,
delegate: T,
task_scheduler: Arc<RwLock<TaskDispatcher>>,
task_scheduler: Arc<TokioRwLock<TaskDispatcher>>,
cell_cache: CellCache,
notifier: DatabaseViewChangedNotifier,
) -> Self

View File

@ -8,7 +8,7 @@ use collab_database::fields::Field;
use collab_database::rows::{Cell, Row, RowId};
use rayon::prelude::ParallelSliceMut;
use serde::{Deserialize, Serialize};
use tokio::sync::RwLock;
use tokio::sync::RwLock as TokioRwLock;
use flowy_error::FlowyResult;
use lib_infra::priority_task::{QualityOfService, Task, TaskContent, TaskDispatcher};
@ -38,7 +38,7 @@ pub struct SortController {
view_id: String,
handler_id: String,
delegate: Box<dyn SortDelegate>,
task_scheduler: Arc<RwLock<TaskDispatcher>>,
task_scheduler: Arc<TokioRwLock<TaskDispatcher>>,
sorts: Vec<Arc<Sort>>,
cell_cache: CellCache,
row_index_cache: HashMap<RowId, usize>,
@ -57,7 +57,7 @@ impl SortController {
handler_id: &str,
sorts: Vec<Arc<Sort>>,
delegate: T,
task_scheduler: Arc<RwLock<TaskDispatcher>>,
task_scheduler: Arc<TokioRwLock<TaskDispatcher>>,
cell_cache: CellCache,
notifier: DatabaseViewChangedNotifier,
) -> Self

View File

@ -4,6 +4,7 @@ use std::sync::Weak;
use collab::core::collab::DataSource;
use collab::core::origin::CollabOrigin;
use collab::entity::EncodedCollab;
use collab::lock::RwLock;
use collab::preclude::Collab;
use collab_document::blocks::DocumentData;
use collab_document::conversions::convert_document_to_plain_text;
@ -17,7 +18,6 @@ use collab_plugins::local_storage::kv::KVTransactionDB;
use collab_plugins::CollabKVDB;
use dashmap::DashMap;
use lib_infra::util::timestamp;
use tokio::sync::RwLock;
use tracing::trace;
use tracing::{event, instrument};

View File

@ -22,6 +22,7 @@ use crate::view_operation::{
};
use arc_swap::ArcSwapOption;
use collab::core::collab::DataSource;
use collab::lock::RwLock;
use collab_entity::{CollabType, EncodedCollab};
use collab_folder::{
Folder, FolderData, FolderNotify, Section, SectionItem, TrashInfo, View, ViewLayout, ViewUpdate,
@ -44,7 +45,6 @@ use futures::future;
use std::collections::HashMap;
use std::fmt::{Display, Formatter};
use std::sync::{Arc, Weak};
use tokio::sync::RwLock;
use tracing::{error, info, instrument};
pub trait FolderUser: Send + Sync {

View File

@ -2,12 +2,12 @@ use crate::manager::{FolderInitDataSource, FolderManager};
use crate::manager_observer::*;
use crate::user_default::DefaultFolderBuilder;
use collab::core::collab::DataSource;
use collab::lock::RwLock;
use collab_entity::{CollabType, EncodedCollab};
use collab_folder::{Folder, FolderNotify};
use collab_integrate::CollabKVDB;
use flowy_error::{FlowyError, FlowyResult};
use std::sync::{Arc, Weak};
use tokio::sync::RwLock;
use tokio::task::spawn_blocking;
use tracing::{event, info, Level};

View File

@ -5,6 +5,7 @@ use crate::entities::{
use crate::manager::{get_workspace_private_view_pbs, get_workspace_public_view_pbs, FolderUser};
use crate::notification::{send_notification, FolderNotification};
use collab::core::collab_state::SyncState;
use collab::lock::RwLock;
use collab_folder::{
Folder, SectionChange, SectionChangeReceiver, TrashSectionChange, View, ViewChange,
ViewChangeReceiver,
@ -12,7 +13,6 @@ use collab_folder::{
use lib_dispatch::prelude::af_spawn;
use std::collections::HashSet;
use std::sync::Weak;
use tokio::sync::RwLock;
use tokio_stream::wrappers::WatchStream;
use tokio_stream::StreamExt;
use tracing::{event, trace, Level};

View File

@ -1,11 +1,11 @@
use crate::manager::{FolderManager, FolderUser};
use crate::view_operation::FolderOperationHandlers;
use collab::lock::RwLock;
use collab_folder::Folder;
use collab_integrate::collab_builder::AppFlowyCollabBuilder;
use flowy_folder_pub::cloud::FolderCloudService;
use flowy_search_pub::entities::FolderIndexManager;
use std::sync::Arc;
use tokio::sync::RwLock;
impl FolderManager {
pub fn get_mutex_folder(&self) -> Option<Arc<RwLock<Folder>>> {

View File

@ -14,7 +14,7 @@ use collab_database::database::{
is_database_collab, mut_database_views_with_collab, reset_inline_view_id,
};
use collab_database::rows::{database_row_document_id_from_row_id, mut_row_with_collab, RowId};
use collab_database::workspace_database::DatabaseMetaList;
use collab_database::workspace_database::WorkspaceDatabaseBody;
use collab_document::document_data::default_document_collab_data;
use collab_entity::CollabType;
use collab_folder::{Folder, UserId, View, ViewIdentifier, ViewLayout};
@ -353,7 +353,7 @@ where
&mut imported_database_indexer.transact_mut(),
)?;
let array = DatabaseMetaList::new(&mut imported_database_indexer);
let array = WorkspaceDatabaseBody::new(&mut imported_database_indexer);
for database_meta_list in array.get_all_database_meta(&imported_database_indexer.transact()) {
database_view_ids_by_database_id.insert(
old_to_new_id_map.exchange_new_id(&database_meta_list.database_id),
@ -403,7 +403,7 @@ where
let new_uid = new_user_session.user_id;
let new_object_id = &new_user_session.user_workspace.database_indexer_id;
let array = DatabaseMetaList::new(&mut database_with_views_collab);
let array = WorkspaceDatabaseBody::new(&mut database_with_views_collab);
let mut txn = database_with_views_collab.transact_mut();
for database_meta in array.get_all_database_meta(&txn) {
array.update_database(&mut txn, &database_meta.database_id, |update| {

View File

@ -3,6 +3,7 @@ use collab_integrate::CollabKVDB;
use flowy_error::{internal_error, ErrorCode, FlowyResult};
use arc_swap::ArcSwapOption;
use collab::lock::RwLock;
use collab_user::core::UserAwareness;
use dashmap::DashMap;
use flowy_server_pub::AuthenticatorType;
@ -18,7 +19,7 @@ use serde_json::Value;
use std::string::ToString;
use std::sync::atomic::{AtomicI64, Ordering};
use std::sync::{Arc, Weak};
use tokio::sync::{Mutex, RwLock};
use tokio::sync::Mutex;
use tokio_stream::StreamExt;
use tracing::{debug, error, event, info, instrument, trace, warn};

View File

@ -2,6 +2,7 @@ use std::sync::{Arc, Weak};
use anyhow::Context;
use collab::core::collab::DataSource;
use collab::lock::RwLock;
use collab_entity::reminder::Reminder;
use collab_entity::CollabType;
use collab_integrate::collab_builder::{
@ -9,7 +10,6 @@ use collab_integrate::collab_builder::{
};
use collab_user::core::{UserAwareness, UserAwarenessNotifier};
use dashmap::try_result::TryResult;
use tokio::sync::RwLock;
use tracing::{error, info, instrument, trace};
use collab_integrate::CollabKVDB;