mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: fix database row meta (#6078)
* chore: fix database row meta * chore: update * chore: update client api * chore: clippy * chore: update client api * chore: update collab * chore: update client api
This commit is contained in:
parent
f342f5ec7e
commit
93bf1f79f6
@ -89,6 +89,15 @@ class CellController<T, D> {
|
|||||||
fieldId: _cellContext.fieldId,
|
fieldId: _cellContext.fieldId,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_rowCache.addListener(
|
||||||
|
rowId: rowId,
|
||||||
|
onRowChanged: (context, reason) {
|
||||||
|
if (reason == const ChangedReason.didFetchRow()) {
|
||||||
|
_onRowMetaChanged?.call();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
// 1. Listen on user edit event and load the new cell data if needed.
|
// 1. Listen on user edit event and load the new cell data if needed.
|
||||||
// For example:
|
// For example:
|
||||||
// user input: 12
|
// user input: 12
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:appflowy/plugins/database/application/row/row_service.dart';
|
import 'package:appflowy/plugins/database/application/row/row_service.dart';
|
||||||
import 'package:appflowy/plugins/database/domain/row_listener.dart';
|
import 'package:appflowy/plugins/database/domain/row_listener.dart';
|
||||||
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
|
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
|
||||||
@ -38,6 +40,25 @@ class RowController {
|
|||||||
|
|
||||||
Future<void> initialize() async {
|
Future<void> initialize() async {
|
||||||
await _rowBackendSvc.initRow(rowMeta.id);
|
await _rowBackendSvc.initRow(rowMeta.id);
|
||||||
|
unawaited(
|
||||||
|
_rowBackendSvc.getRowMeta(rowId).then(
|
||||||
|
(result) {
|
||||||
|
if (_isDisposed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
result.fold(
|
||||||
|
(rowMeta) {
|
||||||
|
_rowMeta = rowMeta;
|
||||||
|
_rowCache.setRowMeta(rowMeta);
|
||||||
|
_onRowMetaChanged?.call();
|
||||||
|
},
|
||||||
|
(error) => debugPrint(error.toString()),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
_rowListener.start(
|
_rowListener.start(
|
||||||
onRowFetched: (DidFetchRowPB row) {
|
onRowFetched: (DidFetchRowPB row) {
|
||||||
_rowCache.setRowMeta(row.meta);
|
_rowCache.setRowMeta(row.meta);
|
||||||
|
38
frontend/appflowy_tauri/src-tauri/Cargo.lock
generated
38
frontend/appflowy_tauri/src-tauri/Cargo.lock
generated
@ -172,7 +172,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
|||||||
[[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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bincode",
|
"bincode",
|
||||||
@ -192,7 +192,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "appflowy-ai-client"
|
name = "appflowy-ai-client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -826,7 +826,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "client-api"
|
name = "client-api"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"again",
|
"again",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@ -877,7 +877,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "client-api-entity"
|
name = "client-api-entity"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"collab-entity",
|
"collab-entity",
|
||||||
"collab-rt-entity",
|
"collab-rt-entity",
|
||||||
@ -890,7 +890,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@ -964,7 +964,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab"
|
name = "collab"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@ -989,7 +989,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-database"
|
name = "collab-database"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -1018,7 +1018,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-document"
|
name = "collab-document"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@ -1038,7 +1038,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-entity"
|
name = "collab-entity"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -1057,7 +1057,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-folder"
|
name = "collab-folder"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@ -1100,7 +1100,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-plugins"
|
name = "collab-plugins"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-stream",
|
"async-stream",
|
||||||
@ -1138,7 +1138,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-rt-entity"
|
name = "collab-rt-entity"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bincode",
|
"bincode",
|
||||||
@ -1163,7 +1163,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-rt-protocol"
|
name = "collab-rt-protocol"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -1180,7 +1180,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-user"
|
name = "collab-user"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"collab",
|
"collab",
|
||||||
@ -1551,7 +1551,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"app-error",
|
"app-error",
|
||||||
@ -3076,7 +3076,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@ -3093,7 +3093,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"app-error",
|
"app-error",
|
||||||
@ -3525,7 +3525,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -6122,7 +6122,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"app-error",
|
"app-error",
|
||||||
|
@ -53,7 +53,7 @@ collab-user = { version = "0.2" }
|
|||||||
# 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 = "50e6a41513348f42a441c9c4f90220fcec2ba2ca" }
|
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "8cc410ce6542855b89f98f4c278049b7d679eb8f" }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
@ -116,13 +116,13 @@ custom-protocol = ["tauri/custom-protocol"]
|
|||||||
# 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 = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
|
|
||||||
# Working directory: frontend
|
# Working directory: frontend
|
||||||
# To update the commit ID, run:
|
# To update the commit ID, run:
|
||||||
|
38
frontend/appflowy_web_app/src-tauri/Cargo.lock
generated
38
frontend/appflowy_web_app/src-tauri/Cargo.lock
generated
@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
|||||||
[[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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bincode",
|
"bincode",
|
||||||
@ -183,7 +183,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "appflowy-ai-client"
|
name = "appflowy-ai-client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -800,7 +800,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "client-api"
|
name = "client-api"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"again",
|
"again",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@ -851,7 +851,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "client-api-entity"
|
name = "client-api-entity"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"collab-entity",
|
"collab-entity",
|
||||||
"collab-rt-entity",
|
"collab-rt-entity",
|
||||||
@ -864,7 +864,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@ -947,7 +947,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab"
|
name = "collab"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@ -972,7 +972,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-database"
|
name = "collab-database"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -1001,7 +1001,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-document"
|
name = "collab-document"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@ -1021,7 +1021,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-entity"
|
name = "collab-entity"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -1040,7 +1040,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-folder"
|
name = "collab-folder"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@ -1083,7 +1083,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-plugins"
|
name = "collab-plugins"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-stream",
|
"async-stream",
|
||||||
@ -1121,7 +1121,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-rt-entity"
|
name = "collab-rt-entity"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bincode",
|
"bincode",
|
||||||
@ -1146,7 +1146,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-rt-protocol"
|
name = "collab-rt-protocol"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -1163,7 +1163,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-user"
|
name = "collab-user"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"collab",
|
"collab",
|
||||||
@ -1541,7 +1541,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"app-error",
|
"app-error",
|
||||||
@ -3143,7 +3143,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@ -3160,7 +3160,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"app-error",
|
"app-error",
|
||||||
@ -3597,7 +3597,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -6186,7 +6186,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"app-error",
|
"app-error",
|
||||||
|
@ -52,7 +52,7 @@ collab-user = { version = "0.2" }
|
|||||||
# 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 = "50e6a41513348f42a441c9c4f90220fcec2ba2ca" }
|
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "8cc410ce6542855b89f98f4c278049b7d679eb8f" }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
@ -116,13 +116,13 @@ custom-protocol = ["tauri/custom-protocol"]
|
|||||||
# 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 = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
|
|
||||||
# Working directory: frontend
|
# Working directory: frontend
|
||||||
# To update the commit ID, run:
|
# To update the commit ID, run:
|
||||||
|
38
frontend/rust-lib/Cargo.lock
generated
38
frontend/rust-lib/Cargo.lock
generated
@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
|||||||
[[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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bincode",
|
"bincode",
|
||||||
@ -183,7 +183,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "appflowy-ai-client"
|
name = "appflowy-ai-client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -718,7 +718,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "client-api"
|
name = "client-api"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"again",
|
"again",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@ -769,7 +769,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "client-api-entity"
|
name = "client-api-entity"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"collab-entity",
|
"collab-entity",
|
||||||
"collab-rt-entity",
|
"collab-rt-entity",
|
||||||
@ -782,7 +782,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@ -825,7 +825,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab"
|
name = "collab"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@ -850,7 +850,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-database"
|
name = "collab-database"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -879,7 +879,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-document"
|
name = "collab-document"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@ -899,7 +899,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-entity"
|
name = "collab-entity"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -918,7 +918,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-folder"
|
name = "collab-folder"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@ -961,7 +961,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-plugins"
|
name = "collab-plugins"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-stream",
|
"async-stream",
|
||||||
@ -999,7 +999,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-rt-entity"
|
name = "collab-rt-entity"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bincode",
|
"bincode",
|
||||||
@ -1024,7 +1024,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-rt-protocol"
|
name = "collab-rt-protocol"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -1041,7 +1041,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-user"
|
name = "collab-user"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=f747496df74b61bccfa25eaefae161a331f71f96#f747496df74b61bccfa25eaefae161a331f71f96"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ec4f92941942f20c84dce142cd2eeafd44ca7362#ec4f92941942f20c84dce142cd2eeafd44ca7362"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"collab",
|
"collab",
|
||||||
@ -1375,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"app-error",
|
"app-error",
|
||||||
@ -2754,7 +2754,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@ -2771,7 +2771,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"app-error",
|
"app-error",
|
||||||
@ -3136,7 +3136,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -5344,7 +5344,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=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=8cc410ce6542855b89f98f4c278049b7d679eb8f#8cc410ce6542855b89f98f4c278049b7d679eb8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"app-error",
|
"app-error",
|
||||||
|
@ -100,8 +100,8 @@ dashmap = "6.0.1"
|
|||||||
# Run the script.add_workspace_members:
|
# Run the script.add_workspace_members:
|
||||||
# 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 = "50e6a41513348f42a441c9c4f90220fcec2ba2ca" }
|
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "8cc410ce6542855b89f98f4c278049b7d679eb8f" }
|
||||||
client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "50e6a41513348f42a441c9c4f90220fcec2ba2ca" }
|
client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "8cc410ce6542855b89f98f4c278049b7d679eb8f" }
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
opt-level = 0
|
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:
|
# To switch to the local path, run:
|
||||||
# scripts/tool/update_collab_source.sh
|
# scripts/tool/update_collab_source.sh
|
||||||
# ⚠️⚠️⚠️️
|
# ⚠️⚠️⚠️️
|
||||||
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "f747496df74b61bccfa25eaefae161a331f71f96" }
|
collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
|
||||||
|
|
||||||
# Working directory: frontend
|
# Working directory: frontend
|
||||||
# To update the commit ID, run:
|
# To update the commit ID, run:
|
||||||
|
@ -162,14 +162,6 @@ impl AppFlowyCollabBuilder {
|
|||||||
collab.enable_undo_redo();
|
collab.enable_undo_redo();
|
||||||
|
|
||||||
let document = Document::open_with(collab, data)?;
|
let document = Document::open_with(collab, data)?;
|
||||||
self.flush_collab_if_not_exist(
|
|
||||||
object.uid,
|
|
||||||
&object.object_id,
|
|
||||||
collab_db.clone(),
|
|
||||||
&expected_collab_type,
|
|
||||||
&document,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
let document = Arc::new(RwLock::new(document));
|
let document = Arc::new(RwLock::new(document));
|
||||||
self.finalize(object, builder_config, document)
|
self.finalize(object, builder_config, document)
|
||||||
}
|
}
|
||||||
@ -192,15 +184,6 @@ impl AppFlowyCollabBuilder {
|
|||||||
assert_eq!(object.collab_type, expected_collab_type);
|
assert_eq!(object.collab_type, expected_collab_type);
|
||||||
let collab = self.build_collab(&object, &collab_db, doc_state)?;
|
let collab = self.build_collab(&object, &collab_db, doc_state)?;
|
||||||
let folder = Folder::open_with(object.uid, collab, folder_notifier, folder_data);
|
let folder = Folder::open_with(object.uid, collab, folder_notifier, folder_data);
|
||||||
|
|
||||||
self.flush_collab_if_not_exist(
|
|
||||||
object.uid,
|
|
||||||
&object.object_id,
|
|
||||||
collab_db.clone(),
|
|
||||||
&expected_collab_type,
|
|
||||||
&folder,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
let folder = Arc::new(RwLock::new(folder));
|
let folder = Arc::new(RwLock::new(folder));
|
||||||
self.finalize(object, builder_config, folder)
|
self.finalize(object, builder_config, folder)
|
||||||
}
|
}
|
||||||
@ -222,15 +205,6 @@ impl AppFlowyCollabBuilder {
|
|||||||
assert_eq!(object.collab_type, expected_collab_type);
|
assert_eq!(object.collab_type, expected_collab_type);
|
||||||
let collab = self.build_collab(&object, &collab_db, doc_state)?;
|
let collab = self.build_collab(&object, &collab_db, doc_state)?;
|
||||||
let user_awareness = UserAwareness::open(collab, notifier);
|
let user_awareness = UserAwareness::open(collab, notifier);
|
||||||
|
|
||||||
self.flush_collab_if_not_exist(
|
|
||||||
object.uid,
|
|
||||||
&object.object_id,
|
|
||||||
collab_db.clone(),
|
|
||||||
&expected_collab_type,
|
|
||||||
&user_awareness,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
let user_awareness = Arc::new(RwLock::new(user_awareness));
|
let user_awareness = Arc::new(RwLock::new(user_awareness));
|
||||||
self.finalize(object, builder_config, user_awareness)
|
self.finalize(object, builder_config, user_awareness)
|
||||||
}
|
}
|
||||||
@ -241,22 +215,13 @@ impl AppFlowyCollabBuilder {
|
|||||||
&self,
|
&self,
|
||||||
object: CollabObject,
|
object: CollabObject,
|
||||||
collab: Collab,
|
collab: Collab,
|
||||||
collab_db: Weak<CollabKVDB>,
|
_collab_db: Weak<CollabKVDB>,
|
||||||
builder_config: CollabBuilderConfig,
|
builder_config: CollabBuilderConfig,
|
||||||
collab_service: impl DatabaseCollabService,
|
collab_service: impl DatabaseCollabService,
|
||||||
) -> Result<Arc<RwLock<WorkspaceDatabase>>, Error> {
|
) -> Result<Arc<RwLock<WorkspaceDatabase>>, Error> {
|
||||||
let expected_collab_type = CollabType::WorkspaceDatabase;
|
let expected_collab_type = CollabType::WorkspaceDatabase;
|
||||||
assert_eq!(object.collab_type, expected_collab_type);
|
assert_eq!(object.collab_type, expected_collab_type);
|
||||||
let workspace = WorkspaceDatabase::open(collab, collab_service);
|
let workspace = WorkspaceDatabase::open(&object.object_id, collab, collab_service);
|
||||||
|
|
||||||
self.flush_collab_if_not_exist(
|
|
||||||
object.uid,
|
|
||||||
&object.object_id,
|
|
||||||
collab_db.clone(),
|
|
||||||
&expected_collab_type,
|
|
||||||
&workspace,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
let workspace = Arc::new(RwLock::new(workspace));
|
let workspace = Arc::new(RwLock::new(workspace));
|
||||||
self.finalize(object, builder_config, workspace)
|
self.finalize(object, builder_config, workspace)
|
||||||
}
|
}
|
||||||
@ -267,7 +232,7 @@ impl AppFlowyCollabBuilder {
|
|||||||
collab_db: &Weak<CollabKVDB>,
|
collab_db: &Weak<CollabKVDB>,
|
||||||
data_source: DataSource,
|
data_source: DataSource,
|
||||||
) -> Result<Collab, Error> {
|
) -> Result<Collab, Error> {
|
||||||
let collab = CollabBuilder::new(object.uid, &object.object_id, data_source)
|
let mut collab = CollabBuilder::new(object.uid, &object.object_id, data_source)
|
||||||
.with_device_id(self.workspace_integrate.device_id()?)
|
.with_device_id(self.workspace_integrate.device_id()?)
|
||||||
.build()?;
|
.build()?;
|
||||||
|
|
||||||
@ -280,7 +245,7 @@ impl AppFlowyCollabBuilder {
|
|||||||
persistence_config.clone(),
|
persistence_config.clone(),
|
||||||
);
|
);
|
||||||
collab.add_plugin(Box::new(db_plugin));
|
collab.add_plugin(Box::new(db_plugin));
|
||||||
|
collab.initialize();
|
||||||
Ok(collab)
|
Ok(collab)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,43 +258,34 @@ impl AppFlowyCollabBuilder {
|
|||||||
where
|
where
|
||||||
T: BorrowMut<Collab> + Send + Sync + 'static,
|
T: BorrowMut<Collab> + Send + Sync + 'static,
|
||||||
{
|
{
|
||||||
if !build_config.sync_enable {
|
|
||||||
return Ok(collab);
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut write_collab = collab.try_write()?;
|
let mut write_collab = collab.try_write()?;
|
||||||
if !write_collab.borrow().get_state().is_uninitialized() {
|
if build_config.sync_enable {
|
||||||
warn!("{} is already initialized", object);
|
trace!("🚀finalize collab:{}", object);
|
||||||
drop(write_collab);
|
let plugin_provider = self.plugin_provider.load_full();
|
||||||
return Ok(collab);
|
let provider_type = plugin_provider.provider_type();
|
||||||
}
|
let span =
|
||||||
|
tracing::span!(tracing::Level::TRACE, "collab_builder", object_id = %object.object_id);
|
||||||
|
let _enter = span.enter();
|
||||||
|
match provider_type {
|
||||||
|
CollabPluginProviderType::AppFlowyCloud => {
|
||||||
|
let local_collab = Arc::downgrade(&collab);
|
||||||
|
let plugins = plugin_provider.get_plugins(CollabPluginProviderContext::AppFlowyCloud {
|
||||||
|
uid: object.uid,
|
||||||
|
collab_object: object,
|
||||||
|
local_collab,
|
||||||
|
});
|
||||||
|
|
||||||
trace!("🚀finalize collab:{}", object);
|
// at the moment when we get the lock, the collab object is not yet exposed outside
|
||||||
let plugin_provider = self.plugin_provider.load_full();
|
for plugin in plugins {
|
||||||
let provider_type = plugin_provider.provider_type();
|
write_collab.borrow().add_plugin(plugin);
|
||||||
let span =
|
}
|
||||||
tracing::span!(tracing::Level::TRACE, "collab_builder", object_id = %object.object_id);
|
},
|
||||||
let _enter = span.enter();
|
CollabPluginProviderType::Local => {},
|
||||||
match provider_type {
|
}
|
||||||
CollabPluginProviderType::AppFlowyCloud => {
|
|
||||||
let local_collab = Arc::downgrade(&collab);
|
|
||||||
let plugins = plugin_provider.get_plugins(CollabPluginProviderContext::AppFlowyCloud {
|
|
||||||
uid: object.uid,
|
|
||||||
collab_object: object,
|
|
||||||
local_collab,
|
|
||||||
});
|
|
||||||
|
|
||||||
// at the moment when we get the lock, the collab object is not yet exposed outside
|
|
||||||
for plugin in plugins {
|
|
||||||
write_collab.borrow().add_plugin(plugin);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
CollabPluginProviderType::Local => {},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(*write_collab).borrow_mut().initialize();
|
(*write_collab).borrow_mut().initialize();
|
||||||
drop(write_collab);
|
drop(write_collab);
|
||||||
|
|
||||||
Ok(collab)
|
Ok(collab)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,17 +305,17 @@ impl AppFlowyCollabBuilder {
|
|||||||
let write_txn = collab_db.write_txn();
|
let write_txn = collab_db.write_txn();
|
||||||
let is_not_exist_on_disk = !write_txn.is_exist(uid, object_id);
|
let is_not_exist_on_disk = !write_txn.is_exist(uid, object_id);
|
||||||
if is_not_exist_on_disk {
|
if is_not_exist_on_disk {
|
||||||
trace!("flush collab:{}-{} to disk", collab_type, object_id);
|
trace!("flush collab:{}-{}-{} to disk", uid, collab_type, object_id);
|
||||||
let collab: &Collab = collab.borrow();
|
let collab: &Collab = collab.borrow();
|
||||||
let encode_collab =
|
let encode_collab =
|
||||||
collab.encode_collab_v1(|collab| collab_type.validate_require_data(collab))?;
|
collab.encode_collab_v1(|collab| collab_type.validate_require_data(collab))?;
|
||||||
|
|
||||||
write_txn.flush_doc(
|
write_txn.flush_doc(
|
||||||
uid,
|
uid,
|
||||||
object_id,
|
object_id,
|
||||||
encode_collab.state_vector.to_vec(),
|
encode_collab.state_vector.to_vec(),
|
||||||
encode_collab.doc_state.to_vec(),
|
encode_collab.doc_state.to_vec(),
|
||||||
)?;
|
)?;
|
||||||
|
write_txn.commit_transaction()?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ async fn af_cloud_edit_document_test() {
|
|||||||
let rx = test
|
let rx = test
|
||||||
.notification_sender
|
.notification_sender
|
||||||
.subscribe_with_condition::<DocumentSyncStatePB, _>(&document_id, |pb| {
|
.subscribe_with_condition::<DocumentSyncStatePB, _>(&document_id, |pb| {
|
||||||
pb.value != DocumentSyncState::Syncing
|
pb.value == DocumentSyncState::SyncFinished
|
||||||
});
|
});
|
||||||
let _ = receive_with_timeout(rx, Duration::from_secs(30)).await;
|
let _ = receive_with_timeout(rx, Duration::from_secs(30)).await;
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ impl From<Row> for RowMetaPB {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl std::convert::From<RowDetail> for RowMetaPB {
|
impl From<RowDetail> for RowMetaPB {
|
||||||
fn from(row_detail: RowDetail) -> Self {
|
fn from(row_detail: RowDetail) -> Self {
|
||||||
Self {
|
Self {
|
||||||
id: row_detail.row.id.to_string(),
|
id: row_detail.row.id.to_string(),
|
||||||
|
@ -762,20 +762,31 @@ impl DatabaseCollabService for WorkspaceDatabaseCollabServiceImpl {
|
|||||||
let data_source: DataSource = if is_new {
|
let data_source: DataSource = if is_new {
|
||||||
DataSource::Disk(None)
|
DataSource::Disk(None)
|
||||||
} else if self.persistence.is_collab_exist(object_id) {
|
} else if self.persistence.is_collab_exist(object_id) {
|
||||||
|
trace!("build collab: load {}:{} from disk", collab_type, object_id);
|
||||||
CollabPersistenceImpl {
|
CollabPersistenceImpl {
|
||||||
persistence: Some(self.persistence.clone()),
|
persistence: Some(self.persistence.clone()),
|
||||||
}
|
}
|
||||||
.into()
|
.into()
|
||||||
} else {
|
} else {
|
||||||
match self.get_encode_collab(object_id, collab_type).await {
|
trace!(
|
||||||
|
"build collab: fetch {}:{} from remote",
|
||||||
|
collab_type,
|
||||||
|
object_id
|
||||||
|
);
|
||||||
|
match self.get_encode_collab(object_id, collab_type.clone()).await {
|
||||||
Ok(Some(encode_collab)) => {
|
Ok(Some(encode_collab)) => {
|
||||||
self
|
trace!(
|
||||||
.persistence
|
"build collab: {}:{} with remote encode collab",
|
||||||
.flush_collab(object_id, encode_collab.clone())
|
collab_type,
|
||||||
.map_err(|err| DatabaseError::Internal(anyhow!("Failed to flush collab: {}", err)))?;
|
object_id
|
||||||
|
);
|
||||||
DataSource::from(encode_collab)
|
DataSource::from(encode_collab)
|
||||||
},
|
},
|
||||||
Ok(None) => {
|
Ok(None) => {
|
||||||
|
info!(
|
||||||
|
"build collab: {}:{} with empty encode collab",
|
||||||
|
collab_type, object_id
|
||||||
|
);
|
||||||
// when collab not exist, create a default collab
|
// when collab not exist, create a default collab
|
||||||
CollabPersistenceImpl {
|
CollabPersistenceImpl {
|
||||||
persistence: Some(self.persistence.clone()),
|
persistence: Some(self.persistence.clone()),
|
||||||
@ -783,7 +794,7 @@ impl DatabaseCollabService for WorkspaceDatabaseCollabServiceImpl {
|
|||||||
.into()
|
.into()
|
||||||
},
|
},
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
error!("Failed to get encode collab: {}", err);
|
error!("build collab: failed to get encode collab: {}", err);
|
||||||
return Err(err);
|
return Err(err);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -825,7 +836,7 @@ impl DatabaseCollabPersistenceService for DatabasePersistenceImpl {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
trace!("[Database]: start loading collab:{}", object_id);
|
trace!("[Database]: start loading collab:{} from disk", object_id);
|
||||||
let mut txn = collab.transact_mut();
|
let mut txn = collab.transact_mut();
|
||||||
match db_read.load_doc_with_txn(uid, &object_id, &mut txn) {
|
match db_read.load_doc_with_txn(uid, &object_id, &mut txn) {
|
||||||
Ok(update_count) => {
|
Ok(update_count) => {
|
||||||
@ -881,12 +892,12 @@ impl DatabaseCollabPersistenceService for DatabasePersistenceImpl {
|
|||||||
object_id: &str,
|
object_id: &str,
|
||||||
encode_collab: EncodedCollab,
|
encode_collab: EncodedCollab,
|
||||||
) -> Result<(), DatabaseError> {
|
) -> Result<(), DatabaseError> {
|
||||||
trace!("[Database]: flush collab:{}", object_id);
|
|
||||||
let uid = self
|
let uid = self
|
||||||
.user
|
.user
|
||||||
.user_id()
|
.user_id()
|
||||||
.map_err(|err| DatabaseError::Internal(err.into()))?;
|
.map_err(|err| DatabaseError::Internal(err.into()))?;
|
||||||
if let Ok(Some(collab_db)) = self.user.collab_db(uid).map(|weak| weak.upgrade()) {
|
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();
|
let write_txn = collab_db.write_txn();
|
||||||
write_txn
|
write_txn
|
||||||
.flush_doc(
|
.flush_doc(
|
||||||
|
@ -91,5 +91,8 @@ impl std::convert::From<i32> for DatabaseNotification {
|
|||||||
|
|
||||||
#[tracing::instrument(level = "trace")]
|
#[tracing::instrument(level = "trace")]
|
||||||
pub fn send_notification(id: &str, ty: DatabaseNotification) -> NotificationBuilder {
|
pub fn send_notification(id: &str, ty: DatabaseNotification) -> NotificationBuilder {
|
||||||
|
#[cfg(feature = "verbose_log")]
|
||||||
|
trace!("[Database Notification]: id:{}, ty:{:?}", id, ty);
|
||||||
|
|
||||||
NotificationBuilder::new(id, ty, DATABASE_OBSERVABLE_SOURCE)
|
NotificationBuilder::new(id, ty, DATABASE_OBSERVABLE_SOURCE)
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ use collab_database::views::{
|
|||||||
};
|
};
|
||||||
use collab_entity::CollabType;
|
use collab_entity::CollabType;
|
||||||
use collab_integrate::collab_builder::{AppFlowyCollabBuilder, CollabBuilderConfig};
|
use collab_integrate::collab_builder::{AppFlowyCollabBuilder, CollabBuilderConfig};
|
||||||
|
use dashmap::DashMap;
|
||||||
use flowy_error::{internal_error, ErrorCode, FlowyError, FlowyResult};
|
use flowy_error::{internal_error, ErrorCode, FlowyError, FlowyResult};
|
||||||
use flowy_notification::DebounceNotificationSender;
|
use flowy_notification::DebounceNotificationSender;
|
||||||
use lib_infra::box_any::BoxAny;
|
use lib_infra::box_any::BoxAny;
|
||||||
@ -58,6 +59,7 @@ pub struct DatabaseEditor {
|
|||||||
is_opening: ArcSwap<bool>,
|
is_opening: ArcSwap<bool>,
|
||||||
opening_ret_txs: Arc<RwLock<Vec<OpenDatabaseResult>>>,
|
opening_ret_txs: Arc<RwLock<Vec<OpenDatabaseResult>>>,
|
||||||
database_cancellation: Arc<RwLock<Option<CancellationToken>>>,
|
database_cancellation: Arc<RwLock<Option<CancellationToken>>>,
|
||||||
|
finalized_rows: Arc<DashMap<RowId, bool>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DatabaseEditor {
|
impl DatabaseEditor {
|
||||||
@ -120,6 +122,7 @@ impl DatabaseEditor {
|
|||||||
is_opening: Default::default(),
|
is_opening: Default::default(),
|
||||||
opening_ret_txs: Arc::new(Default::default()),
|
opening_ret_txs: Arc::new(Default::default()),
|
||||||
database_cancellation,
|
database_cancellation,
|
||||||
|
finalized_rows: Arc::new(Default::default()),
|
||||||
});
|
});
|
||||||
observe_block_event(&database_id, &this).await;
|
observe_block_event(&database_id, &this).await;
|
||||||
Ok(this)
|
Ok(this)
|
||||||
@ -699,18 +702,13 @@ impl DatabaseEditor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn init_database_row(&self, row_id: &RowId) -> FlowyResult<()> {
|
pub async fn init_database_row(&self, row_id: &RowId) -> FlowyResult<()> {
|
||||||
if let Some(database_row) = self.database.read().await.get_database_row(row_id) {
|
if let Some(entry) = self.finalized_rows.get(row_id) {
|
||||||
if !database_row
|
if *entry.value() {
|
||||||
.read()
|
|
||||||
.await
|
|
||||||
.collab
|
|
||||||
.get_state()
|
|
||||||
.is_uninitialized()
|
|
||||||
{
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.finalized_rows.insert(row_id.clone(), true);
|
||||||
debug!("Init database row: {}", row_id);
|
debug!("Init database row: {}", row_id);
|
||||||
let database_row = self
|
let database_row = self
|
||||||
.database
|
.database
|
||||||
|
@ -32,7 +32,8 @@ impl<T> DatabaseCloudService for AFCloudDatabaseCloudServiceImpl<T>
|
|||||||
where
|
where
|
||||||
T: AFServer,
|
T: AFServer,
|
||||||
{
|
{
|
||||||
#[instrument(level = "debug", skip_all)]
|
#[instrument(level = "debug", skip_all, err)]
|
||||||
|
#[allow(clippy::blocks_in_conditions)]
|
||||||
async fn get_database_encode_collab(
|
async fn get_database_encode_collab(
|
||||||
&self,
|
&self,
|
||||||
object_id: &str,
|
object_id: &str,
|
||||||
|
@ -15,7 +15,6 @@ where
|
|||||||
PersistenceError: From<R::Error>,
|
PersistenceError: From<R::Error>,
|
||||||
{
|
{
|
||||||
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 {
|
||||||
match load_collab_by_object_id(uid, collab_read_txn, object_id) {
|
match load_collab_by_object_id(uid, collab_read_txn, object_id) {
|
||||||
Ok(collab) => {
|
Ok(collab) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user