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",
|
||||
]
|
||||
|
||||
[[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]]
|
||||
name = "flowy-collaboration"
|
||||
version = "0.1.0"
|
||||
@ -901,51 +946,6 @@ dependencies = [
|
||||
"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]]
|
||||
name = "flowy-error"
|
||||
version = "0.1.0"
|
||||
@ -988,10 +988,10 @@ dependencies = [
|
||||
"derive_more",
|
||||
"diesel",
|
||||
"diesel_derives",
|
||||
"flowy-block",
|
||||
"flowy-collaboration",
|
||||
"flowy-database",
|
||||
"flowy-derive",
|
||||
"flowy-document",
|
||||
"flowy-error",
|
||||
"flowy-folder",
|
||||
"flowy-folder-data-model",
|
||||
@ -1047,9 +1047,9 @@ dependencies = [
|
||||
"bytes",
|
||||
"config",
|
||||
"dashmap",
|
||||
"flowy-block",
|
||||
"flowy-collaboration",
|
||||
"flowy-derive",
|
||||
"flowy-document",
|
||||
"flowy-error",
|
||||
"flowy-folder",
|
||||
"flowy-folder-data-model",
|
||||
@ -1083,9 +1083,9 @@ dependencies = [
|
||||
"bytes",
|
||||
"claim 0.5.0",
|
||||
"color-eyre",
|
||||
"flowy-block",
|
||||
"flowy-collaboration",
|
||||
"flowy-database",
|
||||
"flowy-document",
|
||||
"flowy-folder",
|
||||
"flowy-net",
|
||||
"flowy-sync",
|
||||
|
@ -11,7 +11,7 @@ members = [
|
||||
"flowy-database",
|
||||
"flowy-folder",
|
||||
"dart-notify",
|
||||
"flowy-document",
|
||||
"flowy-block",
|
||||
"flowy-error",
|
||||
"flowy-sync",
|
||||
]
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
[package]
|
||||
name = "flowy-document"
|
||||
name = "flowy-block"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
@ -46,7 +46,7 @@ pin-project = "1.0.0"
|
||||
|
||||
[dev-dependencies]
|
||||
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 }
|
||||
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_document::block_editor::ClientBlockEditor;
|
||||
use flowy_document::DOCUMENT_SYNC_INTERVAL_IN_MILLIS;
|
||||
use flowy_test::{helper::ViewTest, FlowySDKTest};
|
||||
use lib_ot::{core::Interval, rich_text::RichTextDelta};
|
||||
use std::sync::Arc;
|
@ -12,7 +12,7 @@ flowy-derive = { path = "../../../shared-lib/flowy-derive" }
|
||||
lib-ot = { path = "../../../shared-lib/lib-ot" }
|
||||
lib-infra = { path = "../../../shared-lib/lib-infra" }
|
||||
|
||||
flowy-document = { path = "../flowy-document" }
|
||||
flowy-block = { path = "../flowy-block" }
|
||||
flowy-database = { path = "../flowy-database" }
|
||||
flowy-error = { path = "../flowy-error", features = ["db", "http_server"]}
|
||||
dart-notify = { path = "../dart-notify" }
|
||||
|
@ -5,8 +5,8 @@ use flowy_folder_data_model::user_default;
|
||||
use flowy_sync::RevisionWebSocket;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
use flowy_block::BlockManager;
|
||||
use flowy_collaboration::{client_folder::FolderPad, entities::ws_data::ServerRevisionWSData};
|
||||
use flowy_document::BlockManager;
|
||||
|
||||
use flowy_collaboration::entities::revision::{RepeatedRevision, Revision};
|
||||
use std::{collections::HashMap, convert::TryInto, fmt::Formatter, sync::Arc};
|
||||
|
@ -21,8 +21,8 @@ use crate::{
|
||||
TrashController, TrashEvent,
|
||||
},
|
||||
};
|
||||
use flowy_block::BlockManager;
|
||||
use flowy_database::kv::KV;
|
||||
use flowy_document::BlockManager;
|
||||
use flowy_folder_data_model::entities::share::{ExportData, ExportParams};
|
||||
|
||||
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-folder = { path = "../flowy-folder" }
|
||||
flowy-user = { path = "../flowy-user" }
|
||||
flowy-document = { path = "../flowy-document" }
|
||||
flowy-block = { path = "../flowy-block" }
|
||||
lazy_static = "1.4.0"
|
||||
lib-infra = { path = "../../../shared-lib/lib-infra" }
|
||||
protobuf = {version = "2.18.0"}
|
||||
|
@ -2,8 +2,8 @@ use crate::{
|
||||
configuration::*,
|
||||
request::{HttpRequestBuilder, ResponseMiddleware},
|
||||
};
|
||||
use flowy_block::BlockCloudService;
|
||||
use flowy_collaboration::entities::document_info::{BlockId, BlockInfo, CreateBlockParams, ResetDocumentParams};
|
||||
use flowy_document::BlockCloudService;
|
||||
use flowy_error::FlowyError;
|
||||
use http_flowy::response::FlowyResponse;
|
||||
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::{
|
||||
app::{App, AppId, CreateAppParams, RepeatedApp, UpdateAppParams},
|
||||
trash::{RepeatedTrash, RepeatedTrashId},
|
||||
|
@ -12,7 +12,7 @@ flowy-user = { path = "../flowy-user" }
|
||||
flowy-net = { path = "../flowy-net" }
|
||||
flowy-folder = { path = "../flowy-folder", default-features = false }
|
||||
flowy-database = { path = "../flowy-database" }
|
||||
flowy-document = { path = "../flowy-document" }
|
||||
flowy-block = { path = "../flowy-block" }
|
||||
flowy-sync = { path = "../flowy-sync" }
|
||||
|
||||
tracing = { version = "0.1" }
|
||||
@ -37,6 +37,6 @@ tokio = { version = "1", features = ["full"]}
|
||||
futures-util = "0.3.15"
|
||||
|
||||
[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"]
|
||||
dart = ["flowy-user/dart", "flowy-net/dart", "flowy-folder/dart", "flowy-collaboration/dart"]
|
||||
|
@ -1,10 +1,10 @@
|
||||
use bytes::Bytes;
|
||||
use flowy_collaboration::entities::ws_data::ClientRevisionWSData;
|
||||
use flowy_database::ConnectionPool;
|
||||
use flowy_document::{
|
||||
use flowy_block::{
|
||||
errors::{internal_error, FlowyError},
|
||||
BlockCloudService, BlockManager, BlockUser,
|
||||
};
|
||||
use flowy_collaboration::entities::ws_data::ClientRevisionWSData;
|
||||
use flowy_database::ConnectionPool;
|
||||
use flowy_net::ClientServerConfiguration;
|
||||
use flowy_net::{
|
||||
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 std::{convert::TryInto, path::Path, sync::Arc};
|
||||
|
||||
pub struct DocumentDepsResolver();
|
||||
impl DocumentDepsResolver {
|
||||
pub struct BlockDepsResolver();
|
||||
impl BlockDepsResolver {
|
||||
pub fn resolve(
|
||||
local_server: Option<Arc<LocalServer>>,
|
||||
ws_conn: Arc<FlowyWebSocketConnect>,
|
@ -1,7 +1,7 @@
|
||||
use bytes::Bytes;
|
||||
use flowy_block::BlockManager;
|
||||
use flowy_collaboration::entities::ws_data::ClientRevisionWSData;
|
||||
use flowy_database::ConnectionPool;
|
||||
use flowy_document::BlockManager;
|
||||
use flowy_folder::{
|
||||
controller::FolderManager,
|
||||
errors::{internal_error, FlowyError},
|
||||
|
@ -1,7 +1,7 @@
|
||||
mod document_deps;
|
||||
mod block_deps;
|
||||
mod folder_deps;
|
||||
mod user_deps;
|
||||
|
||||
pub use document_deps::*;
|
||||
pub use block_deps::*;
|
||||
pub use folder_deps::*;
|
||||
pub use user_deps::*;
|
||||
|
@ -3,7 +3,7 @@ pub mod module;
|
||||
pub use flowy_net::get_client_server_configuration;
|
||||
|
||||
use crate::deps_resolve::*;
|
||||
use flowy_document::BlockManager;
|
||||
use flowy_block::BlockManager;
|
||||
use flowy_folder::{controller::FolderManager, errors::FlowyError};
|
||||
use flowy_net::ClientServerConfiguration;
|
||||
use flowy_net::{
|
||||
@ -101,7 +101,7 @@ impl FlowySDK {
|
||||
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 = mk_user_session(&config, &local_server, &config.server_config);
|
||||
let document_manager = DocumentDepsResolver::resolve(
|
||||
let document_manager = BlockDepsResolver::resolve(
|
||||
local_server.clone(),
|
||||
ws_conn.clone(),
|
||||
user_session.clone(),
|
||||
|
Loading…
Reference in New Issue
Block a user