From ba67652e2981ae886143dccfe646b35b0ad57dd5 Mon Sep 17 00:00:00 2001 From: appflowy Date: Fri, 19 Nov 2021 15:00:51 +0800 Subject: [PATCH] [rust]: update dart-notify crate name --- backend/Cargo.toml | 2 +- backend/tests/util/helper.rs | 2 +- rust-lib/Cargo.toml | 2 +- rust-lib/{flowy-backend-api => backend-api}/Cargo.toml | 2 +- rust-lib/{flowy-backend-api => backend-api}/src/lib.rs | 0 rust-lib/{flowy-backend-api => backend-api}/src/middleware.rs | 0 .../{flowy-backend-api => backend-api}/src/user_request.rs | 0 .../src/workspace_request.rs | 0 rust-lib/dart-ffi/Cargo.toml | 4 ++-- rust-lib/dart-ffi/src/lib.rs | 2 +- rust-lib/dart-notify/Cargo.toml | 2 +- rust-lib/flowy-document/Cargo.toml | 2 +- rust-lib/flowy-document/src/notify/observable.rs | 2 +- rust-lib/flowy-user/Cargo.toml | 4 ++-- rust-lib/flowy-user/src/notify/observable.rs | 2 +- rust-lib/flowy-user/src/services/server/server_api.rs | 2 +- rust-lib/flowy-workspace/Cargo.toml | 4 ++-- rust-lib/flowy-workspace/src/notify/observable.rs | 2 +- rust-lib/flowy-workspace/src/services/server/server_api.rs | 2 +- 19 files changed, 18 insertions(+), 18 deletions(-) rename rust-lib/{flowy-backend-api => backend-api}/Cargo.toml (93%) rename rust-lib/{flowy-backend-api => backend-api}/src/lib.rs (100%) rename rust-lib/{flowy-backend-api => backend-api}/src/middleware.rs (100%) rename rust-lib/{flowy-backend-api => backend-api}/src/user_request.rs (100%) rename rust-lib/{flowy-backend-api => backend-api}/src/workspace_request.rs (100%) diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 68271e079b..7c36687bc5 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -99,7 +99,7 @@ parking_lot = "0.11" once_cell = "1.7.2" linkify = "0.5.0" backend = { path = ".", features = ["flowy_test"]} -flowy-backend-api = { path = "../rust-lib/flowy-backend-api"} +backend-api = { path = "../rust-lib/backend-api" } flowy-sdk = { path = "../rust-lib/flowy-sdk", features = ["http_server"] } flowy-user = { path = "../rust-lib/flowy-user", features = ["http_server"] } flowy-document = { path = "../rust-lib/flowy-document", features = ["flowy_test", "http_server"] } diff --git a/backend/tests/util/helper.rs b/backend/tests/util/helper.rs index 9a242a32a8..3e562def79 100644 --- a/backend/tests/util/helper.rs +++ b/backend/tests/util/helper.rs @@ -3,7 +3,7 @@ use backend::{ config::{get_configuration, DatabaseSettings}, context::AppContext, }; -use flowy_backend_api::{user_request::*, workspace_request::*}; +use backend_api::{user_request::*, workspace_request::*}; use flowy_document::services::server::read_doc_request; use flowy_document_infra::entities::doc::{Doc, DocIdentifier}; use flowy_net::errors::ServerError; diff --git a/rust-lib/Cargo.toml b/rust-lib/Cargo.toml index 21f1e6864d..c27fbd122b 100644 --- a/rust-lib/Cargo.toml +++ b/rust-lib/Cargo.toml @@ -20,7 +20,7 @@ members = [ "lib-ot", "flowy-net", "lib-ws", - "flowy-backend-api", + "backend-api", ] exclude = ["../backend"] diff --git a/rust-lib/flowy-backend-api/Cargo.toml b/rust-lib/backend-api/Cargo.toml similarity index 93% rename from rust-lib/flowy-backend-api/Cargo.toml rename to rust-lib/backend-api/Cargo.toml index 4a5995ea5d..73992bd5b0 100644 --- a/rust-lib/flowy-backend-api/Cargo.toml +++ b/rust-lib/backend-api/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "flowy-backend-api" +name = "backend-api" version = "0.1.0" edition = "2018" diff --git a/rust-lib/flowy-backend-api/src/lib.rs b/rust-lib/backend-api/src/lib.rs similarity index 100% rename from rust-lib/flowy-backend-api/src/lib.rs rename to rust-lib/backend-api/src/lib.rs diff --git a/rust-lib/flowy-backend-api/src/middleware.rs b/rust-lib/backend-api/src/middleware.rs similarity index 100% rename from rust-lib/flowy-backend-api/src/middleware.rs rename to rust-lib/backend-api/src/middleware.rs diff --git a/rust-lib/flowy-backend-api/src/user_request.rs b/rust-lib/backend-api/src/user_request.rs similarity index 100% rename from rust-lib/flowy-backend-api/src/user_request.rs rename to rust-lib/backend-api/src/user_request.rs diff --git a/rust-lib/flowy-backend-api/src/workspace_request.rs b/rust-lib/backend-api/src/workspace_request.rs similarity index 100% rename from rust-lib/flowy-backend-api/src/workspace_request.rs rename to rust-lib/backend-api/src/workspace_request.rs diff --git a/rust-lib/dart-ffi/Cargo.toml b/rust-lib/dart-ffi/Cargo.toml index 81715e8c35..c512c382d1 100644 --- a/rust-lib/dart-ffi/Cargo.toml +++ b/rust-lib/dart-ffi/Cargo.toml @@ -27,12 +27,12 @@ parking_lot = "0.11" lib-dispatch = {path = "../lib-dispatch" } flowy-sdk = {path = "../flowy-sdk"} flowy-derive = {path = "../flowy-derive"} -flowy-dart-notify = {path = "../dart-notify" } +dart-notify = {path = "../dart-notify" } flowy-net = {path = "../flowy-net"} [features] -flutter = ["flowy-dart-notify/dart"] +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 diff --git a/rust-lib/dart-ffi/src/lib.rs b/rust-lib/dart-ffi/src/lib.rs index 1c43b83073..226c07f731 100644 --- a/rust-lib/dart-ffi/src/lib.rs +++ b/rust-lib/dart-ffi/src/lib.rs @@ -61,7 +61,7 @@ pub extern "C" fn sync_command(input: *const u8, len: usize) -> *const u8 { #[no_mangle] pub extern "C" fn set_stream_port(port: i64) -> i32 { - flowy_dart_notify::dart::DartStreamSender::set_port(port); + dart_notify::dart::DartStreamSender::set_port(port); return 0; } diff --git a/rust-lib/dart-notify/Cargo.toml b/rust-lib/dart-notify/Cargo.toml index 516765ca40..aa25f0e9f9 100644 --- a/rust-lib/dart-notify/Cargo.toml +++ b/rust-lib/dart-notify/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "flowy-dart-notify" +name = "dart-notify" version = "0.1.0" edition = "2018" diff --git a/rust-lib/flowy-document/Cargo.toml b/rust-lib/flowy-document/Cargo.toml index a41d5be2ee..1f5eecb124 100644 --- a/rust-lib/flowy-document/Cargo.toml +++ b/rust-lib/flowy-document/Cargo.toml @@ -13,7 +13,7 @@ lib-dispatch = { path = "../lib-dispatch" } flowy-derive = { path = "../flowy-derive" } flowy-database = { path = "../flowy-database" } lib-infra = { path = "../lib-infra" } -flowy-dart-notify = { path = "../dart-notify" } +dart-notify = { path = "../dart-notify" } lib-ot = { path = "../lib-ot" } lib-ws = { path = "../lib-ws" } flowy-net = { path = "../flowy-net", features = ["flowy_request"] } diff --git a/rust-lib/flowy-document/src/notify/observable.rs b/rust-lib/flowy-document/src/notify/observable.rs index e867ec5d3b..12e04f92c8 100644 --- a/rust-lib/flowy-document/src/notify/observable.rs +++ b/rust-lib/flowy-document/src/notify/observable.rs @@ -1,4 +1,4 @@ -use flowy_dart_notify::DartNotifyBuilder; +use dart_notify::DartNotifyBuilder; use flowy_derive::ProtoBuf_Enum; const OBSERVABLE_CATEGORY: &'static str = "Doc"; #[derive(ProtoBuf_Enum, Debug)] diff --git a/rust-lib/flowy-user/Cargo.toml b/rust-lib/flowy-user/Cargo.toml index 663fa37c84..d4a8e102b2 100644 --- a/rust-lib/flowy-user/Cargo.toml +++ b/rust-lib/flowy-user/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] flowy-user-infra = { path = "../flowy-user-infra" } -flowy-backend-api = { path = "../flowy-backend-api" } +backend-api = { path = "../backend-api" } derive_more = {version = "0.99", features = ["display"]} lib-dispatch = { path = "../lib-dispatch" } flowy-derive = { path = "../flowy-derive" } @@ -16,7 +16,7 @@ lib-sqlite = { path = "../lib-sqlite" } lib-infra = { path = "../lib-infra" } flowy-net = { path = "../flowy-net", features = ["flowy_request"] } lib-ws = { path = "../lib-ws" } -flowy-dart-notify = { path = "../dart-notify" } +dart-notify = { path = "../dart-notify" } tracing = { version = "0.1", features = ["log"] } bytes = "1.0" diff --git a/rust-lib/flowy-user/src/notify/observable.rs b/rust-lib/flowy-user/src/notify/observable.rs index 9fedc90fa4..3812650327 100644 --- a/rust-lib/flowy-user/src/notify/observable.rs +++ b/rust-lib/flowy-user/src/notify/observable.rs @@ -1,6 +1,6 @@ use flowy_derive::ProtoBuf_Enum; -use flowy_dart_notify::DartNotifyBuilder; +use dart_notify::DartNotifyBuilder; const OBSERVABLE_CATEGORY: &'static str = "User"; diff --git a/rust-lib/flowy-user/src/services/server/server_api.rs b/rust-lib/flowy-user/src/services/server/server_api.rs index d08d3e00b8..346df33008 100644 --- a/rust-lib/flowy-user/src/services/server/server_api.rs +++ b/rust-lib/flowy-user/src/services/server/server_api.rs @@ -3,7 +3,7 @@ use crate::{ errors::UserError, services::server::UserServerAPI, }; -use flowy_backend_api::user_request::*; +use backend_api::user_request::*; use flowy_net::config::*; use lib_infra::future::ResultFuture; diff --git a/rust-lib/flowy-workspace/Cargo.toml b/rust-lib/flowy-workspace/Cargo.toml index 59450d3bd9..bed5db9859 100644 --- a/rust-lib/flowy-workspace/Cargo.toml +++ b/rust-lib/flowy-workspace/Cargo.toml @@ -14,10 +14,10 @@ flowy-derive = { path = "../flowy-derive" } flowy-database = { path = "../flowy-database" } lib-sqlite = { path = "../lib-sqlite" } lib-infra = { path = "../lib-infra" } -flowy-dart-notify = { path = "../dart-notify" } +dart-notify = { path = "../dart-notify" } lib-ot = { path = "../lib-ot" } flowy-net = { path = "../flowy-net", features = ["flowy_request"] } -flowy-backend-api = { path = "../flowy-backend-api"} +backend-api = { path = "../backend-api" } parking_lot = "0.11" protobuf = {version = "2.18.0"} diff --git a/rust-lib/flowy-workspace/src/notify/observable.rs b/rust-lib/flowy-workspace/src/notify/observable.rs index 340fc2156a..93b569a36b 100644 --- a/rust-lib/flowy-workspace/src/notify/observable.rs +++ b/rust-lib/flowy-workspace/src/notify/observable.rs @@ -1,4 +1,4 @@ -use flowy_dart_notify::DartNotifyBuilder; +use dart_notify::DartNotifyBuilder; use flowy_derive::ProtoBuf_Enum; const OBSERVABLE_CATEGORY: &'static str = "Workspace"; diff --git a/rust-lib/flowy-workspace/src/services/server/server_api.rs b/rust-lib/flowy-workspace/src/services/server/server_api.rs index 295c63a296..f88dd55458 100644 --- a/rust-lib/flowy-workspace/src/services/server/server_api.rs +++ b/rust-lib/flowy-workspace/src/services/server/server_api.rs @@ -9,7 +9,7 @@ use crate::{ notify::{send_dart_notification, WorkspaceNotification}, services::server::WorkspaceServerAPI, }; -use flowy_backend_api::{middleware::*, workspace_request::*}; +use backend_api::{middleware::*, workspace_request::*}; use flowy_net::config::ServerConfig; use flowy_workspace_infra::errors::ErrorCode; use lib_infra::future::ResultFuture;