Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
refactor: generate the pb files using build.rs
appflowy9135b92a39a7
diff --git a/frontend/Makefile.toml b/frontend/Makefile.tomlindex 48433548c2..7c90c54189 100644--- a/frontend/Makefile.toml+++ b/frontend/Makefile.toml@@ -21,6 +21,7 @@ PRODUCT_NAME = "AppFlowy"CRATE_TYPE = "staticlib"SDK_EXT = "a"APP_ENVIRONMENT = "local"+FLUTTER_FLOWY_SDK_PATH="app_flowy/packages/flowy_sdk/lib/protobuf"[env.development-mac]RUST_LOG = "trace"@@ -149,4 +150,15 @@ script = [assert ${result}""",]-script_runner = "@duckscript"\ No newline at end of file+script_runner = "@duckscript"+++[tasks.test-build]+condition = { env_set = [ "FLUTTER_FLOWY_SDK_PATH"] }+script = [+ """+ cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/dart-ffi+ cargo build -vv+ """,+]+script_runner = "@shell"diff --git a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dart b/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dartindex 8526ad8c59..af8d366342 100644--- a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dart+++ b/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dart@@ -39,7 +39,7 @@ class DocBloc extends Bloc<DocEvent, DocState> {emit(state.copyWith(isDeleted: false));},deletePermanently: (DeletePermanently value) async {- final result = await trashRepo.deleteViews([Tuple2(view.id, TrashType.View)]);+ final result = await trashRepo.deleteViews([Tuple2(view.id, TrashType.TrashView)]);final newState = result.fold((l) => state.copyWith(forceClose: true), (r) => state);emit(newState);},diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/trash.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/trash.pbenum.dartindex 526e649012..e19e42d3bd 100644--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/trash.pbenum.dart+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/trash.pbenum.dart@@ -11,13 +11,13 @@ import 'package:protobuf/protobuf.dart' as $pb;class TrashType extends $pb.ProtobufEnum {static const TrashType Unknown = TrashType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Unknown');- static const TrashType View = TrashType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'View');- static const TrashType App = TrashType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'App');+ static const TrashType TrashView = TrashType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TrashView');+ static const TrashType TrashApp = TrashType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TrashApp');static const $core.List<TrashType> values = <TrashType> [Unknown,- View,- App,+ TrashView,+ TrashApp,];static final $core.Map<$core.int, TrashType> _byValue = $pb.ProtobufEnum.initByValue(values);diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/trash.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/trash.pbjson.dartindex 835fa2eaaa..cfed7a8d32 100644--- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/trash.pbjson.dart+++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-folder-data-model/trash.pbjson.dart@@ -13,13 +13,13 @@ const TrashType$json = const {'1': 'TrashType','2': const [const {'1': 'Unknown', '2': 0},- const {'1': 'View', '2': 1},- const {'1': 'App', '2': 2},+ const {'1': 'TrashView', '2': 1},+ const {'1': 'TrashApp', '2': 2},],};/// Descriptor for `TrashType`. Decode as a `google.protobuf.EnumDescriptorProto`.-final $typed_data.Uint8List trashTypeDescriptor = $convert.base64Decode('CglUcmFzaFR5cGUSCwoHVW5rbm93bhAAEggKBFZpZXcQARIHCgNBcHAQAg==');+final $typed_data.Uint8List trashTypeDescriptor = $convert.base64Decode('CglUcmFzaFR5cGUSCwoHVW5rbm93bhAAEg0KCVRyYXNoVmlldxABEgwKCFRyYXNoQXBwEAI=');@$core.Deprecated('Use trashDescriptor instead')const Trash$json = const {'1': 'Trash',diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lockindex e7bf278535..90bbc15fc5 100755--- a/frontend/rust-lib/Cargo.lock+++ b/frontend/rust-lib/Cargo.lock@@ -214,6 +214,17 @@ dependencies = ["serde",]+[[package]]+name = "cargo_toml"+version = "0.11.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4e270ef0cd868745878982f7ce470aa898d0d4bb248af67f0cf66f54617913ef"+dependencies = [+ "serde",+ "serde_derive",+ "toml",+]+[[package]]name = "cast"version = "0.2.7"@@ -277,6 +288,31 @@ dependencies = ["unicode-width",]+[[package]]+name = "cmd_lib"+version = "1.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ba0f413777386d37f85afa5242f277a7b461905254c1af3c339d4af06800f62"+dependencies = [+ "cmd_lib_macros",+ "faccess",+ "lazy_static",+ "log",+ "os_pipe",+]++[[package]]+name = "cmd_lib_macros"+version = "1.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9e66605092ff6c6e37e0246601ae6c3f62dc1880e0599359b5f303497c112dc0"+dependencies = [+ "proc-macro-error",+ "proc-macro2",+ "quote",+ "syn",+]+[[package]]name = "color-eyre"version = "0.5.11"@@ -506,6 +542,7 @@ dependencies = ["flowy-derive","flowy-sdk","lib-dispatch",+ "lib-infra","log","once_cell","protobuf",@@ -523,6 +560,7 @@ dependencies = ["flowy-derive","lazy_static","lib-dispatch",+ "lib-infra","log","protobuf",]@@ -667,6 +705,7 @@ version = "0.1.0"dependencies = ["derive_more","flowy-derive",+ "lib-infra","protobuf",]@@ -680,6 +719,17 @@ dependencies = ["once_cell",]+[[package]]+name = "faccess"+version = "0.2.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e039175679baf763ddddf4f76900b92d4dae9411ee88cf42d2f11b976b09e07c"+dependencies = [+ "bitflags",+ "libc",+ "winapi",+]+[[package]]name = "fake"version = "2.3.0"@@ -832,6 +882,7 @@ dependencies = ["flowy-derive","http-flowy","lib-dispatch",+ "lib-infra","lib-ot","lib-sqlite","protobuf",@@ -890,6 +941,7 @@ dependencies = ["derive_more","error-code","flowy-derive",+ "lib-infra","log","protobuf","serde",@@ -1070,6 +1122,7 @@ dependencies = ["fancy-regex","flowy-derive","lazy_static",+ "lib-infra","log","protobuf","serde",@@ -1519,13 +1572,17 @@ name = "lib-infra"version = "0.1.0"dependencies = ["bytes",+ "cargo_toml","chrono",+ "cmd_lib","futures-core","log","pin-project",+ "protoc-rust","rand 0.8.4","tokio","uuid",+ "walkdir",][[package]]@@ -1870,6 +1927,16 @@ dependencies = ["vcpkg",]+[[package]]+name = "os_pipe"+version = "0.9.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fb233f06c2307e1f5ce2ecad9f8121cffbbee2c95428f44ea85222e460d0d213"+dependencies = [+ "libc",+ "winapi",+]+[[package]]name = "owo-colors"version = "1.3.0"@@ -1985,6 +2052,30 @@ version = "0.2.16"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"+[[package]]+name = "proc-macro-error"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"+dependencies = [+ "proc-macro-error-attr",+ "proc-macro2",+ "quote",+ "syn",+ "version_check",+]++[[package]]+name = "proc-macro-error-attr"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"+dependencies = [+ "proc-macro2",+ "quote",+ "version_check",+]+[[package]]name = "proc-macro2"version = "1.0.36"@@ -2000,6 +2091,37 @@ version = "2.25.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "47c327e191621a2158159df97cdbc2e7074bb4e940275e35abf38eb3d2595754"+[[package]]+name = "protobuf-codegen"+version = "2.25.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3df8c98c08bd4d6653c2dbae00bd68c1d1d82a360265a5b0bbc73d48c63cb853"+dependencies = [+ "protobuf",+]++[[package]]+name = "protoc"+version = "2.25.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9ac70cfc8935f5db2a29c0929db697035d02284011a9b78a5ef5d48092ce9673"+dependencies = [+ "log",+ "which",+]++[[package]]+name = "protoc-rust"+version = "2.25.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6bad71c8404e3e09024fccbab55aae36e3662662167dc4530a242c8cc8ef8d20"+dependencies = [+ "protobuf",+ "protobuf-codegen",+ "protoc",+ "tempfile",+]+[[package]]name = "quickcheck"version = "0.9.2"@@ -2327,9 +2449,9 @@ checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012"[[package]]name = "serde"-version = "1.0.133"+version = "1.0.136"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a"+checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"dependencies = ["serde_derive",]@@ -2357,9 +2479,9 @@ dependencies = [[[package]]name = "serde_derive"-version = "1.0.133"+version = "1.0.136"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537"+checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"dependencies = ["proc-macro2","quote",@@ -2714,6 +2836,15 @@ dependencies = ["tokio",]+[[package]]+name = "toml"+version = "0.5.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa"+dependencies = [+ "serde",+]+[[package]]name = "tower-service"version = "0.3.1"@@ -3069,6 +3200,17 @@ dependencies = ["wasm-bindgen",]+[[package]]+name = "which"+version = "4.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"+dependencies = [+ "either",+ "lazy_static",+ "libc",+]+[[package]]name = "winapi"version = "0.3.9"diff --git a/frontend/rust-lib/dart-ffi/Cargo.toml b/frontend/rust-lib/dart-ffi/Cargo.tomlindex 6787a98d26..74fa95726f 100644--- a/frontend/rust-lib/dart-ffi/Cargo.toml+++ b/frontend/rust-lib/dart-ffi/Cargo.toml@@ -32,4 +32,7 @@ flowy-derive = {path = "../../../shared-lib/flowy-derive" }flutter = ["dart-notify/dart"]http_server = ["flowy-sdk/http_server", "flowy-sdk/use_bunyan"]#use_serde = ["bincode"]-#use_protobuf= ["protobuf"]\ No newline at end of file+#use_protobuf= ["protobuf"]++[build-dependencies]+lib-infra = { path = "../../../shared-lib/lib-infra", features = ["gen_pb"] }\ No newline at end of filediff --git a/frontend/rust-lib/dart-ffi/build.rs b/frontend/rust-lib/dart-ffi/build.rsnew file mode 100644index 0000000000..8708af08ad--- /dev/null+++ b/frontend/rust-lib/dart-ffi/build.rs@@ -0,0 +1,5 @@+use lib_infra::pb;++fn main() {+ pb::gen("dart-ffi", "./src/protobuf/proto");+}diff --git a/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_request.rs b/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_request.rsindex aeac5013bf..61e77820dd 100644--- a/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_request.rs+++ b/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_request.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct FFIRequest {@@ -226,15 +226,8 @@ impl ::protobuf::reflect::ProtobufValue for FFIRequest {static file_descriptor_proto_data: &'static [u8] = b"\\n\x11ffi_request.proto\"<\n\nFFIRequest\x12\x14\n\x05event\x18\x01\x20\- \x01(\tR\x05event\x12\x18\n\x07payload\x18\x02\x20\x01(\x0cR\x07payloadJ\- \x98\x01\n\x06\x12\x04\0\0\x05\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\- \x02\x04\0\x12\x04\x02\0\x05\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x12\- \n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x15\n\x0c\n\x05\x04\0\x02\0\x05\- \x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x10\n\x0c\- \n\x05\x04\0\x02\0\x03\x12\x03\x03\x13\x14\n\x0b\n\x04\x04\0\x02\x01\x12\- \x03\x04\x04\x16\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\t\n\x0c\n\- \x05\x04\0\x02\x01\x01\x12\x03\x04\n\x11\n\x0c\n\x05\x04\0\x02\x01\x03\- \x12\x03\x04\x14\x15b\x06proto3\+ \x01(\tR\x05event\x12\x18\n\x07payload\x18\x02\x20\x01(\x0cR\x07payloadb\+ \x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_response.rs b/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_response.rsindex f5b8b71e5a..14d75265ec 100644--- a/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_response.rs+++ b/frontend/rust-lib/dart-ffi/src/protobuf/model/ffi_response.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct FFIResponse {@@ -270,22 +270,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\n\x12ffi_response.proto\"K\n\x0bFFIResponse\x12\x18\n\x07payload\x18\\x01\x20\x01(\x0cR\x07payload\x12\"\n\x04code\x18\x02\x20\x01(\x0e2\x0e.\FFIStatusCodeR\x04code*.\n\rFFIStatusCode\x12\x06\n\x02Ok\x10\0\x12\x07\- \n\x03Err\x10\x01\x12\x0c\n\x08Internal\x10\x02J\xab\x02\n\x06\x12\x04\0\- \0\n\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\- \x05\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x13\n\x0b\n\x04\x04\0\x02\0\- \x12\x03\x03\x04\x16\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\t\n\x0c\- \n\x05\x04\0\x02\0\x01\x12\x03\x03\n\x11\n\x0c\n\x05\x04\0\x02\0\x03\x12\- \x03\x03\x14\x15\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\x1b\n\x0c\n\- \x05\x04\0\x02\x01\x06\x12\x03\x04\x04\x11\n\x0c\n\x05\x04\0\x02\x01\x01\- \x12\x03\x04\x12\x16\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04\x19\x1a\n\- \n\n\x02\x05\0\x12\x04\x06\0\n\x01\n\n\n\x03\x05\0\x01\x12\x03\x06\x05\- \x12\n\x0b\n\x04\x05\0\x02\0\x12\x03\x07\x04\x0b\n\x0c\n\x05\x05\0\x02\0\- \x01\x12\x03\x07\x04\x06\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x07\t\n\n\- \x0b\n\x04\x05\0\x02\x01\x12\x03\x08\x04\x0c\n\x0c\n\x05\x05\0\x02\x01\- \x01\x12\x03\x08\x04\x07\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x08\n\x0b\- \n\x0b\n\x04\x05\0\x02\x02\x12\x03\t\x04\x11\n\x0c\n\x05\x05\0\x02\x02\- \x01\x12\x03\t\x04\x0c\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\t\x0f\x10b\- \x06proto3\+ \n\x03Err\x10\x01\x12\x0c\n\x08Internal\x10\x02b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/frontend/rust-lib/dart-notify/Cargo.toml b/frontend/rust-lib/dart-notify/Cargo.tomlindex d334f8eaf9..3210c3d5a0 100644--- a/frontend/rust-lib/dart-notify/Cargo.toml+++ b/frontend/rust-lib/dart-notify/Cargo.toml@@ -16,4 +16,7 @@ flowy-derive = {path = "../../../shared-lib/flowy-derive" }lib-dispatch = {path = "../lib-dispatch" }[features]-dart = []\ No newline at end of file+dart = []++[build-dependencies]+lib-infra = { path = "../../../shared-lib/lib-infra", features = ["gen_pb"] }\ No newline at end of filediff --git a/frontend/rust-lib/dart-notify/build.rs b/frontend/rust-lib/dart-notify/build.rsnew file mode 100644index 0000000000..76c2697b8b--- /dev/null+++ b/frontend/rust-lib/dart-notify/build.rs@@ -0,0 +1,5 @@+use lib_infra::pb;++fn main() {+ pb::gen("dart-notify", "./src/protobuf/proto");+}diff --git a/frontend/rust-lib/dart-notify/src/protobuf/model/subject.rs b/frontend/rust-lib/dart-notify/src/protobuf/model/subject.rsindex 9b92b65e61..29f2223b9a 100644--- a/frontend/rust-lib/dart-notify/src/protobuf/model/subject.rs+++ b/frontend/rust-lib/dart-notify/src/protobuf/model/subject.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct SubscribeObject {@@ -427,25 +427,8 @@ static file_descriptor_proto_data: &'static [u8] = b"\\x01\x20\x01(\tR\x06source\x12\x0e\n\x02ty\x18\x02\x20\x01(\x05R\x02ty\\x12\x0e\n\x02id\x18\x03\x20\x01(\tR\x02id\x12\x1a\n\x07payload\x18\x04\\x20\x01(\x0cH\0R\x07payload\x12\x16\n\x05error\x18\x05\x20\x01(\x0cH\- \x01R\x05errorB\x10\n\x0eone_of_payloadB\x0e\n\x0cone_of_errorJ\xf3\x02\- \n\x06\x12\x04\0\0\x08\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\- \0\x12\x04\x02\0\x08\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x17\n\x0b\n\- \x04\x04\0\x02\0\x12\x03\x03\x04\x16\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\- \x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x11\n\x0c\n\x05\- \x04\0\x02\0\x03\x12\x03\x03\x14\x15\n\x0b\n\x04\x04\0\x02\x01\x12\x03\- \x04\x04\x11\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\t\n\x0c\n\x05\- \x04\0\x02\x01\x01\x12\x03\x04\n\x0c\n\x0c\n\x05\x04\0\x02\x01\x03\x12\- \x03\x04\x0f\x10\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x12\n\x0c\n\- \x05\x04\0\x02\x02\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x02\x01\- \x12\x03\x05\x0b\r\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05\x10\x11\n\- \x0b\n\x04\x04\0\x08\0\x12\x03\x06\x04/\n\x0c\n\x05\x04\0\x08\0\x01\x12\- \x03\x06\n\x18\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x06\x1b-\n\x0c\n\x05\- \x04\0\x02\x03\x05\x12\x03\x06\x1b\x20\n\x0c\n\x05\x04\0\x02\x03\x01\x12\- \x03\x06!(\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x06+,\n\x0b\n\x04\x04\0\- \x08\x01\x12\x03\x07\x04+\n\x0c\n\x05\x04\0\x08\x01\x01\x12\x03\x07\n\- \x16\n\x0b\n\x04\x04\0\x02\x04\x12\x03\x07\x19)\n\x0c\n\x05\x04\0\x02\- \x04\x05\x12\x03\x07\x19\x1e\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x07\- \x1f$\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03\x07'(b\x06proto3\+ \x01R\x05errorB\x10\n\x0eone_of_payloadB\x0e\n\x0cone_of_errorb\x06proto\+ 3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/frontend/rust-lib/flowy-document/Flowy.toml b/frontend/rust-lib/flowy-document/Flowy.tomldeleted file mode 100644index 3b417207d9..0000000000--- a/frontend/rust-lib/flowy-document/Flowy.toml+++ /dev/null@@ -1,2 +0,0 @@-proto_crates = []-event_files = []\ No newline at end of filediff --git a/frontend/rust-lib/flowy-document/src/lib.rs b/frontend/rust-lib/flowy-document/src/lib.rsindex 89b5e8208a..0b9f78672d 100644--- a/frontend/rust-lib/flowy-document/src/lib.rs+++ b/frontend/rust-lib/flowy-document/src/lib.rs@@ -1,7 +1,5 @@pub mod controller;pub mod core;-// mod notify;-pub mod protobuf;pub use controller::*;pub mod errors {pub use flowy_error::{internal_error, ErrorCode, FlowyError};diff --git a/frontend/rust-lib/flowy-document/src/protobuf/mod.rs b/frontend/rust-lib/flowy-document/src/protobuf/mod.rsdeleted file mode 100644index da97aad28a..0000000000--- a/frontend/rust-lib/flowy-document/src/protobuf/mod.rs+++ /dev/null@@ -1,4 +0,0 @@-#![cfg_attr(rustfmt, rustfmt::skip)]-// Auto-generated, do not edit-mod model;-pub use model::*;\ No newline at end of filediff --git a/frontend/rust-lib/flowy-document/src/protobuf/model/mod.rs b/frontend/rust-lib/flowy-document/src/protobuf/model/mod.rsdeleted file mode 100644index 6e3d5a1000..0000000000--- a/frontend/rust-lib/flowy-document/src/protobuf/model/mod.rs+++ /dev/null@@ -1,2 +0,0 @@-#![cfg_attr(rustfmt, rustfmt::skip)]-// Auto-generated, do not editdiff --git a/frontend/rust-lib/flowy-error/Cargo.toml b/frontend/rust-lib/flowy-error/Cargo.tomlindex 6deceba9d7..fa25d1d094 100644--- a/frontend/rust-lib/flowy-error/Cargo.toml+++ b/frontend/rust-lib/flowy-error/Cargo.toml@@ -27,3 +27,6 @@ ot = ["lib-ot"]serde = ["serde_json"]http_server = ["http-flowy"]db = ["flowy-database", "lib-sqlite", "r2d2"]++[build-dependencies]+lib-infra = { path = "../../../shared-lib/lib-infra", features = ["gen_pb"] }\ No newline at end of filediff --git a/frontend/rust-lib/flowy-error/build.rs b/frontend/rust-lib/flowy-error/build.rsnew file mode 100644index 0000000000..d5f17bf093--- /dev/null+++ b/frontend/rust-lib/flowy-error/build.rs@@ -0,0 +1,5 @@+use lib_infra::pb;++fn main() {+ pb::gen("flowy-error", "./src/protobuf/proto");+}diff --git a/frontend/rust-lib/flowy-error/src/protobuf/model/errors.rs b/frontend/rust-lib/flowy-error/src/protobuf/model/errors.rsindex a3dcaf639b..150e16c280 100644--- a/frontend/rust-lib/flowy-error/src/protobuf/model/errors.rs+++ b/frontend/rust-lib/flowy-error/src/protobuf/model/errors.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct FlowyError {@@ -219,15 +219,7 @@ impl ::protobuf::reflect::ProtobufValue for FlowyError {static file_descriptor_proto_data: &'static [u8] = b"\\n\x0cerrors.proto\"2\n\nFlowyError\x12\x12\n\x04code\x18\x01\x20\x01(\- \x05R\x04code\x12\x10\n\x03msg\x18\x02\x20\x01(\tR\x03msgJ\x98\x01\n\x06\- \x12\x04\0\0\x05\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\- \x04\x02\0\x05\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x12\n\x0b\n\x04\- \x04\0\x02\0\x12\x03\x03\x04\x13\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\- \x04\t\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\n\x0e\n\x0c\n\x05\x04\0\- \x02\0\x03\x12\x03\x03\x11\x12\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\- \x13\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\- \x02\x01\x01\x12\x03\x04\x0b\x0e\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\- \x04\x11\x12b\x06proto3\+ \x05R\x04code\x12\x10\n\x03msg\x18\x02\x20\x01(\tR\x03msgb\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/frontend/rust-lib/flowy-folder/Cargo.toml b/frontend/rust-lib/flowy-folder/Cargo.tomlindex f98ecd51e3..e93f3eae89 100644--- a/frontend/rust-lib/flowy-folder/Cargo.toml+++ b/frontend/rust-lib/flowy-folder/Cargo.toml@@ -52,4 +52,7 @@ flowy-test = { path = "../flowy-test" }[features]default = []http_server = []-flowy_unit_test = ["lib-ot/flowy_unit_test", "flowy-sync/flowy_unit_test"]\ No newline at end of file+flowy_unit_test = ["lib-ot/flowy_unit_test", "flowy-sync/flowy_unit_test"]++[build-dependencies]+lib-infra = { path = "../../../shared-lib/lib-infra", features = ["gen_pb"] }\ No newline at end of filediff --git a/frontend/rust-lib/flowy-folder/build.rs b/frontend/rust-lib/flowy-folder/build.rsnew file mode 100644index 0000000000..223a7a8b8d--- /dev/null+++ b/frontend/rust-lib/flowy-folder/build.rs@@ -0,0 +1,5 @@+use lib_infra::pb;++fn main() {+ pb::gen("flowy-folder", "./src/protobuf/proto");+}diff --git a/frontend/rust-lib/flowy-folder/src/protobuf/model/dart_notification.rs b/frontend/rust-lib/flowy-folder/src/protobuf/model/dart_notification.rsindex ea29698185..d43a627f4b 100644--- a/frontend/rust-lib/flowy-folder/src/protobuf/model/dart_notification.rs+++ b/frontend/rust-lib/flowy-folder/src/protobuf/model/dart_notification.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(Clone,PartialEq,Eq,Debug,Hash)]pub enum FolderNotification {@@ -114,35 +114,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\x0e\x12\x0e\n\nAppUpdated\x10\x15\x12\x13\n\x0fAppViewsChanged\x10\x18\\x12\x0f\n\x0bViewUpdated\x10\x1f\x12\x0f\n\x0bViewDeleted\x10\x20\x12\\x10\n\x0cViewRestored\x10!\x12\x14\n\x10UserUnauthorized\x10d\x12\x11\n\- \x0cTrashUpdated\x10\xe8\x07J\xbf\x04\n\x06\x12\x04\0\0\x10\x01\n\x08\n\- \x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\x02\0\x10\x01\n\n\n\x03\- \x05\0\x01\x12\x03\x02\x05\x17\n\x0b\n\x04\x05\0\x02\0\x12\x03\x03\x04\- \x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x03\x04\x0b\n\x0c\n\x05\x05\0\- \x02\0\x02\x12\x03\x03\x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x04\x04\- \x1d\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x04\x04\x17\n\x0c\n\x05\x05\0\- \x02\x01\x02\x12\x03\x04\x1a\x1c\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x05\- \x04\x1d\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x05\x04\x17\n\x0c\n\x05\- \x05\0\x02\x02\x02\x12\x03\x05\x1a\x1c\n\x0b\n\x04\x05\0\x02\x03\x12\x03\- \x06\x04\x1a\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\x06\x04\x14\n\x0c\n\- \x05\x05\0\x02\x03\x02\x12\x03\x06\x17\x19\n\x0b\n\x04\x05\0\x02\x04\x12\- \x03\x07\x04\x1e\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03\x07\x04\x18\n\x0c\- \n\x05\x05\0\x02\x04\x02\x12\x03\x07\x1b\x1d\n\x0b\n\x04\x05\0\x02\x05\- \x12\x03\x08\x04\x1e\n\x0c\n\x05\x05\0\x02\x05\x01\x12\x03\x08\x04\x18\n\- \x0c\n\x05\x05\0\x02\x05\x02\x12\x03\x08\x1b\x1d\n\x0b\n\x04\x05\0\x02\- \x06\x12\x03\t\x04\x14\n\x0c\n\x05\x05\0\x02\x06\x01\x12\x03\t\x04\x0e\n\- \x0c\n\x05\x05\0\x02\x06\x02\x12\x03\t\x11\x13\n\x0b\n\x04\x05\0\x02\x07\- \x12\x03\n\x04\x19\n\x0c\n\x05\x05\0\x02\x07\x01\x12\x03\n\x04\x13\n\x0c\- \n\x05\x05\0\x02\x07\x02\x12\x03\n\x16\x18\n\x0b\n\x04\x05\0\x02\x08\x12\- \x03\x0b\x04\x15\n\x0c\n\x05\x05\0\x02\x08\x01\x12\x03\x0b\x04\x0f\n\x0c\- \n\x05\x05\0\x02\x08\x02\x12\x03\x0b\x12\x14\n\x0b\n\x04\x05\0\x02\t\x12\- \x03\x0c\x04\x15\n\x0c\n\x05\x05\0\x02\t\x01\x12\x03\x0c\x04\x0f\n\x0c\n\- \x05\x05\0\x02\t\x02\x12\x03\x0c\x12\x14\n\x0b\n\x04\x05\0\x02\n\x12\x03\- \r\x04\x16\n\x0c\n\x05\x05\0\x02\n\x01\x12\x03\r\x04\x10\n\x0c\n\x05\x05\- \0\x02\n\x02\x12\x03\r\x13\x15\n\x0b\n\x04\x05\0\x02\x0b\x12\x03\x0e\x04\- \x1b\n\x0c\n\x05\x05\0\x02\x0b\x01\x12\x03\x0e\x04\x14\n\x0c\n\x05\x05\0\- \x02\x0b\x02\x12\x03\x0e\x17\x1a\n\x0b\n\x04\x05\0\x02\x0c\x12\x03\x0f\- \x04\x18\n\x0c\n\x05\x05\0\x02\x0c\x01\x12\x03\x0f\x04\x10\n\x0c\n\x05\- \x05\0\x02\x0c\x02\x12\x03\x0f\x13\x17b\x06proto3\+ \x0cTrashUpdated\x10\xe8\x07b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/frontend/rust-lib/flowy-folder/src/protobuf/model/event_map.rs b/frontend/rust-lib/flowy-folder/src/protobuf/model/event_map.rsindex 1b50f077a8..556a71f14d 100644--- a/frontend/rust-lib/flowy-folder/src/protobuf/model/event_map.rs+++ b/frontend/rust-lib/flowy-folder/src/protobuf/model/event_map.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(Clone,PartialEq,Eq,Debug,Hash)]pub enum FolderEvent {@@ -155,60 +155,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\x0e\n\tReadTrash\x10\xac\x02\x12\x11\n\x0cPutbackTrash\x10\xad\x02\x12\\x10\n\x0bDeleteTrash\x10\xae\x02\x12\x14\n\x0fRestoreAllTrash\x10\xaf\\x02\x12\x13\n\x0eDeleteAllTrash\x10\xb0\x02\x12\x12\n\rApplyDocDelta\- \x10\x90\x03\x12\x13\n\x0eExportDocument\x10\xf4\x03J\xab\x08\n\x06\x12\- \x04\0\0\x1c\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\- \x02\0\x1c\x01\n\n\n\x03\x05\0\x01\x12\x03\x02\x05\x10\n\x0b\n\x04\x05\0\- \x02\0\x12\x03\x03\x04\x18\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x03\x04\- \x13\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x03\x16\x17\n\x0b\n\x04\x05\0\- \x02\x01\x12\x03\x04\x04\x19\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x04\- \x04\x14\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x04\x17\x18\n\x0b\n\x04\- \x05\0\x02\x02\x12\x03\x05\x04\x17\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\- \x05\x04\x12\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x05\x15\x16\n\x0b\n\- \x04\x05\0\x02\x03\x12\x03\x06\x04\x18\n\x0c\n\x05\x05\0\x02\x03\x01\x12\- \x03\x06\x04\x13\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\x06\x16\x17\n\x0b\- \n\x04\x05\0\x02\x04\x12\x03\x07\x04\x16\n\x0c\n\x05\x05\0\x02\x04\x01\- \x12\x03\x07\x04\x11\n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03\x07\x14\x15\n\- \x0b\n\x04\x05\0\x02\x05\x12\x03\x08\x04\x1a\n\x0c\n\x05\x05\0\x02\x05\- \x01\x12\x03\x08\x04\x15\n\x0c\n\x05\x05\0\x02\x05\x02\x12\x03\x08\x18\- \x19\n\x0b\n\x04\x05\0\x02\x06\x12\x03\t\x04\x14\n\x0c\n\x05\x05\0\x02\- \x06\x01\x12\x03\t\x04\r\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03\t\x10\x13\- \n\x0b\n\x04\x05\0\x02\x07\x12\x03\n\x04\x14\n\x0c\n\x05\x05\0\x02\x07\- \x01\x12\x03\n\x04\r\n\x0c\n\x05\x05\0\x02\x07\x02\x12\x03\n\x10\x13\n\- \x0b\n\x04\x05\0\x02\x08\x12\x03\x0b\x04\x12\n\x0c\n\x05\x05\0\x02\x08\- \x01\x12\x03\x0b\x04\x0b\n\x0c\n\x05\x05\0\x02\x08\x02\x12\x03\x0b\x0e\- \x11\n\x0b\n\x04\x05\0\x02\t\x12\x03\x0c\x04\x14\n\x0c\n\x05\x05\0\x02\t\- \x01\x12\x03\x0c\x04\r\n\x0c\n\x05\x05\0\x02\t\x02\x12\x03\x0c\x10\x13\n\- \x0b\n\x04\x05\0\x02\n\x12\x03\r\x04\x15\n\x0c\n\x05\x05\0\x02\n\x01\x12\- \x03\r\x04\x0e\n\x0c\n\x05\x05\0\x02\n\x02\x12\x03\r\x11\x14\n\x0b\n\x04\- \x05\0\x02\x0b\x12\x03\x0e\x04\x13\n\x0c\n\x05\x05\0\x02\x0b\x01\x12\x03\- \x0e\x04\x0c\n\x0c\n\x05\x05\0\x02\x0b\x02\x12\x03\x0e\x0f\x12\n\x0b\n\- \x04\x05\0\x02\x0c\x12\x03\x0f\x04\x15\n\x0c\n\x05\x05\0\x02\x0c\x01\x12\- \x03\x0f\x04\x0e\n\x0c\n\x05\x05\0\x02\x0c\x02\x12\x03\x0f\x11\x14\n\x0b\- \n\x04\x05\0\x02\r\x12\x03\x10\x04\x15\n\x0c\n\x05\x05\0\x02\r\x01\x12\- \x03\x10\x04\x0e\n\x0c\n\x05\x05\0\x02\r\x02\x12\x03\x10\x11\x14\n\x0b\n\- \x04\x05\0\x02\x0e\x12\x03\x11\x04\x18\n\x0c\n\x05\x05\0\x02\x0e\x01\x12\- \x03\x11\x04\x11\n\x0c\n\x05\x05\0\x02\x0e\x02\x12\x03\x11\x14\x17\n\x0b\- \n\x04\x05\0\x02\x0f\x12\x03\x12\x04\x13\n\x0c\n\x05\x05\0\x02\x0f\x01\- \x12\x03\x12\x04\x0c\n\x0c\n\x05\x05\0\x02\x0f\x02\x12\x03\x12\x0f\x12\n\- \x0b\n\x04\x05\0\x02\x10\x12\x03\x13\x04\x17\n\x0c\n\x05\x05\0\x02\x10\- \x01\x12\x03\x13\x04\x10\n\x0c\n\x05\x05\0\x02\x10\x02\x12\x03\x13\x13\- \x16\n\x0b\n\x04\x05\0\x02\x11\x12\x03\x14\x04\x14\n\x0c\n\x05\x05\0\x02\- \x11\x01\x12\x03\x14\x04\r\n\x0c\n\x05\x05\0\x02\x11\x02\x12\x03\x14\x10\- \x13\n\x0b\n\x04\x05\0\x02\x12\x12\x03\x15\x04\x14\n\x0c\n\x05\x05\0\x02\- \x12\x01\x12\x03\x15\x04\r\n\x0c\n\x05\x05\0\x02\x12\x02\x12\x03\x15\x10\- \x13\n\x0b\n\x04\x05\0\x02\x13\x12\x03\x16\x04\x17\n\x0c\n\x05\x05\0\x02\- \x13\x01\x12\x03\x16\x04\x10\n\x0c\n\x05\x05\0\x02\x13\x02\x12\x03\x16\- \x13\x16\n\x0b\n\x04\x05\0\x02\x14\x12\x03\x17\x04\x16\n\x0c\n\x05\x05\0\- \x02\x14\x01\x12\x03\x17\x04\x0f\n\x0c\n\x05\x05\0\x02\x14\x02\x12\x03\- \x17\x12\x15\n\x0b\n\x04\x05\0\x02\x15\x12\x03\x18\x04\x1a\n\x0c\n\x05\- \x05\0\x02\x15\x01\x12\x03\x18\x04\x13\n\x0c\n\x05\x05\0\x02\x15\x02\x12\- \x03\x18\x16\x19\n\x0b\n\x04\x05\0\x02\x16\x12\x03\x19\x04\x19\n\x0c\n\- \x05\x05\0\x02\x16\x01\x12\x03\x19\x04\x12\n\x0c\n\x05\x05\0\x02\x16\x02\- \x12\x03\x19\x15\x18\n\x0b\n\x04\x05\0\x02\x17\x12\x03\x1a\x04\x18\n\x0c\- \n\x05\x05\0\x02\x17\x01\x12\x03\x1a\x04\x11\n\x0c\n\x05\x05\0\x02\x17\- \x02\x12\x03\x1a\x14\x17\n\x0b\n\x04\x05\0\x02\x18\x12\x03\x1b\x04\x19\n\- \x0c\n\x05\x05\0\x02\x18\x01\x12\x03\x1b\x04\x12\n\x0c\n\x05\x05\0\x02\- \x18\x02\x12\x03\x1b\x15\x18b\x06proto3\+ \x10\x90\x03\x12\x13\n\x0eExportDocument\x10\xf4\x03b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/frontend/rust-lib/flowy-folder/src/services/app/controller.rs b/frontend/rust-lib/flowy-folder/src/services/app/controller.rsindex 2e587d0fd3..4fa2018523 100644--- a/frontend/rust-lib/flowy-folder/src/services/app/controller.rs+++ b/frontend/rust-lib/flowy-folder/src/services/app/controller.rs@@ -169,7 +169,7 @@ impl AppController {loop {let mut stream = Box::pin(rx.recv().into_stream().filter_map(|result| async move {match result {- Ok(event) => event.select(TrashType::App),+ Ok(event) => event.select(TrashType::TrashApp),Err(_e) => None,}}));diff --git a/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/app_sql.rs b/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/app_sql.rsindex b098b5f461..33b30a8656 100644--- a/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/app_sql.rs+++ b/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/app_sql.rs@@ -118,7 +118,7 @@ impl std::convert::From<AppTable> for Trash {name: table.name,modified_time: table.modified_time,create_time: table.create_time,- ty: TrashType::App,+ ty: TrashType::TrashApp,}}}diff --git a/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/trash_sql.rs b/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/trash_sql.rsindex 3c67084cdb..14bdce0d10 100644--- a/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/trash_sql.rs+++ b/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/trash_sql.rs@@ -129,8 +129,8 @@ impl std::convert::From<SqlTrashType> for TrashType {fn from(ty: SqlTrashType) -> Self {match ty {SqlTrashType::Unknown => TrashType::Unknown,- SqlTrashType::View => TrashType::View,- SqlTrashType::App => TrashType::App,+ SqlTrashType::View => TrashType::TrashView,+ SqlTrashType::App => TrashType::TrashApp,}}}@@ -139,8 +139,8 @@ impl std::convert::From<TrashType> for SqlTrashType {fn from(ty: TrashType) -> Self {match ty {TrashType::Unknown => SqlTrashType::Unknown,- TrashType::View => SqlTrashType::View,- TrashType::App => SqlTrashType::App,+ TrashType::TrashView => SqlTrashType::View,+ TrashType::TrashApp => SqlTrashType::App,}}}diff --git a/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/view_sql.rs b/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/view_sql.rsindex 705ab136a8..ad0edbf547 100644--- a/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/view_sql.rs+++ b/frontend/rust-lib/flowy-folder/src/services/persistence/version_1/view_sql.rs@@ -174,7 +174,7 @@ impl std::convert::From<ViewTable> for Trash {name: table.name,modified_time: table.modified_time,create_time: table.create_time,- ty: TrashType::View,+ ty: TrashType::TrashView,}}}diff --git a/frontend/rust-lib/flowy-folder/src/services/view/controller.rs b/frontend/rust-lib/flowy-folder/src/services/view/controller.rsindex b978fe5d65..cb23286493 100644--- a/frontend/rust-lib/flowy-folder/src/services/view/controller.rs+++ b/frontend/rust-lib/flowy-folder/src/services/view/controller.rs@@ -315,7 +315,7 @@ impl ViewController {loop {let mut stream = Box::pin(rx.recv().into_stream().filter_map(|result| async move {match result {- Ok(event) => event.select(TrashType::View),+ Ok(event) => event.select(TrashType::TrashView),Err(_e) => None,}}));diff --git a/frontend/rust-lib/flowy-folder/tests/workspace/helper.rs b/frontend/rust-lib/flowy-folder/tests/workspace/helper.rsindex fc1143626e..f67c9961bd 100644--- a/frontend/rust-lib/flowy-folder/tests/workspace/helper.rs+++ b/frontend/rust-lib/flowy-folder/tests/workspace/helper.rs@@ -180,7 +180,7 @@ pub async fn read_trash(sdk: &FlowySDKTest) -> RepeatedTrash {pub async fn restore_app_from_trash(sdk: &FlowySDKTest, app_id: &str) {let id = TrashId {id: app_id.to_owned(),- ty: TrashType::App,+ ty: TrashType::TrashApp,};FolderEventBuilder::new(sdk.clone()).event(PutbackTrash)@@ -192,7 +192,7 @@ pub async fn restore_app_from_trash(sdk: &FlowySDKTest, app_id: &str) {pub async fn restore_view_from_trash(sdk: &FlowySDKTest, view_id: &str) {let id = TrashId {id: view_id.to_owned(),- ty: TrashType::View,+ ty: TrashType::TrashView,};FolderEventBuilder::new(sdk.clone()).event(PutbackTrash)diff --git a/frontend/rust-lib/flowy-net/Cargo.toml b/frontend/rust-lib/flowy-net/Cargo.tomlindex 67e215c86d..24b09946e6 100644--- a/frontend/rust-lib/flowy-net/Cargo.toml+++ b/frontend/rust-lib/flowy-net/Cargo.toml@@ -39,4 +39,7 @@ serde = { version = "1.0", features = ["derive"] }serde_json = "1.0"[features]-http_server = []\ No newline at end of file+http_server = []++[build-dependencies]+lib-infra = { path = "../../../shared-lib/lib-infra", features = ["gen_pb"] }\ No newline at end of filediff --git a/frontend/rust-lib/flowy-net/build.rs b/frontend/rust-lib/flowy-net/build.rsnew file mode 100644index 0000000000..75083105f3--- /dev/null+++ b/frontend/rust-lib/flowy-net/build.rs@@ -0,0 +1,5 @@+use lib_infra::pb;++fn main() {+ pb::gen("flowy-net", "./src/protobuf/proto");+}diff --git a/frontend/rust-lib/flowy-net/src/protobuf/model/event.rs b/frontend/rust-lib/flowy-net/src/protobuf/model/event.rsindex be330c2d33..765d45a594 100644--- a/frontend/rust-lib/flowy-net/src/protobuf/model/event.rs+++ b/frontend/rust-lib/flowy-net/src/protobuf/model/event.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(Clone,PartialEq,Eq,Debug,Hash)]pub enum NetworkEvent {@@ -72,11 +72,7 @@ impl ::protobuf::reflect::ProtobufValue for NetworkEvent {static file_descriptor_proto_data: &'static [u8] = b"\\n\x0bevent.proto*%\n\x0cNetworkEvent\x12\x15\n\x11UpdateNetworkType\x10\- \0JS\n\x06\x12\x04\0\0\x04\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\- \x05\0\x12\x04\x02\0\x04\x01\n\n\n\x03\x05\0\x01\x12\x03\x02\x05\x11\n\- \x0b\n\x04\x05\0\x02\0\x12\x03\x03\x04\x1a\n\x0c\n\x05\x05\0\x02\0\x01\- \x12\x03\x03\x04\x15\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x03\x18\x19b\- \x06proto3\+ \0b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/frontend/rust-lib/flowy-net/src/protobuf/model/network_state.rs b/frontend/rust-lib/flowy-net/src/protobuf/model/network_state.rsindex b74f295a86..26fa1259fa 100644--- a/frontend/rust-lib/flowy-net/src/protobuf/model/network_state.rs+++ b/frontend/rust-lib/flowy-net/src/protobuf/model/network_state.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct NetworkState {@@ -231,21 +231,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\n\x13network_state.proto\",\n\x0cNetworkState\x12\x1c\n\x02ty\x18\x01\\x20\x01(\x0e2\x0c.NetworkTypeR\x02ty*G\n\x0bNetworkType\x12\x16\n\x12Un\knownNetworkType\x10\0\x12\x08\n\x04Wifi\x10\x01\x12\x08\n\x04Cell\x10\- \x02\x12\x0c\n\x08Ethernet\x10\x03J\x9d\x02\n\x06\x12\x04\0\0\n\x01\n\- \x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x04\x01\n\n\- \n\x03\x04\0\x01\x12\x03\x02\x08\x14\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\- \x04\x17\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\x03\x04\x0f\n\x0c\n\x05\x04\- \0\x02\0\x01\x12\x03\x03\x10\x12\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\- \x15\x16\n\n\n\x02\x05\0\x12\x04\x05\0\n\x01\n\n\n\x03\x05\0\x01\x12\x03\- \x05\x05\x10\n\x0b\n\x04\x05\0\x02\0\x12\x03\x06\x04\x1b\n\x0c\n\x05\x05\- \0\x02\0\x01\x12\x03\x06\x04\x16\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x06\- \x19\x1a\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x07\x04\r\n\x0c\n\x05\x05\0\- \x02\x01\x01\x12\x03\x07\x04\x08\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\- \x07\x0b\x0c\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x08\x04\r\n\x0c\n\x05\x05\- \0\x02\x02\x01\x12\x03\x08\x04\x08\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\- \x08\x0b\x0c\n\x0b\n\x04\x05\0\x02\x03\x12\x03\t\x04\x11\n\x0c\n\x05\x05\- \0\x02\x03\x01\x12\x03\t\x04\x0c\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\t\- \x0f\x10b\x06proto3\+ \x02\x12\x0c\n\x08Ethernet\x10\x03b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/frontend/rust-lib/flowy-user/Cargo.toml b/frontend/rust-lib/flowy-user/Cargo.tomlindex 3f7e1021c3..7f7d04f964 100644--- a/frontend/rust-lib/flowy-user/Cargo.toml+++ b/frontend/rust-lib/flowy-user/Cargo.toml@@ -44,4 +44,7 @@ futures = "0.3.15"serial_test = "0.5.1"[features]-http_server = []\ No newline at end of file+http_server = []++[build-dependencies]+lib-infra = { path = "../../../shared-lib/lib-infra", features = ["gen_pb"] }\ No newline at end of filediff --git a/frontend/rust-lib/flowy-user/build.rs b/frontend/rust-lib/flowy-user/build.rsnew file mode 100644index 0000000000..bcc5f28171--- /dev/null+++ b/frontend/rust-lib/flowy-user/build.rs@@ -0,0 +1,5 @@+use lib_infra::pb;++fn main() {+ pb::gen("flowy-user", "./src/protobuf/proto");+}diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/dart_notification.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/dart_notification.rsindex 95e2553f0a..a340c4aa27 100644--- a/frontend/rust-lib/flowy-user/src/protobuf/model/dart_notification.rs+++ b/frontend/rust-lib/flowy-user/src/protobuf/model/dart_notification.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(Clone,PartialEq,Eq,Debug,Hash)]pub enum UserNotification {@@ -86,19 +86,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\n\x17dart_notification.proto*\x81\x01\n\x10UserNotification\x12\x0b\n\\x07Unknown\x10\0\x12\x13\n\x0fUserAuthChanged\x10\x01\x12\x16\n\x12User\ProfileUpdated\x10\x02\x12\x14\n\x10UserUnauthorized\x10\x03\x12\x1d\n\- \x19UserWsConnectStateChanged\x10\x04J\xf7\x01\n\x06\x12\x04\0\0\x08\x01\- \n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\x02\0\x08\x01\n\- \n\n\x03\x05\0\x01\x12\x03\x02\x05\x15\n\x0b\n\x04\x05\0\x02\0\x12\x03\- \x03\x04\x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x03\x04\x0b\n\x0c\n\x05\- \x05\0\x02\0\x02\x12\x03\x03\x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\x03\- \x04\x04\x18\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x04\x04\x13\n\x0c\n\- \x05\x05\0\x02\x01\x02\x12\x03\x04\x16\x17\n\x0b\n\x04\x05\0\x02\x02\x12\- \x03\x05\x04\x1b\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x05\x04\x16\n\x0c\- \n\x05\x05\0\x02\x02\x02\x12\x03\x05\x19\x1a\n\x0b\n\x04\x05\0\x02\x03\- \x12\x03\x06\x04\x19\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\x06\x04\x14\n\- \x0c\n\x05\x05\0\x02\x03\x02\x12\x03\x06\x17\x18\n\x0b\n\x04\x05\0\x02\- \x04\x12\x03\x07\x04\"\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03\x07\x04\x1d\- \n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03\x07\x20!b\x06proto3\+ \x19UserWsConnectStateChanged\x10\x04b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/event_map.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/event_map.rsindex f9151d58e5..b536f361a5 100644--- a/frontend/rust-lib/flowy-user/src/protobuf/model/event_map.rs+++ b/frontend/rust-lib/flowy-user/src/protobuf/model/event_map.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(Clone,PartialEq,Eq,Debug,Hash)]pub enum UserEvent {@@ -99,27 +99,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\x12\n\n\x06SignIn\x10\x01\x12\n\n\x06SignUp\x10\x02\x12\x0b\n\x07SignOu\t\x10\x03\x12\x0e\n\nUpdateUser\x10\x04\x12\x12\n\x0eGetUserProfile\x10\\x05\x12\r\n\tCheckUser\x10\x06\x12\x18\n\x14SetAppearanceSetting\x10\- \x07\x12\x18\n\x14GetAppearanceSetting\x10\x08J\x9b\x03\n\x06\x12\x04\0\- \0\x0c\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\x02\0\- \x0c\x01\n\n\n\x03\x05\0\x01\x12\x03\x02\x05\x0e\n\x0b\n\x04\x05\0\x02\0\- \x12\x03\x03\x04\x11\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x03\x04\x0c\n\- \x0c\n\x05\x05\0\x02\0\x02\x12\x03\x03\x0f\x10\n\x0b\n\x04\x05\0\x02\x01\- \x12\x03\x04\x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x04\x04\n\n\- \x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x04\r\x0e\n\x0b\n\x04\x05\0\x02\x02\- \x12\x03\x05\x04\x0f\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x05\x04\n\n\- \x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x05\r\x0e\n\x0b\n\x04\x05\0\x02\x03\- \x12\x03\x06\x04\x10\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\x06\x04\x0b\n\- \x0c\n\x05\x05\0\x02\x03\x02\x12\x03\x06\x0e\x0f\n\x0b\n\x04\x05\0\x02\- \x04\x12\x03\x07\x04\x13\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03\x07\x04\- \x0e\n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03\x07\x11\x12\n\x0b\n\x04\x05\0\- \x02\x05\x12\x03\x08\x04\x17\n\x0c\n\x05\x05\0\x02\x05\x01\x12\x03\x08\- \x04\x12\n\x0c\n\x05\x05\0\x02\x05\x02\x12\x03\x08\x15\x16\n\x0b\n\x04\- \x05\0\x02\x06\x12\x03\t\x04\x12\n\x0c\n\x05\x05\0\x02\x06\x01\x12\x03\t\- \x04\r\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03\t\x10\x11\n\x0b\n\x04\x05\0\- \x02\x07\x12\x03\n\x04\x1d\n\x0c\n\x05\x05\0\x02\x07\x01\x12\x03\n\x04\- \x18\n\x0c\n\x05\x05\0\x02\x07\x02\x12\x03\n\x1b\x1c\n\x0b\n\x04\x05\0\- \x02\x08\x12\x03\x0b\x04\x1d\n\x0c\n\x05\x05\0\x02\x08\x01\x12\x03\x0b\- \x04\x18\n\x0c\n\x05\x05\0\x02\x08\x02\x12\x03\x0b\x1b\x1cb\x06proto3\+ \x07\x12\x18\n\x14GetAppearanceSetting\x10\x08b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/Cargo.lock b/shared-lib/Cargo.lockindex 326e71a4ac..82716e07ad 100644--- a/shared-lib/Cargo.lock+++ b/shared-lib/Cargo.lock@@ -109,6 +109,17 @@ version = "1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"+[[package]]+name = "cargo_toml"+version = "0.11.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4e270ef0cd868745878982f7ce470aa898d0d4bb248af67f0cf66f54617913ef"+dependencies = [+ "serde",+ "serde_derive",+ "toml",+]+[[package]]name = "cfg-if"version = "1.0.0"@@ -137,6 +148,31 @@ dependencies = ["autocfg",]+[[package]]+name = "cmd_lib"+version = "1.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ba0f413777386d37f85afa5242f277a7b461905254c1af3c339d4af06800f62"+dependencies = [+ "cmd_lib_macros",+ "faccess",+ "lazy_static",+ "log",+ "os_pipe",+]++[[package]]+name = "cmd_lib_macros"+version = "1.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9e66605092ff6c6e37e0246601ae6c3f62dc1880e0599359b5f303497c112dc0"+dependencies = [+ "proc-macro-error",+ "proc-macro2",+ "quote",+ "syn",+]+[[package]]name = "convert_case"version = "0.4.0"@@ -190,6 +226,12 @@ version = "1.0.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "31ad93652f40969dead8d4bf897a41e9462095152eb21c56e5830537e41179dd"+[[package]]+name = "either"+version = "1.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"+[[package]]name = "env_logger"version = "0.7.1"@@ -219,9 +261,21 @@ version = "0.1.0"dependencies = ["derive_more","flowy-derive",+ "lib-infra","protobuf",]+[[package]]+name = "faccess"+version = "0.2.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e039175679baf763ddddf4f76900b92d4dae9411ee88cf42d2f11b976b09e07c"+dependencies = [+ "bitflags",+ "libc",+ "winapi",+]+[[package]]name = "fake"version = "2.3.0"@@ -241,6 +295,15 @@ dependencies = ["regex",]+[[package]]+name = "fastrand"+version = "1.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"+dependencies = [+ "instant",+]+[[package]]name = "flowy-ast"version = "0.1.0"@@ -299,6 +362,7 @@ dependencies = ["derive_more","error-code","flowy-derive",+ "lib-infra","log","protobuf","serde",@@ -322,6 +386,7 @@ dependencies = ["flowy-derive","futures","lazy_static",+ "lib-infra","log","protobuf","quickcheck",@@ -558,13 +623,17 @@ name = "lib-infra"version = "0.1.0"dependencies = ["bytes",+ "cargo_toml","chrono",+ "cmd_lib","futures-core","log","pin-project",+ "protoc-rust","rand 0.8.4","tokio","uuid",+ "walkdir",][[package]]@@ -728,6 +797,16 @@ version = "0.3.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"+[[package]]+name = "os_pipe"+version = "0.9.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fb233f06c2307e1f5ce2ecad9f8121cffbbee2c95428f44ea85222e460d0d213"+dependencies = [+ "libc",+ "winapi",+]+[[package]]name = "parking_lot"version = "0.11.2"@@ -812,6 +891,30 @@ version = "0.2.15"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba"+[[package]]+name = "proc-macro-error"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"+dependencies = [+ "proc-macro-error-attr",+ "proc-macro2",+ "quote",+ "syn",+ "version_check",+]++[[package]]+name = "proc-macro-error-attr"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"+dependencies = [+ "proc-macro2",+ "quote",+ "version_check",+]+[[package]]name = "proc-macro-hack"version = "0.5.19"@@ -839,6 +942,37 @@ version = "2.25.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "47c327e191621a2158159df97cdbc2e7074bb4e940275e35abf38eb3d2595754"+[[package]]+name = "protobuf-codegen"+version = "2.25.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3df8c98c08bd4d6653c2dbae00bd68c1d1d82a360265a5b0bbc73d48c63cb853"+dependencies = [+ "protobuf",+]++[[package]]+name = "protoc"+version = "2.25.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9ac70cfc8935f5db2a29c0929db697035d02284011a9b78a5ef5d48092ce9673"+dependencies = [+ "log",+ "which",+]++[[package]]+name = "protoc-rust"+version = "2.25.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6bad71c8404e3e09024fccbab55aae36e3662662167dc4530a242c8cc8ef8d20"+dependencies = [+ "protobuf",+ "protobuf-codegen",+ "protoc",+ "tempfile",+]+[[package]]name = "quickcheck"version = "0.9.2"@@ -978,6 +1112,15 @@ version = "0.6.25"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"+[[package]]+name = "remove_dir_all"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"+dependencies = [+ "winapi",+]+[[package]]name = "rustc_version"version = "0.3.3"@@ -993,6 +1136,15 @@ version = "1.0.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"+[[package]]+name = "same-file"+version = "1.0.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"+dependencies = [+ "winapi-util",+]+[[package]]name = "scopeguard"version = "1.1.0"@@ -1019,18 +1171,18 @@ dependencies = [[[package]]name = "serde"-version = "1.0.130"+version = "1.0.136"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913"+checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"dependencies = ["serde_derive",][[package]]name = "serde_derive"-version = "1.0.130"+version = "1.0.136"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"+checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"dependencies = ["proc-macro2","quote",@@ -1133,6 +1285,20 @@ dependencies = ["unicode-xid",]+[[package]]+name = "tempfile"+version = "3.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"+dependencies = [+ "cfg-if",+ "fastrand",+ "libc",+ "redox_syscall",+ "remove_dir_all",+ "winapi",+]+[[package]]name = "termcolor"version = "1.1.2"@@ -1402,6 +1568,17 @@ version = "0.9.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"+[[package]]+name = "walkdir"+version = "2.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"+dependencies = [+ "same-file",+ "winapi",+ "winapi-util",+]+[[package]]name = "wasi"version = "0.9.0+wasi-snapshot-preview1"@@ -1414,6 +1591,17 @@ version = "0.10.0+wasi-snapshot-preview1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"+[[package]]+name = "which"+version = "4.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"+dependencies = [+ "either",+ "lazy_static",+ "libc",+]+[[package]]name = "winapi"version = "0.3.9"diff --git a/shared-lib/error-code/Cargo.toml b/shared-lib/error-code/Cargo.tomlindex 5688c869ee..bedb25a63a 100644--- a/shared-lib/error-code/Cargo.toml+++ b/shared-lib/error-code/Cargo.toml@@ -8,4 +8,7 @@ edition = "2018"[dependencies]flowy-derive = { path = "../flowy-derive" }protobuf = {version = "2.18.0"}-derive_more = {version = "0.99", features = ["display"]}\ No newline at end of file+derive_more = {version = "0.99", features = ["display"]}++[build-dependencies]+lib-infra = { path = "../lib-infra", features = ["gen_pb"] }\ No newline at end of filediff --git a/shared-lib/error-code/build.rs b/shared-lib/error-code/build.rsnew file mode 100644index 0000000000..afa413f054--- /dev/null+++ b/shared-lib/error-code/build.rs@@ -0,0 +1,5 @@+use lib_infra::pb;++fn main() {+ pb::gen("error-code", "./src/protobuf/proto");+}diff --git a/shared-lib/error-code/src/protobuf/model/error_code.rs b/shared-lib/error-code/src/protobuf/model/error_code.rsindex 0fe3afbf55..412b935aab 100644--- a/shared-lib/error-code/src/protobuf/model/error_code.rs+++ b/shared-lib/error-code/src/protobuf/model/error_code.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(Clone,PartialEq,Eq,Debug,Hash)]pub enum ErrorCode {@@ -174,70 +174,8 @@ static file_descriptor_proto_data: &'static [u8] = b"\dFormatInvalid\x10\xb2\x02\x12\x15\n\x10PasswordNotMatch\x10\xb3\x02\x12\\x14\n\x0fUserNameTooLong\x10\xb4\x02\x12'\n\"UserNameContainForbiddenCh\aracters\x10\xb5\x02\x12\x14\n\x0fUserNameIsEmpty\x10\xb6\x02\x12\x12\n\- \rUserIdInvalid\x10\xb7\x02\x12\x11\n\x0cUserNotExist\x10\xb8\x02J\xf8\t\- \n\x06\x12\x04\0\0!\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\- \x12\x04\x02\0!\x01\n\n\n\x03\x05\0\x01\x12\x03\x02\x05\x0e\n\x0b\n\x04\- \x05\0\x02\0\x12\x03\x03\x04\x11\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x03\- \x04\x0c\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x03\x0f\x10\n\x0b\n\x04\x05\- \0\x02\x01\x12\x03\x04\x04\x19\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x04\- \x04\x14\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x04\x17\x18\n\x0b\n\x04\- \x05\0\x02\x02\x12\x03\x05\x04\x17\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\- \x05\x04\x12\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x05\x15\x16\n\x0b\n\- \x04\x05\0\x02\x03\x12\x03\x06\x04\x1f\n\x0c\n\x05\x05\0\x02\x03\x01\x12\- \x03\x06\x04\x18\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\x06\x1b\x1e\n\x0b\- \n\x04\x05\0\x02\x04\x12\x03\x07\x04\x1d\n\x0c\n\x05\x05\0\x02\x04\x01\- \x12\x03\x07\x04\x16\n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03\x07\x19\x1c\n\- \x0b\n\x04\x05\0\x02\x05\x12\x03\x08\x04\x1f\n\x0c\n\x05\x05\0\x02\x05\- \x01\x12\x03\x08\x04\x18\n\x0c\n\x05\x05\0\x02\x05\x02\x12\x03\x08\x1b\- \x1e\n\x0b\n\x04\x05\0\x02\x06\x12\x03\t\x04\x1f\n\x0c\n\x05\x05\0\x02\- \x06\x01\x12\x03\t\x04\x18\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03\t\x1b\- \x1e\n\x0b\n\x04\x05\0\x02\x07\x12\x03\n\x04\x1f\n\x0c\n\x05\x05\0\x02\- \x07\x01\x12\x03\n\x04\x18\n\x0c\n\x05\x05\0\x02\x07\x02\x12\x03\n\x1b\- \x1e\n\x0b\n\x04\x05\0\x02\x08\x12\x03\x0b\x04\x17\n\x0c\n\x05\x05\0\x02\- \x08\x01\x12\x03\x0b\x04\x10\n\x0c\n\x05\x05\0\x02\x08\x02\x12\x03\x0b\- \x13\x16\n\x0b\n\x04\x05\0\x02\t\x12\x03\x0c\x04\x19\n\x0c\n\x05\x05\0\- \x02\t\x01\x12\x03\x0c\x04\x12\n\x0c\n\x05\x05\0\x02\t\x02\x12\x03\x0c\- \x15\x18\n\x0b\n\x04\x05\0\x02\n\x12\x03\r\x04\x1a\n\x0c\n\x05\x05\0\x02\- \n\x01\x12\x03\r\x04\x13\n\x0c\n\x05\x05\0\x02\n\x02\x12\x03\r\x16\x19\n\- \x0b\n\x04\x05\0\x02\x0b\x12\x03\x0e\x04\x1f\n\x0c\n\x05\x05\0\x02\x0b\- \x01\x12\x03\x0e\x04\x18\n\x0c\n\x05\x05\0\x02\x0b\x02\x12\x03\x0e\x1b\- \x1e\n\x0b\n\x04\x05\0\x02\x0c\x12\x03\x0f\x04\x18\n\x0c\n\x05\x05\0\x02\- \x0c\x01\x12\x03\x0f\x04\x11\n\x0c\n\x05\x05\0\x02\x0c\x02\x12\x03\x0f\- \x14\x17\n\x0b\n\x04\x05\0\x02\r\x12\x03\x10\x04\x1a\n\x0c\n\x05\x05\0\- \x02\r\x01\x12\x03\x10\x04\x13\n\x0c\n\x05\x05\0\x02\r\x02\x12\x03\x10\- \x16\x19\n\x0b\n\x04\x05\0\x02\x0e\x12\x03\x11\x04\x1a\n\x0c\n\x05\x05\0\- \x02\x0e\x01\x12\x03\x11\x04\x13\n\x0c\n\x05\x05\0\x02\x0e\x02\x12\x03\- \x11\x16\x19\n\x0b\n\x04\x05\0\x02\x0f\x12\x03\x12\x04\x1a\n\x0c\n\x05\- \x05\0\x02\x0f\x01\x12\x03\x12\x04\x13\n\x0c\n\x05\x05\0\x02\x0f\x02\x12\- \x03\x12\x16\x19\n\x0b\n\x04\x05\0\x02\x10\x12\x03\x13\x04\x17\n\x0c\n\- \x05\x05\0\x02\x10\x01\x12\x03\x13\x04\x10\n\x0c\n\x05\x05\0\x02\x10\x02\- \x12\x03\x13\x13\x16\n\x0b\n\x04\x05\0\x02\x11\x12\x03\x14\x04\x17\n\x0c\- \n\x05\x05\0\x02\x11\x01\x12\x03\x14\x04\x10\n\x0c\n\x05\x05\0\x02\x11\- \x02\x12\x03\x14\x13\x16\n\x0b\n\x04\x05\0\x02\x12\x12\x03\x15\x04\x1d\n\- \x0c\n\x05\x05\0\x02\x12\x01\x12\x03\x15\x04\x16\n\x0c\n\x05\x05\0\x02\- \x12\x02\x12\x03\x15\x19\x1c\n\x0b\n\x04\x05\0\x02\x13\x12\x03\x16\x04\- \x1d\n\x0c\n\x05\x05\0\x02\x13\x01\x12\x03\x16\x04\x16\n\x0c\n\x05\x05\0\- \x02\x13\x02\x12\x03\x16\x19\x1c\n\x0b\n\x04\x05\0\x02\x14\x12\x03\x17\- \x04\x1a\n\x0c\n\x05\x05\0\x02\x14\x01\x12\x03\x17\x04\x13\n\x0c\n\x05\- \x05\0\x02\x14\x02\x12\x03\x17\x16\x19\n\x0b\n\x04\x05\0\x02\x15\x12\x03\- \x18\x04\x1a\n\x0c\n\x05\x05\0\x02\x15\x01\x12\x03\x18\x04\x13\n\x0c\n\- \x05\x05\0\x02\x15\x02\x12\x03\x18\x16\x19\n\x0b\n\x04\x05\0\x02\x16\x12\- \x03\x19\x04+\n\x0c\n\x05\x05\0\x02\x16\x01\x12\x03\x19\x04$\n\x0c\n\x05\- \x05\0\x02\x16\x02\x12\x03\x19'*\n\x0b\n\x04\x05\0\x02\x17\x12\x03\x1a\- \x04\x20\n\x0c\n\x05\x05\0\x02\x17\x01\x12\x03\x1a\x04\x19\n\x0c\n\x05\- \x05\0\x02\x17\x02\x12\x03\x1a\x1c\x1f\n\x0b\n\x04\x05\0\x02\x18\x12\x03\- \x1b\x04\x1b\n\x0c\n\x05\x05\0\x02\x18\x01\x12\x03\x1b\x04\x14\n\x0c\n\- \x05\x05\0\x02\x18\x02\x12\x03\x1b\x17\x1a\n\x0b\n\x04\x05\0\x02\x19\x12\- \x03\x1c\x04\x1a\n\x0c\n\x05\x05\0\x02\x19\x01\x12\x03\x1c\x04\x13\n\x0c\- \n\x05\x05\0\x02\x19\x02\x12\x03\x1c\x16\x19\n\x0b\n\x04\x05\0\x02\x1a\- \x12\x03\x1d\x04-\n\x0c\n\x05\x05\0\x02\x1a\x01\x12\x03\x1d\x04&\n\x0c\n\- \x05\x05\0\x02\x1a\x02\x12\x03\x1d),\n\x0b\n\x04\x05\0\x02\x1b\x12\x03\- \x1e\x04\x1a\n\x0c\n\x05\x05\0\x02\x1b\x01\x12\x03\x1e\x04\x13\n\x0c\n\- \x05\x05\0\x02\x1b\x02\x12\x03\x1e\x16\x19\n\x0b\n\x04\x05\0\x02\x1c\x12\- \x03\x1f\x04\x18\n\x0c\n\x05\x05\0\x02\x1c\x01\x12\x03\x1f\x04\x11\n\x0c\- \n\x05\x05\0\x02\x1c\x02\x12\x03\x1f\x14\x17\n\x0b\n\x04\x05\0\x02\x1d\- \x12\x03\x20\x04\x17\n\x0c\n\x05\x05\0\x02\x1d\x01\x12\x03\x20\x04\x10\n\- \x0c\n\x05\x05\0\x02\x1d\x02\x12\x03\x20\x13\x16b\x06proto3\+ \rUserIdInvalid\x10\xb7\x02\x12\x11\n\x0cUserNotExist\x10\xb8\x02b\x06pr\+ oto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-collaboration/Cargo.toml b/shared-lib/flowy-collaboration/Cargo.tomlindex d96a783bec..6d70ef5b5f 100644--- a/shared-lib/flowy-collaboration/Cargo.toml+++ b/shared-lib/flowy-collaboration/Cargo.toml@@ -27,3 +27,6 @@ parking_lot = "0.11"dashmap = "4.0"futures = "0.3.15"async-stream = "0.3.2"++[build-dependencies]+lib-infra = { path = "../lib-infra", features = ["gen_pb"] }\ No newline at end of filediff --git a/shared-lib/flowy-collaboration/build.rs b/shared-lib/flowy-collaboration/build.rsnew file mode 100644index 0000000000..413973cb05--- /dev/null+++ b/shared-lib/flowy-collaboration/build.rs@@ -0,0 +1,5 @@+use lib_infra::pb;++fn main() {+ pb::gen("flowy-collaboration", "./src/protobuf/proto");+}diff --git a/shared-lib/flowy-collaboration/src/protobuf/model/document_info.rs b/shared-lib/flowy-collaboration/src/protobuf/model/document_info.rsindex c7cdb97c3e..a88d1f6f0a 100644--- a/shared-lib/flowy-collaboration/src/protobuf/model/document_info.rs+++ b/shared-lib/flowy-collaboration/src/protobuf/model/document_info.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct CreateDocParams {@@ -1335,54 +1335,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ta_json\x18\x02\x20\x01(\tR\tdeltaJson\"S\n\nNewDocUser\x12\x17\n\x07use\r_id\x18\x01\x20\x01(\tR\x06userId\x12\x15\n\x06rev_id\x18\x02\x20\x01(\\x03R\x05revId\x12\x15\n\x06doc_id\x18\x03\x20\x01(\tR\x05docId\"#\n\nDo\- cumentId\x12\x15\n\x06doc_id\x18\x01\x20\x01(\tR\x05docIdJ\xaf\x07\n\x06\- \x12\x04\0\0\x1c\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\t\n\x02\x03\0\x12\- \x03\x01\0\x18\n\n\n\x02\x04\0\x12\x04\x03\0\x06\x01\n\n\n\x03\x04\0\x01\- \x12\x03\x03\x08\x17\n\x0b\n\x04\x04\0\x02\0\x12\x03\x04\x04\x12\n\x0c\n\- \x05\x04\0\x02\0\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\- \x03\x04\x0b\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x04\x10\x11\n\x0b\n\- \x04\x04\0\x02\x01\x12\x03\x05\x04#\n\x0c\n\x05\x04\0\x02\x01\x06\x12\- \x03\x05\x04\x14\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x05\x15\x1e\n\x0c\- \n\x05\x04\0\x02\x01\x03\x12\x03\x05!\"\n\n\n\x02\x04\x01\x12\x04\x07\0\- \x0c\x01\n\n\n\x03\x04\x01\x01\x12\x03\x07\x08\x14\n\x0b\n\x04\x04\x01\- \x02\0\x12\x03\x08\x04\x16\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x08\x04\- \n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x08\x0b\x11\n\x0c\n\x05\x04\x01\- \x02\0\x03\x12\x03\x08\x14\x15\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\t\x04\- \x14\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\t\x04\n\n\x0c\n\x05\x04\x01\- \x02\x01\x01\x12\x03\t\x0b\x0f\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\t\- \x12\x13\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\n\x04\x15\n\x0c\n\x05\x04\- \x01\x02\x02\x05\x12\x03\n\x04\t\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\- \n\n\x10\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\n\x13\x14\n\x0b\n\x04\- \x04\x01\x02\x03\x12\x03\x0b\x04\x1a\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\- \x03\x0b\x04\t\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\x0b\n\x15\n\x0c\n\- \x05\x04\x01\x02\x03\x03\x12\x03\x0b\x18\x19\n\n\n\x02\x04\x02\x12\x04\r\- \0\x10\x01\n\n\n\x03\x04\x02\x01\x12\x03\r\x08\x1b\n\x0b\n\x04\x04\x02\- \x02\0\x12\x03\x0e\x04\x16\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\x0e\x04\- \n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x0e\x0b\x11\n\x0c\n\x05\x04\x02\- \x02\0\x03\x12\x03\x0e\x14\x15\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\x0f\- \x04#\n\x0c\n\x05\x04\x02\x02\x01\x06\x12\x03\x0f\x04\x14\n\x0c\n\x05\- \x04\x02\x02\x01\x01\x12\x03\x0f\x15\x1e\n\x0c\n\x05\x04\x02\x02\x01\x03\- \x12\x03\x0f!\"\n\n\n\x02\x04\x03\x12\x04\x11\0\x14\x01\n\n\n\x03\x04\- \x03\x01\x12\x03\x11\x08\x15\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x12\x04\- \x16\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x12\x04\n\n\x0c\n\x05\x04\x03\- \x02\0\x01\x12\x03\x12\x0b\x11\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x12\- \x14\x15\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x13\x04\x1a\n\x0c\n\x05\x04\- \x03\x02\x01\x05\x12\x03\x13\x04\n\n\x0c\n\x05\x04\x03\x02\x01\x01\x12\- \x03\x13\x0b\x15\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03\x13\x18\x19\n\n\- \n\x02\x04\x04\x12\x04\x15\0\x19\x01\n\n\n\x03\x04\x04\x01\x12\x03\x15\- \x08\x12\n\x0b\n\x04\x04\x04\x02\0\x12\x03\x16\x04\x17\n\x0c\n\x05\x04\- \x04\x02\0\x05\x12\x03\x16\x04\n\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03\- \x16\x0b\x12\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03\x16\x15\x16\n\x0b\n\- \x04\x04\x04\x02\x01\x12\x03\x17\x04\x15\n\x0c\n\x05\x04\x04\x02\x01\x05\- \x12\x03\x17\x04\t\n\x0c\n\x05\x04\x04\x02\x01\x01\x12\x03\x17\n\x10\n\- \x0c\n\x05\x04\x04\x02\x01\x03\x12\x03\x17\x13\x14\n\x0b\n\x04\x04\x04\- \x02\x02\x12\x03\x18\x04\x16\n\x0c\n\x05\x04\x04\x02\x02\x05\x12\x03\x18\- \x04\n\n\x0c\n\x05\x04\x04\x02\x02\x01\x12\x03\x18\x0b\x11\n\x0c\n\x05\- \x04\x04\x02\x02\x03\x12\x03\x18\x14\x15\n\n\n\x02\x04\x05\x12\x04\x1a\0\- \x1c\x01\n\n\n\x03\x04\x05\x01\x12\x03\x1a\x08\x12\n\x0b\n\x04\x04\x05\- \x02\0\x12\x03\x1b\x04\x16\n\x0c\n\x05\x04\x05\x02\0\x05\x12\x03\x1b\x04\- \n\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03\x1b\x0b\x11\n\x0c\n\x05\x04\x05\- \x02\0\x03\x12\x03\x1b\x14\x15b\x06proto3\+ cumentId\x12\x15\n\x06doc_id\x18\x01\x20\x01(\tR\x05docIdb\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-collaboration/src/protobuf/model/folder_info.rs b/shared-lib/flowy-collaboration/src/protobuf/model/folder_info.rsindex 77086345ad..af8d77948d 100644--- a/shared-lib/flowy-collaboration/src/protobuf/model/folder_info.rs+++ b/shared-lib/flowy-collaboration/src/protobuf/model/folder_info.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct FolderInfo {@@ -298,20 +298,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\n\x11folder_info.proto\"t\n\nFolderInfo\x12\x1b\n\tfolder_id\x18\x01\\x20\x01(\tR\x08folderId\x12\x12\n\x04text\x18\x02\x20\x01(\tR\x04text\\x12\x15\n\x06rev_id\x18\x03\x20\x01(\x03R\x05revId\x12\x1e\n\x0bbase_re\- v_id\x18\x04\x20\x01(\x03R\tbaseRevIdJ\x86\x02\n\x06\x12\x04\0\0\x07\x01\- \n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x07\x01\n\- \n\n\x03\x04\0\x01\x12\x03\x02\x08\x12\n\x0b\n\x04\x04\0\x02\0\x12\x03\- \x03\x04\x19\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\- \x04\0\x02\0\x01\x12\x03\x03\x0b\x14\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\- \x03\x17\x18\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\x14\n\x0c\n\x05\- \x04\0\x02\x01\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\- \x03\x04\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04\x12\x13\n\x0b\- \n\x04\x04\0\x02\x02\x12\x03\x05\x04\x15\n\x0c\n\x05\x04\0\x02\x02\x05\- \x12\x03\x05\x04\t\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x05\n\x10\n\x0c\- \n\x05\x04\0\x02\x02\x03\x12\x03\x05\x13\x14\n\x0b\n\x04\x04\0\x02\x03\- \x12\x03\x06\x04\x1a\n\x0c\n\x05\x04\0\x02\x03\x05\x12\x03\x06\x04\t\n\- \x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x06\n\x15\n\x0c\n\x05\x04\0\x02\x03\- \x03\x12\x03\x06\x18\x19b\x06proto3\+ v_id\x18\x04\x20\x01(\x03R\tbaseRevIdb\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-collaboration/src/protobuf/model/revision.rs b/shared-lib/flowy-collaboration/src/protobuf/model/revision.rsindex 3283a4a6be..079687ca44 100644--- a/shared-lib/flowy-collaboration/src/protobuf/model/revision.rs+++ b/shared-lib/flowy-collaboration/src/protobuf/model/revision.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct Revision {@@ -1026,54 +1026,8 @@ static file_descriptor_proto_data: &'static [u8] = b"\value\"7\n\rRevisionRange\x12\x14\n\x05start\x18\x01\x20\x01(\x03R\x05st\art\x12\x10\n\x03end\x18\x02\x20\x01(\x03R\x03end*\"\n\rRevisionState\\x12\x08\n\x04Sync\x10\0\x12\x07\n\x03Ack\x10\x01*4\n\x07RevType\x12\x13\- \n\x0fDeprecatedLocal\x10\0\x12\x14\n\x10DeprecatedRemote\x10\x01J\xb1\- \x07\n\x06\x12\x04\0\0\x1c\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\- \x04\0\x12\x04\x02\0\n\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x10\n\x0b\- \n\x04\x04\0\x02\0\x12\x03\x03\x04\x1a\n\x0c\n\x05\x04\0\x02\0\x05\x12\- \x03\x03\x04\t\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\n\x15\n\x0c\n\x05\- \x04\0\x02\0\x03\x12\x03\x03\x18\x19\n\x0b\n\x04\x04\0\x02\x01\x12\x03\- \x04\x04\x15\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\t\n\x0c\n\x05\- \x04\0\x02\x01\x01\x12\x03\x04\n\x10\n\x0c\n\x05\x04\0\x02\x01\x03\x12\- \x03\x04\x13\x14\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x19\n\x0c\n\- \x05\x04\0\x02\x02\x05\x12\x03\x05\x04\t\n\x0c\n\x05\x04\0\x02\x02\x01\- \x12\x03\x05\n\x14\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05\x17\x18\n\- \x0b\n\x04\x04\0\x02\x03\x12\x03\x06\x04\x13\n\x0c\n\x05\x04\0\x02\x03\- \x05\x12\x03\x06\x04\n\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x06\x0b\x0e\- \n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x06\x11\x12\n\x0b\n\x04\x04\0\x02\- \x04\x12\x03\x07\x04\x19\n\x0c\n\x05\x04\0\x02\x04\x05\x12\x03\x07\x04\n\- \n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x07\x0b\x14\n\x0c\n\x05\x04\0\x02\- \x04\x03\x12\x03\x07\x17\x18\n\x0b\n\x04\x04\0\x02\x05\x12\x03\x08\x04\- \x13\n\x0c\n\x05\x04\0\x02\x05\x06\x12\x03\x08\x04\x0b\n\x0c\n\x05\x04\0\- \x02\x05\x01\x12\x03\x08\x0c\x0e\n\x0c\n\x05\x04\0\x02\x05\x03\x12\x03\- \x08\x11\x12\n\x0b\n\x04\x04\0\x02\x06\x12\x03\t\x04\x17\n\x0c\n\x05\x04\- \0\x02\x06\x05\x12\x03\t\x04\n\n\x0c\n\x05\x04\0\x02\x06\x01\x12\x03\t\- \x0b\x12\n\x0c\n\x05\x04\0\x02\x06\x03\x12\x03\t\x15\x16\n\n\n\x02\x04\- \x01\x12\x04\x0b\0\r\x01\n\n\n\x03\x04\x01\x01\x12\x03\x0b\x08\x18\n\x0b\- \n\x04\x04\x01\x02\0\x12\x03\x0c\x04\x20\n\x0c\n\x05\x04\x01\x02\0\x04\- \x12\x03\x0c\x04\x0c\n\x0c\n\x05\x04\x01\x02\0\x06\x12\x03\x0c\r\x15\n\- \x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x0c\x16\x1b\n\x0c\n\x05\x04\x01\x02\- \0\x03\x12\x03\x0c\x1e\x1f\n\n\n\x02\x04\x02\x12\x04\x0e\0\x10\x01\n\n\n\- \x03\x04\x02\x01\x12\x03\x0e\x08\r\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x0f\- \x04\x14\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\x0f\x04\t\n\x0c\n\x05\x04\- \x02\x02\0\x01\x12\x03\x0f\n\x0f\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\- \x0f\x12\x13\n\n\n\x02\x04\x03\x12\x04\x11\0\x14\x01\n\n\n\x03\x04\x03\- \x01\x12\x03\x11\x08\x15\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x12\x04\x14\n\- \x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x12\x04\t\n\x0c\n\x05\x04\x03\x02\0\- \x01\x12\x03\x12\n\x0f\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x12\x12\x13\- \n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x13\x04\x12\n\x0c\n\x05\x04\x03\x02\- \x01\x05\x12\x03\x13\x04\t\n\x0c\n\x05\x04\x03\x02\x01\x01\x12\x03\x13\n\- \r\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03\x13\x10\x11\n\n\n\x02\x05\0\- \x12\x04\x15\0\x18\x01\n\n\n\x03\x05\0\x01\x12\x03\x15\x05\x12\n\x0b\n\- \x04\x05\0\x02\0\x12\x03\x16\x04\r\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\- \x16\x04\x08\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x16\x0b\x0c\n\x0b\n\x04\- \x05\0\x02\x01\x12\x03\x17\x04\x0c\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\- \x17\x04\x07\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x17\n\x0b\n\n\n\x02\- \x05\x01\x12\x04\x19\0\x1c\x01\n\n\n\x03\x05\x01\x01\x12\x03\x19\x05\x0c\- \n\x0b\n\x04\x05\x01\x02\0\x12\x03\x1a\x04\x18\n\x0c\n\x05\x05\x01\x02\0\- \x01\x12\x03\x1a\x04\x13\n\x0c\n\x05\x05\x01\x02\0\x02\x12\x03\x1a\x16\- \x17\n\x0b\n\x04\x05\x01\x02\x01\x12\x03\x1b\x04\x19\n\x0c\n\x05\x05\x01\- \x02\x01\x01\x12\x03\x1b\x04\x14\n\x0c\n\x05\x05\x01\x02\x01\x02\x12\x03\- \x1b\x17\x18b\x06proto3\+ \n\x0fDeprecatedLocal\x10\0\x12\x14\n\x10DeprecatedRemote\x10\x01b\x06pr\+ oto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-collaboration/src/protobuf/model/ws_data.rs b/shared-lib/flowy-collaboration/src/protobuf/model/ws_data.rsindex d7185be526..e1c8d8a1fa 100644--- a/shared-lib/flowy-collaboration/src/protobuf/model/ws_data.rs+++ b/shared-lib/flowy-collaboration/src/protobuf/model/ws_data.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct ClientRevisionWSData {@@ -907,54 +907,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\n\x18ClientRevisionWSDataType\x12\x11\n\rClientPushRev\x10\0\x12\x0e\n\\nClientPing\x10\x01*`\n\x18ServerRevisionWSDataType\x12\r\n\tServerAck\\x10\0\x12\x11\n\rServerPushRev\x10\x01\x12\x11\n\rServerPullRev\x10\x02\- \x12\x0f\n\x0bUserConnect\x10\x03J\xb1\x07\n\x06\x12\x04\0\0\x1c\x01\n\- \x08\n\x01\x0c\x12\x03\0\0\x12\n\t\n\x02\x03\0\x12\x03\x01\0\x18\n\n\n\- \x02\x04\0\x12\x04\x03\0\x08\x01\n\n\n\x03\x04\0\x01\x12\x03\x03\x08\x1c\- \n\x0b\n\x04\x04\0\x02\0\x12\x03\x04\x04\x19\n\x0c\n\x05\x04\0\x02\0\x05\- \x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x04\x0b\x14\n\x0c\- \n\x05\x04\0\x02\0\x03\x12\x03\x04\x17\x18\n\x0b\n\x04\x04\0\x02\x01\x12\- \x03\x05\x04$\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03\x05\x04\x1c\n\x0c\n\- \x05\x04\0\x02\x01\x01\x12\x03\x05\x1d\x1f\n\x0c\n\x05\x04\0\x02\x01\x03\- \x12\x03\x05\"#\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x06\x04#\n\x0c\n\x05\- \x04\0\x02\x02\x06\x12\x03\x06\x04\x14\n\x0c\n\x05\x04\0\x02\x02\x01\x12\- \x03\x06\x15\x1e\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x06!\"\n\x0b\n\- \x04\x04\0\x02\x03\x12\x03\x07\x04\x17\n\x0c\n\x05\x04\0\x02\x03\x05\x12\- \x03\x07\x04\n\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x07\x0b\x12\n\x0c\n\- \x05\x04\0\x02\x03\x03\x12\x03\x07\x15\x16\n\n\n\x02\x04\x01\x12\x04\t\0\- \r\x01\n\n\n\x03\x04\x01\x01\x12\x03\t\x08\x1c\n\x0b\n\x04\x04\x01\x02\0\- \x12\x03\n\x04\x19\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\n\x04\n\n\x0c\n\- \x05\x04\x01\x02\0\x01\x12\x03\n\x0b\x14\n\x0c\n\x05\x04\x01\x02\0\x03\- \x12\x03\n\x17\x18\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x0b\x04$\n\x0c\n\- \x05\x04\x01\x02\x01\x06\x12\x03\x0b\x04\x1c\n\x0c\n\x05\x04\x01\x02\x01\- \x01\x12\x03\x0b\x1d\x1f\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x0b\"#\- \n\x0b\n\x04\x04\x01\x02\x02\x12\x03\x0c\x04\x13\n\x0c\n\x05\x04\x01\x02\- \x02\x05\x12\x03\x0c\x04\t\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\x0c\n\- \x0e\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x0c\x11\x12\n\n\n\x02\x04\- \x02\x12\x04\x0e\0\x12\x01\n\n\n\x03\x04\x02\x01\x12\x03\x0e\x08\x17\n\- \x0b\n\x04\x04\x02\x02\0\x12\x03\x0f\x04\x17\n\x0c\n\x05\x04\x02\x02\0\- \x05\x12\x03\x0f\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x0f\x0b\x12\- \n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x0f\x15\x16\n\x0b\n\x04\x04\x02\- \x02\x01\x12\x03\x10\x04\x16\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\x10\- \x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x10\x0b\x11\n\x0c\n\x05\- \x04\x02\x02\x01\x03\x12\x03\x10\x14\x15\n\x0b\n\x04\x04\x02\x02\x02\x12\- \x03\x11\x04\x1c\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03\x11\x04\t\n\x0c\- \n\x05\x04\x02\x02\x02\x01\x12\x03\x11\n\x17\n\x0c\n\x05\x04\x02\x02\x02\- \x03\x12\x03\x11\x1a\x1b\n\n\n\x02\x05\0\x12\x04\x13\0\x16\x01\n\n\n\x03\- \x05\0\x01\x12\x03\x13\x05\x1d\n\x0b\n\x04\x05\0\x02\0\x12\x03\x14\x04\- \x16\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x14\x04\x11\n\x0c\n\x05\x05\0\- \x02\0\x02\x12\x03\x14\x14\x15\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x15\x04\- \x13\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x15\x04\x0e\n\x0c\n\x05\x05\0\- \x02\x01\x02\x12\x03\x15\x11\x12\n\n\n\x02\x05\x01\x12\x04\x17\0\x1c\x01\- \n\n\n\x03\x05\x01\x01\x12\x03\x17\x05\x1d\n\x0b\n\x04\x05\x01\x02\0\x12\- \x03\x18\x04\x12\n\x0c\n\x05\x05\x01\x02\0\x01\x12\x03\x18\x04\r\n\x0c\n\- \x05\x05\x01\x02\0\x02\x12\x03\x18\x10\x11\n\x0b\n\x04\x05\x01\x02\x01\- \x12\x03\x19\x04\x16\n\x0c\n\x05\x05\x01\x02\x01\x01\x12\x03\x19\x04\x11\- \n\x0c\n\x05\x05\x01\x02\x01\x02\x12\x03\x19\x14\x15\n\x0b\n\x04\x05\x01\- \x02\x02\x12\x03\x1a\x04\x16\n\x0c\n\x05\x05\x01\x02\x02\x01\x12\x03\x1a\- \x04\x11\n\x0c\n\x05\x05\x01\x02\x02\x02\x12\x03\x1a\x14\x15\n\x0b\n\x04\- \x05\x01\x02\x03\x12\x03\x1b\x04\x14\n\x0c\n\x05\x05\x01\x02\x03\x01\x12\- \x03\x1b\x04\x0f\n\x0c\n\x05\x05\x01\x02\x03\x02\x12\x03\x1b\x12\x13b\- \x06proto3\+ \x12\x0f\n\x0bUserConnect\x10\x03b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-derive/src/derive_cache/derive_cache.rs b/shared-lib/flowy-derive/src/derive_cache/derive_cache.rsindex 7c99aaa1db..ad669eeed4 100644--- a/shared-lib/flowy-derive/src/derive_cache/derive_cache.rs+++ b/shared-lib/flowy-derive/src/derive_cache/derive_cache.rs@@ -18,22 +18,49 @@ pub fn category_from_str(type_str: &str) -> TypeCategory {"String" => TypeCategory::Str,"FFIRequest"| "FFIResponse"- | "SubscribeObject"| "FlowyError"+ | "SubscribeObject"| "NetworkState"- | "UserToken"- | "UserProfile"- | "UpdateUserRequest"- | "UpdateUserParams"| "SignInRequest"| "SignInParams"| "SignInResponse"| "SignUpRequest"| "SignUpParams"| "SignUpResponse"+ | "UserToken"+ | "UserProfile"+ | "UpdateUserRequest"+ | "UpdateUserParams"| "UserPreferences"| "AppearanceSettings"| "LocaleSettings"+ | "ClientRevisionWSData"+ | "ServerRevisionWSData"+ | "NewDocumentUser"+ | "FolderInfo"+ | "Revision"+ | "RepeatedRevision"+ | "RevId"+ | "RevisionRange"+ | "CreateDocParams"+ | "DocumentInfo"+ | "ResetDocumentParams"+ | "DocumentDelta"+ | "NewDocUser"+ | "DocumentId"+ | "WSError"+ | "WebSocketRawMessage"+ | "Workspace"+ | "RepeatedWorkspace"+ | "CreateWorkspaceRequest"+ | "CreateWorkspaceParams"+ | "QueryWorkspaceRequest"+ | "WorkspaceId"+ | "CurrentWorkspaceSetting"+ | "UpdateWorkspaceRequest"+ | "UpdateWorkspaceParams"+ | "ExportRequest"+ | "ExportData"| "App"| "RepeatedApp"| "CreateAppRequest"@@ -43,8 +70,10 @@ pub fn category_from_str(type_str: &str) -> TypeCategory {| "AppId"| "UpdateAppRequest"| "UpdateAppParams"- | "ExportRequest"- | "ExportData"+ | "Trash"+ | "RepeatedTrash"+ | "RepeatedTrashId"+ | "TrashId"| "View"| "RepeatedView"| "CreateViewRequest"@@ -54,52 +83,23 @@ pub fn category_from_str(type_str: &str) -> TypeCategory {| "RepeatedViewId"| "UpdateViewRequest"| "UpdateViewParams"- | "Trash"- | "RepeatedTrash"- | "RepeatedTrashId"- | "TrashId"- | "Workspace"- | "RepeatedWorkspace"- | "CreateWorkspaceRequest"- | "CreateWorkspaceParams"- | "QueryWorkspaceRequest"- | "WorkspaceId"- | "CurrentWorkspaceSetting"- | "UpdateWorkspaceRequest"- | "UpdateWorkspaceParams"- | "ClientRevisionWSData"- | "ServerRevisionWSData"- | "NewDocumentUser"- | "CreateDocParams"- | "DocumentInfo"- | "ResetDocumentParams"- | "DocumentDelta"- | "NewDocUser"- | "DocumentId"- | "Revision"- | "RepeatedRevision"- | "RevId"- | "RevisionRange"- | "FolderInfo"- | "WSError"- | "WebSocketRawMessage"=> TypeCategory::Protobuf,"FFIStatusCode"| "FolderEvent"| "FolderNotification"- | "UserEvent"- | "UserNotification"| "NetworkEvent"| "NetworkType"- | "ExportType"- | "ViewType"- | "TrashType"+ | "UserEvent"+ | "UserNotification"| "ClientRevisionWSDataType"| "ServerRevisionWSDataType"| "RevisionState"| "RevType"| "ErrorCode"| "WSChannel"+ | "ExportType"+ | "TrashType"+ | "ViewType"=> TypeCategory::Enum,"Option" => TypeCategory::Opt,diff --git a/shared-lib/flowy-folder-data-model/Cargo.toml b/shared-lib/flowy-folder-data-model/Cargo.tomlindex 8905046423..bf56e55147 100644--- a/shared-lib/flowy-folder-data-model/Cargo.toml+++ b/shared-lib/flowy-folder-data-model/Cargo.toml@@ -20,6 +20,9 @@ error-code = { path = "../error-code" }serde = { version = "1.0", features = ["derive"] }serde_json = "1.0"+[build-dependencies]+lib-infra = { path = "../lib-infra", features = ["gen_pb"] }+[features]default = []backend = []diff --git a/shared-lib/flowy-folder-data-model/build.rs b/shared-lib/flowy-folder-data-model/build.rsnew file mode 100644index 0000000000..4a73077b68--- /dev/null+++ b/shared-lib/flowy-folder-data-model/build.rs@@ -0,0 +1,5 @@+use lib_infra::pb;++fn main() {+ pb::gen("flowy-folder-data-model", "./src/protobuf/proto");+}diff --git a/shared-lib/flowy-folder-data-model/src/entities/trash.rs b/shared-lib/flowy-folder-data-model/src/entities/trash.rsindex 86d98cb0a7..73d8a7e242 100644--- a/shared-lib/flowy-folder-data-model/src/entities/trash.rs+++ b/shared-lib/flowy-folder-data-model/src/entities/trash.rs@@ -36,7 +36,7 @@ impl std::convert::From<App> for Trash {name: app.name,modified_time: app.modified_time,create_time: app.create_time,- ty: TrashType::App,+ ty: TrashType::TrashApp,}}}@@ -44,8 +44,8 @@ impl std::convert::From<App> for Trash {#[derive(Eq, PartialEq, Debug, ProtoBuf_Enum, Clone, Serialize, Deserialize)]pub enum TrashType {Unknown = 0,- View = 1,- App = 2,+ TrashView = 1,+ TrashApp = 2,}impl std::convert::TryFrom<i32> for TrashType {@@ -54,8 +54,8 @@ impl std::convert::TryFrom<i32> for TrashType {fn try_from(value: i32) -> Result<Self, Self::Error> {match value {0 => Ok(TrashType::Unknown),- 1 => Ok(TrashType::View),- 2 => Ok(TrashType::App),+ 1 => Ok(TrashType::TrashView),+ 2 => Ok(TrashType::TrashApp),_ => Err(format!("Invalid trash type: {}", value)),}}diff --git a/shared-lib/flowy-folder-data-model/src/entities/view.rs b/shared-lib/flowy-folder-data-model/src/entities/view.rsindex 2bdefa2003..b7141a8a79 100644--- a/shared-lib/flowy-folder-data-model/src/entities/view.rs+++ b/shared-lib/flowy-folder-data-model/src/entities/view.rs@@ -57,7 +57,7 @@ impl std::convert::From<View> for Trash {name: view.name,modified_time: view.modified_time,create_time: view.create_time,- ty: TrashType::View,+ ty: TrashType::TrashView,}}}diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/app.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/app.rsindex 1c0406ff84..3a60ca97ff 100644--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/app.rs+++ b/shared-lib/flowy-folder-data-model/src/protobuf/model/app.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct App {@@ -2678,110 +2678,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\x20\x01(\tH\x01R\x04desc\x12.\n\x0bcolor_style\x18\x04\x20\x01(\x0b2\\x0b.ColorStyleH\x02R\ncolorStyle\x12\x1b\n\x08is_trash\x18\x05\x20\x01(\\x08H\x03R\x07isTrashB\r\n\x0bone_of_nameB\r\n\x0bone_of_descB\x14\n\x12\- one_of_color_styleB\x11\n\x0fone_of_is_trashJ\xdb\x10\n\x06\x12\x04\0\02\- \x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\t\n\x02\x03\0\x12\x03\x01\0\x14\n\- \n\n\x02\x04\0\x12\x04\x03\0\x0c\x01\n\n\n\x03\x04\0\x01\x12\x03\x03\x08\- \x0b\n\x0b\n\x04\x04\0\x02\0\x12\x03\x04\x04\x12\n\x0c\n\x05\x04\0\x02\0\- \x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x04\x0b\r\n\- \x0c\n\x05\x04\0\x02\0\x03\x12\x03\x04\x10\x11\n\x0b\n\x04\x04\0\x02\x01\- \x12\x03\x05\x04\x1c\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x05\x04\n\n\- \x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x05\x0b\x17\n\x0c\n\x05\x04\0\x02\- \x01\x03\x12\x03\x05\x1a\x1b\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x06\x04\- \x14\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x06\x04\n\n\x0c\n\x05\x04\0\- \x02\x02\x01\x12\x03\x06\x0b\x0f\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\- \x06\x12\x13\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x07\x04\x14\n\x0c\n\x05\- \x04\0\x02\x03\x05\x12\x03\x07\x04\n\n\x0c\n\x05\x04\0\x02\x03\x01\x12\- \x03\x07\x0b\x0f\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x07\x12\x13\n\x0b\- \n\x04\x04\0\x02\x04\x12\x03\x08\x04\x20\n\x0c\n\x05\x04\0\x02\x04\x06\- \x12\x03\x08\x04\x10\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x08\x11\x1b\n\- \x0c\n\x05\x04\0\x02\x04\x03\x12\x03\x08\x1e\x1f\n\x0b\n\x04\x04\0\x02\- \x05\x12\x03\t\x04\x16\n\x0c\n\x05\x04\0\x02\x05\x05\x12\x03\t\x04\t\n\- \x0c\n\x05\x04\0\x02\x05\x01\x12\x03\t\n\x11\n\x0c\n\x05\x04\0\x02\x05\- \x03\x12\x03\t\x14\x15\n\x0b\n\x04\x04\0\x02\x06\x12\x03\n\x04\x1c\n\x0c\- \n\x05\x04\0\x02\x06\x05\x12\x03\n\x04\t\n\x0c\n\x05\x04\0\x02\x06\x01\- \x12\x03\n\n\x17\n\x0c\n\x05\x04\0\x02\x06\x03\x12\x03\n\x1a\x1b\n\x0b\n\- \x04\x04\0\x02\x07\x12\x03\x0b\x04\x1a\n\x0c\n\x05\x04\0\x02\x07\x05\x12\- \x03\x0b\x04\t\n\x0c\n\x05\x04\0\x02\x07\x01\x12\x03\x0b\n\x15\n\x0c\n\- \x05\x04\0\x02\x07\x03\x12\x03\x0b\x18\x19\n\n\n\x02\x04\x01\x12\x04\r\0\- \x0f\x01\n\n\n\x03\x04\x01\x01\x12\x03\r\x08\x13\n\x0b\n\x04\x04\x01\x02\- \0\x12\x03\x0e\x04\x1b\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x0e\x04\x0c\- \n\x0c\n\x05\x04\x01\x02\0\x06\x12\x03\x0e\r\x10\n\x0c\n\x05\x04\x01\x02\- \0\x01\x12\x03\x0e\x11\x16\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x0e\x19\- \x1a\n\n\n\x02\x04\x02\x12\x04\x10\0\x15\x01\n\n\n\x03\x04\x02\x01\x12\- \x03\x10\x08\x18\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x11\x04\x1c\n\x0c\n\- \x05\x04\x02\x02\0\x05\x12\x03\x11\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\- \x12\x03\x11\x0b\x17\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x11\x1a\x1b\n\- \x0b\n\x04\x04\x02\x02\x01\x12\x03\x12\x04\x14\n\x0c\n\x05\x04\x02\x02\- \x01\x05\x12\x03\x12\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x12\- \x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\x12\x12\x13\n\x0b\n\x04\- \x04\x02\x02\x02\x12\x03\x13\x04\x14\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\- \x03\x13\x04\n\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x13\x0b\x0f\n\x0c\- \n\x05\x04\x02\x02\x02\x03\x12\x03\x13\x12\x13\n\x0b\n\x04\x04\x02\x02\- \x03\x12\x03\x14\x04\x1f\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\x03\x14\x04\- \x0e\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x14\x0f\x1a\n\x0c\n\x05\x04\- \x02\x02\x03\x03\x12\x03\x14\x1d\x1e\n\n\n\x02\x04\x03\x12\x04\x16\0\x18\- \x01\n\n\n\x03\x04\x03\x01\x12\x03\x16\x08\x12\n\x0b\n\x04\x04\x03\x02\0\- \x12\x03\x17\x04\x1b\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x17\x04\n\n\- \x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x17\x0b\x16\n\x0c\n\x05\x04\x03\x02\- \0\x03\x12\x03\x17\x19\x1a\n\n\n\x02\x04\x04\x12\x04\x19\0\x1e\x01\n\n\n\- \x03\x04\x04\x01\x12\x03\x19\x08\x17\n\x0b\n\x04\x04\x04\x02\0\x12\x03\- \x1a\x04\x1c\n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03\x1a\x04\n\n\x0c\n\x05\- \x04\x04\x02\0\x01\x12\x03\x1a\x0b\x17\n\x0c\n\x05\x04\x04\x02\0\x03\x12\- \x03\x1a\x1a\x1b\n\x0b\n\x04\x04\x04\x02\x01\x12\x03\x1b\x04\x14\n\x0c\n\- \x05\x04\x04\x02\x01\x05\x12\x03\x1b\x04\n\n\x0c\n\x05\x04\x04\x02\x01\- \x01\x12\x03\x1b\x0b\x0f\n\x0c\n\x05\x04\x04\x02\x01\x03\x12\x03\x1b\x12\- \x13\n\x0b\n\x04\x04\x04\x02\x02\x12\x03\x1c\x04\x14\n\x0c\n\x05\x04\x04\- \x02\x02\x05\x12\x03\x1c\x04\n\n\x0c\n\x05\x04\x04\x02\x02\x01\x12\x03\- \x1c\x0b\x0f\n\x0c\n\x05\x04\x04\x02\x02\x03\x12\x03\x1c\x12\x13\n\x0b\n\- \x04\x04\x04\x02\x03\x12\x03\x1d\x04\x1f\n\x0c\n\x05\x04\x04\x02\x03\x06\- \x12\x03\x1d\x04\x0e\n\x0c\n\x05\x04\x04\x02\x03\x01\x12\x03\x1d\x0f\x1a\- \n\x0c\n\x05\x04\x04\x02\x03\x03\x12\x03\x1d\x1d\x1e\n\n\n\x02\x04\x05\- \x12\x04\x1f\0!\x01\n\n\n\x03\x04\x05\x01\x12\x03\x1f\x08\x17\n\x0b\n\- \x04\x04\x05\x02\0\x12\x03\x20\x04\x20\n\x0c\n\x05\x04\x05\x02\0\x04\x12\- \x03\x20\x04\x0c\n\x0c\n\x05\x04\x05\x02\0\x05\x12\x03\x20\r\x13\n\x0c\n\- \x05\x04\x05\x02\0\x01\x12\x03\x20\x14\x1b\n\x0c\n\x05\x04\x05\x02\0\x03\- \x12\x03\x20\x1e\x1f\n\n\n\x02\x04\x06\x12\x04\"\0$\x01\n\n\n\x03\x04\- \x06\x01\x12\x03\"\x08\r\n\x0b\n\x04\x04\x06\x02\0\x12\x03#\x04\x16\n\- \x0c\n\x05\x04\x06\x02\0\x05\x12\x03#\x04\n\n\x0c\n\x05\x04\x06\x02\0\- \x01\x12\x03#\x0b\x11\n\x0c\n\x05\x04\x06\x02\0\x03\x12\x03#\x14\x15\n\n\- \n\x02\x04\x07\x12\x04%\0+\x01\n\n\n\x03\x04\x07\x01\x12\x03%\x08\x18\n\- \x0b\n\x04\x04\x07\x02\0\x12\x03&\x04\x16\n\x0c\n\x05\x04\x07\x02\0\x05\- \x12\x03&\x04\n\n\x0c\n\x05\x04\x07\x02\0\x01\x12\x03&\x0b\x11\n\x0c\n\- \x05\x04\x07\x02\0\x03\x12\x03&\x14\x15\n\x0b\n\x04\x04\x07\x08\0\x12\- \x03'\x04*\n\x0c\n\x05\x04\x07\x08\0\x01\x12\x03'\n\x15\n\x0b\n\x04\x04\- \x07\x02\x01\x12\x03'\x18(\n\x0c\n\x05\x04\x07\x02\x01\x05\x12\x03'\x18\- \x1e\n\x0c\n\x05\x04\x07\x02\x01\x01\x12\x03'\x1f#\n\x0c\n\x05\x04\x07\- \x02\x01\x03\x12\x03'&'\n\x0b\n\x04\x04\x07\x08\x01\x12\x03(\x04*\n\x0c\- \n\x05\x04\x07\x08\x01\x01\x12\x03(\n\x15\n\x0b\n\x04\x04\x07\x02\x02\- \x12\x03(\x18(\n\x0c\n\x05\x04\x07\x02\x02\x05\x12\x03(\x18\x1e\n\x0c\n\- \x05\x04\x07\x02\x02\x01\x12\x03(\x1f#\n\x0c\n\x05\x04\x07\x02\x02\x03\- \x12\x03(&'\n\x0b\n\x04\x04\x07\x08\x02\x12\x03)\x04<\n\x0c\n\x05\x04\- \x07\x08\x02\x01\x12\x03)\n\x1c\n\x0b\n\x04\x04\x07\x02\x03\x12\x03)\x1f\- :\n\x0c\n\x05\x04\x07\x02\x03\x06\x12\x03)\x1f)\n\x0c\n\x05\x04\x07\x02\- \x03\x01\x12\x03)*5\n\x0c\n\x05\x04\x07\x02\x03\x03\x12\x03)89\n\x0b\n\- \x04\x04\x07\x08\x03\x12\x03*\x040\n\x0c\n\x05\x04\x07\x08\x03\x01\x12\- \x03*\n\x19\n\x0b\n\x04\x04\x07\x02\x04\x12\x03*\x1c.\n\x0c\n\x05\x04\- \x07\x02\x04\x05\x12\x03*\x1c\x20\n\x0c\n\x05\x04\x07\x02\x04\x01\x12\- \x03*!)\n\x0c\n\x05\x04\x07\x02\x04\x03\x12\x03*,-\n\n\n\x02\x04\x08\x12\- \x04,\02\x01\n\n\n\x03\x04\x08\x01\x12\x03,\x08\x17\n\x0b\n\x04\x04\x08\- \x02\0\x12\x03-\x04\x16\n\x0c\n\x05\x04\x08\x02\0\x05\x12\x03-\x04\n\n\- \x0c\n\x05\x04\x08\x02\0\x01\x12\x03-\x0b\x11\n\x0c\n\x05\x04\x08\x02\0\- \x03\x12\x03-\x14\x15\n\x0b\n\x04\x04\x08\x08\0\x12\x03.\x04*\n\x0c\n\- \x05\x04\x08\x08\0\x01\x12\x03.\n\x15\n\x0b\n\x04\x04\x08\x02\x01\x12\- \x03.\x18(\n\x0c\n\x05\x04\x08\x02\x01\x05\x12\x03.\x18\x1e\n\x0c\n\x05\- \x04\x08\x02\x01\x01\x12\x03.\x1f#\n\x0c\n\x05\x04\x08\x02\x01\x03\x12\- \x03.&'\n\x0b\n\x04\x04\x08\x08\x01\x12\x03/\x04*\n\x0c\n\x05\x04\x08\- \x08\x01\x01\x12\x03/\n\x15\n\x0b\n\x04\x04\x08\x02\x02\x12\x03/\x18(\n\- \x0c\n\x05\x04\x08\x02\x02\x05\x12\x03/\x18\x1e\n\x0c\n\x05\x04\x08\x02\- \x02\x01\x12\x03/\x1f#\n\x0c\n\x05\x04\x08\x02\x02\x03\x12\x03/&'\n\x0b\- \n\x04\x04\x08\x08\x02\x12\x030\x04<\n\x0c\n\x05\x04\x08\x08\x02\x01\x12\- \x030\n\x1c\n\x0b\n\x04\x04\x08\x02\x03\x12\x030\x1f:\n\x0c\n\x05\x04\- \x08\x02\x03\x06\x12\x030\x1f)\n\x0c\n\x05\x04\x08\x02\x03\x01\x12\x030*\- 5\n\x0c\n\x05\x04\x08\x02\x03\x03\x12\x03089\n\x0b\n\x04\x04\x08\x08\x03\- \x12\x031\x040\n\x0c\n\x05\x04\x08\x08\x03\x01\x12\x031\n\x19\n\x0b\n\- \x04\x04\x08\x02\x04\x12\x031\x1c.\n\x0c\n\x05\x04\x08\x02\x04\x05\x12\- \x031\x1c\x20\n\x0c\n\x05\x04\x08\x02\x04\x01\x12\x031!)\n\x0c\n\x05\x04\- \x08\x02\x04\x03\x12\x031,-b\x06proto3\+ one_of_color_styleB\x11\n\x0fone_of_is_trashb\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/errors.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/errors.rsindex d72b4f5b95..06c33a8af8 100644--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/errors.rs+++ b/shared-lib/flowy-folder-data-model/src/protobuf/model/errors.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(Clone,PartialEq,Eq,Debug,Hash)]pub enum ErrorCode {@@ -128,44 +128,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\x12\x13\n\x0fViewDescTooLong\x10\x17\x12\x13\n\x0fViewDataInvalid\x10\\x18\x12\x13\n\x0fViewNameTooLong\x10\x19\x12\x14\n\x10UserUnauthorized\\x10d\x12\x13\n\x0eWsConnectError\x10\xc8\x01\x12\x12\n\rInternalError\- \x10\xe8\x07\x12\x13\n\x0eRecordNotFound\x10\xe9\x07J\xe3\x05\n\x06\x12\- \x04\0\0\x14\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\- \x02\0\x14\x01\n\n\n\x03\x05\0\x01\x12\x03\x02\x05\x0e\n\x0b\n\x04\x05\0\- \x02\0\x12\x03\x03\x04\x1d\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x03\x04\- \x18\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x03\x1b\x1c\n\x0b\n\x04\x05\0\- \x02\x01\x12\x03\x04\x04\x1b\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x04\- \x04\x16\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x04\x19\x1a\n\x0b\n\x04\- \x05\0\x02\x02\x12\x03\x05\x04\x1d\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\- \x05\x04\x18\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x05\x1b\x1c\n\x0b\n\- \x04\x05\0\x02\x03\x12\x03\x06\x04\x1d\n\x0c\n\x05\x05\0\x02\x03\x01\x12\- \x03\x06\x04\x18\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\x06\x1b\x1c\n\x0b\- \n\x04\x05\0\x02\x04\x12\x03\x07\x04\x1d\n\x0c\n\x05\x05\0\x02\x04\x01\- \x12\x03\x07\x04\x18\n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03\x07\x1b\x1c\n\- \x0b\n\x04\x05\0\x02\x05\x12\x03\x08\x04\x16\n\x0c\n\x05\x05\0\x02\x05\- \x01\x12\x03\x08\x04\x10\n\x0c\n\x05\x05\0\x02\x05\x02\x12\x03\x08\x13\- \x15\n\x0b\n\x04\x05\0\x02\x06\x12\x03\t\x04\x18\n\x0c\n\x05\x05\0\x02\- \x06\x01\x12\x03\t\x04\x12\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03\t\x15\- \x17\n\x0b\n\x04\x05\0\x02\x07\x12\x03\n\x04\x19\n\x0c\n\x05\x05\0\x02\- \x07\x01\x12\x03\n\x04\x13\n\x0c\n\x05\x05\0\x02\x07\x02\x12\x03\n\x16\- \x18\n\x0b\n\x04\x05\0\x02\x08\x12\x03\x0b\x04\x1e\n\x0c\n\x05\x05\0\x02\- \x08\x01\x12\x03\x0b\x04\x18\n\x0c\n\x05\x05\0\x02\x08\x02\x12\x03\x0b\- \x1b\x1d\n\x0b\n\x04\x05\0\x02\t\x12\x03\x0c\x04\x17\n\x0c\n\x05\x05\0\- \x02\t\x01\x12\x03\x0c\x04\x11\n\x0c\n\x05\x05\0\x02\t\x02\x12\x03\x0c\- \x14\x16\n\x0b\n\x04\x05\0\x02\n\x12\x03\r\x04\x19\n\x0c\n\x05\x05\0\x02\- \n\x01\x12\x03\r\x04\x13\n\x0c\n\x05\x05\0\x02\n\x02\x12\x03\r\x16\x18\n\- \x0b\n\x04\x05\0\x02\x0b\x12\x03\x0e\x04\x19\n\x0c\n\x05\x05\0\x02\x0b\- \x01\x12\x03\x0e\x04\x13\n\x0c\n\x05\x05\0\x02\x0b\x02\x12\x03\x0e\x16\- \x18\n\x0b\n\x04\x05\0\x02\x0c\x12\x03\x0f\x04\x19\n\x0c\n\x05\x05\0\x02\- \x0c\x01\x12\x03\x0f\x04\x13\n\x0c\n\x05\x05\0\x02\x0c\x02\x12\x03\x0f\- \x16\x18\n\x0b\n\x04\x05\0\x02\r\x12\x03\x10\x04\x1b\n\x0c\n\x05\x05\0\- \x02\r\x01\x12\x03\x10\x04\x14\n\x0c\n\x05\x05\0\x02\r\x02\x12\x03\x10\- \x17\x1a\n\x0b\n\x04\x05\0\x02\x0e\x12\x03\x11\x04\x19\n\x0c\n\x05\x05\0\- \x02\x0e\x01\x12\x03\x11\x04\x12\n\x0c\n\x05\x05\0\x02\x0e\x02\x12\x03\- \x11\x15\x18\n\x0b\n\x04\x05\0\x02\x0f\x12\x03\x12\x04\x19\n\x0c\n\x05\- \x05\0\x02\x0f\x01\x12\x03\x12\x04\x11\n\x0c\n\x05\x05\0\x02\x0f\x02\x12\- \x03\x12\x14\x18\n\x0b\n\x04\x05\0\x02\x10\x12\x03\x13\x04\x1a\n\x0c\n\- \x05\x05\0\x02\x10\x01\x12\x03\x13\x04\x12\n\x0c\n\x05\x05\0\x02\x10\x02\- \x12\x03\x13\x15\x19b\x06proto3\+ \x10\xe8\x07\x12\x13\n\x0eRecordNotFound\x10\xe9\x07b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/share.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/share.rsindex 7ad41ea786..0afb0c61c7 100644--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/share.rs+++ b/shared-lib/flowy-folder-data-model/src/protobuf/model/share.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct ExportRequest {@@ -462,28 +462,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\TypeR\nexportType\"N\n\nExportData\x12\x12\n\x04data\x18\x01\x20\x01(\tR\\x04data\x12,\n\x0bexport_type\x18\x02\x20\x01(\x0e2\x0b.ExportTypeR\nex\portType*.\n\nExportType\x12\x08\n\x04Text\x10\0\x12\x0c\n\x08Markdown\- \x10\x01\x12\x08\n\x04Link\x10\x02J\xb1\x03\n\x06\x12\x04\0\0\x0e\x01\n\- \x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x05\x01\n\n\- \n\x03\x04\0\x01\x12\x03\x02\x08\x15\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\- \x04\x16\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\- \x02\0\x01\x12\x03\x03\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\- \x14\x15\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\x1f\n\x0c\n\x05\x04\0\- \x02\x01\x06\x12\x03\x04\x04\x0e\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\- \x04\x0f\x1a\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04\x1d\x1e\n\n\n\x02\- \x04\x01\x12\x04\x06\0\t\x01\n\n\n\x03\x04\x01\x01\x12\x03\x06\x08\x12\n\- \x0b\n\x04\x04\x01\x02\0\x12\x03\x07\x04\x14\n\x0c\n\x05\x04\x01\x02\0\- \x05\x12\x03\x07\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x07\x0b\x0f\- \n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x07\x12\x13\n\x0b\n\x04\x04\x01\- \x02\x01\x12\x03\x08\x04\x1f\n\x0c\n\x05\x04\x01\x02\x01\x06\x12\x03\x08\- \x04\x0e\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x08\x0f\x1a\n\x0c\n\x05\- \x04\x01\x02\x01\x03\x12\x03\x08\x1d\x1e\n\n\n\x02\x05\0\x12\x04\n\0\x0e\- \x01\n\n\n\x03\x05\0\x01\x12\x03\n\x05\x0f\n\x0b\n\x04\x05\0\x02\0\x12\- \x03\x0b\x04\r\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x0b\x04\x08\n\x0c\n\- \x05\x05\0\x02\0\x02\x12\x03\x0b\x0b\x0c\n\x0b\n\x04\x05\0\x02\x01\x12\- \x03\x0c\x04\x11\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x0c\x04\x0c\n\x0c\- \n\x05\x05\0\x02\x01\x02\x12\x03\x0c\x0f\x10\n\x0b\n\x04\x05\0\x02\x02\- \x12\x03\r\x04\r\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\r\x04\x08\n\x0c\n\- \x05\x05\0\x02\x02\x02\x12\x03\r\x0b\x0cb\x06proto3\+ \x10\x01\x12\x08\n\x04Link\x10\x02b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/trash.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/trash.rsindex b8b393b9d1..26d9c70016 100644--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/trash.rs+++ b/shared-lib/flowy-folder-data-model/src/protobuf/model/trash.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct Trash {@@ -885,8 +885,8 @@ impl ::protobuf::reflect::ProtobufValue for TrashId {#[derive(Clone,PartialEq,Eq,Debug,Hash)]pub enum TrashType {Unknown = 0,- View = 1,- App = 2,+ TrashView = 1,+ TrashApp = 2,}impl ::protobuf::ProtobufEnum for TrashType {@@ -897,8 +897,8 @@ impl ::protobuf::ProtobufEnum for TrashType {fn from_i32(value: i32) -> ::std::option::Option<TrashType> {match value {0 => ::std::option::Option::Some(TrashType::Unknown),- 1 => ::std::option::Option::Some(TrashType::View),- 2 => ::std::option::Option::Some(TrashType::App),+ 1 => ::std::option::Option::Some(TrashType::TrashView),+ 2 => ::std::option::Option::Some(TrashType::TrashApp),_ => ::std::option::Option::None}}@@ -906,8 +906,8 @@ impl ::protobuf::ProtobufEnum for TrashType {fn values() -> &'static [Self] {static values: &'static [TrashType] = &[TrashType::Unknown,- TrashType::View,- TrashType::App,+ TrashType::TrashView,+ TrashType::TrashApp,];values}@@ -945,49 +945,8 @@ static file_descriptor_proto_data: &'static [u8] = b"\\x01\x20\x03(\x0b2\x08.TrashIdR\x05items\x12\x1d\n\ndelete_all\x18\x02\\x20\x01(\x08R\tdeleteAll\"5\n\x07TrashId\x12\x0e\n\x02id\x18\x01\x20\\x01(\tR\x02id\x12\x1a\n\x02ty\x18\x02\x20\x01(\x0e2\n.TrashTypeR\x02ty*\- +\n\tTrashType\x12\x0b\n\x07Unknown\x10\0\x12\x08\n\x04View\x10\x01\x12\- \x07\n\x03App\x10\x02J\xc7\x06\n\x06\x12\x04\0\0\x18\x01\n\x08\n\x01\x0c\- \x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x08\x01\n\n\n\x03\x04\0\- \x01\x12\x03\x02\x08\r\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x12\n\x0c\- \n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\- \x03\x03\x0b\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x10\x11\n\x0b\n\- \x04\x04\0\x02\x01\x12\x03\x04\x04\x14\n\x0c\n\x05\x04\0\x02\x01\x05\x12\- \x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\x0b\x0f\n\x0c\n\- \x05\x04\0\x02\x01\x03\x12\x03\x04\x12\x13\n\x0b\n\x04\x04\0\x02\x02\x12\- \x03\x05\x04\x1c\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x05\x04\t\n\x0c\n\- \x05\x04\0\x02\x02\x01\x12\x03\x05\n\x17\n\x0c\n\x05\x04\0\x02\x02\x03\- \x12\x03\x05\x1a\x1b\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x06\x04\x1a\n\x0c\- \n\x05\x04\0\x02\x03\x05\x12\x03\x06\x04\t\n\x0c\n\x05\x04\0\x02\x03\x01\- \x12\x03\x06\n\x15\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x06\x18\x19\n\- \x0b\n\x04\x04\0\x02\x04\x12\x03\x07\x04\x15\n\x0c\n\x05\x04\0\x02\x04\- \x06\x12\x03\x07\x04\r\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x07\x0e\x10\- \n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03\x07\x13\x14\n\n\n\x02\x04\x01\x12\- \x04\t\0\x0b\x01\n\n\n\x03\x04\x01\x01\x12\x03\t\x08\x15\n\x0b\n\x04\x04\- \x01\x02\0\x12\x03\n\x04\x1d\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\n\x04\- \x0c\n\x0c\n\x05\x04\x01\x02\0\x06\x12\x03\n\r\x12\n\x0c\n\x05\x04\x01\- \x02\0\x01\x12\x03\n\x13\x18\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\n\x1b\- \x1c\n\n\n\x02\x04\x02\x12\x04\x0c\0\x0f\x01\n\n\n\x03\x04\x02\x01\x12\- \x03\x0c\x08\x17\n\x0b\n\x04\x04\x02\x02\0\x12\x03\r\x04\x1f\n\x0c\n\x05\- \x04\x02\x02\0\x04\x12\x03\r\x04\x0c\n\x0c\n\x05\x04\x02\x02\0\x06\x12\- \x03\r\r\x14\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\r\x15\x1a\n\x0c\n\x05\- \x04\x02\x02\0\x03\x12\x03\r\x1d\x1e\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\- \x0e\x04\x18\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\x0e\x04\x08\n\x0c\n\- \x05\x04\x02\x02\x01\x01\x12\x03\x0e\t\x13\n\x0c\n\x05\x04\x02\x02\x01\- \x03\x12\x03\x0e\x16\x17\n\n\n\x02\x04\x03\x12\x04\x10\0\x13\x01\n\n\n\- \x03\x04\x03\x01\x12\x03\x10\x08\x0f\n\x0b\n\x04\x04\x03\x02\0\x12\x03\- \x11\x04\x12\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x11\x04\n\n\x0c\n\x05\- \x04\x03\x02\0\x01\x12\x03\x11\x0b\r\n\x0c\n\x05\x04\x03\x02\0\x03\x12\- \x03\x11\x10\x11\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x12\x04\x15\n\x0c\n\- \x05\x04\x03\x02\x01\x06\x12\x03\x12\x04\r\n\x0c\n\x05\x04\x03\x02\x01\- \x01\x12\x03\x12\x0e\x10\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03\x12\x13\- \x14\n\n\n\x02\x05\0\x12\x04\x14\0\x18\x01\n\n\n\x03\x05\0\x01\x12\x03\- \x14\x05\x0e\n\x0b\n\x04\x05\0\x02\0\x12\x03\x15\x04\x10\n\x0c\n\x05\x05\- \0\x02\0\x01\x12\x03\x15\x04\x0b\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x15\- \x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x16\x04\r\n\x0c\n\x05\x05\0\- \x02\x01\x01\x12\x03\x16\x04\x08\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\- \x16\x0b\x0c\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x17\x04\x0c\n\x0c\n\x05\- \x05\0\x02\x02\x01\x12\x03\x17\x04\x07\n\x0c\n\x05\x05\0\x02\x02\x02\x12\- \x03\x17\n\x0bb\x06proto3\+ 5\n\tTrashType\x12\x0b\n\x07Unknown\x10\0\x12\r\n\tTrashView\x10\x01\x12\+ \x0c\n\x08TrashApp\x10\x02b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/view.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/view.rsindex bcfbd746c2..0d306b1b80 100644--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/view.rs+++ b/shared-lib/flowy-folder-data-model/src/protobuf/model/view.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct View {@@ -2786,122 +2786,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04desc\x12\x1e\n\tthumbnail\x18\\x04\x20\x01(\tH\x02R\tthumbnailB\r\n\x0bone_of_nameB\r\n\x0bone_of_desc\B\x12\n\x10one_of_thumbnail*\x1e\n\x08ViewType\x12\t\n\x05Blank\x10\0\- \x12\x07\n\x03Doc\x10\x01J\xd2\x12\n\x06\x12\x04\0\08\x01\n\x08\n\x01\- \x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x0c\x01\n\n\n\x03\x04\- \0\x01\x12\x03\x02\x08\x0c\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x12\n\- \x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\- \x12\x03\x03\x0b\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x10\x11\n\x0b\- \n\x04\x04\0\x02\x01\x12\x03\x04\x04\x1c\n\x0c\n\x05\x04\0\x02\x01\x05\- \x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\x0b\x17\n\- \x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04\x1a\x1b\n\x0b\n\x04\x04\0\x02\- \x02\x12\x03\x05\x04\x14\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x05\x04\n\- \n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\- \x02\x03\x12\x03\x05\x12\x13\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x06\x04\- \x14\n\x0c\n\x05\x04\0\x02\x03\x05\x12\x03\x06\x04\n\n\x0c\n\x05\x04\0\- \x02\x03\x01\x12\x03\x06\x0b\x0f\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\- \x06\x12\x13\n\x0b\n\x04\x04\0\x02\x04\x12\x03\x07\x04\x1b\n\x0c\n\x05\- \x04\0\x02\x04\x06\x12\x03\x07\x04\x0c\n\x0c\n\x05\x04\0\x02\x04\x01\x12\- \x03\x07\r\x16\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03\x07\x19\x1a\n\x0b\n\- \x04\x04\0\x02\x05\x12\x03\x08\x04\x16\n\x0c\n\x05\x04\0\x02\x05\x05\x12\- \x03\x08\x04\t\n\x0c\n\x05\x04\0\x02\x05\x01\x12\x03\x08\n\x11\n\x0c\n\- \x05\x04\0\x02\x05\x03\x12\x03\x08\x14\x15\n\x0b\n\x04\x04\0\x02\x06\x12\- \x03\t\x04\x20\n\x0c\n\x05\x04\0\x02\x06\x06\x12\x03\t\x04\x10\n\x0c\n\- \x05\x04\0\x02\x06\x01\x12\x03\t\x11\x1b\n\x0c\n\x05\x04\0\x02\x06\x03\- \x12\x03\t\x1e\x1f\n\x0b\n\x04\x04\0\x02\x07\x12\x03\n\x04\x1c\n\x0c\n\- \x05\x04\0\x02\x07\x05\x12\x03\n\x04\t\n\x0c\n\x05\x04\0\x02\x07\x01\x12\- \x03\n\n\x17\n\x0c\n\x05\x04\0\x02\x07\x03\x12\x03\n\x1a\x1b\n\x0b\n\x04\- \x04\0\x02\x08\x12\x03\x0b\x04\x1a\n\x0c\n\x05\x04\0\x02\x08\x05\x12\x03\- \x0b\x04\t\n\x0c\n\x05\x04\0\x02\x08\x01\x12\x03\x0b\n\x15\n\x0c\n\x05\- \x04\0\x02\x08\x03\x12\x03\x0b\x18\x19\n\n\n\x02\x04\x01\x12\x04\r\0\x0f\- \x01\n\n\n\x03\x04\x01\x01\x12\x03\r\x08\x14\n\x0b\n\x04\x04\x01\x02\0\- \x12\x03\x0e\x04\x1c\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x0e\x04\x0c\n\- \x0c\n\x05\x04\x01\x02\0\x06\x12\x03\x0e\r\x11\n\x0c\n\x05\x04\x01\x02\0\- \x01\x12\x03\x0e\x12\x17\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x0e\x1a\- \x1b\n\n\n\x02\x04\x02\x12\x04\x10\0\x16\x01\n\n\n\x03\x04\x02\x01\x12\- \x03\x10\x08\x19\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x11\x04\x1c\n\x0c\n\- \x05\x04\x02\x02\0\x05\x12\x03\x11\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\- \x12\x03\x11\x0b\x17\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x11\x1a\x1b\n\- \x0b\n\x04\x04\x02\x02\x01\x12\x03\x12\x04\x14\n\x0c\n\x05\x04\x02\x02\- \x01\x05\x12\x03\x12\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x12\- \x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\x12\x12\x13\n\x0b\n\x04\- \x04\x02\x02\x02\x12\x03\x13\x04\x14\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\- \x03\x13\x04\n\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x13\x0b\x0f\n\x0c\- \n\x05\x04\x02\x02\x02\x03\x12\x03\x13\x12\x13\n\x0b\n\x04\x04\x02\x08\0\- \x12\x03\x14\x044\n\x0c\n\x05\x04\x02\x08\0\x01\x12\x03\x14\n\x1a\n\x0b\- \n\x04\x04\x02\x02\x03\x12\x03\x14\x1d2\n\x0c\n\x05\x04\x02\x02\x03\x05\- \x12\x03\x14\x1d#\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x14$-\n\x0c\n\- \x05\x04\x02\x02\x03\x03\x12\x03\x1401\n\x0b\n\x04\x04\x02\x02\x04\x12\- \x03\x15\x04\x1b\n\x0c\n\x05\x04\x02\x02\x04\x06\x12\x03\x15\x04\x0c\n\- \x0c\n\x05\x04\x02\x02\x04\x01\x12\x03\x15\r\x16\n\x0c\n\x05\x04\x02\x02\- \x04\x03\x12\x03\x15\x19\x1a\n\n\n\x02\x04\x03\x12\x04\x17\0\x1f\x01\n\n\- \n\x03\x04\x03\x01\x12\x03\x17\x08\x18\n\x0b\n\x04\x04\x03\x02\0\x12\x03\- \x18\x04\x1c\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x18\x04\n\n\x0c\n\x05\- \x04\x03\x02\0\x01\x12\x03\x18\x0b\x17\n\x0c\n\x05\x04\x03\x02\0\x03\x12\- \x03\x18\x1a\x1b\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x19\x04\x14\n\x0c\n\- \x05\x04\x03\x02\x01\x05\x12\x03\x19\x04\n\n\x0c\n\x05\x04\x03\x02\x01\- \x01\x12\x03\x19\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03\x19\x12\- \x13\n\x0b\n\x04\x04\x03\x02\x02\x12\x03\x1a\x04\x14\n\x0c\n\x05\x04\x03\- \x02\x02\x05\x12\x03\x1a\x04\n\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x03\- \x1a\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x02\x03\x12\x03\x1a\x12\x13\n\x0b\n\- \x04\x04\x03\x02\x03\x12\x03\x1b\x04\x19\n\x0c\n\x05\x04\x03\x02\x03\x05\- \x12\x03\x1b\x04\n\n\x0c\n\x05\x04\x03\x02\x03\x01\x12\x03\x1b\x0b\x14\n\- \x0c\n\x05\x04\x03\x02\x03\x03\x12\x03\x1b\x17\x18\n\x0b\n\x04\x04\x03\- \x02\x04\x12\x03\x1c\x04\x1b\n\x0c\n\x05\x04\x03\x02\x04\x06\x12\x03\x1c\- \x04\x0c\n\x0c\n\x05\x04\x03\x02\x04\x01\x12\x03\x1c\r\x16\n\x0c\n\x05\- \x04\x03\x02\x04\x03\x12\x03\x1c\x19\x1a\n\x0b\n\x04\x04\x03\x02\x05\x12\- \x03\x1d\x04\x19\n\x0c\n\x05\x04\x03\x02\x05\x05\x12\x03\x1d\x04\n\n\x0c\- \n\x05\x04\x03\x02\x05\x01\x12\x03\x1d\x0b\x14\n\x0c\n\x05\x04\x03\x02\- \x05\x03\x12\x03\x1d\x17\x18\n\x0b\n\x04\x04\x03\x02\x06\x12\x03\x1e\x04\- \x17\n\x0c\n\x05\x04\x03\x02\x06\x05\x12\x03\x1e\x04\n\n\x0c\n\x05\x04\- \x03\x02\x06\x01\x12\x03\x1e\x0b\x12\n\x0c\n\x05\x04\x03\x02\x06\x03\x12\- \x03\x1e\x15\x16\n\n\n\x02\x04\x04\x12\x04\x20\0\"\x01\n\n\n\x03\x04\x04\- \x01\x12\x03\x20\x08\x18\n\x0b\n\x04\x04\x04\x02\0\x12\x03!\x04!\n\x0c\n\- \x05\x04\x04\x02\0\x04\x12\x03!\x04\x0c\n\x0c\n\x05\x04\x04\x02\0\x05\- \x12\x03!\r\x13\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03!\x14\x1c\n\x0c\n\- \x05\x04\x04\x02\0\x03\x12\x03!\x1f\x20\n\n\n\x02\x04\x05\x12\x04#\0%\- \x01\n\n\n\x03\x04\x05\x01\x12\x03#\x08\x0e\n\x0b\n\x04\x04\x05\x02\0\- \x12\x03$\x04\x17\n\x0c\n\x05\x04\x05\x02\0\x05\x12\x03$\x04\n\n\x0c\n\- \x05\x04\x05\x02\0\x01\x12\x03$\x0b\x12\n\x0c\n\x05\x04\x05\x02\0\x03\- \x12\x03$\x15\x16\n\n\n\x02\x04\x06\x12\x04&\0(\x01\n\n\n\x03\x04\x06\- \x01\x12\x03&\x08\x16\n\x0b\n\x04\x04\x06\x02\0\x12\x03'\x04\x1e\n\x0c\n\- \x05\x04\x06\x02\0\x04\x12\x03'\x04\x0c\n\x0c\n\x05\x04\x06\x02\0\x05\- \x12\x03'\r\x13\n\x0c\n\x05\x04\x06\x02\0\x01\x12\x03'\x14\x19\n\x0c\n\- \x05\x04\x06\x02\0\x03\x12\x03'\x1c\x1d\n\n\n\x02\x04\x07\x12\x04)\0.\- \x01\n\n\n\x03\x04\x07\x01\x12\x03)\x08\x19\n\x0b\n\x04\x04\x07\x02\0\- \x12\x03*\x04\x17\n\x0c\n\x05\x04\x07\x02\0\x05\x12\x03*\x04\n\n\x0c\n\- \x05\x04\x07\x02\0\x01\x12\x03*\x0b\x12\n\x0c\n\x05\x04\x07\x02\0\x03\- \x12\x03*\x15\x16\n\x0b\n\x04\x04\x07\x08\0\x12\x03+\x04*\n\x0c\n\x05\- \x04\x07\x08\0\x01\x12\x03+\n\x15\n\x0b\n\x04\x04\x07\x02\x01\x12\x03+\- \x18(\n\x0c\n\x05\x04\x07\x02\x01\x05\x12\x03+\x18\x1e\n\x0c\n\x05\x04\- \x07\x02\x01\x01\x12\x03+\x1f#\n\x0c\n\x05\x04\x07\x02\x01\x03\x12\x03+&\- '\n\x0b\n\x04\x04\x07\x08\x01\x12\x03,\x04*\n\x0c\n\x05\x04\x07\x08\x01\- \x01\x12\x03,\n\x15\n\x0b\n\x04\x04\x07\x02\x02\x12\x03,\x18(\n\x0c\n\- \x05\x04\x07\x02\x02\x05\x12\x03,\x18\x1e\n\x0c\n\x05\x04\x07\x02\x02\- \x01\x12\x03,\x1f#\n\x0c\n\x05\x04\x07\x02\x02\x03\x12\x03,&'\n\x0b\n\- \x04\x04\x07\x08\x02\x12\x03-\x044\n\x0c\n\x05\x04\x07\x08\x02\x01\x12\- \x03-\n\x1a\n\x0b\n\x04\x04\x07\x02\x03\x12\x03-\x1d2\n\x0c\n\x05\x04\- \x07\x02\x03\x05\x12\x03-\x1d#\n\x0c\n\x05\x04\x07\x02\x03\x01\x12\x03-$\- -\n\x0c\n\x05\x04\x07\x02\x03\x03\x12\x03-01\n\n\n\x02\x04\x08\x12\x04/\- \04\x01\n\n\n\x03\x04\x08\x01\x12\x03/\x08\x18\n\x0b\n\x04\x04\x08\x02\0\- \x12\x030\x04\x17\n\x0c\n\x05\x04\x08\x02\0\x05\x12\x030\x04\n\n\x0c\n\- \x05\x04\x08\x02\0\x01\x12\x030\x0b\x12\n\x0c\n\x05\x04\x08\x02\0\x03\- \x12\x030\x15\x16\n\x0b\n\x04\x04\x08\x08\0\x12\x031\x04*\n\x0c\n\x05\- \x04\x08\x08\0\x01\x12\x031\n\x15\n\x0b\n\x04\x04\x08\x02\x01\x12\x031\- \x18(\n\x0c\n\x05\x04\x08\x02\x01\x05\x12\x031\x18\x1e\n\x0c\n\x05\x04\- \x08\x02\x01\x01\x12\x031\x1f#\n\x0c\n\x05\x04\x08\x02\x01\x03\x12\x031&\- '\n\x0b\n\x04\x04\x08\x08\x01\x12\x032\x04*\n\x0c\n\x05\x04\x08\x08\x01\- \x01\x12\x032\n\x15\n\x0b\n\x04\x04\x08\x02\x02\x12\x032\x18(\n\x0c\n\- \x05\x04\x08\x02\x02\x05\x12\x032\x18\x1e\n\x0c\n\x05\x04\x08\x02\x02\- \x01\x12\x032\x1f#\n\x0c\n\x05\x04\x08\x02\x02\x03\x12\x032&'\n\x0b\n\- \x04\x04\x08\x08\x02\x12\x033\x044\n\x0c\n\x05\x04\x08\x08\x02\x01\x12\- \x033\n\x1a\n\x0b\n\x04\x04\x08\x02\x03\x12\x033\x1d2\n\x0c\n\x05\x04\- \x08\x02\x03\x05\x12\x033\x1d#\n\x0c\n\x05\x04\x08\x02\x03\x01\x12\x033$\- -\n\x0c\n\x05\x04\x08\x02\x03\x03\x12\x03301\n\n\n\x02\x05\0\x12\x045\08\- \x01\n\n\n\x03\x05\0\x01\x12\x035\x05\r\n\x0b\n\x04\x05\0\x02\0\x12\x036\- \x04\x0e\n\x0c\n\x05\x05\0\x02\0\x01\x12\x036\x04\t\n\x0c\n\x05\x05\0\- \x02\0\x02\x12\x036\x0c\r\n\x0b\n\x04\x05\0\x02\x01\x12\x037\x04\x0c\n\- \x0c\n\x05\x05\0\x02\x01\x01\x12\x037\x04\x07\n\x0c\n\x05\x05\0\x02\x01\- \x02\x12\x037\n\x0bb\x06proto3\+ \x12\x07\n\x03Doc\x10\x01b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/model/workspace.rs b/shared-lib/flowy-folder-data-model/src/protobuf/model/workspace.rsindex 0384732e33..4d151d28c4 100644--- a/shared-lib/flowy-folder-data-model/src/protobuf/model/workspace.rs+++ b/shared-lib/flowy-folder-data-model/src/protobuf/model/workspace.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct Workspace {@@ -2288,84 +2288,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\x0bone_of_desc\"q\n\x15UpdateWorkspaceParams\x12\x0e\n\x02id\x18\x01\\x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04descB\r\n\x0bone_of_nameB\r\n\- \x0bone_of_descJ\xce\x0c\n\x06\x12\x04\0\0*\x01\n\x08\n\x01\x0c\x12\x03\- \0\0\x12\n\t\n\x02\x03\0\x12\x03\x01\0\x13\n\t\n\x02\x03\x01\x12\x03\x02\- \0\x14\n\n\n\x02\x04\0\x12\x04\x04\0\x0b\x01\n\n\n\x03\x04\0\x01\x12\x03\- \x04\x08\x11\n\x0b\n\x04\x04\0\x02\0\x12\x03\x05\x04\x12\n\x0c\n\x05\x04\- \0\x02\0\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x05\- \x0b\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x05\x10\x11\n\x0b\n\x04\x04\0\- \x02\x01\x12\x03\x06\x04\x14\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x06\- \x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x06\x0b\x0f\n\x0c\n\x05\x04\- \0\x02\x01\x03\x12\x03\x06\x12\x13\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x07\- \x04\x14\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x07\x04\n\n\x0c\n\x05\x04\- \0\x02\x02\x01\x12\x03\x07\x0b\x0f\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\- \x07\x12\x13\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x08\x04\x19\n\x0c\n\x05\- \x04\0\x02\x03\x06\x12\x03\x08\x04\x0f\n\x0c\n\x05\x04\0\x02\x03\x01\x12\- \x03\x08\x10\x14\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x08\x17\x18\n\x0b\- \n\x04\x04\0\x02\x04\x12\x03\t\x04\x1c\n\x0c\n\x05\x04\0\x02\x04\x05\x12\- \x03\t\x04\t\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\t\n\x17\n\x0c\n\x05\- \x04\0\x02\x04\x03\x12\x03\t\x1a\x1b\n\x0b\n\x04\x04\0\x02\x05\x12\x03\n\- \x04\x1a\n\x0c\n\x05\x04\0\x02\x05\x05\x12\x03\n\x04\t\n\x0c\n\x05\x04\0\- \x02\x05\x01\x12\x03\n\n\x15\n\x0c\n\x05\x04\0\x02\x05\x03\x12\x03\n\x18\- \x19\n\n\n\x02\x04\x01\x12\x04\x0c\0\x0e\x01\n\n\n\x03\x04\x01\x01\x12\- \x03\x0c\x08\x19\n\x0b\n\x04\x04\x01\x02\0\x12\x03\r\x04!\n\x0c\n\x05\- \x04\x01\x02\0\x04\x12\x03\r\x04\x0c\n\x0c\n\x05\x04\x01\x02\0\x06\x12\- \x03\r\r\x16\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\r\x17\x1c\n\x0c\n\x05\- \x04\x01\x02\0\x03\x12\x03\r\x1f\x20\n\n\n\x02\x04\x02\x12\x04\x0f\0\x12\- \x01\n\n\n\x03\x04\x02\x01\x12\x03\x0f\x08\x1e\n\x0b\n\x04\x04\x02\x02\0\- \x12\x03\x10\x04\x14\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\x10\x04\n\n\- \x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x10\x0b\x0f\n\x0c\n\x05\x04\x02\x02\- \0\x03\x12\x03\x10\x12\x13\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\x11\x04\- \x14\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\x11\x04\n\n\x0c\n\x05\x04\- \x02\x02\x01\x01\x12\x03\x11\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\- \x03\x11\x12\x13\n\n\n\x02\x04\x03\x12\x04\x13\0\x16\x01\n\n\n\x03\x04\- \x03\x01\x12\x03\x13\x08\x1d\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x14\x04\- \x14\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x14\x04\n\n\x0c\n\x05\x04\x03\- \x02\0\x01\x12\x03\x14\x0b\x0f\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x14\- \x12\x13\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x15\x04\x14\n\x0c\n\x05\x04\- \x03\x02\x01\x05\x12\x03\x15\x04\n\n\x0c\n\x05\x04\x03\x02\x01\x01\x12\- \x03\x15\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03\x15\x12\x13\n\n\- \n\x02\x04\x04\x12\x04\x17\0\x19\x01\n\n\n\x03\x04\x04\x01\x12\x03\x17\- \x08\x1d\n\x0b\n\x04\x04\x04\x08\0\x12\x03\x18\x04:\n\x0c\n\x05\x04\x04\- \x08\0\x01\x12\x03\x18\n\x1d\n\x0b\n\x04\x04\x04\x02\0\x12\x03\x18\x208\- \n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03\x18\x20&\n\x0c\n\x05\x04\x04\x02\- \0\x01\x12\x03\x18'3\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03\x1867\n\n\n\- \x02\x04\x05\x12\x04\x1a\0\x1c\x01\n\n\n\x03\x04\x05\x01\x12\x03\x1a\x08\- \x13\n\x0b\n\x04\x04\x05\x08\0\x12\x03\x1b\x04:\n\x0c\n\x05\x04\x05\x08\- \0\x01\x12\x03\x1b\n\x1d\n\x0b\n\x04\x04\x05\x02\0\x12\x03\x1b\x208\n\- \x0c\n\x05\x04\x05\x02\0\x05\x12\x03\x1b\x20&\n\x0c\n\x05\x04\x05\x02\0\- \x01\x12\x03\x1b'3\n\x0c\n\x05\x04\x05\x02\0\x03\x12\x03\x1b67\n\n\n\x02\- \x04\x06\x12\x04\x1d\0\x20\x01\n\n\n\x03\x04\x06\x01\x12\x03\x1d\x08\x1f\- \n\x0b\n\x04\x04\x06\x02\0\x12\x03\x1e\x04\x1c\n\x0c\n\x05\x04\x06\x02\0\- \x06\x12\x03\x1e\x04\r\n\x0c\n\x05\x04\x06\x02\0\x01\x12\x03\x1e\x0e\x17\- \n\x0c\n\x05\x04\x06\x02\0\x03\x12\x03\x1e\x1a\x1b\n\x0b\n\x04\x04\x06\- \x08\0\x12\x03\x1f\x046\n\x0c\n\x05\x04\x06\x08\0\x01\x12\x03\x1f\n\x1c\- \n\x0b\n\x04\x04\x06\x02\x01\x12\x03\x1f\x1f4\n\x0c\n\x05\x04\x06\x02\- \x01\x06\x12\x03\x1f\x1f#\n\x0c\n\x05\x04\x06\x02\x01\x01\x12\x03\x1f$/\- \n\x0c\n\x05\x04\x06\x02\x01\x03\x12\x03\x1f23\n\n\n\x02\x04\x07\x12\x04\- !\0%\x01\n\n\n\x03\x04\x07\x01\x12\x03!\x08\x1e\n\x0b\n\x04\x04\x07\x02\- \0\x12\x03\"\x04\x12\n\x0c\n\x05\x04\x07\x02\0\x05\x12\x03\"\x04\n\n\x0c\- \n\x05\x04\x07\x02\0\x01\x12\x03\"\x0b\r\n\x0c\n\x05\x04\x07\x02\0\x03\- \x12\x03\"\x10\x11\n\x0b\n\x04\x04\x07\x08\0\x12\x03#\x04*\n\x0c\n\x05\- \x04\x07\x08\0\x01\x12\x03#\n\x15\n\x0b\n\x04\x04\x07\x02\x01\x12\x03#\- \x18(\n\x0c\n\x05\x04\x07\x02\x01\x05\x12\x03#\x18\x1e\n\x0c\n\x05\x04\- \x07\x02\x01\x01\x12\x03#\x1f#\n\x0c\n\x05\x04\x07\x02\x01\x03\x12\x03#&\- '\n\x0b\n\x04\x04\x07\x08\x01\x12\x03$\x04*\n\x0c\n\x05\x04\x07\x08\x01\- \x01\x12\x03$\n\x15\n\x0b\n\x04\x04\x07\x02\x02\x12\x03$\x18(\n\x0c\n\- \x05\x04\x07\x02\x02\x05\x12\x03$\x18\x1e\n\x0c\n\x05\x04\x07\x02\x02\- \x01\x12\x03$\x1f#\n\x0c\n\x05\x04\x07\x02\x02\x03\x12\x03$&'\n\n\n\x02\- \x04\x08\x12\x04&\0*\x01\n\n\n\x03\x04\x08\x01\x12\x03&\x08\x1d\n\x0b\n\- \x04\x04\x08\x02\0\x12\x03'\x04\x12\n\x0c\n\x05\x04\x08\x02\0\x05\x12\- \x03'\x04\n\n\x0c\n\x05\x04\x08\x02\0\x01\x12\x03'\x0b\r\n\x0c\n\x05\x04\- \x08\x02\0\x03\x12\x03'\x10\x11\n\x0b\n\x04\x04\x08\x08\0\x12\x03(\x04*\- \n\x0c\n\x05\x04\x08\x08\0\x01\x12\x03(\n\x15\n\x0b\n\x04\x04\x08\x02\- \x01\x12\x03(\x18(\n\x0c\n\x05\x04\x08\x02\x01\x05\x12\x03(\x18\x1e\n\- \x0c\n\x05\x04\x08\x02\x01\x01\x12\x03(\x1f#\n\x0c\n\x05\x04\x08\x02\x01\- \x03\x12\x03(&'\n\x0b\n\x04\x04\x08\x08\x01\x12\x03)\x04*\n\x0c\n\x05\- \x04\x08\x08\x01\x01\x12\x03)\n\x15\n\x0b\n\x04\x04\x08\x02\x02\x12\x03)\- \x18(\n\x0c\n\x05\x04\x08\x02\x02\x05\x12\x03)\x18\x1e\n\x0c\n\x05\x04\- \x08\x02\x02\x01\x12\x03)\x1f#\n\x0c\n\x05\x04\x08\x02\x02\x03\x12\x03)&\- 'b\x06proto3\+ \x0bone_of_descb\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-folder-data-model/src/protobuf/proto/trash.proto b/shared-lib/flowy-folder-data-model/src/protobuf/proto/trash.protoindex 876bbb9f53..8db07d992f 100644--- a/shared-lib/flowy-folder-data-model/src/protobuf/proto/trash.proto+++ b/shared-lib/flowy-folder-data-model/src/protobuf/proto/trash.proto@@ -20,6 +20,6 @@ message TrashId {}enum TrashType {Unknown = 0;- View = 1;- App = 2;+ TrashView = 1;+ TrashApp = 2;}diff --git a/shared-lib/flowy-user-data-model/Cargo.toml b/shared-lib/flowy-user-data-model/Cargo.tomlindex e90125f6b5..fe15afdf2c 100644--- a/shared-lib/flowy-user-data-model/Cargo.toml+++ b/shared-lib/flowy-user-data-model/Cargo.toml@@ -18,6 +18,8 @@ log = "0.4.14"fancy-regex = "0.5.0"lazy_static = "1.4"+[build-dependencies]+lib-infra = { path = "../lib-infra", features = ["gen_pb"] }[dev-dependencies]quickcheck = "0.9.2"diff --git a/shared-lib/flowy-user-data-model/build.rs b/shared-lib/flowy-user-data-model/build.rsnew file mode 100644index 0000000000..3b049683be--- /dev/null+++ b/shared-lib/flowy-user-data-model/build.rs@@ -0,0 +1,5 @@+use lib_infra::pb;++fn main() {+ pb::gen("flowy-user-data-model", "./src/protobuf/proto");+}diff --git a/shared-lib/flowy-user-data-model/src/protobuf/model/auth.rs b/shared-lib/flowy-user-data-model/src/protobuf/model/auth.rsindex 9a6cf2f3ff..2c4dbcd20a 100644--- a/shared-lib/flowy-user-data-model/src/protobuf/model/auth.rs+++ b/shared-lib/flowy-user-data-model/src/protobuf/model/auth.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct SignInRequest {@@ -1581,71 +1581,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\x12\x1a\n\x08password\x18\x03\x20\x01(\tR\x08password\"i\n\x0eSignUpRes\ponse\x12\x17\n\x07user_id\x18\x01\x20\x01(\tR\x06userId\x12\x12\n\x04na\me\x18\x02\x20\x01(\tR\x04name\x12\x14\n\x05email\x18\x03\x20\x01(\tR\- \x05email\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05tokenJ\xee\t\n\x06\- \x12\x04\0\0!\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\- \x04\x02\0\x06\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x15\n\x0b\n\x04\- \x04\0\x02\0\x12\x03\x03\x04\x15\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\- \x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x10\n\x0c\n\x05\x04\0\- \x02\0\x03\x12\x03\x03\x13\x14\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\- \x18\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\- \x02\x01\x01\x12\x03\x04\x0b\x13\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\- \x04\x16\x17\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x14\n\x0c\n\x05\- \x04\0\x02\x02\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x02\x01\x12\- \x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05\x12\x13\n\n\n\- \x02\x04\x01\x12\x04\x07\0\x0b\x01\n\n\n\x03\x04\x01\x01\x12\x03\x07\x08\- \x14\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x08\x04\x15\n\x0c\n\x05\x04\x01\- \x02\0\x05\x12\x03\x08\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x08\- \x0b\x10\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x08\x13\x14\n\x0b\n\x04\- \x04\x01\x02\x01\x12\x03\t\x04\x18\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\- \x03\t\x04\n\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\t\x0b\x13\n\x0c\n\- \x05\x04\x01\x02\x01\x03\x12\x03\t\x16\x17\n\x0b\n\x04\x04\x01\x02\x02\- \x12\x03\n\x04\x14\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\n\x04\n\n\x0c\- \n\x05\x04\x01\x02\x02\x01\x12\x03\n\x0b\x0f\n\x0c\n\x05\x04\x01\x02\x02\- \x03\x12\x03\n\x12\x13\n\n\n\x02\x04\x02\x12\x04\x0c\0\x11\x01\n\n\n\x03\- \x04\x02\x01\x12\x03\x0c\x08\x16\n\x0b\n\x04\x04\x02\x02\0\x12\x03\r\x04\- \x17\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\r\x04\n\n\x0c\n\x05\x04\x02\- \x02\0\x01\x12\x03\r\x0b\x12\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\r\x15\- \x16\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\x0e\x04\x14\n\x0c\n\x05\x04\x02\- \x02\x01\x05\x12\x03\x0e\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\- \x0e\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\x0e\x12\x13\n\x0b\n\- \x04\x04\x02\x02\x02\x12\x03\x0f\x04\x15\n\x0c\n\x05\x04\x02\x02\x02\x05\- \x12\x03\x0f\x04\n\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x0f\x0b\x10\n\- \x0c\n\x05\x04\x02\x02\x02\x03\x12\x03\x0f\x13\x14\n\x0b\n\x04\x04\x02\- \x02\x03\x12\x03\x10\x04\x15\n\x0c\n\x05\x04\x02\x02\x03\x05\x12\x03\x10\- \x04\n\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x10\x0b\x10\n\x0c\n\x05\- \x04\x02\x02\x03\x03\x12\x03\x10\x13\x14\n\n\n\x02\x04\x03\x12\x04\x12\0\- \x16\x01\n\n\n\x03\x04\x03\x01\x12\x03\x12\x08\x15\n\x0b\n\x04\x04\x03\- \x02\0\x12\x03\x13\x04\x15\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x13\x04\- \n\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x13\x0b\x10\n\x0c\n\x05\x04\x03\- \x02\0\x03\x12\x03\x13\x13\x14\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x14\- \x04\x14\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03\x14\x04\n\n\x0c\n\x05\- \x04\x03\x02\x01\x01\x12\x03\x14\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x01\x03\- \x12\x03\x14\x12\x13\n\x0b\n\x04\x04\x03\x02\x02\x12\x03\x15\x04\x18\n\- \x0c\n\x05\x04\x03\x02\x02\x05\x12\x03\x15\x04\n\n\x0c\n\x05\x04\x03\x02\- \x02\x01\x12\x03\x15\x0b\x13\n\x0c\n\x05\x04\x03\x02\x02\x03\x12\x03\x15\- \x16\x17\n\n\n\x02\x04\x04\x12\x04\x17\0\x1b\x01\n\n\n\x03\x04\x04\x01\- \x12\x03\x17\x08\x14\n\x0b\n\x04\x04\x04\x02\0\x12\x03\x18\x04\x15\n\x0c\- \n\x05\x04\x04\x02\0\x05\x12\x03\x18\x04\n\n\x0c\n\x05\x04\x04\x02\0\x01\- \x12\x03\x18\x0b\x10\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03\x18\x13\x14\n\- \x0b\n\x04\x04\x04\x02\x01\x12\x03\x19\x04\x14\n\x0c\n\x05\x04\x04\x02\- \x01\x05\x12\x03\x19\x04\n\n\x0c\n\x05\x04\x04\x02\x01\x01\x12\x03\x19\- \x0b\x0f\n\x0c\n\x05\x04\x04\x02\x01\x03\x12\x03\x19\x12\x13\n\x0b\n\x04\- \x04\x04\x02\x02\x12\x03\x1a\x04\x18\n\x0c\n\x05\x04\x04\x02\x02\x05\x12\- \x03\x1a\x04\n\n\x0c\n\x05\x04\x04\x02\x02\x01\x12\x03\x1a\x0b\x13\n\x0c\- \n\x05\x04\x04\x02\x02\x03\x12\x03\x1a\x16\x17\n\n\n\x02\x04\x05\x12\x04\- \x1c\0!\x01\n\n\n\x03\x04\x05\x01\x12\x03\x1c\x08\x16\n\x0b\n\x04\x04\- \x05\x02\0\x12\x03\x1d\x04\x17\n\x0c\n\x05\x04\x05\x02\0\x05\x12\x03\x1d\- \x04\n\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03\x1d\x0b\x12\n\x0c\n\x05\x04\- \x05\x02\0\x03\x12\x03\x1d\x15\x16\n\x0b\n\x04\x04\x05\x02\x01\x12\x03\- \x1e\x04\x14\n\x0c\n\x05\x04\x05\x02\x01\x05\x12\x03\x1e\x04\n\n\x0c\n\- \x05\x04\x05\x02\x01\x01\x12\x03\x1e\x0b\x0f\n\x0c\n\x05\x04\x05\x02\x01\- \x03\x12\x03\x1e\x12\x13\n\x0b\n\x04\x04\x05\x02\x02\x12\x03\x1f\x04\x15\- \n\x0c\n\x05\x04\x05\x02\x02\x05\x12\x03\x1f\x04\n\n\x0c\n\x05\x04\x05\- \x02\x02\x01\x12\x03\x1f\x0b\x10\n\x0c\n\x05\x04\x05\x02\x02\x03\x12\x03\- \x1f\x13\x14\n\x0b\n\x04\x04\x05\x02\x03\x12\x03\x20\x04\x15\n\x0c\n\x05\- \x04\x05\x02\x03\x05\x12\x03\x20\x04\n\n\x0c\n\x05\x04\x05\x02\x03\x01\- \x12\x03\x20\x0b\x10\n\x0c\n\x05\x04\x05\x02\x03\x03\x12\x03\x20\x13\x14\- b\x06proto3\+ \x05email\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05tokenb\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-user-data-model/src/protobuf/model/document b/shared-lib/flowy-user-data-model/src/protobuf/model/documentdeleted file mode 100644index 5becb7204f..0000000000--- a/shared-lib/flowy-user-data-model/src/protobuf/model/document+++ /dev/null@@ -1,11 +0,0 @@-#![cfg_attr(rustfmt, rustfmt::skip)]-// Auto-generated, do not edit--mod errors;-pub use errors::*;--mod user_profile;-pub use user_profile::*;--mod auth;-pub use auth::*;diff --git a/shared-lib/flowy-user-data-model/src/protobuf/model/errors.rs b/shared-lib/flowy-user-data-model/src/protobuf/model/errors.rsindex e8078221ed..97c089f44c 100644--- a/shared-lib/flowy-user-data-model/src/protobuf/model/errors.rs+++ b/shared-lib/flowy-user-data-model/src/protobuf/model/errors.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(Clone,PartialEq,Eq,Debug,Hash)]pub enum ErrorCode {@@ -125,41 +125,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\aracters\x10\x15\x12\x13\n\x0fUserNameIsEmpty\x10\x16\x12\x11\n\rUserIdI\nvalid\x10\x17\x12\x14\n\x10UserUnauthorized\x10\x18\x12\x10\n\x0cUserNo\tExist\x10\x19\x12\x0f\n\x0bServerError\x10c\x12\x11\n\rInternalError\- \x10dJ\xba\x05\n\x06\x12\x04\0\0\x13\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\- \n\n\n\x02\x05\0\x12\x04\x02\0\x13\x01\n\n\n\x03\x05\0\x01\x12\x03\x02\- \x05\x0e\n\x0b\n\x04\x05\0\x02\0\x12\x03\x03\x04\x15\n\x0c\n\x05\x05\0\- \x02\0\x01\x12\x03\x03\x04\x10\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x03\- \x13\x14\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x04\x04\x1b\n\x0c\n\x05\x05\0\- \x02\x01\x01\x12\x03\x04\x04\x16\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\- \x04\x19\x1a\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x05\x04\x1b\n\x0c\n\x05\- \x05\0\x02\x02\x01\x12\x03\x05\x04\x16\n\x0c\n\x05\x05\0\x02\x02\x02\x12\- \x03\x05\x19\x1a\n\x0b\n\x04\x05\0\x02\x03\x12\x03\x06\x04\x19\n\x0c\n\- \x05\x05\0\x02\x03\x01\x12\x03\x06\x04\x13\n\x0c\n\x05\x05\0\x02\x03\x02\- \x12\x03\x06\x16\x18\n\x0b\n\x04\x05\0\x02\x04\x12\x03\x07\x04\x19\n\x0c\- \n\x05\x05\0\x02\x04\x01\x12\x03\x07\x04\x13\n\x0c\n\x05\x05\0\x02\x04\- \x02\x12\x03\x07\x16\x18\n\x0b\n\x04\x05\0\x02\x05\x12\x03\x08\x04*\n\- \x0c\n\x05\x05\0\x02\x05\x01\x12\x03\x08\x04$\n\x0c\n\x05\x05\0\x02\x05\- \x02\x12\x03\x08')\n\x0b\n\x04\x05\0\x02\x06\x12\x03\t\x04\x1f\n\x0c\n\- \x05\x05\0\x02\x06\x01\x12\x03\t\x04\x19\n\x0c\n\x05\x05\0\x02\x06\x02\- \x12\x03\t\x1c\x1e\n\x0b\n\x04\x05\0\x02\x07\x12\x03\n\x04\x1a\n\x0c\n\- \x05\x05\0\x02\x07\x01\x12\x03\n\x04\x14\n\x0c\n\x05\x05\0\x02\x07\x02\- \x12\x03\n\x17\x19\n\x0b\n\x04\x05\0\x02\x08\x12\x03\x0b\x04\x19\n\x0c\n\- \x05\x05\0\x02\x08\x01\x12\x03\x0b\x04\x13\n\x0c\n\x05\x05\0\x02\x08\x02\- \x12\x03\x0b\x16\x18\n\x0b\n\x04\x05\0\x02\t\x12\x03\x0c\x04,\n\x0c\n\- \x05\x05\0\x02\t\x01\x12\x03\x0c\x04&\n\x0c\n\x05\x05\0\x02\t\x02\x12\- \x03\x0c)+\n\x0b\n\x04\x05\0\x02\n\x12\x03\r\x04\x19\n\x0c\n\x05\x05\0\- \x02\n\x01\x12\x03\r\x04\x13\n\x0c\n\x05\x05\0\x02\n\x02\x12\x03\r\x16\- \x18\n\x0b\n\x04\x05\0\x02\x0b\x12\x03\x0e\x04\x17\n\x0c\n\x05\x05\0\x02\- \x0b\x01\x12\x03\x0e\x04\x11\n\x0c\n\x05\x05\0\x02\x0b\x02\x12\x03\x0e\- \x14\x16\n\x0b\n\x04\x05\0\x02\x0c\x12\x03\x0f\x04\x1a\n\x0c\n\x05\x05\0\- \x02\x0c\x01\x12\x03\x0f\x04\x14\n\x0c\n\x05\x05\0\x02\x0c\x02\x12\x03\- \x0f\x17\x19\n\x0b\n\x04\x05\0\x02\r\x12\x03\x10\x04\x16\n\x0c\n\x05\x05\- \0\x02\r\x01\x12\x03\x10\x04\x10\n\x0c\n\x05\x05\0\x02\r\x02\x12\x03\x10\- \x13\x15\n\x0b\n\x04\x05\0\x02\x0e\x12\x03\x11\x04\x15\n\x0c\n\x05\x05\0\- \x02\x0e\x01\x12\x03\x11\x04\x0f\n\x0c\n\x05\x05\0\x02\x0e\x02\x12\x03\- \x11\x12\x14\n\x0b\n\x04\x05\0\x02\x0f\x12\x03\x12\x04\x18\n\x0c\n\x05\- \x05\0\x02\x0f\x01\x12\x03\x12\x04\x11\n\x0c\n\x05\x05\0\x02\x0f\x02\x12\- \x03\x12\x14\x17b\x06proto3\+ \x10db\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-user-data-model/src/protobuf/model/user_profile.rs b/shared-lib/flowy-user-data-model/src/protobuf/model/user_profile.rsindex 842cbed2b6..5e9b09bf0c 100644--- a/shared-lib/flowy-user-data-model/src/protobuf/model/user_profile.rs+++ b/shared-lib/flowy-user-data-model/src/protobuf/model/user_profile.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct UserToken {@@ -1286,56 +1286,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\id\x18\x01\x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\\x04name\x12\x16\n\x05email\x18\x03\x20\x01(\tH\x01R\x05email\x12\x1c\n\\x08password\x18\x04\x20\x01(\tH\x02R\x08passwordB\r\n\x0bone_of_nameB\- \x0e\n\x0cone_of_emailB\x11\n\x0fone_of_passwordJ\xdf\x07\n\x06\x12\x04\- \0\0\x16\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\- \0\x04\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x11\n\x0b\n\x04\x04\0\x02\- \0\x12\x03\x03\x04\x15\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\- \x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x10\n\x0c\n\x05\x04\0\x02\0\- \x03\x12\x03\x03\x13\x14\n\n\n\x02\x04\x01\x12\x04\x05\0\n\x01\n\n\n\x03\- \x04\x01\x01\x12\x03\x05\x08\x13\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x06\- \x04\x12\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x06\x04\n\n\x0c\n\x05\x04\- \x01\x02\0\x01\x12\x03\x06\x0b\r\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\- \x06\x10\x11\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x07\x04\x15\n\x0c\n\x05\- \x04\x01\x02\x01\x05\x12\x03\x07\x04\n\n\x0c\n\x05\x04\x01\x02\x01\x01\- \x12\x03\x07\x0b\x10\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x07\x13\x14\- \n\x0b\n\x04\x04\x01\x02\x02\x12\x03\x08\x04\x14\n\x0c\n\x05\x04\x01\x02\- \x02\x05\x12\x03\x08\x04\n\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\x08\- \x0b\x0f\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x08\x12\x13\n\x0b\n\x04\- \x04\x01\x02\x03\x12\x03\t\x04\x15\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\- \x03\t\x04\n\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\t\x0b\x10\n\x0c\n\- \x05\x04\x01\x02\x03\x03\x12\x03\t\x13\x14\n\n\n\x02\x04\x02\x12\x04\x0b\- \0\x10\x01\n\n\n\x03\x04\x02\x01\x12\x03\x0b\x08\x19\n\x0b\n\x04\x04\x02\- \x02\0\x12\x03\x0c\x04\x12\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\x0c\x04\- \n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x0c\x0b\r\n\x0c\n\x05\x04\x02\- \x02\0\x03\x12\x03\x0c\x10\x11\n\x0b\n\x04\x04\x02\x08\0\x12\x03\r\x04*\- \n\x0c\n\x05\x04\x02\x08\0\x01\x12\x03\r\n\x15\n\x0b\n\x04\x04\x02\x02\- \x01\x12\x03\r\x18(\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\r\x18\x1e\n\- \x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\r\x1f#\n\x0c\n\x05\x04\x02\x02\- \x01\x03\x12\x03\r&'\n\x0b\n\x04\x04\x02\x08\x01\x12\x03\x0e\x04,\n\x0c\- \n\x05\x04\x02\x08\x01\x01\x12\x03\x0e\n\x16\n\x0b\n\x04\x04\x02\x02\x02\- \x12\x03\x0e\x19*\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03\x0e\x19\x1f\n\- \x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x0e\x20%\n\x0c\n\x05\x04\x02\x02\- \x02\x03\x12\x03\x0e()\n\x0b\n\x04\x04\x02\x08\x02\x12\x03\x0f\x042\n\- \x0c\n\x05\x04\x02\x08\x02\x01\x12\x03\x0f\n\x19\n\x0b\n\x04\x04\x02\x02\- \x03\x12\x03\x0f\x1c0\n\x0c\n\x05\x04\x02\x02\x03\x05\x12\x03\x0f\x1c\"\- \n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x0f#+\n\x0c\n\x05\x04\x02\x02\- \x03\x03\x12\x03\x0f./\n\n\n\x02\x04\x03\x12\x04\x11\0\x16\x01\n\n\n\x03\- \x04\x03\x01\x12\x03\x11\x08\x18\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x12\- \x04\x12\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x12\x04\n\n\x0c\n\x05\x04\- \x03\x02\0\x01\x12\x03\x12\x0b\r\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\- \x12\x10\x11\n\x0b\n\x04\x04\x03\x08\0\x12\x03\x13\x04*\n\x0c\n\x05\x04\- \x03\x08\0\x01\x12\x03\x13\n\x15\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x13\- \x18(\n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03\x13\x18\x1e\n\x0c\n\x05\- \x04\x03\x02\x01\x01\x12\x03\x13\x1f#\n\x0c\n\x05\x04\x03\x02\x01\x03\- \x12\x03\x13&'\n\x0b\n\x04\x04\x03\x08\x01\x12\x03\x14\x04,\n\x0c\n\x05\- \x04\x03\x08\x01\x01\x12\x03\x14\n\x16\n\x0b\n\x04\x04\x03\x02\x02\x12\- \x03\x14\x19*\n\x0c\n\x05\x04\x03\x02\x02\x05\x12\x03\x14\x19\x1f\n\x0c\- \n\x05\x04\x03\x02\x02\x01\x12\x03\x14\x20%\n\x0c\n\x05\x04\x03\x02\x02\- \x03\x12\x03\x14()\n\x0b\n\x04\x04\x03\x08\x02\x12\x03\x15\x042\n\x0c\n\- \x05\x04\x03\x08\x02\x01\x12\x03\x15\n\x19\n\x0b\n\x04\x04\x03\x02\x03\- \x12\x03\x15\x1c0\n\x0c\n\x05\x04\x03\x02\x03\x05\x12\x03\x15\x1c\"\n\- \x0c\n\x05\x04\x03\x02\x03\x01\x12\x03\x15#+\n\x0c\n\x05\x04\x03\x02\x03\- \x03\x12\x03\x15./b\x06proto3\+ \x0e\n\x0cone_of_emailB\x11\n\x0fone_of_passwordb\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/flowy-user-data-model/src/protobuf/model/user_setting.rs b/shared-lib/flowy-user-data-model/src/protobuf/model/user_setting.rsindex 400fa0686f..c173360230 100644--- a/shared-lib/flowy-user-data-model/src/protobuf/model/user_setting.rs+++ b/shared-lib/flowy-user-data-model/src/protobuf/model/user_setting.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct UserPreferences {@@ -699,30 +699,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\ale\x18\x02\x20\x01(\x0b2\x0f.LocaleSettingsR\x06locale\x12(\n\x10reset_\as_default\x18\x03\x20\x01(\x08R\x0eresetAsDefault\"X\n\x0eLocaleSetting\s\x12#\n\rlanguage_code\x18\x01\x20\x01(\tR\x0clanguageCode\x12!\n\x0cco\- untry_code\x18\x02\x20\x01(\tR\x0bcountryCodeJ\xdb\x03\n\x06\x12\x04\0\0\- \x0e\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\- \x05\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x17\n\x0b\n\x04\x04\0\x02\0\- \x12\x03\x03\x04\x17\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\- \n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x12\n\x0c\n\x05\x04\0\x02\0\x03\- \x12\x03\x03\x15\x16\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04.\n\x0c\n\- \x05\x04\0\x02\x01\x06\x12\x03\x04\x04\x16\n\x0c\n\x05\x04\0\x02\x01\x01\- \x12\x03\x04\x17)\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04,-\n\n\n\x02\- \x04\x01\x12\x04\x06\0\n\x01\n\n\n\x03\x04\x01\x01\x12\x03\x06\x08\x1a\n\- \x0b\n\x04\x04\x01\x02\0\x12\x03\x07\x04\x15\n\x0c\n\x05\x04\x01\x02\0\- \x05\x12\x03\x07\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x07\x0b\x10\- \n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x07\x13\x14\n\x0b\n\x04\x04\x01\- \x02\x01\x12\x03\x08\x04\x1e\n\x0c\n\x05\x04\x01\x02\x01\x06\x12\x03\x08\- \x04\x12\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x08\x13\x19\n\x0c\n\x05\- \x04\x01\x02\x01\x03\x12\x03\x08\x1c\x1d\n\x0b\n\x04\x04\x01\x02\x02\x12\- \x03\t\x04\x1e\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\t\x04\x08\n\x0c\n\- \x05\x04\x01\x02\x02\x01\x12\x03\t\t\x19\n\x0c\n\x05\x04\x01\x02\x02\x03\- \x12\x03\t\x1c\x1d\n\n\n\x02\x04\x02\x12\x04\x0b\0\x0e\x01\n\n\n\x03\x04\- \x02\x01\x12\x03\x0b\x08\x16\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x0c\x04\- \x1d\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\x0c\x04\n\n\x0c\n\x05\x04\x02\- \x02\0\x01\x12\x03\x0c\x0b\x18\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x0c\- \x1b\x1c\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\r\x04\x1c\n\x0c\n\x05\x04\- \x02\x02\x01\x05\x12\x03\r\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\- \r\x0b\x17\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\r\x1a\x1bb\x06proto3\+ untry_code\x18\x02\x20\x01(\tR\x0bcountryCodeb\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/lib-infra/Cargo.toml b/shared-lib/lib-infra/Cargo.tomlindex 705d70f18e..cf4a4115ef 100644--- a/shared-lib/lib-infra/Cargo.toml+++ b/shared-lib/lib-infra/Cargo.toml@@ -15,3 +15,10 @@ futures-core = { version = "0.3", default-features = false }tokio = { version = "1.0", features = ["time", "rt"] }rand = "0.8.3"+cmd_lib = { version = "1", optional = true }+cargo_toml = { version = "0.11", optional = true }+protoc-rust = { version = "2", optional = true }+walkdir = { version = "2", optional = true }++[features]+gen_pb = ["cmd_lib","cargo_toml", "protoc-rust", "walkdir"]\ No newline at end of filediff --git a/shared-lib/lib-infra/src/lib.rs b/shared-lib/lib-infra/src/lib.rsindex 0e4beae90c..f8dc092f7e 100644--- a/shared-lib/lib-infra/src/lib.rs+++ b/shared-lib/lib-infra/src/lib.rs@@ -1,6 +1,9 @@pub mod future;pub mod retry;+#[cfg(feature = "gen_pb")]+pub mod pb;+#[allow(dead_code)]pub fn uuid_string() -> String {uuid::Uuid::new_v4().to_string()diff --git a/shared-lib/lib-infra/src/pb.rs b/shared-lib/lib-infra/src/pb.rsnew file mode 100644index 0000000000..3d30167bbc--- /dev/null+++ b/shared-lib/lib-infra/src/pb.rs@@ -0,0 +1,38 @@+use walkdir::WalkDir;++pub fn gen(name: &str, root: &str) {+ let mut paths = vec![];+ for path in WalkDir::new(root)+ .into_iter()+ .filter_map(|e| e.ok())+ .map(|e| e.path().to_str().unwrap().to_string())+ {+ if path.ends_with(".proto") {+ // https://stackoverflow.com/questions/49077147/how-can-i-force-build-rs-to-run-again-without-cleaning-my-whole-project+ println!("cargo:rerun-if-changed={}", path);+ paths.push(path);+ }+ }+ let flutter_pb_path = format!(+ "{}/{}/{}",+ env!("CARGO_MAKE_WORKING_DIRECTORY"),+ env!("FLUTTER_FLOWY_SDK_PATH"),+ name+ );+ paths.iter().for_each(|path| {+ if cmd_lib::run_cmd! {+ protoc --dart_out=${flutter_pb_path} --proto_path=${root} ${path}+ }+ .is_err()+ {+ panic!("Run flutter protoc fail")+ };+ });++ protoc_rust::Codegen::new()+ .out_dir("./src/protobuf/model")+ .inputs(&paths)+ .include(root)+ .run()+ .expect("Running protoc failed.");+}diff --git a/shared-lib/lib-ws/Cargo.toml b/shared-lib/lib-ws/Cargo.tomlindex 9094e3a334..5d3972f4db 100644--- a/shared-lib/lib-ws/Cargo.toml+++ b/shared-lib/lib-ws/Cargo.toml@@ -27,6 +27,9 @@ strum_macros = "0.21"parking_lot = "0.11"dashmap = "4.0"+[build-dependencies]+lib-infra = { path = "../lib-infra", features = ["gen_pb"] }+[dev-dependencies]tokio = {version = "1", features = ["full"]}env_logger = "0.8.2"\ No newline at end of filediff --git a/shared-lib/lib-ws/build.rs b/shared-lib/lib-ws/build.rsnew file mode 100644index 0000000000..e527a83276--- /dev/null+++ b/shared-lib/lib-ws/build.rs@@ -0,0 +1,5 @@+use lib_infra::pb;++fn main() {+ pb::gen("lib-ws", "./src/protobuf/proto");+}diff --git a/shared-lib/lib-ws/src/protobuf/model/errors.rs b/shared-lib/lib-ws/src/protobuf/model/errors.rsindex 1f4e8a0bec..0df21d613a 100644--- a/shared-lib/lib-ws/src/protobuf/model/errors.rs+++ b/shared-lib/lib-ws/src/protobuf/model/errors.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct WSError {@@ -270,22 +270,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\n\x0cerrors.proto\";\n\x07WSError\x12\x1e\n\x04code\x18\x01\x20\x01(\\x0e2\n.ErrorCodeR\x04code\x12\x10\n\x03msg\x18\x02\x20\x01(\tR\x03msg*H\\n\tErrorCode\x12\x11\n\rInternalError\x10\0\x12\x16\n\x12UnsupportedMes\- sage\x10\x01\x12\x10\n\x0cUnauthorized\x10\x02J\xab\x02\n\x06\x12\x04\0\- \0\n\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\- \x05\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x0f\n\x0b\n\x04\x04\0\x02\0\- \x12\x03\x03\x04\x17\n\x0c\n\x05\x04\0\x02\0\x06\x12\x03\x03\x04\r\n\x0c\- \n\x05\x04\0\x02\0\x01\x12\x03\x03\x0e\x12\n\x0c\n\x05\x04\0\x02\0\x03\- \x12\x03\x03\x15\x16\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\x13\n\x0c\- \n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\- \x12\x03\x04\x0b\x0e\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04\x11\x12\n\- \n\n\x02\x05\0\x12\x04\x06\0\n\x01\n\n\n\x03\x05\0\x01\x12\x03\x06\x05\- \x0e\n\x0b\n\x04\x05\0\x02\0\x12\x03\x07\x04\x16\n\x0c\n\x05\x05\0\x02\0\- \x01\x12\x03\x07\x04\x11\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x07\x14\x15\- \n\x0b\n\x04\x05\0\x02\x01\x12\x03\x08\x04\x1b\n\x0c\n\x05\x05\0\x02\x01\- \x01\x12\x03\x08\x04\x16\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x08\x19\- \x1a\n\x0b\n\x04\x05\0\x02\x02\x12\x03\t\x04\x15\n\x0c\n\x05\x05\0\x02\- \x02\x01\x12\x03\t\x04\x10\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\t\x13\- \x14b\x06proto3\+ sage\x10\x01\x12\x10\n\x0cUnauthorized\x10\x02b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;diff --git a/shared-lib/lib-ws/src/protobuf/model/msg.rs b/shared-lib/lib-ws/src/protobuf/model/msg.rsindex 0fcbb21ef9..0911d4e9b9 100644--- a/shared-lib/lib-ws/src/protobuf/model/msg.rs+++ b/shared-lib/lib-ws/src/protobuf/model/msg.rs@@ -1,4 +1,4 @@-// This file is generated by rust-protobuf 2.22.1. Do not edit+// This file is generated by rust-protobuf 2.25.2. Do not edit// @generated// https://github.com/rust-lang/rust-clippy/issues/702@@ -21,7 +21,7 @@/// Generated files are compatible only with the same version/// of protobuf runtime.-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;#[derive(PartialEq,Clone,Default)]pub struct WebSocketRawMessage {@@ -267,19 +267,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\\n\tmsg.proto\"O\n\x13WebSocketRawMessage\x12$\n\x07channel\x18\x01\x20\\x01(\x0e2\n.WSChannelR\x07channel\x12\x12\n\x04data\x18\x02\x20\x01(\\x0cR\x04data*%\n\tWSChannel\x12\x0c\n\x08Document\x10\0\x12\n\n\x06Fold\- er\x10\x01J\x82\x02\n\x06\x12\x04\0\0\t\x01\n\x08\n\x01\x0c\x12\x03\0\0\- \x12\n\n\n\x02\x04\0\x12\x04\x02\0\x05\x01\n\n\n\x03\x04\0\x01\x12\x03\- \x02\x08\x1b\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x1a\n\x0c\n\x05\x04\- \0\x02\0\x06\x12\x03\x03\x04\r\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\- \x0e\x15\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x18\x19\n\x0b\n\x04\x04\- \0\x02\x01\x12\x03\x04\x04\x13\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\- \x04\t\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\n\x0e\n\x0c\n\x05\x04\0\- \x02\x01\x03\x12\x03\x04\x11\x12\n\n\n\x02\x05\0\x12\x04\x06\0\t\x01\n\n\- \n\x03\x05\0\x01\x12\x03\x06\x05\x0e\n\x0b\n\x04\x05\0\x02\0\x12\x03\x07\- \x04\x11\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x07\x04\x0c\n\x0c\n\x05\x05\- \0\x02\0\x02\x12\x03\x07\x0f\x10\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x08\- \x04\x0f\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x08\x04\n\n\x0c\n\x05\x05\- \0\x02\x01\x02\x12\x03\x08\r\x0eb\x06proto3\+ er\x10\x01b\x06proto3\";static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;