chore: Upgrade the collab library to fix the issue with importing Notion zip files that contain embedded zip attachments. (#955)
* chore: bump collab that fixs import notion zip file contains zip attachment * chore: fix compile
This commit is contained in:
parent
3f3439b498
commit
7c42cee11a
|
|
@ -2240,7 +2240,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=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=4175465382020f1bd9cd9aa0e0766178eac7b4e5#4175465382020f1bd9cd9aa0e0766178eac7b4e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
|
@ -2265,7 +2265,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=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=4175465382020f1bd9cd9aa0e0766178eac7b4e5#4175465382020f1bd9cd9aa0e0766178eac7b4e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
|
@ -2304,7 +2304,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=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=4175465382020f1bd9cd9aa0e0766178eac7b4e5#4175465382020f1bd9cd9aa0e0766178eac7b4e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
|
@ -2325,7 +2325,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=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=4175465382020f1bd9cd9aa0e0766178eac7b4e5#4175465382020f1bd9cd9aa0e0766178eac7b4e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -2345,7 +2345,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=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=4175465382020f1bd9cd9aa0e0766178eac7b4e5#4175465382020f1bd9cd9aa0e0766178eac7b4e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
|
@ -2367,7 +2367,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=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=4175465382020f1bd9cd9aa0e0766178eac7b4e5#4175465382020f1bd9cd9aa0e0766178eac7b4e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-recursion",
|
"async-recursion",
|
||||||
|
|
@ -2470,7 +2470,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=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730"
|
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=4175465382020f1bd9cd9aa0e0766178eac7b4e5#4175465382020f1bd9cd9aa0e0766178eac7b4e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"collab",
|
"collab",
|
||||||
|
|
|
||||||
14
Cargo.toml
14
Cargo.toml
|
|
@ -305,13 +305,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 = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" }
|
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "4175465382020f1bd9cd9aa0e0766178eac7b4e5" }
|
||||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" }
|
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "4175465382020f1bd9cd9aa0e0766178eac7b4e5" }
|
||||||
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" }
|
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "4175465382020f1bd9cd9aa0e0766178eac7b4e5" }
|
||||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" }
|
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "4175465382020f1bd9cd9aa0e0766178eac7b4e5" }
|
||||||
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" }
|
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "4175465382020f1bd9cd9aa0e0766178eac7b4e5" }
|
||||||
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" }
|
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "4175465382020f1bd9cd9aa0e0766178eac7b4e5" }
|
||||||
collab-importer = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" }
|
collab-importer = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "4175465382020f1bd9cd9aa0e0766178eac7b4e5" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
history = []
|
history = []
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@ pub struct ViewBuilder {
|
||||||
parent_view_id: String,
|
parent_view_id: String,
|
||||||
view_id: String,
|
view_id: String,
|
||||||
name: String,
|
name: String,
|
||||||
desc: String,
|
|
||||||
layout: ViewLayout,
|
layout: ViewLayout,
|
||||||
child_views: Vec<ParentChildViews>,
|
child_views: Vec<ParentChildViews>,
|
||||||
is_favorite: bool,
|
is_favorite: bool,
|
||||||
|
|
@ -59,7 +58,6 @@ impl ViewBuilder {
|
||||||
parent_view_id,
|
parent_view_id,
|
||||||
view_id: gen_view_id().to_string(),
|
view_id: gen_view_id().to_string(),
|
||||||
name: Default::default(),
|
name: Default::default(),
|
||||||
desc: Default::default(),
|
|
||||||
layout: ViewLayout::Document,
|
layout: ViewLayout::Document,
|
||||||
child_views: vec![],
|
child_views: vec![],
|
||||||
is_favorite: false,
|
is_favorite: false,
|
||||||
|
|
@ -87,11 +85,6 @@ impl ViewBuilder {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_desc(mut self, desc: &str) -> Self {
|
|
||||||
self.desc = desc.to_string();
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn with_icon(mut self, icon: &str) -> Self {
|
pub fn with_icon(mut self, icon: &str) -> Self {
|
||||||
self.icon = Some(ViewIcon {
|
self.icon = Some(ViewIcon {
|
||||||
ty: IconType::Emoji,
|
ty: IconType::Emoji,
|
||||||
|
|
@ -122,7 +115,6 @@ impl ViewBuilder {
|
||||||
id: self.view_id,
|
id: self.view_id,
|
||||||
parent_view_id: self.parent_view_id,
|
parent_view_id: self.parent_view_id,
|
||||||
name: self.name,
|
name: self.name,
|
||||||
desc: self.desc,
|
|
||||||
created_at: timestamp(),
|
created_at: timestamp(),
|
||||||
is_favorite: self.is_favorite,
|
is_favorite: self.is_favorite,
|
||||||
layout: self.layout,
|
layout: self.layout,
|
||||||
|
|
|
||||||
|
|
@ -165,8 +165,12 @@ async fn get_page_collab_data_for_database(
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
let db_body = DatabaseBody::from_collab(&db_collab, Arc::new(NoPersistenceDatabaseCollabService))
|
let db_body = DatabaseBody::from_collab(
|
||||||
.ok_or_else(|| AppError::RecordNotFound("no database body found".to_string()))?;
|
&db_collab,
|
||||||
|
Arc::new(NoPersistenceDatabaseCollabService),
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.ok_or_else(|| AppError::RecordNotFound("no database body found".to_string()))?;
|
||||||
let inline_view_id = {
|
let inline_view_id = {
|
||||||
let txn = db_collab.transact();
|
let txn = db_collab.transact();
|
||||||
db_body.get_inline_view_id(&txn)
|
db_body.get_inline_view_id(&txn)
|
||||||
|
|
|
||||||
|
|
@ -726,9 +726,12 @@ impl PublishCollabDuplicator {
|
||||||
) -> Result<(String, String, bool), AppError> {
|
) -> Result<(String, String, bool), AppError> {
|
||||||
// collab of database
|
// collab of database
|
||||||
let mut db_collab = collab_from_doc_state(published_db.database_collab.clone(), "")?;
|
let mut db_collab = collab_from_doc_state(published_db.database_collab.clone(), "")?;
|
||||||
let db_body =
|
let db_body = DatabaseBody::from_collab(
|
||||||
DatabaseBody::from_collab(&db_collab, Arc::new(NoPersistenceDatabaseCollabService))
|
&db_collab,
|
||||||
.ok_or_else(|| AppError::RecordNotFound("no database body found".to_string()))?;
|
Arc::new(NoPersistenceDatabaseCollabService),
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.ok_or_else(|| AppError::RecordNotFound("no database body found".to_string()))?;
|
||||||
let pub_db_id = db_body.get_database_id(&db_collab.context.transact());
|
let pub_db_id = db_body.get_database_id(&db_collab.context.transact());
|
||||||
|
|
||||||
// check if the database is already duplicated
|
// check if the database is already duplicated
|
||||||
|
|
@ -1115,7 +1118,6 @@ impl PublishCollabDuplicator {
|
||||||
id: new_view_id,
|
id: new_view_id,
|
||||||
parent_view_id: "".to_string(), // to be filled by caller
|
parent_view_id: "".to_string(), // to be filled by caller
|
||||||
name: view_info.name.clone(),
|
name: view_info.name.clone(),
|
||||||
desc: "".to_string(), // unable to get from metadata
|
|
||||||
children: RepeatedViewIdentifier { items: vec![] }, // fill in while iterating children
|
children: RepeatedViewIdentifier { items: vec![] }, // fill in while iterating children
|
||||||
created_at: self.ts_now,
|
created_at: self.ts_now,
|
||||||
is_favorite: false,
|
is_favorite: false,
|
||||||
|
|
|
||||||
|
|
@ -1313,6 +1313,7 @@ async fn duplicate_to_workspace_db_with_relation() {
|
||||||
let rel_col_db_body = DatabaseBody::from_collab(
|
let rel_col_db_body = DatabaseBody::from_collab(
|
||||||
&db_with_rel_col_collab,
|
&db_with_rel_col_collab,
|
||||||
Arc::new(NoPersistenceDatabaseCollabService),
|
Arc::new(NoPersistenceDatabaseCollabService),
|
||||||
|
None,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let txn = db_with_rel_col_collab.transact();
|
let txn = db_with_rel_col_collab.transact();
|
||||||
|
|
@ -1387,9 +1388,12 @@ async fn duplicate_to_workspace_db_row_with_doc() {
|
||||||
.get_db_collab_from_view(&workspace_id_2, &db_with_row_doc.view_id)
|
.get_db_collab_from_view(&workspace_id_2, &db_with_row_doc.view_id)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
let db_body =
|
let db_body = DatabaseBody::from_collab(
|
||||||
DatabaseBody::from_collab(&db_collab, Arc::new(NoPersistenceDatabaseCollabService))
|
&db_collab,
|
||||||
.unwrap();
|
Arc::new(NoPersistenceDatabaseCollabService),
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
// check that doc exists and can be fetched
|
// check that doc exists and can be fetched
|
||||||
let first_row_id = &db_body.views.get_all_views(&db_collab.transact())[0].row_orders[0].id;
|
let first_row_id = &db_body.views.get_all_views(&db_collab.transact())[0].row_orders[0].id;
|
||||||
|
|
@ -1472,6 +1476,7 @@ async fn duplicate_to_workspace_db_rel_self() {
|
||||||
let db_rel_self_body = DatabaseBody::from_collab(
|
let db_rel_self_body = DatabaseBody::from_collab(
|
||||||
&db_rel_self_collab,
|
&db_rel_self_collab,
|
||||||
Arc::new(NoPersistenceDatabaseCollabService),
|
Arc::new(NoPersistenceDatabaseCollabService),
|
||||||
|
None,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let database_id = db_rel_self_body.get_database_id(&txn);
|
let database_id = db_rel_self_body.get_database_id(&txn);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue