mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
refactor: rename flowy-document to flowy-block
This commit is contained in:
parent
0e8ac4828b
commit
2e6dd39780
96
frontend/rust-lib/Cargo.lock
generated
96
frontend/rust-lib/Cargo.lock
generated
@ -847,6 +847,51 @@ dependencies = [
|
|||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "flowy-block"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"async-stream",
|
||||||
|
"async-trait",
|
||||||
|
"bytecount",
|
||||||
|
"byteorder",
|
||||||
|
"bytes",
|
||||||
|
"chrono",
|
||||||
|
"color-eyre",
|
||||||
|
"criterion",
|
||||||
|
"dart-notify",
|
||||||
|
"dashmap",
|
||||||
|
"derive_more",
|
||||||
|
"diesel",
|
||||||
|
"diesel_derives",
|
||||||
|
"flowy-block",
|
||||||
|
"flowy-collaboration",
|
||||||
|
"flowy-database",
|
||||||
|
"flowy-derive",
|
||||||
|
"flowy-error",
|
||||||
|
"flowy-sync",
|
||||||
|
"flowy-test",
|
||||||
|
"futures",
|
||||||
|
"futures-util",
|
||||||
|
"lib-dispatch",
|
||||||
|
"lib-infra",
|
||||||
|
"lib-ot",
|
||||||
|
"lib-ws",
|
||||||
|
"log",
|
||||||
|
"parking_lot",
|
||||||
|
"pin-project",
|
||||||
|
"protobuf",
|
||||||
|
"rand 0.7.3",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"strum",
|
||||||
|
"strum_macros",
|
||||||
|
"tokio",
|
||||||
|
"tracing",
|
||||||
|
"unicode-segmentation",
|
||||||
|
"url",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "flowy-collaboration"
|
name = "flowy-collaboration"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
@ -901,51 +946,6 @@ dependencies = [
|
|||||||
"walkdir",
|
"walkdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "flowy-document"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"async-stream",
|
|
||||||
"async-trait",
|
|
||||||
"bytecount",
|
|
||||||
"byteorder",
|
|
||||||
"bytes",
|
|
||||||
"chrono",
|
|
||||||
"color-eyre",
|
|
||||||
"criterion",
|
|
||||||
"dart-notify",
|
|
||||||
"dashmap",
|
|
||||||
"derive_more",
|
|
||||||
"diesel",
|
|
||||||
"diesel_derives",
|
|
||||||
"flowy-collaboration",
|
|
||||||
"flowy-database",
|
|
||||||
"flowy-derive",
|
|
||||||
"flowy-document",
|
|
||||||
"flowy-error",
|
|
||||||
"flowy-sync",
|
|
||||||
"flowy-test",
|
|
||||||
"futures",
|
|
||||||
"futures-util",
|
|
||||||
"lib-dispatch",
|
|
||||||
"lib-infra",
|
|
||||||
"lib-ot",
|
|
||||||
"lib-ws",
|
|
||||||
"log",
|
|
||||||
"parking_lot",
|
|
||||||
"pin-project",
|
|
||||||
"protobuf",
|
|
||||||
"rand 0.7.3",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"strum",
|
|
||||||
"strum_macros",
|
|
||||||
"tokio",
|
|
||||||
"tracing",
|
|
||||||
"unicode-segmentation",
|
|
||||||
"url",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "flowy-error"
|
name = "flowy-error"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
@ -988,10 +988,10 @@ dependencies = [
|
|||||||
"derive_more",
|
"derive_more",
|
||||||
"diesel",
|
"diesel",
|
||||||
"diesel_derives",
|
"diesel_derives",
|
||||||
|
"flowy-block",
|
||||||
"flowy-collaboration",
|
"flowy-collaboration",
|
||||||
"flowy-database",
|
"flowy-database",
|
||||||
"flowy-derive",
|
"flowy-derive",
|
||||||
"flowy-document",
|
|
||||||
"flowy-error",
|
"flowy-error",
|
||||||
"flowy-folder",
|
"flowy-folder",
|
||||||
"flowy-folder-data-model",
|
"flowy-folder-data-model",
|
||||||
@ -1047,9 +1047,9 @@ dependencies = [
|
|||||||
"bytes",
|
"bytes",
|
||||||
"config",
|
"config",
|
||||||
"dashmap",
|
"dashmap",
|
||||||
|
"flowy-block",
|
||||||
"flowy-collaboration",
|
"flowy-collaboration",
|
||||||
"flowy-derive",
|
"flowy-derive",
|
||||||
"flowy-document",
|
|
||||||
"flowy-error",
|
"flowy-error",
|
||||||
"flowy-folder",
|
"flowy-folder",
|
||||||
"flowy-folder-data-model",
|
"flowy-folder-data-model",
|
||||||
@ -1083,9 +1083,9 @@ dependencies = [
|
|||||||
"bytes",
|
"bytes",
|
||||||
"claim 0.5.0",
|
"claim 0.5.0",
|
||||||
"color-eyre",
|
"color-eyre",
|
||||||
|
"flowy-block",
|
||||||
"flowy-collaboration",
|
"flowy-collaboration",
|
||||||
"flowy-database",
|
"flowy-database",
|
||||||
"flowy-document",
|
|
||||||
"flowy-folder",
|
"flowy-folder",
|
||||||
"flowy-net",
|
"flowy-net",
|
||||||
"flowy-sync",
|
"flowy-sync",
|
||||||
|
@ -11,7 +11,7 @@ members = [
|
|||||||
"flowy-database",
|
"flowy-database",
|
||||||
"flowy-folder",
|
"flowy-folder",
|
||||||
"dart-notify",
|
"dart-notify",
|
||||||
"flowy-document",
|
"flowy-block",
|
||||||
"flowy-error",
|
"flowy-error",
|
||||||
"flowy-sync",
|
"flowy-sync",
|
||||||
]
|
]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "flowy-document"
|
name = "flowy-block"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ pin-project = "1.0.0"
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
flowy-test = { path = "../flowy-test" }
|
flowy-test = { path = "../flowy-test" }
|
||||||
flowy-document = { path = "../flowy-document", features = ["flowy_unit_test"]}
|
flowy-block = { path = "../flowy-block", features = ["flowy_unit_test"]}
|
||||||
|
|
||||||
color-eyre = { version = "0.5", default-features = false }
|
color-eyre = { version = "0.5", default-features = false }
|
||||||
criterion = "0.3"
|
criterion = "0.3"
|
@ -1,6 +1,6 @@
|
|||||||
|
use flowy_block::block_editor::ClientBlockEditor;
|
||||||
|
use flowy_block::DOCUMENT_SYNC_INTERVAL_IN_MILLIS;
|
||||||
use flowy_collaboration::entities::revision::RevisionState;
|
use flowy_collaboration::entities::revision::RevisionState;
|
||||||
use flowy_document::block_editor::ClientBlockEditor;
|
|
||||||
use flowy_document::DOCUMENT_SYNC_INTERVAL_IN_MILLIS;
|
|
||||||
use flowy_test::{helper::ViewTest, FlowySDKTest};
|
use flowy_test::{helper::ViewTest, FlowySDKTest};
|
||||||
use lib_ot::{core::Interval, rich_text::RichTextDelta};
|
use lib_ot::{core::Interval, rich_text::RichTextDelta};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
@ -12,7 +12,7 @@ flowy-derive = { path = "../../../shared-lib/flowy-derive" }
|
|||||||
lib-ot = { path = "../../../shared-lib/lib-ot" }
|
lib-ot = { path = "../../../shared-lib/lib-ot" }
|
||||||
lib-infra = { path = "../../../shared-lib/lib-infra" }
|
lib-infra = { path = "../../../shared-lib/lib-infra" }
|
||||||
|
|
||||||
flowy-document = { path = "../flowy-document" }
|
flowy-block = { path = "../flowy-block" }
|
||||||
flowy-database = { path = "../flowy-database" }
|
flowy-database = { path = "../flowy-database" }
|
||||||
flowy-error = { path = "../flowy-error", features = ["db", "http_server"]}
|
flowy-error = { path = "../flowy-error", features = ["db", "http_server"]}
|
||||||
dart-notify = { path = "../dart-notify" }
|
dart-notify = { path = "../dart-notify" }
|
||||||
|
@ -5,8 +5,8 @@ use flowy_folder_data_model::user_default;
|
|||||||
use flowy_sync::RevisionWebSocket;
|
use flowy_sync::RevisionWebSocket;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
|
|
||||||
|
use flowy_block::BlockManager;
|
||||||
use flowy_collaboration::{client_folder::FolderPad, entities::ws_data::ServerRevisionWSData};
|
use flowy_collaboration::{client_folder::FolderPad, entities::ws_data::ServerRevisionWSData};
|
||||||
use flowy_document::BlockManager;
|
|
||||||
|
|
||||||
use flowy_collaboration::entities::revision::{RepeatedRevision, Revision};
|
use flowy_collaboration::entities::revision::{RepeatedRevision, Revision};
|
||||||
use std::{collections::HashMap, convert::TryInto, fmt::Formatter, sync::Arc};
|
use std::{collections::HashMap, convert::TryInto, fmt::Formatter, sync::Arc};
|
||||||
|
@ -21,8 +21,8 @@ use crate::{
|
|||||||
TrashController, TrashEvent,
|
TrashController, TrashEvent,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
use flowy_block::BlockManager;
|
||||||
use flowy_database::kv::KV;
|
use flowy_database::kv::KV;
|
||||||
use flowy_document::BlockManager;
|
|
||||||
use flowy_folder_data_model::entities::share::{ExportData, ExportParams};
|
use flowy_folder_data_model::entities::share::{ExportData, ExportParams};
|
||||||
|
|
||||||
use lib_infra::uuid_string;
|
use lib_infra::uuid_string;
|
||||||
|
@ -14,7 +14,7 @@ flowy-folder-data-model = { path = "../../../shared-lib/flowy-folder-data-model"
|
|||||||
flowy-user-data-model = { path = "../../../shared-lib/flowy-user-data-model"}
|
flowy-user-data-model = { path = "../../../shared-lib/flowy-user-data-model"}
|
||||||
flowy-folder = { path = "../flowy-folder" }
|
flowy-folder = { path = "../flowy-folder" }
|
||||||
flowy-user = { path = "../flowy-user" }
|
flowy-user = { path = "../flowy-user" }
|
||||||
flowy-document = { path = "../flowy-document" }
|
flowy-block = { path = "../flowy-block" }
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
lib-infra = { path = "../../../shared-lib/lib-infra" }
|
lib-infra = { path = "../../../shared-lib/lib-infra" }
|
||||||
protobuf = {version = "2.18.0"}
|
protobuf = {version = "2.18.0"}
|
||||||
|
@ -2,8 +2,8 @@ use crate::{
|
|||||||
configuration::*,
|
configuration::*,
|
||||||
request::{HttpRequestBuilder, ResponseMiddleware},
|
request::{HttpRequestBuilder, ResponseMiddleware},
|
||||||
};
|
};
|
||||||
|
use flowy_block::BlockCloudService;
|
||||||
use flowy_collaboration::entities::document_info::{BlockId, BlockInfo, CreateBlockParams, ResetDocumentParams};
|
use flowy_collaboration::entities::document_info::{BlockId, BlockInfo, CreateBlockParams, ResetDocumentParams};
|
||||||
use flowy_document::BlockCloudService;
|
|
||||||
use flowy_error::FlowyError;
|
use flowy_error::FlowyError;
|
||||||
use http_flowy::response::FlowyResponse;
|
use http_flowy::response::FlowyResponse;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
|
@ -248,7 +248,7 @@ impl RevisionUser for LocalRevisionUser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
use flowy_document::BlockCloudService;
|
use flowy_block::BlockCloudService;
|
||||||
use flowy_folder_data_model::entities::{
|
use flowy_folder_data_model::entities::{
|
||||||
app::{App, AppId, CreateAppParams, RepeatedApp, UpdateAppParams},
|
app::{App, AppId, CreateAppParams, RepeatedApp, UpdateAppParams},
|
||||||
trash::{RepeatedTrash, RepeatedTrashId},
|
trash::{RepeatedTrash, RepeatedTrashId},
|
||||||
|
@ -12,7 +12,7 @@ flowy-user = { path = "../flowy-user" }
|
|||||||
flowy-net = { path = "../flowy-net" }
|
flowy-net = { path = "../flowy-net" }
|
||||||
flowy-folder = { path = "../flowy-folder", default-features = false }
|
flowy-folder = { path = "../flowy-folder", default-features = false }
|
||||||
flowy-database = { path = "../flowy-database" }
|
flowy-database = { path = "../flowy-database" }
|
||||||
flowy-document = { path = "../flowy-document" }
|
flowy-block = { path = "../flowy-block" }
|
||||||
flowy-sync = { path = "../flowy-sync" }
|
flowy-sync = { path = "../flowy-sync" }
|
||||||
|
|
||||||
tracing = { version = "0.1" }
|
tracing = { version = "0.1" }
|
||||||
@ -37,6 +37,6 @@ tokio = { version = "1", features = ["full"]}
|
|||||||
futures-util = "0.3.15"
|
futures-util = "0.3.15"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
http_server = ["flowy-user/http_server", "flowy-folder/http_server", "flowy-document/http_server"]
|
http_server = ["flowy-user/http_server", "flowy-folder/http_server", "flowy-block/http_server"]
|
||||||
use_bunyan = ["lib-log/use_bunyan"]
|
use_bunyan = ["lib-log/use_bunyan"]
|
||||||
dart = ["flowy-user/dart", "flowy-net/dart", "flowy-folder/dart", "flowy-collaboration/dart"]
|
dart = ["flowy-user/dart", "flowy-net/dart", "flowy-folder/dart", "flowy-collaboration/dart"]
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use flowy_collaboration::entities::ws_data::ClientRevisionWSData;
|
use flowy_block::{
|
||||||
use flowy_database::ConnectionPool;
|
|
||||||
use flowy_document::{
|
|
||||||
errors::{internal_error, FlowyError},
|
errors::{internal_error, FlowyError},
|
||||||
BlockCloudService, BlockManager, BlockUser,
|
BlockCloudService, BlockManager, BlockUser,
|
||||||
};
|
};
|
||||||
|
use flowy_collaboration::entities::ws_data::ClientRevisionWSData;
|
||||||
|
use flowy_database::ConnectionPool;
|
||||||
use flowy_net::ClientServerConfiguration;
|
use flowy_net::ClientServerConfiguration;
|
||||||
use flowy_net::{
|
use flowy_net::{
|
||||||
http_server::document::BlockHttpCloudService, local_server::LocalServer, ws::connection::FlowyWebSocketConnect,
|
http_server::document::BlockHttpCloudService, local_server::LocalServer, ws::connection::FlowyWebSocketConnect,
|
||||||
@ -16,8 +16,8 @@ use lib_infra::future::BoxResultFuture;
|
|||||||
use lib_ws::{WSChannel, WSMessageReceiver, WebSocketRawMessage};
|
use lib_ws::{WSChannel, WSMessageReceiver, WebSocketRawMessage};
|
||||||
use std::{convert::TryInto, path::Path, sync::Arc};
|
use std::{convert::TryInto, path::Path, sync::Arc};
|
||||||
|
|
||||||
pub struct DocumentDepsResolver();
|
pub struct BlockDepsResolver();
|
||||||
impl DocumentDepsResolver {
|
impl BlockDepsResolver {
|
||||||
pub fn resolve(
|
pub fn resolve(
|
||||||
local_server: Option<Arc<LocalServer>>,
|
local_server: Option<Arc<LocalServer>>,
|
||||||
ws_conn: Arc<FlowyWebSocketConnect>,
|
ws_conn: Arc<FlowyWebSocketConnect>,
|
@ -1,7 +1,7 @@
|
|||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
|
use flowy_block::BlockManager;
|
||||||
use flowy_collaboration::entities::ws_data::ClientRevisionWSData;
|
use flowy_collaboration::entities::ws_data::ClientRevisionWSData;
|
||||||
use flowy_database::ConnectionPool;
|
use flowy_database::ConnectionPool;
|
||||||
use flowy_document::BlockManager;
|
|
||||||
use flowy_folder::{
|
use flowy_folder::{
|
||||||
controller::FolderManager,
|
controller::FolderManager,
|
||||||
errors::{internal_error, FlowyError},
|
errors::{internal_error, FlowyError},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
mod document_deps;
|
mod block_deps;
|
||||||
mod folder_deps;
|
mod folder_deps;
|
||||||
mod user_deps;
|
mod user_deps;
|
||||||
|
|
||||||
pub use document_deps::*;
|
pub use block_deps::*;
|
||||||
pub use folder_deps::*;
|
pub use folder_deps::*;
|
||||||
pub use user_deps::*;
|
pub use user_deps::*;
|
||||||
|
@ -3,7 +3,7 @@ pub mod module;
|
|||||||
pub use flowy_net::get_client_server_configuration;
|
pub use flowy_net::get_client_server_configuration;
|
||||||
|
|
||||||
use crate::deps_resolve::*;
|
use crate::deps_resolve::*;
|
||||||
use flowy_document::BlockManager;
|
use flowy_block::BlockManager;
|
||||||
use flowy_folder::{controller::FolderManager, errors::FlowyError};
|
use flowy_folder::{controller::FolderManager, errors::FlowyError};
|
||||||
use flowy_net::ClientServerConfiguration;
|
use flowy_net::ClientServerConfiguration;
|
||||||
use flowy_net::{
|
use flowy_net::{
|
||||||
@ -101,7 +101,7 @@ impl FlowySDK {
|
|||||||
let (local_server, ws_conn) = mk_local_server(&config.server_config);
|
let (local_server, ws_conn) = mk_local_server(&config.server_config);
|
||||||
let (user_session, document_manager, folder_manager, local_server) = runtime.block_on(async {
|
let (user_session, document_manager, folder_manager, local_server) = runtime.block_on(async {
|
||||||
let user_session = mk_user_session(&config, &local_server, &config.server_config);
|
let user_session = mk_user_session(&config, &local_server, &config.server_config);
|
||||||
let document_manager = DocumentDepsResolver::resolve(
|
let document_manager = BlockDepsResolver::resolve(
|
||||||
local_server.clone(),
|
local_server.clone(),
|
||||||
ws_conn.clone(),
|
ws_conn.clone(),
|
||||||
user_session.clone(),
|
user_session.clone(),
|
||||||
|
Loading…
Reference in New Issue
Block a user