瀏覽代碼

chore: provider default for FlowyConfig propertis

appflowy 2 年之前
父節點
當前提交
ed138abcc3

+ 1 - 3
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 = []

+ 1 - 4
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 = []

+ 1 - 3
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 = []

+ 1 - 3
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"]

+ 1 - 2
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"]

+ 1 - 2
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"]

+ 1 - 3
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"]

+ 1 - 3
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"]

+ 1 - 4
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 = []

+ 1 - 4
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 = []

+ 1 - 4
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 = []

+ 1 - 4
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 = []

+ 1 - 4
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 = []

+ 3 - 0
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<String>,
+
     // Collect AST from the file or directory specified by proto_input to generate the proto files.
+    #[serde(default)]
     pub proto_input: Vec<String>,
 
     // Output path for the generated proto files. The default value is default_proto_output()

+ 1 - 3
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 = []