diff --git a/Cargo.lock b/Cargo.lock index 1a30cac..9851c50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -913,81 +913,6 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" -[[package]] -name = "dpts-cli" -version = "0.1.0" -dependencies = [ - "chrono", - "chrono-tz", - "clap", - "dpts-client", - "thiserror 2.0.12", - "tokio", - "toml", -] - -[[package]] -name = "dpts-client" -version = "0.1.0" -dependencies = [ - "chrono-tz", - "clap", - "dirs", - "dpts-core", - "serde", - "thiserror 2.0.12", - "tokio", - "toml", -] - -[[package]] -name = "dpts-core" -version = "0.1.0" -dependencies = [ - "async-graphql", - "axum", - "chrono", - "chrono-tz", - "clap", - "csv", - "cynic", - "dotenv", - "dpts-migration", - "iana-time-zone", - "log", - "sea-orm", - "serde", - "thiserror 2.0.12", - "tokio", - "toml", -] - -[[package]] -name = "dpts-migration" -version = "0.1.0" -dependencies = [ - "async-std", - "sea-orm-migration", -] - -[[package]] -name = "dpts-server" -version = "0.1.0" -dependencies = [ - "argon2", - "async-graphql", - "async-graphql-axum", - "axum", - "chrono", - "clap", - "dpts-core", - "rand 0.9.1", - "serde", - "thiserror 2.0.12", - "tokio", - "toml", -] - [[package]] name = "either" version = "1.15.0" @@ -2315,6 +2240,89 @@ dependencies = [ "yansi", ] +[[package]] +name = "progress-pile-cli" +version = "0.1.0" +dependencies = [ + "chrono", + "chrono-tz", + "clap", + "progress-pile-client", + "thiserror 2.0.12", + "tokio", + "toml", +] + +[[package]] +name = "progress-pile-client" +version = "0.1.0" +dependencies = [ + "chrono-tz", + "clap", + "dirs", + "progress-pile-core", + "serde", + "thiserror 2.0.12", + "tokio", + "toml", +] + +[[package]] +name = "progress-pile-client-migration" +version = "0.1.0" +dependencies = [ + "async-std", + "sea-orm-migration", +] + +[[package]] +name = "progress-pile-core" +version = "0.1.0" +dependencies = [ + "async-graphql", + "axum", + "chrono", + "chrono-tz", + "clap", + "csv", + "cynic", + "dotenv", + "iana-time-zone", + "log", + "progress-pile-server-migration", + "sea-orm", + "serde", + "thiserror 2.0.12", + "tokio", + "toml", +] + +[[package]] +name = "progress-pile-server" +version = "0.1.0" +dependencies = [ + "argon2", + "async-graphql", + "async-graphql-axum", + "axum", + "chrono", + "clap", + "progress-pile-core", + "rand 0.9.1", + "serde", + "thiserror 2.0.12", + "tokio", + "toml", +] + +[[package]] +name = "progress-pile-server-migration" +version = "0.1.0" +dependencies = [ + "async-std", + "sea-orm-migration", +] + [[package]] name = "quote" version = "1.0.40" diff --git a/Cargo.toml b/Cargo.toml index 6be57ce..00fe75f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,18 +1,19 @@ [workspace] -members = ["dpts-*"] +members = ["progress-pile-*"] [workspace.dependencies] async-graphql = { version = "7.0", features = ["chrono"] } -dpts-cli.path = "dpts-cli" -dpts-client.path = "dpts-client" -dpts-core = { path = "dpts-core" } -dpts-migration = {path = "dpts-migration"} -dpts-server = { path = "dpts-server" } chrono = {version = "0.4", features = ["serde"]} chrono-tz = {version = "0.10.3", features = ["serde"]} clap = {version = "4.5", features = ["derive"]} dirs = "6.0.0" dotenv = "0.15.0" +progress-pile-cli.path = "progress-pile-cli" +progress-pile-client.path = "progress-pile-client" +progress-pile-client-migration.path = "progress-pile-client-migration" +progress-pile-core = { path = "progress-pile-core" } +progress-pile-server.path = "progress-pile-server" +progress-pile-server-migration.path = "progress-pile-server-migration" serde = { version = "1.0", features = ["derive"] } thiserror = "2.0.12" tokio = "1.44.2" @@ -33,5 +34,5 @@ default-features = false version = "0.1.0" edition = "2024" license = "MIT" -repository = "https://github.com/fluo10/dpts" +repository = "https://github.com/fluo10/progres-pile" diff --git a/README.md b/README.md index a24d5af..116ffb4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# DPTS +# Progress Pile -Digital tools for Progress Token Stack \ No newline at end of file +Digital tools for Progress Pile, my personal lifehack. \ No newline at end of file diff --git a/dpts-client/src/lib.rs b/dpts-client/src/lib.rs deleted file mode 100644 index 1fe99a2..0000000 --- a/dpts-client/src/lib.rs +++ /dev/null @@ -1,7 +0,0 @@ -pub mod auth; -pub mod config; - -pub use dpts_core::error; - - - diff --git a/dpts-cli/Cargo.toml b/progress-pile-cli/Cargo.toml similarity index 81% rename from dpts-cli/Cargo.toml rename to progress-pile-cli/Cargo.toml index a1454d5..0c4910b 100644 --- a/dpts-cli/Cargo.toml +++ b/progress-pile-cli/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "dpts-cli" +name = "progress-pile-cli" version.workspace = true license.workspace = true edition.workspace = true repository.workspace = true [dependencies] -dpts-client = {workspace = true} +progress-pile-client = {workspace = true} chrono = {workspace = true} chrono-tz.workspace = true clap = {workspace = true, features = ["derive"]} diff --git a/dpts-cli/src/config.rs b/progress-pile-cli/src/config.rs similarity index 100% rename from dpts-cli/src/config.rs rename to progress-pile-cli/src/config.rs diff --git a/dpts-cli/src/init.rs b/progress-pile-cli/src/init.rs similarity index 95% rename from dpts-cli/src/init.rs rename to progress-pile-cli/src/init.rs index aa665e5..c21fc7e 100644 --- a/dpts-cli/src/init.rs +++ b/progress-pile-cli/src/init.rs @@ -1,8 +1,8 @@ use clap::{Args, Subcommand}; use chrono_tz::Tz; use crate::error::Error; -use dpts_client::auth::try_login; -use dpts_client::config::{ +use progress_pile_client::auth::try_login; +use progress_pile_client::config::{ ClientConfig, ClientRemoteStorageConfig, ClientStorageConfig, Config, GlobalConfig, PartialGlobalConfig }; diff --git a/dpts-cli/src/label.rs b/progress-pile-cli/src/label.rs similarity index 100% rename from dpts-cli/src/label.rs rename to progress-pile-cli/src/label.rs diff --git a/dpts-cli/src/main.rs b/progress-pile-cli/src/main.rs similarity index 95% rename from dpts-cli/src/main.rs rename to progress-pile-cli/src/main.rs index b8ac6a6..210ccb5 100644 --- a/dpts-cli/src/main.rs +++ b/progress-pile-cli/src/main.rs @@ -3,7 +3,7 @@ mod init; mod record; mod user; -pub use dpts_client::error; +pub use progress_pile_client::error; //use label::LabelArgs; diff --git a/dpts-cli/src/record.rs b/progress-pile-cli/src/record.rs similarity index 100% rename from dpts-cli/src/record.rs rename to progress-pile-cli/src/record.rs diff --git a/dpts-cli/src/user.rs b/progress-pile-cli/src/user.rs similarity index 95% rename from dpts-cli/src/user.rs rename to progress-pile-cli/src/user.rs index 18fefe1..55e68cd 100644 --- a/dpts-cli/src/user.rs +++ b/progress-pile-cli/src/user.rs @@ -1,6 +1,6 @@ use clap::{Args, Subcommand}; use crate::error::Error; -use dpts_client::config::Config; +use progress_pile_client::config::Config; #[derive(Args, Clone, Debug)] diff --git a/dpts-client/Cargo.toml b/progress-pile-client/Cargo.toml similarity index 82% rename from dpts-client/Cargo.toml rename to progress-pile-client/Cargo.toml index 9e7099f..69a222c 100644 --- a/dpts-client/Cargo.toml +++ b/progress-pile-client/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "dpts-client" +name = "progress-pile-client" version = "0.1.0" edition = "2024" @@ -11,7 +11,7 @@ clap = ["dep:clap"] chrono-tz.workspace = true clap = { workspace = true, optional = true } dirs.workspace = true -dpts-core.workspace = true +progress-pile-core.workspace = true serde.workspace = true thiserror.workspace = true tokio.workspace = true diff --git a/dpts-client/src/auth.rs b/progress-pile-client/src/auth.rs similarity index 100% rename from dpts-client/src/auth.rs rename to progress-pile-client/src/auth.rs diff --git a/dpts-client/src/config/mod.rs b/progress-pile-client/src/config/mod.rs similarity index 99% rename from dpts-client/src/config/mod.rs rename to progress-pile-client/src/config/mod.rs index 50aef53..353e980 100644 --- a/dpts-client/src/config/mod.rs +++ b/progress-pile-client/src/config/mod.rs @@ -2,7 +2,7 @@ mod storage; use std::{fmt::{Display, Formatter}, path::{Path, PathBuf}, str::FromStr}; -pub use dpts_core::config::*; +pub use progress_pile_core::config::*; pub use storage::*; use crate::error::Error; diff --git a/dpts-client/src/config/storage/mod.rs b/progress-pile-client/src/config/storage/mod.rs similarity index 100% rename from dpts-client/src/config/storage/mod.rs rename to progress-pile-client/src/config/storage/mod.rs diff --git a/dpts-client/src/config/storage/remote.rs b/progress-pile-client/src/config/storage/remote.rs similarity index 100% rename from dpts-client/src/config/storage/remote.rs rename to progress-pile-client/src/config/storage/remote.rs diff --git a/progress-pile-client/src/lib.rs b/progress-pile-client/src/lib.rs new file mode 100644 index 0000000..971fd0a --- /dev/null +++ b/progress-pile-client/src/lib.rs @@ -0,0 +1,7 @@ +pub mod auth; +pub mod config; + +pub use progress_pile_core::error; + + + diff --git a/dpts-core/Cargo.toml b/progress-pile-core/Cargo.toml similarity index 86% rename from dpts-core/Cargo.toml rename to progress-pile-core/Cargo.toml index e33fe51..81a0e89 100644 --- a/dpts-core/Cargo.toml +++ b/progress-pile-core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "dpts-core" +name = "progress-pile-core" version.workspace = true edition.workspace = true license.workspace = true @@ -18,7 +18,7 @@ clap = { workspace = true, optional = true } csv = "1.3.1" cynic = "3.10.0" dotenv = {workspace = true} -dpts-migration = { workspace = true } +progress-pile-server-migration = { workspace = true } iana-time-zone = "0.1.63" log = "0.4.27" sea-orm.workspace = true diff --git a/dpts-core/src/config/database.rs b/progress-pile-core/src/config/database.rs similarity index 100% rename from dpts-core/src/config/database.rs rename to progress-pile-core/src/config/database.rs diff --git a/dpts-core/src/config/global.rs b/progress-pile-core/src/config/global.rs similarity index 100% rename from dpts-core/src/config/global.rs rename to progress-pile-core/src/config/global.rs diff --git a/dpts-core/src/config/mod.rs b/progress-pile-core/src/config/mod.rs similarity index 100% rename from dpts-core/src/config/mod.rs rename to progress-pile-core/src/config/mod.rs diff --git a/dpts-core/src/csv/mod.rs b/progress-pile-core/src/csv/mod.rs similarity index 100% rename from dpts-core/src/csv/mod.rs rename to progress-pile-core/src/csv/mod.rs diff --git a/dpts-core/src/csv/reader.rs b/progress-pile-core/src/csv/reader.rs similarity index 100% rename from dpts-core/src/csv/reader.rs rename to progress-pile-core/src/csv/reader.rs diff --git a/dpts-core/src/csv/record.rs b/progress-pile-core/src/csv/record.rs similarity index 100% rename from dpts-core/src/csv/record.rs rename to progress-pile-core/src/csv/record.rs diff --git a/dpts-core/src/csv/table.rs b/progress-pile-core/src/csv/table.rs similarity index 100% rename from dpts-core/src/csv/table.rs rename to progress-pile-core/src/csv/table.rs diff --git a/dpts-core/src/csv/writer.rs b/progress-pile-core/src/csv/writer.rs similarity index 100% rename from dpts-core/src/csv/writer.rs rename to progress-pile-core/src/csv/writer.rs diff --git a/dpts-core/src/database_connection.rs b/progress-pile-core/src/database_connection.rs similarity index 97% rename from dpts-core/src/database_connection.rs rename to progress-pile-core/src/database_connection.rs index 283f751..90bf99b 100644 --- a/dpts-core/src/database_connection.rs +++ b/progress-pile-core/src/database_connection.rs @@ -4,7 +4,7 @@ use crate::config::{ }; use std::time::Duration; use sea_orm::{entity::*, query::*, ConnectOptions, Database, DatabaseConnection}; -use dpts_migration::{Migrator, MigratorTrait}; +use progress_pile_server_migration::{Migrator, MigratorTrait}; use tokio::sync::OnceCell; @@ -71,7 +71,7 @@ mod tests { use std::time::Duration; use chrono::{offset, FixedOffset, Local, TimeZone}; use sea_orm::{entity::*, query::*, ConnectOptions, Database}; - use dpts_migration::{Migrator, MigratorTrait}; + use progress_pile_server_migration::{Migrator, MigratorTrait}; use crate::entity::*; #[tokio::test] diff --git a/dpts-core/src/entity/mod.rs b/progress-pile-core/src/entity/mod.rs similarity index 100% rename from dpts-core/src/entity/mod.rs rename to progress-pile-core/src/entity/mod.rs diff --git a/dpts-core/src/entity/record_detail.rs b/progress-pile-core/src/entity/record_detail.rs similarity index 100% rename from dpts-core/src/entity/record_detail.rs rename to progress-pile-core/src/entity/record_detail.rs diff --git a/dpts-core/src/entity/record_header.rs b/progress-pile-core/src/entity/record_header.rs similarity index 100% rename from dpts-core/src/entity/record_header.rs rename to progress-pile-core/src/entity/record_header.rs diff --git a/dpts-core/src/entity/record_tag.rs b/progress-pile-core/src/entity/record_tag.rs similarity index 100% rename from dpts-core/src/entity/record_tag.rs rename to progress-pile-core/src/entity/record_tag.rs diff --git a/dpts-core/src/entity/user.rs b/progress-pile-core/src/entity/user.rs similarity index 100% rename from dpts-core/src/entity/user.rs rename to progress-pile-core/src/entity/user.rs diff --git a/dpts-core/src/error.rs b/progress-pile-core/src/error.rs similarity index 100% rename from dpts-core/src/error.rs rename to progress-pile-core/src/error.rs diff --git a/dpts-core/src/graphql/mod.rs b/progress-pile-core/src/graphql/mod.rs similarity index 100% rename from dpts-core/src/graphql/mod.rs rename to progress-pile-core/src/graphql/mod.rs diff --git a/dpts-core/src/graphql/record_detail.rs b/progress-pile-core/src/graphql/record_detail.rs similarity index 100% rename from dpts-core/src/graphql/record_detail.rs rename to progress-pile-core/src/graphql/record_detail.rs diff --git a/dpts-core/src/graphql/record_header.rs b/progress-pile-core/src/graphql/record_header.rs similarity index 100% rename from dpts-core/src/graphql/record_header.rs rename to progress-pile-core/src/graphql/record_header.rs diff --git a/dpts-core/src/graphql/record_tag.rs b/progress-pile-core/src/graphql/record_tag.rs similarity index 100% rename from dpts-core/src/graphql/record_tag.rs rename to progress-pile-core/src/graphql/record_tag.rs diff --git a/dpts-core/src/graphql/user.rs b/progress-pile-core/src/graphql/user.rs similarity index 100% rename from dpts-core/src/graphql/user.rs rename to progress-pile-core/src/graphql/user.rs diff --git a/dpts-core/src/lib.rs b/progress-pile-core/src/lib.rs similarity index 100% rename from dpts-core/src/lib.rs rename to progress-pile-core/src/lib.rs diff --git a/dpts-migration/Cargo.toml b/progress-pile-server-migration/Cargo.toml similarity index 78% rename from dpts-migration/Cargo.toml rename to progress-pile-server-migration/Cargo.toml index dcf4381..fbd912f 100644 --- a/dpts-migration/Cargo.toml +++ b/progress-pile-server-migration/Cargo.toml @@ -1,13 +1,9 @@ [package] -name = "dpts-migration" +name = "progress-pile-server-migration" version = "0.1.0" edition = "2021" publish = false -[lib] -name = "dpts_migration" -path = "src/lib.rs" - [dependencies] async-std = { version = "1", features = ["attributes", "tokio1"] } diff --git a/dpts-migration/README.md b/progress-pile-server-migration/README.md similarity index 100% rename from dpts-migration/README.md rename to progress-pile-server-migration/README.md diff --git a/dpts-migration/src/lib.rs b/progress-pile-server-migration/src/lib.rs similarity index 100% rename from dpts-migration/src/lib.rs rename to progress-pile-server-migration/src/lib.rs diff --git a/dpts-migration/src/m20220101_000001_create_table.rs b/progress-pile-server-migration/src/m20220101_000001_create_table.rs similarity index 100% rename from dpts-migration/src/m20220101_000001_create_table.rs rename to progress-pile-server-migration/src/m20220101_000001_create_table.rs diff --git a/dpts-migration/src/main.rs b/progress-pile-server-migration/src/main.rs similarity index 53% rename from dpts-migration/src/main.rs rename to progress-pile-server-migration/src/main.rs index 6a2a1cc..52340a8 100644 --- a/dpts-migration/src/main.rs +++ b/progress-pile-server-migration/src/main.rs @@ -2,5 +2,5 @@ use sea_orm_migration::prelude::*; #[async_std::main] async fn main() { - cli::run_cli(dpts_migration::Migrator).await; + cli::run_cli(progress_pile_server_migration::Migrator).await; } diff --git a/dpts-server/Cargo.toml b/progress-pile-server/Cargo.toml similarity index 85% rename from dpts-server/Cargo.toml rename to progress-pile-server/Cargo.toml index e652f23..ba6c468 100644 --- a/dpts-server/Cargo.toml +++ b/progress-pile-server/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "dpts-server" +name = "progress-pile-server" version.workspace = true license.workspace = true edition.workspace = true @@ -10,7 +10,7 @@ argon2 = "0.5.3" async-graphql.workspace = true axum = "0.8.4" clap = {workspace = true, features = ["derive"]} -dpts-core = {workspace = true} +progress-pile-core = {workspace = true} chrono = {workspace = true} serde.workspace = true thiserror.workspace = true diff --git a/dpts-server/src/args.rs b/progress-pile-server/src/args.rs similarity index 94% rename from dpts-server/src/args.rs rename to progress-pile-server/src/args.rs index 617bb28..a33bbc7 100644 --- a/dpts-server/src/args.rs +++ b/progress-pile-server/src/args.rs @@ -1,6 +1,6 @@ use crate::config::PartialServerConfig; use clap::Parser; -use dpts_core::config::{ +use progress_pile_core::config::{ PartialDatabaseConfig, PartialGlobalConfig, }; diff --git a/dpts-server/src/auth.rs b/progress-pile-server/src/auth.rs similarity index 100% rename from dpts-server/src/auth.rs rename to progress-pile-server/src/auth.rs diff --git a/dpts-server/src/config.rs b/progress-pile-server/src/config.rs similarity index 99% rename from dpts-server/src/config.rs rename to progress-pile-server/src/config.rs index 4537fb6..0e2c3a9 100644 --- a/dpts-server/src/config.rs +++ b/progress-pile-server/src/config.rs @@ -1,6 +1,6 @@ use crate::error::Error; -use dpts_core::config::{ +use progress_pile_core::config::{ DatabaseConfig, GlobalConfig, PartialDatabaseConfig }; use serde::Deserialize; diff --git a/dpts-server/src/error.rs b/progress-pile-server/src/error.rs similarity index 100% rename from dpts-server/src/error.rs rename to progress-pile-server/src/error.rs diff --git a/dpts-server/src/graphql/mod.rs b/progress-pile-server/src/graphql/mod.rs similarity index 91% rename from dpts-server/src/graphql/mod.rs rename to progress-pile-server/src/graphql/mod.rs index aa70971..d930f87 100644 --- a/dpts-server/src/graphql/mod.rs +++ b/progress-pile-server/src/graphql/mod.rs @@ -1,7 +1,7 @@ mod mutation; mod query; -pub use dpts_core::graphql::*; +pub use progress_pile_core::graphql::*; pub use mutation::Mutation; pub use query::Query; diff --git a/dpts-server/src/graphql/mutation.rs b/progress-pile-server/src/graphql/mutation.rs similarity index 89% rename from dpts-server/src/graphql/mutation.rs rename to progress-pile-server/src/graphql/mutation.rs index 3d0b780..12f1d04 100644 --- a/dpts-server/src/graphql/mutation.rs +++ b/progress-pile-server/src/graphql/mutation.rs @@ -1,5 +1,5 @@ use async_graphql::*; -use dpts_core::entity::UserModel; +use progress_pile_core::entity::UserModel; use crate::{auth::try_hash_password, entity::UserActiveModel}; diff --git a/dpts-server/src/graphql/query.rs b/progress-pile-server/src/graphql/query.rs similarity index 100% rename from dpts-server/src/graphql/query.rs rename to progress-pile-server/src/graphql/query.rs diff --git a/dpts-server/src/lib.rs b/progress-pile-server/src/lib.rs similarity index 89% rename from dpts-server/src/lib.rs rename to progress-pile-server/src/lib.rs index 9380797..f030772 100644 --- a/dpts-server/src/lib.rs +++ b/progress-pile-server/src/lib.rs @@ -12,7 +12,7 @@ use async_graphql_axum::{ }; use axum::{routing::get, Router}; use crate::graphql::build_service; -use dpts_core::entity as entity; +use progress_pile_core::entity as entity; pub fn build_app() -> Router { diff --git a/dpts-server/src/main.rs b/progress-pile-server/src/main.rs similarity index 89% rename from dpts-server/src/main.rs rename to progress-pile-server/src/main.rs index e20b32d..cac95da 100644 --- a/dpts-server/src/main.rs +++ b/progress-pile-server/src/main.rs @@ -1,7 +1,7 @@ use async_graphql::{http::{playground_source, GraphQLPlaygroundConfig}, *}; use async_graphql_axum::GraphQL; -use dpts_server::{build_app, Args}; +use progress_pile_server::{build_app, Args}; use axum::{response::{Html, IntoResponse}, routing::get, Router}; use clap::Parser;