From 29c14949cb9ad22d3dd34b60c9eb767d63c1958c Mon Sep 17 00:00:00 2001 From: appflowy Date: Mon, 6 Dec 2021 14:41:09 +0800 Subject: [PATCH] reanme flowy-workspace to flowy-core --- backend/Cargo.lock | 78 ++++---- .../user/presentation/skip_log_in_screen.dart | 2 +- .../workspace/application/app/app_bloc.dart | 2 +- .../workspace/application/doc/doc_bloc.dart | 2 +- .../workspace/application/doc/share_bloc.dart | 2 +- .../workspace/application/menu/menu_bloc.dart | 2 +- .../application/menu/menu_user_bloc.dart | 2 +- .../application/trash/trash_bloc.dart | 2 +- .../workspace/application/view/view_bloc.dart | 2 +- .../application/workspace/welcome_bloc.dart | 2 +- .../app_flowy/lib/workspace/domain/i_app.dart | 2 +- .../app_flowy/lib/workspace/domain/i_doc.dart | 2 +- .../lib/workspace/domain/i_share.dart | 2 +- .../lib/workspace/domain/i_trash.dart | 2 +- .../lib/workspace/domain/i_user.dart | 2 +- .../lib/workspace/domain/i_view.dart | 2 +- .../lib/workspace/domain/i_workspace.dart | 2 +- .../workspace/infrastructure/i_app_impl.dart | 2 +- .../workspace/infrastructure/i_doc_impl.dart | 2 +- .../infrastructure/i_share_impl.dart | 2 +- .../infrastructure/i_trash_impl.dart | 2 +- .../workspace/infrastructure/i_user_impl.dart | 6 +- .../workspace/infrastructure/i_view_impl.dart | 2 +- .../infrastructure/i_workspace_impl.dart | 2 +- .../infrastructure/repos/app_repo.dart | 6 +- .../infrastructure/repos/doc_repo.dart | 2 +- .../infrastructure/repos/helper.dart | 6 +- .../infrastructure/repos/share_repo.dart | 2 +- .../infrastructure/repos/trash_repo.dart | 6 +- .../infrastructure/repos/user_repo.dart | 2 +- .../infrastructure/repos/view_repo.dart | 6 +- .../infrastructure/repos/workspace_repo.dart | 6 +- .../stack_page/doc/doc_stack_page.dart | 2 +- .../flowy_sdk/lib/dispatch/dispatch.dart | 6 +- .../errors.pb.dart | 0 .../errors.pbenum.dart | 0 .../errors.pbjson.dart | 0 .../errors.pbserver.dart | 0 .../event.pb.dart | 0 .../event.pbenum.dart | 0 .../event.pbjson.dart | 0 .../event.pbserver.dart | 0 .../observable.pb.dart | 0 .../observable.pbenum.dart | 0 .../observable.pbjson.dart | 0 .../observable.pbserver.dart | 0 .../protobuf.dart | 0 .../protobuf/flowy-dart-notify/protobuf.dart | 2 - .../flowy-dart-notify/subject.pb.dart | 140 --------------- .../flowy-dart-notify/subject.pbenum.dart | 7 - .../flowy-dart-notify/subject.pbjson.dart | 28 --- .../flowy-dart-notify/subject.pbserver.dart | 9 - .../lib/protobuf/flowy-infra/kv.pb.dart | 167 ------------------ .../lib/protobuf/flowy-infra/kv.pbenum.dart | 7 - .../lib/protobuf/flowy-infra/kv.pbjson.dart | 30 ---- .../lib/protobuf/flowy-infra/kv.pbserver.dart | 9 - .../lib/protobuf/flowy-infra/protobuf.dart | 2 - .../lib/protobuf/flowy-ws/errors.pb.dart | 76 -------- .../lib/protobuf/flowy-ws/errors.pbenum.dart | 28 --- .../lib/protobuf/flowy-ws/errors.pbjson.dart | 33 ---- .../protobuf/flowy-ws/errors.pbserver.dart | 9 - .../lib/protobuf/flowy-ws/msg.pb.dart | 76 -------- .../lib/protobuf/flowy-ws/msg.pbenum.dart | 24 --- .../lib/protobuf/flowy-ws/msg.pbjson.dart | 31 ---- .../lib/protobuf/flowy-ws/msg.pbserver.dart | 9 - .../lib/protobuf/flowy-ws/protobuf.dart | 3 - .../packages/flowy_sdk/lib/rust_stream.dart | 2 +- frontend/rust-lib/Cargo.toml | 2 +- .../Cargo.toml | 2 +- .../Flowy.toml | 0 .../src/errors.rs | 0 .../src/event.rs | 0 .../src/handlers/app_handler.rs | 0 .../src/handlers/mod.rs | 0 .../src/handlers/trash_handler.rs | 0 .../src/handlers/view_handler.rs | 0 .../src/handlers/workspace_handler.rs | 0 .../src/lib.rs | 0 .../src/macros.rs | 0 .../src/module.rs | 0 .../src/notify/mod.rs | 0 .../src/notify/observable.rs | 0 .../src/protobuf/mod.rs | 0 .../src/protobuf/model/errors.rs | 0 .../src/protobuf/model/event.rs | 0 .../src/protobuf/model/mod.rs | 0 .../src/protobuf/model/observable.rs | 0 .../src/protobuf/proto/errors.proto | 0 .../src/protobuf/proto/event.proto | 0 .../src/protobuf/proto/observable.proto | 0 .../src/services/app_controller.rs | 0 .../src/services/database.rs | 0 .../src/services/mod.rs | 0 .../src/services/server/mod.rs | 0 .../src/services/server/server_api.rs | 0 .../src/services/server/server_api_mock.rs | 0 .../src/services/trash_can.rs | 0 .../src/services/view_controller.rs | 0 .../src/services/workspace_controller.rs | 0 .../src/sql_tables/app/app_sql.rs | 0 .../src/sql_tables/app/app_table.rs | 0 .../src/sql_tables/app/mod.rs | 0 .../src/sql_tables/mod.rs | 0 .../src/sql_tables/trash/mod.rs | 0 .../src/sql_tables/trash/trash_sql.rs | 0 .../src/sql_tables/trash/trash_table.rs | 0 .../src/sql_tables/view/mod.rs | 0 .../src/sql_tables/view/view_sql.rs | 0 .../src/sql_tables/view/view_table.rs | 0 .../src/sql_tables/workspace/mod.rs | 0 .../src/sql_tables/workspace/workspace_sql.rs | 0 .../sql_tables/workspace/workspace_table.rs | 0 .../src/util.rs | 0 .../tests/workspace/app_test.rs | 4 +- .../tests/workspace/main.rs | 0 .../tests/workspace/view_test.rs | 4 +- .../tests/workspace/workspace_test.rs | 4 +- frontend/rust-lib/flowy-sdk/Cargo.toml | 4 +- .../src/deps_resolve/workspace_deps.rs | 6 +- frontend/rust-lib/flowy-sdk/src/lib.rs | 4 +- frontend/rust-lib/flowy-sdk/src/module.rs | 4 +- frontend/rust-lib/flowy-test/Cargo.toml | 2 +- frontend/rust-lib/flowy-test/src/builder.rs | 2 +- frontend/rust-lib/flowy-test/src/helper.rs | 10 +- frontend/rust-lib/flowy-test/src/workspace.rs | 4 +- frontend/scripts/makefile/tests.toml | 2 +- 126 files changed, 114 insertions(+), 804 deletions(-) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/errors.pb.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/errors.pbenum.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/errors.pbjson.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/errors.pbserver.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/event.pb.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/event.pbenum.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/event.pbjson.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/event.pbserver.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/observable.pb.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/observable.pbenum.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/observable.pbjson.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/observable.pbserver.dart (100%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-workspace => flowy-core}/protobuf.dart (100%) delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/protobuf.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/protobuf.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/protobuf.dart rename frontend/rust-lib/{flowy-workspace => flowy-core}/Cargo.toml (97%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/Flowy.toml (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/errors.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/event.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/handlers/app_handler.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/handlers/mod.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/handlers/trash_handler.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/handlers/view_handler.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/handlers/workspace_handler.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/lib.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/macros.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/module.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/notify/mod.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/notify/observable.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/protobuf/mod.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/protobuf/model/errors.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/protobuf/model/event.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/protobuf/model/mod.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/protobuf/model/observable.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/protobuf/proto/errors.proto (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/protobuf/proto/event.proto (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/protobuf/proto/observable.proto (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/services/app_controller.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/services/database.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/services/mod.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/services/server/mod.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/services/server/server_api.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/services/server/server_api_mock.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/services/trash_can.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/services/view_controller.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/services/workspace_controller.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/app/app_sql.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/app/app_table.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/app/mod.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/mod.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/trash/mod.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/trash/trash_sql.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/trash/trash_table.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/view/mod.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/view/view_sql.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/view/view_table.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/workspace/mod.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/workspace/workspace_sql.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/sql_tables/workspace/workspace_table.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/src/util.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/tests/workspace/app_test.rs (98%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/tests/workspace/main.rs (100%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/tests/workspace/view_test.rs (98%) rename frontend/rust-lib/{flowy-workspace => flowy-core}/tests/workspace/workspace_test.rs (99%) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index bceb695223..7efe8c9b83 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1195,6 +1195,43 @@ dependencies = [ "syn", ] +[[package]] +name = "flowy-core" +version = "0.1.0" +dependencies = [ + "backend-service", + "bincode", + "bytes", + "chrono", + "crossbeam", + "crossbeam-utils", + "dart-notify", + "derive_more", + "diesel", + "diesel_derives", + "flowy-database", + "flowy-derive", + "flowy-document", + "flowy-document-infra", + "flowy-workspace-infra", + "futures", + "futures-core", + "lazy_static", + "lib-dispatch", + "lib-infra", + "lib-ot", + "lib-sqlite", + "log", + "parking_lot", + "pin-project 1.0.8", + "protobuf", + "serde", + "strum", + "strum_macros", + "tokio", + "tracing", +] + [[package]] name = "flowy-database" version = "0.1.0" @@ -1280,11 +1317,11 @@ dependencies = [ "backend-service", "bytes", "color-eyre", + "flowy-core", "flowy-database", "flowy-document", "flowy-document-infra", "flowy-user", - "flowy-workspace", "futures-core", "lib-dispatch", "lib-infra", @@ -1304,11 +1341,11 @@ dependencies = [ "bincode", "bytes", "claim", + "flowy-core", "flowy-document", "flowy-document-infra", "flowy-sdk", "flowy-user", - "flowy-workspace", "futures-util", "lib-dispatch", "lib-infra", @@ -1369,43 +1406,6 @@ dependencies = [ "validator", ] -[[package]] -name = "flowy-workspace" -version = "0.1.0" -dependencies = [ - "backend-service", - "bincode", - "bytes", - "chrono", - "crossbeam", - "crossbeam-utils", - "dart-notify", - "derive_more", - "diesel", - "diesel_derives", - "flowy-database", - "flowy-derive", - "flowy-document", - "flowy-document-infra", - "flowy-workspace-infra", - "futures", - "futures-core", - "lazy_static", - "lib-dispatch", - "lib-infra", - "lib-ot", - "lib-sqlite", - "log", - "parking_lot", - "pin-project 1.0.8", - "protobuf", - "serde", - "strum", - "strum_macros", - "tokio", - "tracing", -] - [[package]] name = "flowy-workspace-infra" version = "0.1.0" diff --git a/frontend/app_flowy/lib/user/presentation/skip_log_in_screen.dart b/frontend/app_flowy/lib/user/presentation/skip_log_in_screen.dart index 2cd490baf9..972ee09285 100644 --- a/frontend/app_flowy/lib/user/presentation/skip_log_in_screen.dart +++ b/frontend/app_flowy/lib/user/presentation/skip_log_in_screen.dart @@ -10,7 +10,7 @@ import 'package:flowy_infra_ui/widget/spacing.dart'; import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/protobuf.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-user-infra/protobuf.dart' show UserProfile; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/app/app_bloc.dart b/frontend/app_flowy/lib/workspace/application/app/app_bloc.dart index 67b26580dc..c2af8cf871 100644 --- a/frontend/app_flowy/lib/workspace/application/app/app_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/app/app_bloc.dart @@ -2,7 +2,7 @@ import 'package:app_flowy/workspace/domain/i_app.dart'; import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/app_create.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:dartz/dartz.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dart b/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dart index e90749dd8c..67c7023c8a 100644 --- a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dart @@ -4,7 +4,7 @@ import 'package:app_flowy/workspace/domain/i_trash.dart'; import 'package:app_flowy/workspace/domain/i_view.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/trash_create.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; import 'package:flutter_quill/flutter_quill.dart'; import 'package:flowy_log/flowy_log.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/doc/share_bloc.dart b/frontend/app_flowy/lib/workspace/application/doc/share_bloc.dart index f81495a15a..bfb98d2528 100644 --- a/frontend/app_flowy/lib/workspace/application/doc/share_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/doc/share_bloc.dart @@ -2,7 +2,7 @@ import 'package:app_flowy/workspace/domain/i_share.dart'; import 'package:app_flowy/workspace/infrastructure/markdown/delta_markdown.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/export.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:dartz/dartz.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dart b/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dart index b6dac402f9..f78eef6e73 100644 --- a/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dart @@ -5,7 +5,7 @@ import 'package:app_flowy/workspace/presentation/stack_page/blank/blank_page.dar import 'package:dartz/dartz.dart'; import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/app_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; import 'package:flutter/material.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/menu/menu_user_bloc.dart b/frontend/app_flowy/lib/workspace/application/menu/menu_user_bloc.dart index 56635c0c89..bff016f9f9 100644 --- a/frontend/app_flowy/lib/workspace/application/menu/menu_user_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/menu/menu_user_bloc.dart @@ -2,7 +2,7 @@ import 'package:app_flowy/workspace/domain/i_user.dart'; import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/protobuf/flowy-user-infra/protobuf.dart' show UserProfile; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/workspace_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:dartz/dartz.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.dart b/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.dart index 2505128dd5..2d885d8ff9 100644 --- a/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.dart @@ -2,7 +2,7 @@ import 'package:app_flowy/workspace/domain/i_trash.dart'; import 'package:dartz/dartz.dart'; import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/trash_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; part 'trash_bloc.freezed.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/view/view_bloc.dart b/frontend/app_flowy/lib/workspace/application/view/view_bloc.dart index ffd1a02466..59c00e44f3 100644 --- a/frontend/app_flowy/lib/workspace/application/view/view_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/view/view_bloc.dart @@ -1,6 +1,6 @@ import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:app_flowy/workspace/domain/i_view.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.dart b/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.dart index b53c797744..faba9f421e 100644 --- a/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.dart @@ -2,7 +2,7 @@ import 'package:app_flowy/workspace/domain/i_user.dart'; import 'package:app_flowy/workspace/infrastructure/repos/user_repo.dart'; import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/workspace_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:dartz/dartz.dart'; diff --git a/frontend/app_flowy/lib/workspace/domain/i_app.dart b/frontend/app_flowy/lib/workspace/domain/i_app.dart index 42f14b9166..240ec54c55 100644 --- a/frontend/app_flowy/lib/workspace/domain/i_app.dart +++ b/frontend/app_flowy/lib/workspace/domain/i_app.dart @@ -2,7 +2,7 @@ import 'package:flowy_sdk/protobuf/flowy-workspace-infra/app_create.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/protobuf.dart'; import 'package:dartz/dartz.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; typedef AppUpdatedCallback = void Function(App app); typedef AppViewsChangeCallback = void Function(Either, WorkspaceError> viewsOrFailed); diff --git a/frontend/app_flowy/lib/workspace/domain/i_doc.dart b/frontend/app_flowy/lib/workspace/domain/i_doc.dart index 7956e8fb2b..9092302b70 100644 --- a/frontend/app_flowy/lib/workspace/domain/i_doc.dart +++ b/frontend/app_flowy/lib/workspace/domain/i_doc.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/protobuf/flowy-document-infra/doc.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; abstract class IDoc { Future> readDoc(); diff --git a/frontend/app_flowy/lib/workspace/domain/i_share.dart b/frontend/app_flowy/lib/workspace/domain/i_share.dart index 8fa89111ce..8bf29ce153 100644 --- a/frontend/app_flowy/lib/workspace/domain/i_share.dart +++ b/frontend/app_flowy/lib/workspace/domain/i_share.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/protobuf.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; abstract class IShare { Future> exportText(String docId); diff --git a/frontend/app_flowy/lib/workspace/domain/i_trash.dart b/frontend/app_flowy/lib/workspace/domain/i_trash.dart index da0777fde9..57de56e1c0 100644 --- a/frontend/app_flowy/lib/workspace/domain/i_trash.dart +++ b/frontend/app_flowy/lib/workspace/domain/i_trash.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/trash_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; abstract class ITrash { Future, WorkspaceError>> readTrash(); diff --git a/frontend/app_flowy/lib/workspace/domain/i_user.dart b/frontend/app_flowy/lib/workspace/domain/i_user.dart index bedb89c61e..95bc9398b0 100644 --- a/frontend/app_flowy/lib/workspace/domain/i_user.dart +++ b/frontend/app_flowy/lib/workspace/domain/i_user.dart @@ -3,7 +3,7 @@ import 'package:flowy_infra/notifier.dart'; import 'package:flowy_sdk/protobuf/flowy-user/errors.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-user-infra/protobuf.dart' show UserProfile; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/workspace_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; export 'package:flowy_sdk/protobuf/flowy-user/errors.pb.dart'; export 'package:flowy_sdk/protobuf/flowy-user-infra/protobuf.dart' show UserProfile; diff --git a/frontend/app_flowy/lib/workspace/domain/i_view.dart b/frontend/app_flowy/lib/workspace/domain/i_view.dart index b65bb6ef05..bdddbfcad3 100644 --- a/frontend/app_flowy/lib/workspace/domain/i_view.dart +++ b/frontend/app_flowy/lib/workspace/domain/i_view.dart @@ -1,7 +1,7 @@ import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pb.dart'; import 'package:dartz/dartz.dart'; import 'package:flowy_infra/notifier.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; typedef ViewUpdatedCallback = void Function(Either); diff --git a/frontend/app_flowy/lib/workspace/domain/i_workspace.dart b/frontend/app_flowy/lib/workspace/domain/i_workspace.dart index 39c8c84924..9837689233 100644 --- a/frontend/app_flowy/lib/workspace/domain/i_workspace.dart +++ b/frontend/app_flowy/lib/workspace/domain/i_workspace.dart @@ -1,6 +1,6 @@ import 'package:flowy_sdk/protobuf/flowy-workspace-infra/protobuf.dart'; import 'package:dartz/dartz.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; typedef WorkspaceAppsChangedCallback = void Function(Either, WorkspaceError> appsOrFail); diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_app_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_app_impl.dart index 5b6d4768a9..2eb71235b7 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_app_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_app_impl.dart @@ -2,7 +2,7 @@ import 'package:app_flowy/workspace/infrastructure/repos/app_repo.dart'; import 'package:dartz/dartz.dart'; import 'package:app_flowy/workspace/domain/i_app.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; export 'package:app_flowy/workspace/domain/i_app.dart'; class IAppImpl extends IApp { diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_doc_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_doc_impl.dart index a290c96b56..141e4c45b4 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_doc_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_doc_impl.dart @@ -5,7 +5,7 @@ import 'package:dartz/dartz.dart'; import 'package:app_flowy/workspace/domain/i_doc.dart'; import 'package:app_flowy/workspace/infrastructure/repos/doc_repo.dart'; import 'package:flowy_sdk/protobuf/flowy-document-infra/doc.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; class IDocImpl extends IDoc { DocRepository repo; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_share_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_share_impl.dart index 05ef1f5c2c..e57df7f516 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_share_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_share_impl.dart @@ -1,6 +1,6 @@ import 'package:app_flowy/workspace/domain/i_share.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/protobuf.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; import 'package:dartz/dartz.dart'; import 'repos/share_repo.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_trash_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_trash_impl.dart index fb6bae0b9d..fa73c11704 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_trash_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_trash_impl.dart @@ -2,7 +2,7 @@ import 'package:app_flowy/workspace/domain/i_trash.dart'; import 'package:app_flowy/workspace/infrastructure/repos/trash_repo.dart'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/trash_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; class ITrashImpl implements ITrash { TrashRepo repo; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_user_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_user_impl.dart index a65726784a..d1e5ec7f42 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_user_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_user_impl.dart @@ -5,13 +5,13 @@ import 'package:dartz/dartz.dart'; import 'package:app_flowy/workspace/domain/i_user.dart'; import 'package:app_flowy/workspace/infrastructure/repos/user_repo.dart'; import 'package:flowy_infra/notifier.dart'; -import 'package:flowy_sdk/protobuf/flowy-dart-notify/protobuf.dart'; +import 'package:flowy_sdk/protobuf/dart-notify/protobuf.dart'; import 'package:flowy_sdk/protobuf/flowy-user-infra/errors.pb.dart'; // import 'package:flowy_sdk/protobuf/flowy-user/errors.pb.dart' as user_error; import 'package:flowy_sdk/protobuf/flowy-user/observable.pb.dart' as user; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/workspace_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/observable.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/observable.pb.dart'; export 'package:app_flowy/workspace/domain/i_user.dart'; export 'package:app_flowy/workspace/infrastructure/repos/user_repo.dart'; import 'package:flowy_sdk/rust_stream.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_view_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_view_impl.dart index 64ccd3b32a..c737076b4e 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_view_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_view_impl.dart @@ -3,7 +3,7 @@ import 'package:app_flowy/workspace/infrastructure/repos/view_repo.dart'; import 'package:flowy_infra/notifier.dart'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; class IViewImpl extends IView { ViewRepository repo; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_workspace_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_workspace_impl.dart index b528b977b4..1d1826b600 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_workspace_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_workspace_impl.dart @@ -2,7 +2,7 @@ import 'package:app_flowy/workspace/domain/i_workspace.dart'; import 'package:app_flowy/workspace/infrastructure/repos/workspace_repo.dart'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/app_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; export 'package:app_flowy/workspace/domain/i_workspace.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/app_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/app_repo.dart index 27096b49a7..d915ed4487 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/app_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/app_repo.dart @@ -4,14 +4,14 @@ import 'package:app_flowy/workspace/domain/i_app.dart'; import 'package:dartz/dartz.dart'; import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; -import 'package:flowy_sdk/protobuf/flowy-dart-notify/subject.pb.dart'; +import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/app_create.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/app_query.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/app_update.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pbenum.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/observable.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/observable.pb.dart'; import 'package:flowy_sdk/rust_stream.dart'; import 'helper.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/doc_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/doc_repo.dart index 3b0b14a675..b56afffd9f 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/doc_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/doc_repo.dart @@ -2,7 +2,7 @@ import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; import 'package:flowy_sdk/protobuf/flowy-document-infra/doc.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_query.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; class DocRepository { final String docId; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/helper.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/helper.dart index a3ad4fee07..2110e6f725 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/helper.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/helper.dart @@ -1,9 +1,9 @@ import 'dart:typed_data'; -import 'package:flowy_sdk/protobuf/flowy-dart-notify/protobuf.dart'; +import 'package:flowy_sdk/protobuf/dart-notify/protobuf.dart'; import 'package:flowy_sdk/protobuf/flowy-user/protobuf.dart'; import 'package:dartz/dartz.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/observable.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/observable.pb.dart'; typedef UserNotificationCallback = void Function(UserNotification, Either); diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/share_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/share_repo.dart index de9482859f..52c72912f3 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/share_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/share_repo.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/protobuf.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; class ShareRepo { Future> export(String docId, ExportType type) { diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/trash_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/trash_repo.dart index 5ff35117e1..67123d9264 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/trash_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/trash_repo.dart @@ -4,10 +4,10 @@ import 'package:app_flowy/workspace/domain/i_trash.dart'; import 'package:app_flowy/workspace/infrastructure/repos/helper.dart'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; -import 'package:flowy_sdk/protobuf/flowy-dart-notify/subject.pb.dart'; +import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/trash_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/observable.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/observable.pb.dart'; import 'package:flowy_sdk/rust_stream.dart'; class TrashRepo { diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/user_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/user_repo.dart index 19c3308d59..fd613f2f6e 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/user_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/user_repo.dart @@ -6,7 +6,7 @@ import 'package:flowy_sdk/protobuf/flowy-user-infra/protobuf.dart' show UserProf import 'package:flowy_sdk/protobuf/flowy-workspace-infra/workspace_create.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/workspace_query.pb.dart'; import 'package:app_flowy/workspace/domain/i_user.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; class UserRepo { final UserProfile user; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/view_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/view_repo.dart index a3a809ef7b..7fd2735abe 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/view_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/view_repo.dart @@ -2,12 +2,12 @@ import 'dart:async'; import 'dart:typed_data'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; -import 'package:flowy_sdk/protobuf/flowy-dart-notify/subject.pb.dart'; +import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_query.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_update.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/observable.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/observable.pb.dart'; import 'package:flowy_sdk/rust_stream.dart'; import 'package:app_flowy/workspace/domain/i_view.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dart index 59f0e5b482..e7faf31091 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dart @@ -5,13 +5,13 @@ import 'package:dartz/dartz.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; -import 'package:flowy_sdk/protobuf/flowy-dart-notify/subject.pb.dart'; +import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-user-infra/protobuf.dart' show UserProfile; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/app_create.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/workspace_create.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/workspace_query.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/observable.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/observable.pb.dart'; import 'package:flowy_sdk/rust_stream.dart'; import 'package:app_flowy/generated/locale_keys.g.dart'; diff --git a/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dart b/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dart index 024b02d8e1..d1b7f7ca8d 100644 --- a/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dart +++ b/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dart @@ -14,7 +14,7 @@ import 'package:flowy_infra_ui/widget/rounded_button.dart'; import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/export.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/view_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; import 'package:flutter/material.dart'; import 'package:dartz/dartz.dart' as dartz; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dart b/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dart index 58b7b88e28..0672da7200 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dart @@ -4,8 +4,8 @@ import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/protobuf/dart-ffi/ffi_response.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-user/errors.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-user/event.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/errors.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-workspace/event.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/event.pb.dart'; import 'package:flowy_sdk/protobuf/lib-infra/network_state.pb.dart'; import 'package:isolates/isolates.dart'; import 'package:isolates/ports.dart'; @@ -21,7 +21,7 @@ import 'package:flowy_sdk/protobuf/flowy-workspace-infra/protobuf.dart'; import 'package:flowy_sdk/protobuf/flowy-document-infra/protobuf.dart'; // ignore: unused_import -import 'package:flowy_sdk/protobuf/flowy-infra/protobuf.dart'; +import 'package:flowy_sdk/protobuf/lib-infra/protobuf.dart'; import 'package:protobuf/protobuf.dart'; import 'dart:convert' show utf8; import 'error.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/errors.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/errors.pb.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/errors.pb.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/errors.pb.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/errors.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/errors.pbenum.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/errors.pbenum.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/errors.pbenum.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/errors.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/errors.pbjson.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/errors.pbjson.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/errors.pbjson.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/errors.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/errors.pbserver.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/errors.pbserver.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/errors.pbserver.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/event.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/event.pb.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/event.pb.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/event.pb.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/event.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/event.pbenum.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/event.pbenum.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/event.pbenum.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/event.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/event.pbjson.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/event.pbjson.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/event.pbjson.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/event.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/event.pbserver.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/event.pbserver.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/event.pbserver.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/observable.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pb.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/observable.pb.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pb.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/observable.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbenum.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/observable.pbenum.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbenum.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/observable.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbjson.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/observable.pbjson.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbjson.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/observable.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbserver.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/observable.pbserver.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbserver.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/protobuf.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/protobuf.dart similarity index 100% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-workspace/protobuf.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/protobuf.dart diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/protobuf.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/protobuf.dart deleted file mode 100644 index 6f21b675f3..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/protobuf.dart +++ /dev/null @@ -1,2 +0,0 @@ -// Auto-generated, do not edit -export './subject.pb.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pb.dart deleted file mode 100644 index 828600c49e..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pb.dart +++ /dev/null @@ -1,140 +0,0 @@ -/// -// Generated code. Do not modify. -// source: subject.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields - -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -enum SubscribeObject_OneOfPayload { - payload, - notSet -} - -enum SubscribeObject_OneOfError { - error, - notSet -} - -class SubscribeObject extends $pb.GeneratedMessage { - static const $core.Map<$core.int, SubscribeObject_OneOfPayload> _SubscribeObject_OneOfPayloadByTag = { - 4 : SubscribeObject_OneOfPayload.payload, - 0 : SubscribeObject_OneOfPayload.notSet - }; - static const $core.Map<$core.int, SubscribeObject_OneOfError> _SubscribeObject_OneOfErrorByTag = { - 5 : SubscribeObject_OneOfError.error, - 0 : SubscribeObject_OneOfError.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SubscribeObject', createEmptyInstance: create) - ..oo(0, [4]) - ..oo(1, [5]) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'source') - ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'ty', $pb.PbFieldType.O3) - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') - ..a<$core.List<$core.int>>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payload', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'error', $pb.PbFieldType.OY) - ..hasRequiredFields = false - ; - - SubscribeObject._() : super(); - factory SubscribeObject({ - $core.String? source, - $core.int? ty, - $core.String? id, - $core.List<$core.int>? payload, - $core.List<$core.int>? error, - }) { - final _result = create(); - if (source != null) { - _result.source = source; - } - if (ty != null) { - _result.ty = ty; - } - if (id != null) { - _result.id = id; - } - if (payload != null) { - _result.payload = payload; - } - if (error != null) { - _result.error = error; - } - return _result; - } - factory SubscribeObject.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory SubscribeObject.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - SubscribeObject clone() => SubscribeObject()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - SubscribeObject copyWith(void Function(SubscribeObject) updates) => super.copyWith((message) => updates(message as SubscribeObject)) as SubscribeObject; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static SubscribeObject create() => SubscribeObject._(); - SubscribeObject createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static SubscribeObject getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SubscribeObject? _defaultInstance; - - SubscribeObject_OneOfPayload whichOneOfPayload() => _SubscribeObject_OneOfPayloadByTag[$_whichOneof(0)]!; - void clearOneOfPayload() => clearField($_whichOneof(0)); - - SubscribeObject_OneOfError whichOneOfError() => _SubscribeObject_OneOfErrorByTag[$_whichOneof(1)]!; - void clearOneOfError() => clearField($_whichOneof(1)); - - @$pb.TagNumber(1) - $core.String get source => $_getSZ(0); - @$pb.TagNumber(1) - set source($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasSource() => $_has(0); - @$pb.TagNumber(1) - void clearSource() => clearField(1); - - @$pb.TagNumber(2) - $core.int get ty => $_getIZ(1); - @$pb.TagNumber(2) - set ty($core.int v) { $_setSignedInt32(1, v); } - @$pb.TagNumber(2) - $core.bool hasTy() => $_has(1); - @$pb.TagNumber(2) - void clearTy() => clearField(2); - - @$pb.TagNumber(3) - $core.String get id => $_getSZ(2); - @$pb.TagNumber(3) - set id($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasId() => $_has(2); - @$pb.TagNumber(3) - void clearId() => clearField(3); - - @$pb.TagNumber(4) - $core.List<$core.int> get payload => $_getN(3); - @$pb.TagNumber(4) - set payload($core.List<$core.int> v) { $_setBytes(3, v); } - @$pb.TagNumber(4) - $core.bool hasPayload() => $_has(3); - @$pb.TagNumber(4) - void clearPayload() => clearField(4); - - @$pb.TagNumber(5) - $core.List<$core.int> get error => $_getN(4); - @$pb.TagNumber(5) - set error($core.List<$core.int> v) { $_setBytes(4, v); } - @$pb.TagNumber(5) - $core.bool hasError() => $_has(4); - @$pb.TagNumber(5) - void clearError() => clearField(5); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbenum.dart deleted file mode 100644 index 7ae7ff12c2..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbenum.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// -// Generated code. Do not modify. -// source: subject.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbjson.dart deleted file mode 100644 index 8d8b238ba4..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbjson.dart +++ /dev/null @@ -1,28 +0,0 @@ -/// -// Generated code. Do not modify. -// source: subject.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package - -import 'dart:core' as $core; -import 'dart:convert' as $convert; -import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use subscribeObjectDescriptor instead') -const SubscribeObject$json = const { - '1': 'SubscribeObject', - '2': const [ - const {'1': 'source', '3': 1, '4': 1, '5': 9, '10': 'source'}, - const {'1': 'ty', '3': 2, '4': 1, '5': 5, '10': 'ty'}, - const {'1': 'id', '3': 3, '4': 1, '5': 9, '10': 'id'}, - const {'1': 'payload', '3': 4, '4': 1, '5': 12, '9': 0, '10': 'payload'}, - const {'1': 'error', '3': 5, '4': 1, '5': 12, '9': 1, '10': 'error'}, - ], - '8': const [ - const {'1': 'one_of_payload'}, - const {'1': 'one_of_error'}, - ], -}; - -/// Descriptor for `SubscribeObject`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List subscribeObjectDescriptor = $convert.base64Decode('Cg9TdWJzY3JpYmVPYmplY3QSFgoGc291cmNlGAEgASgJUgZzb3VyY2USDgoCdHkYAiABKAVSAnR5Eg4KAmlkGAMgASgJUgJpZBIaCgdwYXlsb2FkGAQgASgMSABSB3BheWxvYWQSFgoFZXJyb3IYBSABKAxIAVIFZXJyb3JCEAoOb25lX29mX3BheWxvYWRCDgoMb25lX29mX2Vycm9y'); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbserver.dart deleted file mode 100644 index 1e092ab75a..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-dart-notify/subject.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: subject.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package - -export 'subject.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pb.dart deleted file mode 100644 index 971c06cd0a..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pb.dart +++ /dev/null @@ -1,167 +0,0 @@ -/// -// Generated code. Do not modify. -// source: kv.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields - -import 'dart:core' as $core; - -import 'package:fixnum/fixnum.dart' as $fixnum; -import 'package:protobuf/protobuf.dart' as $pb; - -enum KeyValue_OneOfStrValue { - strValue, - notSet -} - -enum KeyValue_OneOfIntValue { - intValue, - notSet -} - -enum KeyValue_OneOfFloatValue { - floatValue, - notSet -} - -enum KeyValue_OneOfBoolValue { - boolValue, - notSet -} - -class KeyValue extends $pb.GeneratedMessage { - static const $core.Map<$core.int, KeyValue_OneOfStrValue> _KeyValue_OneOfStrValueByTag = { - 2 : KeyValue_OneOfStrValue.strValue, - 0 : KeyValue_OneOfStrValue.notSet - }; - static const $core.Map<$core.int, KeyValue_OneOfIntValue> _KeyValue_OneOfIntValueByTag = { - 3 : KeyValue_OneOfIntValue.intValue, - 0 : KeyValue_OneOfIntValue.notSet - }; - static const $core.Map<$core.int, KeyValue_OneOfFloatValue> _KeyValue_OneOfFloatValueByTag = { - 4 : KeyValue_OneOfFloatValue.floatValue, - 0 : KeyValue_OneOfFloatValue.notSet - }; - static const $core.Map<$core.int, KeyValue_OneOfBoolValue> _KeyValue_OneOfBoolValueByTag = { - 5 : KeyValue_OneOfBoolValue.boolValue, - 0 : KeyValue_OneOfBoolValue.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'KeyValue', createEmptyInstance: create) - ..oo(0, [2]) - ..oo(1, [3]) - ..oo(2, [4]) - ..oo(3, [5]) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'key') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'strValue') - ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'intValue') - ..a<$core.double>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'floatValue', $pb.PbFieldType.OD) - ..aOB(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'boolValue') - ..hasRequiredFields = false - ; - - KeyValue._() : super(); - factory KeyValue({ - $core.String? key, - $core.String? strValue, - $fixnum.Int64? intValue, - $core.double? floatValue, - $core.bool? boolValue, - }) { - final _result = create(); - if (key != null) { - _result.key = key; - } - if (strValue != null) { - _result.strValue = strValue; - } - if (intValue != null) { - _result.intValue = intValue; - } - if (floatValue != null) { - _result.floatValue = floatValue; - } - if (boolValue != null) { - _result.boolValue = boolValue; - } - return _result; - } - factory KeyValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory KeyValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - KeyValue clone() => KeyValue()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - KeyValue copyWith(void Function(KeyValue) updates) => super.copyWith((message) => updates(message as KeyValue)) as KeyValue; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static KeyValue create() => KeyValue._(); - KeyValue createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static KeyValue getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static KeyValue? _defaultInstance; - - KeyValue_OneOfStrValue whichOneOfStrValue() => _KeyValue_OneOfStrValueByTag[$_whichOneof(0)]!; - void clearOneOfStrValue() => clearField($_whichOneof(0)); - - KeyValue_OneOfIntValue whichOneOfIntValue() => _KeyValue_OneOfIntValueByTag[$_whichOneof(1)]!; - void clearOneOfIntValue() => clearField($_whichOneof(1)); - - KeyValue_OneOfFloatValue whichOneOfFloatValue() => _KeyValue_OneOfFloatValueByTag[$_whichOneof(2)]!; - void clearOneOfFloatValue() => clearField($_whichOneof(2)); - - KeyValue_OneOfBoolValue whichOneOfBoolValue() => _KeyValue_OneOfBoolValueByTag[$_whichOneof(3)]!; - void clearOneOfBoolValue() => clearField($_whichOneof(3)); - - @$pb.TagNumber(1) - $core.String get key => $_getSZ(0); - @$pb.TagNumber(1) - set key($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasKey() => $_has(0); - @$pb.TagNumber(1) - void clearKey() => clearField(1); - - @$pb.TagNumber(2) - $core.String get strValue => $_getSZ(1); - @$pb.TagNumber(2) - set strValue($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasStrValue() => $_has(1); - @$pb.TagNumber(2) - void clearStrValue() => clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get intValue => $_getI64(2); - @$pb.TagNumber(3) - set intValue($fixnum.Int64 v) { $_setInt64(2, v); } - @$pb.TagNumber(3) - $core.bool hasIntValue() => $_has(2); - @$pb.TagNumber(3) - void clearIntValue() => clearField(3); - - @$pb.TagNumber(4) - $core.double get floatValue => $_getN(3); - @$pb.TagNumber(4) - set floatValue($core.double v) { $_setDouble(3, v); } - @$pb.TagNumber(4) - $core.bool hasFloatValue() => $_has(3); - @$pb.TagNumber(4) - void clearFloatValue() => clearField(4); - - @$pb.TagNumber(5) - $core.bool get boolValue => $_getBF(4); - @$pb.TagNumber(5) - set boolValue($core.bool v) { $_setBool(4, v); } - @$pb.TagNumber(5) - $core.bool hasBoolValue() => $_has(4); - @$pb.TagNumber(5) - void clearBoolValue() => clearField(5); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbenum.dart deleted file mode 100644 index 79c2244e07..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbenum.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// -// Generated code. Do not modify. -// source: kv.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbjson.dart deleted file mode 100644 index 45152125bb..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbjson.dart +++ /dev/null @@ -1,30 +0,0 @@ -/// -// Generated code. Do not modify. -// source: kv.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package - -import 'dart:core' as $core; -import 'dart:convert' as $convert; -import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use keyValueDescriptor instead') -const KeyValue$json = const { - '1': 'KeyValue', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const {'1': 'str_value', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'strValue'}, - const {'1': 'int_value', '3': 3, '4': 1, '5': 3, '9': 1, '10': 'intValue'}, - const {'1': 'float_value', '3': 4, '4': 1, '5': 1, '9': 2, '10': 'floatValue'}, - const {'1': 'bool_value', '3': 5, '4': 1, '5': 8, '9': 3, '10': 'boolValue'}, - ], - '8': const [ - const {'1': 'one_of_str_value'}, - const {'1': 'one_of_int_value'}, - const {'1': 'one_of_float_value'}, - const {'1': 'one_of_bool_value'}, - ], -}; - -/// Descriptor for `KeyValue`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List keyValueDescriptor = $convert.base64Decode('CghLZXlWYWx1ZRIQCgNrZXkYASABKAlSA2tleRIdCglzdHJfdmFsdWUYAiABKAlIAFIIc3RyVmFsdWUSHQoJaW50X3ZhbHVlGAMgASgDSAFSCGludFZhbHVlEiEKC2Zsb2F0X3ZhbHVlGAQgASgBSAJSCmZsb2F0VmFsdWUSHwoKYm9vbF92YWx1ZRgFIAEoCEgDUglib29sVmFsdWVCEgoQb25lX29mX3N0cl92YWx1ZUISChBvbmVfb2ZfaW50X3ZhbHVlQhQKEm9uZV9vZl9mbG9hdF92YWx1ZUITChFvbmVfb2ZfYm9vbF92YWx1ZQ=='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbserver.dart deleted file mode 100644 index 0daeedf5a6..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/kv.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: kv.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package - -export 'kv.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/protobuf.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/protobuf.dart deleted file mode 100644 index ccc75e7e37..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-infra/protobuf.dart +++ /dev/null @@ -1,2 +0,0 @@ -// Auto-generated, do not edit -export './kv.pb.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pb.dart deleted file mode 100644 index 63c73c28f3..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pb.dart +++ /dev/null @@ -1,76 +0,0 @@ -/// -// Generated code. Do not modify. -// source: errors.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields - -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'errors.pbenum.dart'; - -export 'errors.pbenum.dart'; - -class WsError extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'WsError', createEmptyInstance: create) - ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'code', $pb.PbFieldType.OE, defaultOrMaker: ErrorCode.InternalError, valueOf: ErrorCode.valueOf, enumValues: ErrorCode.values) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'msg') - ..hasRequiredFields = false - ; - - WsError._() : super(); - factory WsError({ - ErrorCode? code, - $core.String? msg, - }) { - final _result = create(); - if (code != null) { - _result.code = code; - } - if (msg != null) { - _result.msg = msg; - } - return _result; - } - factory WsError.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory WsError.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - WsError clone() => WsError()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - WsError copyWith(void Function(WsError) updates) => super.copyWith((message) => updates(message as WsError)) as WsError; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static WsError create() => WsError._(); - WsError createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static WsError getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static WsError? _defaultInstance; - - @$pb.TagNumber(1) - ErrorCode get code => $_getN(0); - @$pb.TagNumber(1) - set code(ErrorCode v) { setField(1, v); } - @$pb.TagNumber(1) - $core.bool hasCode() => $_has(0); - @$pb.TagNumber(1) - void clearCode() => clearField(1); - - @$pb.TagNumber(2) - $core.String get msg => $_getSZ(1); - @$pb.TagNumber(2) - set msg($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasMsg() => $_has(1); - @$pb.TagNumber(2) - void clearMsg() => clearField(2); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbenum.dart deleted file mode 100644 index 215409e69c..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbenum.dart +++ /dev/null @@ -1,28 +0,0 @@ -/// -// Generated code. Do not modify. -// source: errors.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields - -// ignore_for_file: UNDEFINED_SHOWN_NAME -import 'dart:core' as $core; -import 'package:protobuf/protobuf.dart' as $pb; - -class ErrorCode extends $pb.ProtobufEnum { - static const ErrorCode InternalError = ErrorCode._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'InternalError'); - static const ErrorCode UnsupportedMessage = ErrorCode._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UnsupportedMessage'); - static const ErrorCode Unauthorized = ErrorCode._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Unauthorized'); - - static const $core.List values = [ - InternalError, - UnsupportedMessage, - Unauthorized, - ]; - - static final $core.Map<$core.int, ErrorCode> _byValue = $pb.ProtobufEnum.initByValue(values); - static ErrorCode? valueOf($core.int value) => _byValue[value]; - - const ErrorCode._($core.int v, $core.String n) : super(v, n); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbjson.dart deleted file mode 100644 index c1039debcf..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbjson.dart +++ /dev/null @@ -1,33 +0,0 @@ -/// -// Generated code. Do not modify. -// source: errors.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package - -import 'dart:core' as $core; -import 'dart:convert' as $convert; -import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use errorCodeDescriptor instead') -const ErrorCode$json = const { - '1': 'ErrorCode', - '2': const [ - const {'1': 'InternalError', '2': 0}, - const {'1': 'UnsupportedMessage', '2': 1}, - const {'1': 'Unauthorized', '2': 2}, - ], -}; - -/// Descriptor for `ErrorCode`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List errorCodeDescriptor = $convert.base64Decode('CglFcnJvckNvZGUSEQoNSW50ZXJuYWxFcnJvchAAEhYKElVuc3VwcG9ydGVkTWVzc2FnZRABEhAKDFVuYXV0aG9yaXplZBAC'); -@$core.Deprecated('Use wsErrorDescriptor instead') -const WsError$json = const { - '1': 'WsError', - '2': const [ - const {'1': 'code', '3': 1, '4': 1, '5': 14, '6': '.ErrorCode', '10': 'code'}, - const {'1': 'msg', '3': 2, '4': 1, '5': 9, '10': 'msg'}, - ], -}; - -/// Descriptor for `WsError`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List wsErrorDescriptor = $convert.base64Decode('CgdXc0Vycm9yEh4KBGNvZGUYASABKA4yCi5FcnJvckNvZGVSBGNvZGUSEAoDbXNnGAIgASgJUgNtc2c='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbserver.dart deleted file mode 100644 index 18b02b9216..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/errors.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: errors.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package - -export 'errors.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pb.dart deleted file mode 100644 index 0c07e01026..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pb.dart +++ /dev/null @@ -1,76 +0,0 @@ -/// -// Generated code. Do not modify. -// source: msg.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields - -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'msg.pbenum.dart'; - -export 'msg.pbenum.dart'; - -class WsMessage extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'WsMessage', createEmptyInstance: create) - ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'module', $pb.PbFieldType.OE, defaultOrMaker: WsModule.Doc, valueOf: WsModule.valueOf, enumValues: WsModule.values) - ..a<$core.List<$core.int>>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'data', $pb.PbFieldType.OY) - ..hasRequiredFields = false - ; - - WsMessage._() : super(); - factory WsMessage({ - WsModule? module, - $core.List<$core.int>? data, - }) { - final _result = create(); - if (module != null) { - _result.module = module; - } - if (data != null) { - _result.data = data; - } - return _result; - } - factory WsMessage.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory WsMessage.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - WsMessage clone() => WsMessage()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - WsMessage copyWith(void Function(WsMessage) updates) => super.copyWith((message) => updates(message as WsMessage)) as WsMessage; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static WsMessage create() => WsMessage._(); - WsMessage createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static WsMessage getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static WsMessage? _defaultInstance; - - @$pb.TagNumber(1) - WsModule get module => $_getN(0); - @$pb.TagNumber(1) - set module(WsModule v) { setField(1, v); } - @$pb.TagNumber(1) - $core.bool hasModule() => $_has(0); - @$pb.TagNumber(1) - void clearModule() => clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get data => $_getN(1); - @$pb.TagNumber(2) - set data($core.List<$core.int> v) { $_setBytes(1, v); } - @$pb.TagNumber(2) - $core.bool hasData() => $_has(1); - @$pb.TagNumber(2) - void clearData() => clearField(2); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbenum.dart deleted file mode 100644 index dddbfe6eaa..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbenum.dart +++ /dev/null @@ -1,24 +0,0 @@ -/// -// Generated code. Do not modify. -// source: msg.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields - -// ignore_for_file: UNDEFINED_SHOWN_NAME -import 'dart:core' as $core; -import 'package:protobuf/protobuf.dart' as $pb; - -class WsModule extends $pb.ProtobufEnum { - static const WsModule Doc = WsModule._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'Doc'); - - static const $core.List values = [ - Doc, - ]; - - static final $core.Map<$core.int, WsModule> _byValue = $pb.ProtobufEnum.initByValue(values); - static WsModule? valueOf($core.int value) => _byValue[value]; - - const WsModule._($core.int v, $core.String n) : super(v, n); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbjson.dart deleted file mode 100644 index 13899cc203..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbjson.dart +++ /dev/null @@ -1,31 +0,0 @@ -/// -// Generated code. Do not modify. -// source: msg.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package - -import 'dart:core' as $core; -import 'dart:convert' as $convert; -import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use wsModuleDescriptor instead') -const WsModule$json = const { - '1': 'WsModule', - '2': const [ - const {'1': 'Doc', '2': 0}, - ], -}; - -/// Descriptor for `WsModule`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List wsModuleDescriptor = $convert.base64Decode('CghXc01vZHVsZRIHCgNEb2MQAA=='); -@$core.Deprecated('Use wsMessageDescriptor instead') -const WsMessage$json = const { - '1': 'WsMessage', - '2': const [ - const {'1': 'module', '3': 1, '4': 1, '5': 14, '6': '.WsModule', '10': 'module'}, - const {'1': 'data', '3': 2, '4': 1, '5': 12, '10': 'data'}, - ], -}; - -/// Descriptor for `WsMessage`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List wsMessageDescriptor = $convert.base64Decode('CglXc01lc3NhZ2USIQoGbW9kdWxlGAEgASgOMgkuV3NNb2R1bGVSBm1vZHVsZRISCgRkYXRhGAIgASgMUgRkYXRh'); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbserver.dart deleted file mode 100644 index e6a7eccb26..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/msg.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: msg.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package - -export 'msg.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/protobuf.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/protobuf.dart deleted file mode 100644 index 3d5e1cc240..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-ws/protobuf.dart +++ /dev/null @@ -1,3 +0,0 @@ -// Auto-generated, do not edit -export './errors.pb.dart'; -export './msg.pb.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/rust_stream.dart b/frontend/app_flowy/packages/flowy_sdk/lib/rust_stream.dart index b301841601..633ebfe3b8 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/rust_stream.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/rust_stream.dart @@ -3,7 +3,7 @@ import 'dart:async'; import 'dart:typed_data'; import 'dart:ffi'; import 'package:flowy_log/flowy_log.dart'; -import 'protobuf/flowy-dart-notify/subject.pb.dart'; +import 'protobuf/dart-notify/subject.pb.dart'; typedef ObserverCallback = void Function(SubscribeObject observable); diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml index ca4bf6d4bc..592c6e1d6c 100644 --- a/frontend/rust-lib/Cargo.toml +++ b/frontend/rust-lib/Cargo.toml @@ -8,7 +8,7 @@ members = [ "flowy-user", "flowy-test", "flowy-database", - "flowy-workspace", + "flowy-core", "dart-notify", "flowy-document", ] diff --git a/frontend/rust-lib/flowy-workspace/Cargo.toml b/frontend/rust-lib/flowy-core/Cargo.toml similarity index 97% rename from frontend/rust-lib/flowy-workspace/Cargo.toml rename to frontend/rust-lib/flowy-core/Cargo.toml index d4702c08ff..2df640a9e3 100644 --- a/frontend/rust-lib/flowy-workspace/Cargo.toml +++ b/frontend/rust-lib/flowy-core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "flowy-workspace" +name = "flowy-core" version = "0.1.0" edition = "2018" diff --git a/frontend/rust-lib/flowy-workspace/Flowy.toml b/frontend/rust-lib/flowy-core/Flowy.toml similarity index 100% rename from frontend/rust-lib/flowy-workspace/Flowy.toml rename to frontend/rust-lib/flowy-core/Flowy.toml diff --git a/frontend/rust-lib/flowy-workspace/src/errors.rs b/frontend/rust-lib/flowy-core/src/errors.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/errors.rs rename to frontend/rust-lib/flowy-core/src/errors.rs diff --git a/frontend/rust-lib/flowy-workspace/src/event.rs b/frontend/rust-lib/flowy-core/src/event.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/event.rs rename to frontend/rust-lib/flowy-core/src/event.rs diff --git a/frontend/rust-lib/flowy-workspace/src/handlers/app_handler.rs b/frontend/rust-lib/flowy-core/src/handlers/app_handler.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/handlers/app_handler.rs rename to frontend/rust-lib/flowy-core/src/handlers/app_handler.rs diff --git a/frontend/rust-lib/flowy-workspace/src/handlers/mod.rs b/frontend/rust-lib/flowy-core/src/handlers/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/handlers/mod.rs rename to frontend/rust-lib/flowy-core/src/handlers/mod.rs diff --git a/frontend/rust-lib/flowy-workspace/src/handlers/trash_handler.rs b/frontend/rust-lib/flowy-core/src/handlers/trash_handler.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/handlers/trash_handler.rs rename to frontend/rust-lib/flowy-core/src/handlers/trash_handler.rs diff --git a/frontend/rust-lib/flowy-workspace/src/handlers/view_handler.rs b/frontend/rust-lib/flowy-core/src/handlers/view_handler.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/handlers/view_handler.rs rename to frontend/rust-lib/flowy-core/src/handlers/view_handler.rs diff --git a/frontend/rust-lib/flowy-workspace/src/handlers/workspace_handler.rs b/frontend/rust-lib/flowy-core/src/handlers/workspace_handler.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/handlers/workspace_handler.rs rename to frontend/rust-lib/flowy-core/src/handlers/workspace_handler.rs diff --git a/frontend/rust-lib/flowy-workspace/src/lib.rs b/frontend/rust-lib/flowy-core/src/lib.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/lib.rs rename to frontend/rust-lib/flowy-core/src/lib.rs diff --git a/frontend/rust-lib/flowy-workspace/src/macros.rs b/frontend/rust-lib/flowy-core/src/macros.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/macros.rs rename to frontend/rust-lib/flowy-core/src/macros.rs diff --git a/frontend/rust-lib/flowy-workspace/src/module.rs b/frontend/rust-lib/flowy-core/src/module.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/module.rs rename to frontend/rust-lib/flowy-core/src/module.rs diff --git a/frontend/rust-lib/flowy-workspace/src/notify/mod.rs b/frontend/rust-lib/flowy-core/src/notify/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/notify/mod.rs rename to frontend/rust-lib/flowy-core/src/notify/mod.rs diff --git a/frontend/rust-lib/flowy-workspace/src/notify/observable.rs b/frontend/rust-lib/flowy-core/src/notify/observable.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/notify/observable.rs rename to frontend/rust-lib/flowy-core/src/notify/observable.rs diff --git a/frontend/rust-lib/flowy-workspace/src/protobuf/mod.rs b/frontend/rust-lib/flowy-core/src/protobuf/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/protobuf/mod.rs rename to frontend/rust-lib/flowy-core/src/protobuf/mod.rs diff --git a/frontend/rust-lib/flowy-workspace/src/protobuf/model/errors.rs b/frontend/rust-lib/flowy-core/src/protobuf/model/errors.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/protobuf/model/errors.rs rename to frontend/rust-lib/flowy-core/src/protobuf/model/errors.rs diff --git a/frontend/rust-lib/flowy-workspace/src/protobuf/model/event.rs b/frontend/rust-lib/flowy-core/src/protobuf/model/event.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/protobuf/model/event.rs rename to frontend/rust-lib/flowy-core/src/protobuf/model/event.rs diff --git a/frontend/rust-lib/flowy-workspace/src/protobuf/model/mod.rs b/frontend/rust-lib/flowy-core/src/protobuf/model/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/protobuf/model/mod.rs rename to frontend/rust-lib/flowy-core/src/protobuf/model/mod.rs diff --git a/frontend/rust-lib/flowy-workspace/src/protobuf/model/observable.rs b/frontend/rust-lib/flowy-core/src/protobuf/model/observable.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/protobuf/model/observable.rs rename to frontend/rust-lib/flowy-core/src/protobuf/model/observable.rs diff --git a/frontend/rust-lib/flowy-workspace/src/protobuf/proto/errors.proto b/frontend/rust-lib/flowy-core/src/protobuf/proto/errors.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/protobuf/proto/errors.proto rename to frontend/rust-lib/flowy-core/src/protobuf/proto/errors.proto diff --git a/frontend/rust-lib/flowy-workspace/src/protobuf/proto/event.proto b/frontend/rust-lib/flowy-core/src/protobuf/proto/event.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/protobuf/proto/event.proto rename to frontend/rust-lib/flowy-core/src/protobuf/proto/event.proto diff --git a/frontend/rust-lib/flowy-workspace/src/protobuf/proto/observable.proto b/frontend/rust-lib/flowy-core/src/protobuf/proto/observable.proto similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/protobuf/proto/observable.proto rename to frontend/rust-lib/flowy-core/src/protobuf/proto/observable.proto diff --git a/frontend/rust-lib/flowy-workspace/src/services/app_controller.rs b/frontend/rust-lib/flowy-core/src/services/app_controller.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/services/app_controller.rs rename to frontend/rust-lib/flowy-core/src/services/app_controller.rs diff --git a/frontend/rust-lib/flowy-workspace/src/services/database.rs b/frontend/rust-lib/flowy-core/src/services/database.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/services/database.rs rename to frontend/rust-lib/flowy-core/src/services/database.rs diff --git a/frontend/rust-lib/flowy-workspace/src/services/mod.rs b/frontend/rust-lib/flowy-core/src/services/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/services/mod.rs rename to frontend/rust-lib/flowy-core/src/services/mod.rs diff --git a/frontend/rust-lib/flowy-workspace/src/services/server/mod.rs b/frontend/rust-lib/flowy-core/src/services/server/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/services/server/mod.rs rename to frontend/rust-lib/flowy-core/src/services/server/mod.rs diff --git a/frontend/rust-lib/flowy-workspace/src/services/server/server_api.rs b/frontend/rust-lib/flowy-core/src/services/server/server_api.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/services/server/server_api.rs rename to frontend/rust-lib/flowy-core/src/services/server/server_api.rs diff --git a/frontend/rust-lib/flowy-workspace/src/services/server/server_api_mock.rs b/frontend/rust-lib/flowy-core/src/services/server/server_api_mock.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/services/server/server_api_mock.rs rename to frontend/rust-lib/flowy-core/src/services/server/server_api_mock.rs diff --git a/frontend/rust-lib/flowy-workspace/src/services/trash_can.rs b/frontend/rust-lib/flowy-core/src/services/trash_can.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/services/trash_can.rs rename to frontend/rust-lib/flowy-core/src/services/trash_can.rs diff --git a/frontend/rust-lib/flowy-workspace/src/services/view_controller.rs b/frontend/rust-lib/flowy-core/src/services/view_controller.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/services/view_controller.rs rename to frontend/rust-lib/flowy-core/src/services/view_controller.rs diff --git a/frontend/rust-lib/flowy-workspace/src/services/workspace_controller.rs b/frontend/rust-lib/flowy-core/src/services/workspace_controller.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/services/workspace_controller.rs rename to frontend/rust-lib/flowy-core/src/services/workspace_controller.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/app/app_sql.rs b/frontend/rust-lib/flowy-core/src/sql_tables/app/app_sql.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/app/app_sql.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/app/app_sql.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/app/app_table.rs b/frontend/rust-lib/flowy-core/src/sql_tables/app/app_table.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/app/app_table.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/app/app_table.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/app/mod.rs b/frontend/rust-lib/flowy-core/src/sql_tables/app/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/app/mod.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/app/mod.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/mod.rs b/frontend/rust-lib/flowy-core/src/sql_tables/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/mod.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/mod.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/trash/mod.rs b/frontend/rust-lib/flowy-core/src/sql_tables/trash/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/trash/mod.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/trash/mod.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/trash/trash_sql.rs b/frontend/rust-lib/flowy-core/src/sql_tables/trash/trash_sql.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/trash/trash_sql.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/trash/trash_sql.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/trash/trash_table.rs b/frontend/rust-lib/flowy-core/src/sql_tables/trash/trash_table.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/trash/trash_table.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/trash/trash_table.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/view/mod.rs b/frontend/rust-lib/flowy-core/src/sql_tables/view/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/view/mod.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/view/mod.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/view/view_sql.rs b/frontend/rust-lib/flowy-core/src/sql_tables/view/view_sql.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/view/view_sql.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/view/view_sql.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/view/view_table.rs b/frontend/rust-lib/flowy-core/src/sql_tables/view/view_table.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/view/view_table.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/view/view_table.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/workspace/mod.rs b/frontend/rust-lib/flowy-core/src/sql_tables/workspace/mod.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/workspace/mod.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/workspace/mod.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/workspace/workspace_sql.rs b/frontend/rust-lib/flowy-core/src/sql_tables/workspace/workspace_sql.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/workspace/workspace_sql.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/workspace/workspace_sql.rs diff --git a/frontend/rust-lib/flowy-workspace/src/sql_tables/workspace/workspace_table.rs b/frontend/rust-lib/flowy-core/src/sql_tables/workspace/workspace_table.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/sql_tables/workspace/workspace_table.rs rename to frontend/rust-lib/flowy-core/src/sql_tables/workspace/workspace_table.rs diff --git a/frontend/rust-lib/flowy-workspace/src/util.rs b/frontend/rust-lib/flowy-core/src/util.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/src/util.rs rename to frontend/rust-lib/flowy-core/src/util.rs diff --git a/frontend/rust-lib/flowy-workspace/tests/workspace/app_test.rs b/frontend/rust-lib/flowy-core/tests/workspace/app_test.rs similarity index 98% rename from frontend/rust-lib/flowy-workspace/tests/workspace/app_test.rs rename to frontend/rust-lib/flowy-core/tests/workspace/app_test.rs index cfa4b82088..74521bd0d3 100644 --- a/frontend/rust-lib/flowy-workspace/tests/workspace/app_test.rs +++ b/frontend/rust-lib/flowy-core/tests/workspace/app_test.rs @@ -1,9 +1,9 @@ -use flowy_test::workspace::*; -use flowy_workspace::entities::{ +use flowy_core::entities::{ app::QueryAppRequest, trash::{TrashIdentifier, TrashType}, view::*, }; +use flowy_test::workspace::*; #[tokio::test] #[should_panic] diff --git a/frontend/rust-lib/flowy-workspace/tests/workspace/main.rs b/frontend/rust-lib/flowy-core/tests/workspace/main.rs similarity index 100% rename from frontend/rust-lib/flowy-workspace/tests/workspace/main.rs rename to frontend/rust-lib/flowy-core/tests/workspace/main.rs diff --git a/frontend/rust-lib/flowy-workspace/tests/workspace/view_test.rs b/frontend/rust-lib/flowy-core/tests/workspace/view_test.rs similarity index 98% rename from frontend/rust-lib/flowy-workspace/tests/workspace/view_test.rs rename to frontend/rust-lib/flowy-core/tests/workspace/view_test.rs index 51fa02b2e9..220d0aeb70 100644 --- a/frontend/rust-lib/flowy-workspace/tests/workspace/view_test.rs +++ b/frontend/rust-lib/flowy-core/tests/workspace/view_test.rs @@ -1,9 +1,9 @@ -use flowy_test::{workspace::*, FlowyTest}; -use flowy_workspace::entities::{ +use flowy_core::entities::{ app::QueryAppRequest, trash::{TrashIdentifier, TrashType}, view::*, }; +use flowy_test::{workspace::*, FlowyTest}; #[tokio::test] #[should_panic] diff --git a/frontend/rust-lib/flowy-workspace/tests/workspace/workspace_test.rs b/frontend/rust-lib/flowy-core/tests/workspace/workspace_test.rs similarity index 99% rename from frontend/rust-lib/flowy-workspace/tests/workspace/workspace_test.rs rename to frontend/rust-lib/flowy-core/tests/workspace/workspace_test.rs index 44e13f6664..62f8bbdfa5 100644 --- a/frontend/rust-lib/flowy-workspace/tests/workspace/workspace_test.rs +++ b/frontend/rust-lib/flowy-core/tests/workspace/workspace_test.rs @@ -1,9 +1,9 @@ -use flowy_test::{builder::*, workspace::*, FlowyTest}; -use flowy_workspace::{ +use flowy_core::{ entities::workspace::{CreateWorkspaceRequest, QueryWorkspaceRequest}, event::WorkspaceEvent::*, prelude::*, }; +use flowy_test::{builder::*, workspace::*, FlowyTest}; #[tokio::test] async fn workspace_read_all() { diff --git a/frontend/rust-lib/flowy-sdk/Cargo.toml b/frontend/rust-lib/flowy-sdk/Cargo.toml index a3067469de..057e4a7825 100644 --- a/frontend/rust-lib/flowy-sdk/Cargo.toml +++ b/frontend/rust-lib/flowy-sdk/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" lib-dispatch = { path = "../lib-dispatch" } lib-log = { path = "../lib-log" } flowy-user = { path = "../flowy-user" } -flowy-workspace = { path = "../flowy-workspace", default-features = false } +flowy-core = { path = "../flowy-core", default-features = false } flowy-database = { path = "../flowy-database" } flowy-document = { path = "../flowy-document" } lib-infra = { path = "../lib-infra" } @@ -36,5 +36,5 @@ tokio = { version = "1", features = ["full"]} futures-util = "0.3.15" [features] -http_server = ["flowy-user/http_server", "flowy-workspace/http_server", "flowy-document/http_server"] +http_server = ["flowy-user/http_server", "flowy-core/http_server", "flowy-document/http_server"] use_bunyan = ["lib-log/use_bunyan"] \ No newline at end of file diff --git a/frontend/rust-lib/flowy-sdk/src/deps_resolve/workspace_deps.rs b/frontend/rust-lib/flowy-sdk/src/deps_resolve/workspace_deps.rs index c1c9d33e72..e89ad9138a 100644 --- a/frontend/rust-lib/flowy-sdk/src/deps_resolve/workspace_deps.rs +++ b/frontend/rust-lib/flowy-sdk/src/deps_resolve/workspace_deps.rs @@ -1,9 +1,9 @@ -use flowy_database::ConnectionPool; -use flowy_user::services::user::UserSession; -use flowy_workspace::{ +use flowy_core::{ errors::WorkspaceError, module::{WorkspaceDatabase, WorkspaceUser}, }; +use flowy_database::ConnectionPool; +use flowy_user::services::user::UserSession; use std::sync::Arc; pub struct WorkspaceDepsResolver { diff --git a/frontend/rust-lib/flowy-sdk/src/lib.rs b/frontend/rust-lib/flowy-sdk/src/lib.rs index 0f9d93f668..fc8aa73fca 100644 --- a/frontend/rust-lib/flowy-sdk/src/lib.rs +++ b/frontend/rust-lib/flowy-sdk/src/lib.rs @@ -3,12 +3,12 @@ mod deps_resolve; pub mod module; use crate::deps_resolve::WorkspaceDepsResolver; use backend_service::configuration::ClientServerConfiguration; +use flowy_core::{errors::WorkspaceError, prelude::WorkspaceController}; use flowy_document::module::FlowyDocument; use flowy_user::{ prelude::UserStatus, services::user::{UserSession, UserSessionConfig}, }; -use flowy_workspace::{errors::WorkspaceError, prelude::WorkspaceController}; use lib_dispatch::prelude::*; use lib_infra::entities::network_state::NetworkType; use module::mk_modules; @@ -177,5 +177,5 @@ fn mk_workspace_controller( ) -> Arc { let workspace_deps = WorkspaceDepsResolver::new(user_session); let (user, database) = workspace_deps.split_into(); - flowy_workspace::module::init_workspace_controller(user, database, flowy_document, server_config) + flowy_core::module::init_workspace_controller(user, database, flowy_document, server_config) } diff --git a/frontend/rust-lib/flowy-sdk/src/module.rs b/frontend/rust-lib/flowy-sdk/src/module.rs index 214d4e6279..61caf42922 100644 --- a/frontend/rust-lib/flowy-sdk/src/module.rs +++ b/frontend/rust-lib/flowy-sdk/src/module.rs @@ -1,8 +1,8 @@ use crate::deps_resolve::DocumentDepsResolver; use backend_service::configuration::ClientServerConfiguration; +use flowy_core::prelude::WorkspaceController; use flowy_document::module::FlowyDocument; use flowy_user::services::user::UserSession; -use flowy_workspace::prelude::WorkspaceController; use lib_dispatch::prelude::Module; use std::sync::Arc; @@ -15,7 +15,7 @@ pub fn mk_modules(workspace_controller: Arc, user_session: fn mk_user_module(user_session: Arc) -> Module { flowy_user::module::create(user_session) } fn mk_workspace_module(workspace_controller: Arc) -> Module { - flowy_workspace::module::create(workspace_controller) + flowy_core::module::create(workspace_controller) } pub fn mk_document_module( diff --git a/frontend/rust-lib/flowy-test/Cargo.toml b/frontend/rust-lib/flowy-test/Cargo.toml index 6c3bafa854..f94de9e574 100644 --- a/frontend/rust-lib/flowy-test/Cargo.toml +++ b/frontend/rust-lib/flowy-test/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" [dependencies] flowy-sdk = { path = "../flowy-sdk"} flowy-user = { path = "../flowy-user"} -flowy-workspace = { path = "../flowy-workspace", default-features = false} +flowy-core = { path = "../flowy-core", default-features = false} flowy-document = { path = "../flowy-document"} lib-dispatch = { path = "../lib-dispatch" } lib-infra = { path = "../lib-infra" } diff --git a/frontend/rust-lib/flowy-test/src/builder.rs b/frontend/rust-lib/flowy-test/src/builder.rs index d48a450dc7..5e23f331a4 100644 --- a/frontend/rust-lib/flowy-test/src/builder.rs +++ b/frontend/rust-lib/flowy-test/src/builder.rs @@ -8,9 +8,9 @@ use std::{ use crate::FlowyTestSDK; use lib_dispatch::prelude::*; +use flowy_core::errors::WorkspaceError; use flowy_sdk::*; use flowy_user::errors::UserError; -use flowy_workspace::errors::WorkspaceError; use std::{convert::TryFrom, marker::PhantomData, sync::Arc}; pub type FlowyWorkspaceTest = Builder; diff --git a/frontend/rust-lib/flowy-test/src/helper.rs b/frontend/rust-lib/flowy-test/src/helper.rs index e0e0e88df6..aa84fd583c 100644 --- a/frontend/rust-lib/flowy-test/src/helper.rs +++ b/frontend/rust-lib/flowy-test/src/helper.rs @@ -2,16 +2,16 @@ use bytes::Bytes; use lib_dispatch::prelude::{EventDispatcher, ModuleRequest, ToBytes}; use lib_infra::{kv::KV, uuid}; +use flowy_core::{ + entities::workspace::{CreateWorkspaceRequest, QueryWorkspaceRequest, Workspace}, + errors::WorkspaceError, + event::WorkspaceEvent::{CreateWorkspace, OpenWorkspace}, +}; use flowy_user::{ entities::{SignInRequest, SignUpRequest, UserProfile}, errors::UserError, event::UserEvent::{SignIn, SignOut, SignUp}, }; -use flowy_workspace::{ - entities::workspace::{CreateWorkspaceRequest, QueryWorkspaceRequest, Workspace}, - errors::WorkspaceError, - event::WorkspaceEvent::{CreateWorkspace, OpenWorkspace}, -}; use std::{fs, path::PathBuf, sync::Arc}; pub fn root_dir() -> String { diff --git a/frontend/rust-lib/flowy-test/src/workspace.rs b/frontend/rust-lib/flowy-test/src/workspace.rs index 6d6000c9f4..d2c2f77b48 100644 --- a/frontend/rust-lib/flowy-test/src/workspace.rs +++ b/frontend/rust-lib/flowy-test/src/workspace.rs @@ -1,6 +1,5 @@ use crate::prelude::*; -use flowy_document_infra::entities::doc::Doc; -use flowy_workspace::{ +use flowy_core::{ entities::{ app::*, trash::{RepeatedTrash, TrashIdentifier}, @@ -10,6 +9,7 @@ use flowy_workspace::{ errors::ErrorCode, event::WorkspaceEvent::*, }; +use flowy_document_infra::entities::doc::Doc; pub struct WorkspaceTest { pub sdk: FlowyTestSDK, diff --git a/frontend/scripts/makefile/tests.toml b/frontend/scripts/makefile/tests.toml index bf177ce5f8..90720d438a 100644 --- a/frontend/scripts/makefile/tests.toml +++ b/frontend/scripts/makefile/tests.toml @@ -13,7 +13,7 @@ cargo test dependencies = ["rm_cache"] script = """ cd rust-lib -cargo test --features "flowy-workspace/http_server","flowy-user/http_server" +cargo test --features "flowy-core/http_server","flowy-user/http_server" """