Optimize server dependency and increase version

This commit is contained in:
Demmie 2023-07-08 21:12:16 -04:00
parent 589d5e0cd6
commit d6e762630e
No known key found for this signature in database
GPG Key ID: B06DAA3D432C6E9A
5 changed files with 25 additions and 32 deletions

38
Cargo.lock generated
View File

@ -324,9 +324,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "aw-client-rust"
version = "0.1.0"
source = "git+https://github.com/ActivityWatch/aw-server-rust?rev=d4253ed#d4253ed64dc6547a821190cc29bf7dca72c616d1"
source = "git+https://github.com/2e3s/aw-server-rust?rev=81db4c8#81db4c8f15b13f106bef960f3a4adf770fc71b50"
dependencies = [
"aw-models 0.1.0 (git+https://github.com/ActivityWatch/aw-server-rust?rev=d4253ed)",
"aw-models",
"chrono",
"gethostname 0.4.3",
"reqwest",
@ -338,10 +338,10 @@ dependencies = [
[[package]]
name = "aw-datastore"
version = "0.1.0"
source = "git+https://github.com/2e3s/aw-server-rust?rev=1c23a55#1c23a55df9f857b3bb50098e88c3458c2d047cd7"
source = "git+https://github.com/2e3s/aw-server-rust?rev=81db4c8#81db4c8f15b13f106bef960f3a4adf770fc71b50"
dependencies = [
"appdirs",
"aw-models 0.1.0 (git+https://github.com/2e3s/aw-server-rust?rev=1c23a55)",
"aw-models",
"aw-transform",
"chrono",
"log",
@ -354,19 +354,7 @@ dependencies = [
[[package]]
name = "aw-models"
version = "0.1.0"
source = "git+https://github.com/2e3s/aw-server-rust?rev=1c23a55#1c23a55df9f857b3bb50098e88c3458c2d047cd7"
dependencies = [
"chrono",
"log",
"schemars",
"serde",
"serde_json",
]
[[package]]
name = "aw-models"
version = "0.1.0"
source = "git+https://github.com/ActivityWatch/aw-server-rust?rev=d4253ed#d4253ed64dc6547a821190cc29bf7dca72c616d1"
source = "git+https://github.com/2e3s/aw-server-rust?rev=81db4c8#81db4c8f15b13f106bef960f3a4adf770fc71b50"
dependencies = [
"chrono",
"log",
@ -378,10 +366,10 @@ dependencies = [
[[package]]
name = "aw-query"
version = "0.1.0"
source = "git+https://github.com/2e3s/aw-server-rust?rev=1c23a55#1c23a55df9f857b3bb50098e88c3458c2d047cd7"
source = "git+https://github.com/2e3s/aw-server-rust?rev=81db4c8#81db4c8f15b13f106bef960f3a4adf770fc71b50"
dependencies = [
"aw-datastore",
"aw-models 0.1.0 (git+https://github.com/2e3s/aw-server-rust?rev=1c23a55)",
"aw-models",
"aw-transform",
"chrono",
"fancy-regex",
@ -394,12 +382,12 @@ dependencies = [
[[package]]
name = "aw-server"
version = "0.12.1"
source = "git+https://github.com/2e3s/aw-server-rust?rev=1c23a55#1c23a55df9f857b3bb50098e88c3458c2d047cd7"
source = "git+https://github.com/2e3s/aw-server-rust?rev=81db4c8#81db4c8f15b13f106bef960f3a4adf770fc71b50"
dependencies = [
"android_logger",
"appdirs",
"aw-datastore",
"aw-models 0.1.0 (git+https://github.com/2e3s/aw-server-rust?rev=1c23a55)",
"aw-models",
"aw-query",
"aw-transform",
"chrono",
@ -426,9 +414,9 @@ dependencies = [
[[package]]
name = "aw-transform"
version = "0.1.0"
source = "git+https://github.com/2e3s/aw-server-rust?rev=1c23a55#1c23a55df9f857b3bb50098e88c3458c2d047cd7"
source = "git+https://github.com/2e3s/aw-server-rust?rev=81db4c8#81db4c8f15b13f106bef960f3a4adf770fc71b50"
dependencies = [
"aw-models 0.1.0 (git+https://github.com/2e3s/aw-server-rust?rev=1c23a55)",
"aw-models",
"chrono",
"fancy-regex",
"log",
@ -439,7 +427,7 @@ dependencies = [
[[package]]
name = "awatcher"
version = "0.1.1"
version = "0.2.0"
dependencies = [
"anyhow",
"aw-datastore",
@ -3871,7 +3859,7 @@ checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
[[package]]
name = "watchers"
version = "0.1.1"
version = "0.2.0"
dependencies = [
"anyhow",
"async-trait",

View File

@ -18,7 +18,7 @@ image = { version = "0.24.6" }
members = ["watchers"]
[workspace.package]
version = "0.1.1"
version = "0.2.0"
[workspace.dependencies]
anyhow = "1.0.71"
@ -36,8 +36,8 @@ anyhow = { workspace = true }
tokio = { workspace = true, features = ["rt", "macros", "signal"] }
ksni = {version = "0.2.0", optional = true}
aw-server = { git = "https://github.com/2e3s/aw-server-rust", optional = true, rev = "1c23a55" }
aw-datastore = { git = "https://github.com/2e3s/aw-server-rust", optional = true, rev = "1c23a55" }
aw-server = { git = "https://github.com/2e3s/aw-server-rust", optional = true, rev = "81db4c8" }
aw-datastore = { git = "https://github.com/2e3s/aw-server-rust", optional = true, rev = "81db4c8" }
open = { version = "4.1.0", optional = true }
rust-embed = { version = "6.6.1", features = ["interpolate-folder-path"], optional = true }

View File

@ -17,7 +17,7 @@ pub async fn run(port: u32) {
let legacy_import = false;
let server_state = aw_server::endpoints::ServerState {
datastore: Mutex::new(aw_datastore::Datastore::new(db_path, legacy_import)),
asset_resolver: embed_asset_resolver!("$AW_WEBUI_DIST"),
asset_resolver: embed_asset_resolver!("$AW_WEBUI_DIST", None),
device_id,
};
build_rocket(server_state, config).launch().await.unwrap();

View File

@ -40,8 +40,13 @@ pub fn setup_logger(verbosity: LevelFilter) -> Result<(), fern::InitError> {
pub fn from_cli() -> anyhow::Result<RunnerConfig> {
let matches = Command::new("Activity Watcher")
.version("0.0.1")
.about("A set of ActivityWatch desktop watchers")
.version(env!("CARGO_PKG_VERSION"))
.about(
#[cfg(not(feature = "bundle"))]
"X11 and Wayland active window and idle watcher for ActivityWatch server",
#[cfg(feature = "bundle")]
"X11 and Wayland active window and idle watcher with a bundled ActivityWatch server",
)
.args([
arg!(-c --config <FILE> "Custom config file").value_parser(value_parser!(PathBuf)),
arg!(--port <PORT> "Custom server port")

View File

@ -13,7 +13,7 @@ path = "src/lib.rs"
rstest = "0.17.0"
[dependencies]
aw-client-rust = { git = "https://github.com/ActivityWatch/aw-server-rust", rev = "d4253ed" }
aw-client-rust = { git = "https://github.com/2e3s/aw-server-rust", rev = "81db4c8" }
wayland-client = "0.30.2"
wayland-scanner = "0.30"
wayland-backend = "0.1"