Skip to content

Commit

Permalink
feat: create websocket crate for wasm and native (#269)
Browse files Browse the repository at this point in the history
* feat: create websocket crate for wasm and native

* chore: update

* chore: replace with websocket::message

* chore: fix client api build

* chore: fix compile

* fix: ci

* refactor: add client api test crate
  • Loading branch information
appflowy authored Jan 23, 2024
1 parent ee3abdb commit 3377e66
Show file tree
Hide file tree
Showing 68 changed files with 1,718 additions and 352 deletions.
152 changes: 134 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ gotrue = { path = "libs/gotrue" }
gotrue-entity = { path = "libs/gotrue-entity" }
infra = { path = "libs/infra" }
app-error = { workspace = true, features = ["sqlx_error", "actix_web_error", "tokio_error"] }
shared_entity = { path = "libs/shared-entity", features = ["cloud"] }
shared-entity = { path = "libs/shared-entity", features = ["cloud"] }
workspace-template = { workspace = true }
realtime-entity.workspace = true

Expand All @@ -91,6 +91,7 @@ once_cell = "1.19.0"
tempfile = "3.9.0"
assert-json-diff = "2.0.2"
scraper = "0.17.1"
client-api-test-util = { path = "libs/client-api-test-util" }
client-api = { path = "libs/client-api", features = ["collab-sync", "test_util"] }
opener = "0.6.1"
image = "0.23.14"
Expand Down Expand Up @@ -120,13 +121,16 @@ members = [
"libs/app_error",
"libs/workspace-template",
"libs/encrypt",
"libs/realtime-protocol"
"libs/realtime-protocol",
"libs/websocket",
"libs/client-api-test-util", "libs/wasm-test",
]

[workspace.dependencies]
realtime-entity = { path = "libs/realtime-entity" }
realtime-protocol = { path = "libs/realtime-protocol" }
database-entity = { path = "libs/database-entity" }
shared-entity = { path = "libs/shared-entity" }
app-error = { path = "libs/app_error" }
serde_json = "1.0.111"
serde = { version = "1.0.195", features = ["derive"] }
Expand All @@ -138,6 +142,12 @@ anyhow = "1.0.79"
tokio = { version = "1.35", features = ["sync"] }
yrs = "0.17.2"
bincode = "1.3.3"
websocket = { path = "libs/websocket" }
collab = { version = "0.1.0" }
collab-folder = { version = "0.1.0" }
tracing = { version = "0.1"}
collab-entity = { version = "0.1.0" }
gotrue = { path = "libs/gotrue" }

[profile.release]
lto = true
Expand Down
32 changes: 32 additions & 0 deletions libs/client-api-test-util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
name = "client-api-test-util"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bytes = "1.5.0"
mime = "0.3.17"
serde_json = "1.0.111"
tokio = { version = "1.0", features = ["sync"] }
tokio-stream = "0.1.14"
tracing.workspace = true
collab-folder.workspace = true
collab = { workspace = true, features = ["async-plugin"] }
client-api = { path = "../client-api", features = ["collab-sync", "test_util"] }
once_cell = "1.19.0"
tempfile = "3.9.0"
assert-json-diff = "2.0.2"
scraper = "0.17.1"
opener = "0.6.1"
image = "0.23.14"
database-entity.workspace = true
collab-entity.workspace = true
shared-entity.workspace = true
tracing-subscriber = { version = "0.3.18", features = ["registry", "env-filter", "ansi", "json"] }
uuid = "1.6.1"
lazy_static = "1.4.0"
dotenv = "0.15.0"
reqwest = "0.11.23"
gotrue.workspace = true
Loading

0 comments on commit 3377e66

Please sign in to comment.