diff --git a/frontend/rust-lib/dart-ffi/Flowy.toml b/frontend/rust-lib/dart-ffi/Flowy.toml index 47ee93d904..9b73c04823 100644 --- a/frontend/rust-lib/dart-ffi/Flowy.toml +++ b/frontend/rust-lib/dart-ffi/Flowy.toml @@ -1,4 +1,2 @@ +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/model"] -#proto_output = "resources/proto" -#protobuf_crate_path = "src/protobuf" -event_files = [] \ No newline at end of file diff --git a/frontend/rust-lib/dart-notify/Flowy.toml b/frontend/rust-lib/dart-notify/Flowy.toml index fd35d807ea..e27d1eaf3d 100644 --- a/frontend/rust-lib/dart-notify/Flowy.toml +++ b/frontend/rust-lib/dart-notify/Flowy.toml @@ -1,5 +1,2 @@ - +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/entities"] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" -event_files = [] \ No newline at end of file diff --git a/frontend/rust-lib/flowy-error/Flowy.toml b/frontend/rust-lib/flowy-error/Flowy.toml index 8f8b6312e7..8794b0b7d5 100644 --- a/frontend/rust-lib/flowy-error/Flowy.toml +++ b/frontend/rust-lib/flowy-error/Flowy.toml @@ -1,5 +1,3 @@ +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/errors.rs",] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" -event_files = [] \ No newline at end of file diff --git a/frontend/rust-lib/flowy-folder/Flowy.toml b/frontend/rust-lib/flowy-folder/Flowy.toml index 373884561a..7ca5466b30 100644 --- a/frontend/rust-lib/flowy-folder/Flowy.toml +++ b/frontend/rust-lib/flowy-folder/Flowy.toml @@ -1,5 +1,3 @@ - +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/entities", "src/event_map.rs", "src/dart_notification.rs"] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" event_files = ["src/event_map.rs"] \ No newline at end of file diff --git a/frontend/rust-lib/flowy-grid/Flowy.toml b/frontend/rust-lib/flowy-grid/Flowy.toml index b4f2b865a5..00e9cf7c04 100644 --- a/frontend/rust-lib/flowy-grid/Flowy.toml +++ b/frontend/rust-lib/flowy-grid/Flowy.toml @@ -1,9 +1,8 @@ +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = [ "src/event_map.rs", "src/services/field/type_options", "src/entities", "src/dart_notification.rs" ] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" event_files = ["src/event_map.rs"] \ No newline at end of file diff --git a/frontend/rust-lib/flowy-net/Flowy.toml b/frontend/rust-lib/flowy-net/Flowy.toml index eae4b3bdf6..cf8a73600d 100644 --- a/frontend/rust-lib/flowy-net/Flowy.toml +++ b/frontend/rust-lib/flowy-net/Flowy.toml @@ -1,4 +1,3 @@ +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/event_map.rs", "src/entities"] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" event_files = ["src/event_map.rs"] \ No newline at end of file diff --git a/frontend/rust-lib/flowy-text-block/Flowy.toml b/frontend/rust-lib/flowy-text-block/Flowy.toml index a9ba87c567..0dbe74b3e3 100644 --- a/frontend/rust-lib/flowy-text-block/Flowy.toml +++ b/frontend/rust-lib/flowy-text-block/Flowy.toml @@ -1,5 +1,3 @@ - +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/event_map.rs", "src/entities.rs"] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" event_files = ["src/event_map.rs"] \ No newline at end of file diff --git a/frontend/rust-lib/flowy-user/Flowy.toml b/frontend/rust-lib/flowy-user/Flowy.toml index a66b5e214d..9994320410 100644 --- a/frontend/rust-lib/flowy-user/Flowy.toml +++ b/frontend/rust-lib/flowy-user/Flowy.toml @@ -1,5 +1,3 @@ - +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/event_map.rs", "src/dart_notification.rs"] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" event_files = ["src/event_map.rs"] \ No newline at end of file diff --git a/shared-lib/flowy-error-code/Flowy.toml b/shared-lib/flowy-error-code/Flowy.toml index 30674e4364..cdd9dd95ff 100644 --- a/shared-lib/flowy-error-code/Flowy.toml +++ b/shared-lib/flowy-error-code/Flowy.toml @@ -1,5 +1,2 @@ - +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/code.rs"] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" -event_files = [] \ No newline at end of file diff --git a/shared-lib/flowy-folder-data-model/Flowy.toml b/shared-lib/flowy-folder-data-model/Flowy.toml index 8385068a56..e98441c877 100644 --- a/shared-lib/flowy-folder-data-model/Flowy.toml +++ b/shared-lib/flowy-folder-data-model/Flowy.toml @@ -1,5 +1,2 @@ - +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/entities",] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" -event_files = [] \ No newline at end of file diff --git a/shared-lib/flowy-grid-data-model/Flowy.toml b/shared-lib/flowy-grid-data-model/Flowy.toml index 48e8084a60..7e493fc841 100644 --- a/shared-lib/flowy-grid-data-model/Flowy.toml +++ b/shared-lib/flowy-grid-data-model/Flowy.toml @@ -1,5 +1,2 @@ - +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/entities/",] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" -event_files = [] \ No newline at end of file diff --git a/shared-lib/flowy-sync/Flowy.toml b/shared-lib/flowy-sync/Flowy.toml index fd35d807ea..e27d1eaf3d 100644 --- a/shared-lib/flowy-sync/Flowy.toml +++ b/shared-lib/flowy-sync/Flowy.toml @@ -1,5 +1,2 @@ - +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/entities"] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" -event_files = [] \ No newline at end of file diff --git a/shared-lib/flowy-user-data-model/Flowy.toml b/shared-lib/flowy-user-data-model/Flowy.toml index 0939516deb..5e3ca53bf2 100644 --- a/shared-lib/flowy-user-data-model/Flowy.toml +++ b/shared-lib/flowy-user-data-model/Flowy.toml @@ -1,5 +1,2 @@ - +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/entities", "src/errors.rs"] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" -event_files = [] \ No newline at end of file diff --git a/shared-lib/lib-infra/src/code_gen/flowy_toml.rs b/shared-lib/lib-infra/src/code_gen/flowy_toml.rs index af199d0f78..c7a07bed73 100644 --- a/shared-lib/lib-infra/src/code_gen/flowy_toml.rs +++ b/shared-lib/lib-infra/src/code_gen/flowy_toml.rs @@ -3,8 +3,11 @@ use std::path::{Path, PathBuf}; #[derive(serde::Deserialize, Clone, Debug)] pub struct FlowyConfig { + #[serde(default)] pub event_files: Vec, + // Collect AST from the file or directory specified by proto_input to generate the proto files. + #[serde(default)] pub proto_input: Vec, // Output path for the generated proto files. The default value is default_proto_output() diff --git a/shared-lib/lib-ws/Flowy.toml b/shared-lib/lib-ws/Flowy.toml index 532d5fb239..a1f5aad68d 100644 --- a/shared-lib/lib-ws/Flowy.toml +++ b/shared-lib/lib-ws/Flowy.toml @@ -1,4 +1,2 @@ +# Check out the FlowyConfig (located in flowy_toml.rs) for more details. proto_input = ["src/errors.rs", "src/msg.rs"] -proto_output = "resources/proto" -protobuf_crate_path = "src/protobuf" -event_files = [] \ No newline at end of file