Merge branch 'main' into feat/custom-namespace-change-publish-name
This commit is contained in:
commit
f13916a49a
|
|
@ -2239,7 +2239,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "collab"
|
name = "collab"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3493d8ca30850d1ee84f5ba1f6d7b673614b172e#3493d8ca30850d1ee84f5ba1f6d7b673614b172e"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ded99c0bf6f41089c87de9a718c784c00b8255e5#ded99c0bf6f41089c87de9a718c784c00b8255e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
|
@ -2264,7 +2264,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-database"
|
name = "collab-database"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3493d8ca30850d1ee84f5ba1f6d7b673614b172e#3493d8ca30850d1ee84f5ba1f6d7b673614b172e"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ded99c0bf6f41089c87de9a718c784c00b8255e5#ded99c0bf6f41089c87de9a718c784c00b8255e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
|
@ -2303,7 +2303,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-document"
|
name = "collab-document"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3493d8ca30850d1ee84f5ba1f6d7b673614b172e#3493d8ca30850d1ee84f5ba1f6d7b673614b172e"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ded99c0bf6f41089c87de9a718c784c00b8255e5#ded99c0bf6f41089c87de9a718c784c00b8255e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
|
@ -2324,7 +2324,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-entity"
|
name = "collab-entity"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3493d8ca30850d1ee84f5ba1f6d7b673614b172e#3493d8ca30850d1ee84f5ba1f6d7b673614b172e"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ded99c0bf6f41089c87de9a718c784c00b8255e5#ded99c0bf6f41089c87de9a718c784c00b8255e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -2344,7 +2344,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-folder"
|
name = "collab-folder"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3493d8ca30850d1ee84f5ba1f6d7b673614b172e#3493d8ca30850d1ee84f5ba1f6d7b673614b172e"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ded99c0bf6f41089c87de9a718c784c00b8255e5#ded99c0bf6f41089c87de9a718c784c00b8255e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
|
@ -2366,7 +2366,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-importer"
|
name = "collab-importer"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3493d8ca30850d1ee84f5ba1f6d7b673614b172e#3493d8ca30850d1ee84f5ba1f6d7b673614b172e"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ded99c0bf6f41089c87de9a718c784c00b8255e5#ded99c0bf6f41089c87de9a718c784c00b8255e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-recursion",
|
"async-recursion",
|
||||||
|
|
@ -2469,7 +2469,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "collab-user"
|
name = "collab-user"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=3493d8ca30850d1ee84f5ba1f6d7b673614b172e#3493d8ca30850d1ee84f5ba1f6d7b673614b172e"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ded99c0bf6f41089c87de9a718c784c00b8255e5#ded99c0bf6f41089c87de9a718c784c00b8255e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"collab",
|
"collab",
|
||||||
|
|
|
||||||
14
Cargo.toml
14
Cargo.toml
|
|
@ -304,13 +304,13 @@ debug = true
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
# It's diffcult to resovle different version with the same crate used in AppFlowy Frontend and the Client-API crate.
|
# It's diffcult to resovle different version with the same crate used in AppFlowy Frontend and the Client-API crate.
|
||||||
# So using patch to workaround this issue.
|
# So using patch to workaround this issue.
|
||||||
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3493d8ca30850d1ee84f5ba1f6d7b673614b172e" }
|
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ded99c0bf6f41089c87de9a718c784c00b8255e5" }
|
||||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3493d8ca30850d1ee84f5ba1f6d7b673614b172e" }
|
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ded99c0bf6f41089c87de9a718c784c00b8255e5" }
|
||||||
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3493d8ca30850d1ee84f5ba1f6d7b673614b172e" }
|
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ded99c0bf6f41089c87de9a718c784c00b8255e5" }
|
||||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3493d8ca30850d1ee84f5ba1f6d7b673614b172e" }
|
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ded99c0bf6f41089c87de9a718c784c00b8255e5" }
|
||||||
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3493d8ca30850d1ee84f5ba1f6d7b673614b172e" }
|
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ded99c0bf6f41089c87de9a718c784c00b8255e5" }
|
||||||
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3493d8ca30850d1ee84f5ba1f6d7b673614b172e" }
|
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ded99c0bf6f41089c87de9a718c784c00b8255e5" }
|
||||||
collab-importer = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "3493d8ca30850d1ee84f5ba1f6d7b673614b172e" }
|
collab-importer = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ded99c0bf6f41089c87de9a718c784c00b8255e5" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
history = []
|
history = []
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ use database_entity::dto::{
|
||||||
QuerySnapshotParams, SnapshotData, UpdateCollabMemberParams,
|
QuerySnapshotParams, SnapshotData, UpdateCollabMemberParams,
|
||||||
};
|
};
|
||||||
use shared_entity::dto::workspace_dto::{
|
use shared_entity::dto::workspace_dto::{
|
||||||
BlobMetadata, CollabResponse, WorkspaceMemberChangeset, WorkspaceMemberInvitation,
|
BlobMetadata, CollabResponse, PublishedDuplicate, WorkspaceMemberChangeset,
|
||||||
WorkspaceSpaceUsage,
|
WorkspaceMemberInvitation, WorkspaceSpaceUsage,
|
||||||
};
|
};
|
||||||
use shared_entity::response::AppResponseError;
|
use shared_entity::response::AppResponseError;
|
||||||
|
|
||||||
|
|
@ -928,6 +928,28 @@ impl TestClient {
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn duplicate_published_to_workspace(
|
||||||
|
&self,
|
||||||
|
dest_workspace_id: &str,
|
||||||
|
src_view_id: &str,
|
||||||
|
dest_view_id: &str,
|
||||||
|
) {
|
||||||
|
self
|
||||||
|
.api_client
|
||||||
|
.duplicate_published_to_workspace(
|
||||||
|
dest_workspace_id,
|
||||||
|
&PublishedDuplicate {
|
||||||
|
published_view_id: src_view_id.to_string(),
|
||||||
|
dest_view_id: dest_view_id.to_string(),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
// wait a while for folder collab to be synced
|
||||||
|
tokio::time::sleep(Duration::from_secs(1)).await;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn assert_server_snapshot(
|
pub async fn assert_server_snapshot(
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ use collab_entity::CollabType;
|
||||||
use collab_folder::{CollabOrigin, Folder, UserId};
|
use collab_folder::{CollabOrigin, Folder, UserId};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use shared_entity::dto::publish_dto::PublishDatabaseData;
|
use shared_entity::dto::publish_dto::PublishDatabaseData;
|
||||||
use shared_entity::dto::workspace_dto::PublishedDuplicate;
|
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
@ -835,16 +834,12 @@ async fn duplicate_to_workspace_references() {
|
||||||
// └── doc1
|
// └── doc1
|
||||||
// └── grid1
|
// └── grid1
|
||||||
client_2
|
client_2
|
||||||
.api_client
|
|
||||||
.duplicate_published_to_workspace(
|
.duplicate_published_to_workspace(
|
||||||
&workspace_id_2,
|
&workspace_id_2,
|
||||||
&PublishedDuplicate {
|
&doc_2_view_id.to_string(),
|
||||||
published_view_id: doc_2_view_id.to_string(),
|
&fv.view_id, // use the root view
|
||||||
dest_view_id: fv.view_id, // use the root view
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
.await
|
.await;
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let fv = client_2
|
let fv = client_2
|
||||||
.api_client
|
.api_client
|
||||||
|
|
@ -925,16 +920,12 @@ async fn duplicate_to_workspace_doc_inline_database() {
|
||||||
// └── grid1
|
// └── grid1
|
||||||
// └── View of grid1
|
// └── View of grid1
|
||||||
client_2
|
client_2
|
||||||
.api_client
|
|
||||||
.duplicate_published_to_workspace(
|
.duplicate_published_to_workspace(
|
||||||
&workspace_id_2,
|
&workspace_id_2,
|
||||||
&PublishedDuplicate {
|
&doc_3_view_id.to_string(),
|
||||||
published_view_id: doc_3_view_id.to_string(),
|
&fv.view_id, // use the root view
|
||||||
dest_view_id: fv.view_id, // use the root view
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
.await
|
.await;
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
{
|
{
|
||||||
let fv = client_2
|
let fv = client_2
|
||||||
|
|
@ -1087,16 +1078,12 @@ async fn duplicate_to_workspace_db_embedded_in_doc() {
|
||||||
// ├── Getting Started (existing)
|
// ├── Getting Started (existing)
|
||||||
// └── db_with_embedded_db (inside should contain the database)
|
// └── db_with_embedded_db (inside should contain the database)
|
||||||
client_2
|
client_2
|
||||||
.api_client
|
|
||||||
.duplicate_published_to_workspace(
|
.duplicate_published_to_workspace(
|
||||||
&workspace_id_2,
|
&workspace_id_2,
|
||||||
&PublishedDuplicate {
|
&doc_with_embedded_db_view_id.to_string(),
|
||||||
published_view_id: doc_with_embedded_db_view_id.to_string(),
|
&fv.view_id, // use the root view
|
||||||
dest_view_id: fv.view_id, // use the root view
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
.await
|
.await;
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
{
|
{
|
||||||
let fv = client_2
|
let fv = client_2
|
||||||
|
|
@ -1192,16 +1179,12 @@ async fn duplicate_to_workspace_db_with_relation() {
|
||||||
// related-db cannot be child of db_with_rel_col because they dont share the same field
|
// related-db cannot be child of db_with_rel_col because they dont share the same field
|
||||||
// and are 2 different databases, so we just put them in the root (dest_id)
|
// and are 2 different databases, so we just put them in the root (dest_id)
|
||||||
client_2
|
client_2
|
||||||
.api_client
|
|
||||||
.duplicate_published_to_workspace(
|
.duplicate_published_to_workspace(
|
||||||
&workspace_id_2,
|
&workspace_id_2,
|
||||||
&PublishedDuplicate {
|
&db_with_rel_col_view_id.to_string(),
|
||||||
published_view_id: db_with_rel_col_view_id.to_string(),
|
&fv.view_id, // use the root view
|
||||||
dest_view_id: fv.view_id, // use the root view
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
.await
|
.await;
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
{
|
{
|
||||||
let fv = client_2
|
let fv = client_2
|
||||||
|
|
@ -1281,16 +1264,12 @@ async fn duplicate_to_workspace_db_row_with_doc() {
|
||||||
// ├── Getting Started (existing)
|
// ├── Getting Started (existing)
|
||||||
// └── db_with_row_doc
|
// └── db_with_row_doc
|
||||||
client_2
|
client_2
|
||||||
.api_client
|
|
||||||
.duplicate_published_to_workspace(
|
.duplicate_published_to_workspace(
|
||||||
&workspace_id_2,
|
&workspace_id_2,
|
||||||
&PublishedDuplicate {
|
&db_with_row_doc_view_id.to_string(),
|
||||||
published_view_id: db_with_row_doc_view_id.to_string(),
|
&fv.view_id, // use the root view
|
||||||
dest_view_id: fv.view_id, // use the root view
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
.await
|
.await;
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
{
|
{
|
||||||
let fv = client_2
|
let fv = client_2
|
||||||
|
|
@ -1364,16 +1343,12 @@ async fn duplicate_to_workspace_db_rel_self() {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
client_2
|
client_2
|
||||||
.api_client
|
|
||||||
.duplicate_published_to_workspace(
|
.duplicate_published_to_workspace(
|
||||||
&workspace_id_2,
|
&workspace_id_2,
|
||||||
&PublishedDuplicate {
|
&db_rel_self_view_id.to_string(),
|
||||||
published_view_id: db_rel_self_view_id.to_string(),
|
&fv.view_id, // use the root view
|
||||||
dest_view_id: fv.view_id, // use the root view
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
.await
|
.await;
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let fv = client_2
|
let fv = client_2
|
||||||
.api_client
|
.api_client
|
||||||
|
|
@ -1459,16 +1434,12 @@ async fn duplicate_to_workspace_inline_db_doc_with_relation() {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
client_2
|
client_2
|
||||||
.api_client
|
|
||||||
.duplicate_published_to_workspace(
|
.duplicate_published_to_workspace(
|
||||||
&workspace_id_2,
|
&workspace_id_2,
|
||||||
&PublishedDuplicate {
|
&doc_4_view_id.to_string(),
|
||||||
published_view_id: doc_4_view_id.to_string(),
|
&fv.view_id, // use the root view
|
||||||
dest_view_id: fv.view_id, // use the root view
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
.await
|
.await;
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let fv = client_2
|
let fv = client_2
|
||||||
.api_client
|
.api_client
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue