Refactor: delete unused crates (#2543)

* refactor: delete user model

* refactor: delete user model crate

* refactor: rm flowy-server-sync crate

* refactor: rm flowy-database and flowy-folder

* refactor: rm folder-model

* refactor: rm database model

* refactor: rm flowy-sync

* refactor: rm document-model

* refactor: rm flowy-document

* refactor: rm flowy-client-sync

* refactor: rm ws-model

* refactor: rm flowy-revisoin

* refactor: rm revision-model

* refactor: rm flowy-folder

* refactor: rm flowy-client-ws

* refactor: move crates

* chore: move configuration file

* ci: fix tauri build'

* ci: fix flutter build

* ci: rust test script

* ci: tauri pnpm version conflict

* ci: tauri build
This commit is contained in:
Nathan.fooo
2023-05-17 09:49:39 +08:00
committed by GitHub
parent 2202326278
commit bc66f43f47
514 changed files with 2274 additions and 55304 deletions

View File

@ -1,17 +1,18 @@
pub mod event_builder;
pub mod helper;
use nanoid::nanoid;
use flowy_core::{AppFlowyCore, AppFlowyCoreConfig};
use flowy_net::http_server::self_host::configuration::get_client_server_configuration;
use flowy_user::entities::UserProfilePB;
use crate::helper::*;
use flowy_core::{AppFlowyCore, AppFlowyCoreConfig};
use flowy_document::entities::DocumentVersionPB;
use flowy_net::get_client_server_configuration;
use flowy_user::entities::UserProfilePB;
use nanoid::nanoid;
pub mod event_builder;
pub mod helper;
pub mod prelude {
pub use crate::{event_builder::*, helper::*, *};
pub use lib_dispatch::prelude::*;
pub use crate::{event_builder::*, helper::*, *};
}
#[derive(Clone)]
@ -29,16 +30,15 @@ impl std::ops::Deref for FlowySDKTest {
impl std::default::Default for FlowySDKTest {
fn default() -> Self {
Self::new(DocumentVersionPB::V0)
Self::new()
}
}
impl FlowySDKTest {
pub fn new(document_version: DocumentVersionPB) -> Self {
pub fn new() -> Self {
let server_config = get_client_server_configuration().unwrap();
let config = AppFlowyCoreConfig::new(&root_dir(), nanoid!(6), server_config)
.with_document_version(document_version)
.log_filter("info", vec![]);
let config =
AppFlowyCoreConfig::new(&root_dir(), nanoid!(6), server_config).log_filter("info", vec![]);
let sdk = std::thread::spawn(|| AppFlowyCore::new(config))
.join()
.unwrap();
@ -55,8 +55,4 @@ impl FlowySDKTest {
init_user_setting(self.inner.dispatcher()).await;
context.user_profile
}
pub fn document_version(&self) -> DocumentVersionPB {
self.inner.config.document.version.clone()
}
}