chore: rename corex-* crates to mytheclipse-* namespace
CI / Rustfmt (push) Canceled after 0s
CI / Clippy (push) Canceled after 0s
CI / Test (workspace all features) (push) Canceled after 0s
CI / Test (workspace default features) (push) Canceled after 0s
CI / Test (mytheclipse / bg only) (push) Canceled after 0s
CI / Test (mytheclipse / compute only) (push) Canceled after 0s
CI / Test (mytheclipse / io only) (push) Canceled after 0s
CI / Test (mytheclipse / lifecycle only) (push) Canceled after 0s
CI / Test (mytheclipse / observability only) (push) Canceled after 0s
CI / Test (mytheclipse / resiliency only) (push) Canceled after 0s
CI / Test (mytheclipse / traffic only) (push) Canceled after 0s
CI / Test (mytheclipse-cache / l2-redis) (push) Canceled after 0s
CI / Test (mytheclipse-cache / l1-moka) (push) Canceled after 0s
CI / Test (mytheclipse-cache / default) (push) Canceled after 0s
CI / Test (mytheclipse-config / default) (push) Canceled after 0s
CI / Test (mytheclipse-crypto / default) (push) Canceled after 0s
CI / Test (mytheclipse-event / amqp) (push) Canceled after 0s
CI / Test (mytheclipse-event / nats) (push) Canceled after 0s
CI / Test (mytheclipse-event / default (mem)) (push) Canceled after 0s
CI / Test (mytheclipse-storage / gcs) (push) Canceled after 0s
CI / Test (mytheclipse-storage / s3) (push) Canceled after 0s
CI / Test (mytheclipse-storage / default (local)) (push) Canceled after 0s
CI / Run mytheclipse example (push) Canceled after 0s
CI / Docs check (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse) (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse-cache) (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse-config) (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse-crypto) (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse-event) (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse-storage) (push) Canceled after 0s
Release / Semantic Release (push) Canceled after 0s
CI / Rustfmt (push) Canceled after 0s
CI / Clippy (push) Canceled after 0s
CI / Test (workspace all features) (push) Canceled after 0s
CI / Test (workspace default features) (push) Canceled after 0s
CI / Test (mytheclipse / bg only) (push) Canceled after 0s
CI / Test (mytheclipse / compute only) (push) Canceled after 0s
CI / Test (mytheclipse / io only) (push) Canceled after 0s
CI / Test (mytheclipse / lifecycle only) (push) Canceled after 0s
CI / Test (mytheclipse / observability only) (push) Canceled after 0s
CI / Test (mytheclipse / resiliency only) (push) Canceled after 0s
CI / Test (mytheclipse / traffic only) (push) Canceled after 0s
CI / Test (mytheclipse-cache / l2-redis) (push) Canceled after 0s
CI / Test (mytheclipse-cache / l1-moka) (push) Canceled after 0s
CI / Test (mytheclipse-cache / default) (push) Canceled after 0s
CI / Test (mytheclipse-config / default) (push) Canceled after 0s
CI / Test (mytheclipse-crypto / default) (push) Canceled after 0s
CI / Test (mytheclipse-event / amqp) (push) Canceled after 0s
CI / Test (mytheclipse-event / nats) (push) Canceled after 0s
CI / Test (mytheclipse-event / default (mem)) (push) Canceled after 0s
CI / Test (mytheclipse-storage / gcs) (push) Canceled after 0s
CI / Test (mytheclipse-storage / s3) (push) Canceled after 0s
CI / Test (mytheclipse-storage / default (local)) (push) Canceled after 0s
CI / Run mytheclipse example (push) Canceled after 0s
CI / Docs check (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse) (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse-cache) (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse-config) (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse-crypto) (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse-event) (push) Canceled after 0s
CI / Cargo package dry-run (mytheclipse-storage) (push) Canceled after 0s
Release / Semantic Release (push) Canceled after 0s
Rename all `corex-cache`, `corex-storage`, `corex-event`, `corex-config`, and `corex-crypto` crates to `mytheclipse-cache`, `mytheclipse-storage`, `mytheclipse-event`, `mytheclipse-config`, and `mytheclipse-crypto` respectively, aligning with the `mytheclipse` root crate naming convention. - Convert root `Cargo.toml` from a package manifest to a workspace manifest with explicit member paths - Update crate names in each `Cargo.toml` and docs.rs URLs - Update all import paths, module doc comments, and error/panic messages from `corex-*` to `mytheclipse-*` across source and README files - Update CI workflow and publish script to reference the new crate names<tool_call></think>chore: rename corex-* crates to mytheclipse-* namespace Rename all `corex-cache`, `corex-storage`, `corex-event`, `corex-config`, and `corex-crypto` crates to `mytheclipse-cache`, `mytheclipse-storage`, `mytheclipse-event`, `mytheclipse-config`, and `mytheclipse-crypto` respectively, aligning with the `mytheclipse` root crate naming convention. - Convert root `Cargo.toml` from a package manifest to a workspace manifest with explicit member paths - Update crate names in each `Cargo.toml` and docs.rs URLs - Update all import paths, module doc comments, and error/panic messages from `corex-*` to `mytheclipse-*` across source and README files - Update CI workflow and publish script to reference the new crate names
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "corex-config"
|
||||
name = "mytheclipse-config"
|
||||
version = "1.2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.75"
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/asepharyana/mytheclipse"
|
||||
homepage = "https://github.com/asepharyana/mytheclipse"
|
||||
documentation = "https://docs.rs/corex-config"
|
||||
documentation = "https://docs.rs/mytheclipse-config"
|
||||
authors = ["asepharyana <superaseph@gmail.com>"]
|
||||
description = "Type-safe, dynamic configuration engine: load .env/YAML/JSON/TOML into typed structs with hot-reload and validation."
|
||||
readme = "README.md"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# corex-config
|
||||
# mytheclipse-config
|
||||
|
||||
Type-safe, dynamic configuration: load `.env`, YAML, JSON, or TOML directly
|
||||
into a typed Rust struct, merge multiple sources with environment variables
|
||||
@@ -14,7 +14,7 @@ taking priority, and optionally hot-reload when the source files change.
|
||||
|
||||
```rust
|
||||
use serde::Deserialize;
|
||||
use corex_config::ConfigLoader;
|
||||
use mytheclipse_config::ConfigLoader;
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
struct AppConfig {
|
||||
@@ -31,13 +31,13 @@ let config: AppConfig = ConfigLoader::new()
|
||||
### Hot-reload
|
||||
|
||||
```rust
|
||||
use corex_config::DynamicConfig;
|
||||
use mytheclipse_config::DynamicConfig;
|
||||
# use serde::Deserialize;
|
||||
# #[derive(Debug, Deserialize, Clone)] struct AppConfig { port: u16 }
|
||||
|
||||
let cfg = DynamicConfig::<AppConfig>::watch_files(
|
||||
vec!["config.yaml".into()],
|
||||
|| corex_config::ConfigLoader::new().merge_file("config.yaml".as_ref())?.build(),
|
||||
|| mytheclipse_config::ConfigLoader::new().merge_file("config.yaml".as_ref())?.build(),
|
||||
)?;
|
||||
|
||||
let mut changes = cfg.subscribe();
|
||||
|
||||
@@ -43,13 +43,13 @@ impl<T: Config + Clone> DynamicConfig<T> {
|
||||
pub fn get(&self) -> T {
|
||||
self.inner
|
||||
.read()
|
||||
.expect("corex-config: RwLock poisoned")
|
||||
.expect("mytheclipse-config: RwLock poisoned")
|
||||
.clone()
|
||||
}
|
||||
|
||||
/// Replaces the current value and notifies subscribers.
|
||||
pub fn set(&self, new: T) {
|
||||
*self.inner.write().expect("corex-config: RwLock poisoned") = new;
|
||||
*self.inner.write().expect("mytheclipse-config: RwLock poisoned") = new;
|
||||
let _ = self.tx.send(());
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ impl<T: Config + Clone> DynamicConfig<T> {
|
||||
}
|
||||
|
||||
std::thread::Builder::new()
|
||||
.name("corex-config-watch".into())
|
||||
.name("mytheclipse-config-watch".into())
|
||||
.spawn(move || {
|
||||
// Keep the watcher alive for the life of this thread.
|
||||
let _watcher = watcher;
|
||||
@@ -115,12 +115,12 @@ impl<T: Config + Clone> DynamicConfig<T> {
|
||||
}
|
||||
match reload() {
|
||||
Ok(new) => {
|
||||
*inner.write().expect("corex-config: RwLock poisoned") = new;
|
||||
*inner.write().expect("mytheclipse-config: RwLock poisoned") = new;
|
||||
let _ = tx.send(());
|
||||
last_applied = Instant::now();
|
||||
}
|
||||
Err(e) => {
|
||||
tracing::error!("corex-config: hot-reload failed: {e}");
|
||||
tracing::error!("mytheclipse-config: hot-reload failed: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Shared error type for corex-config.
|
||||
//! Shared error type for mytheclipse-config.
|
||||
|
||||
/// Errors surfaced while loading or reloading configuration.
|
||||
#[non_exhaustive]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! # corex-config
|
||||
//! # mytheclipse-config
|
||||
//!
|
||||
//! A type-safe, dynamic configuration engine: load environment variables,
|
||||
//! `.env` files, YAML, JSON, or TOML directly into a typed Rust struct, with
|
||||
@@ -14,7 +14,7 @@
|
||||
//!
|
||||
//! ```no_run
|
||||
//! use serde::Deserialize;
|
||||
//! use corex_config::ConfigLoader;
|
||||
//! use mytheclipse_config::ConfigLoader;
|
||||
//!
|
||||
//! #[derive(Debug, Deserialize, Clone)]
|
||||
//! struct AppConfig {
|
||||
|
||||
Reference in New Issue
Block a user